Browse Source

Add option to mount debugfs at startup

@upstream
dir 6 years ago
parent
commit
70a42f6597
2 changed files with 10 additions and 0 deletions
  1. 4 0
      package/base-files/Makefile
  2. 6 0
      target/config/Config.in.runtime

+ 4 - 0
package/base-files/Makefile

@@ -93,6 +93,10 @@ endif
 endif
 ifeq ($(ADK_RUNTIME_INIT_SYSVINIT),y)
 	cp ./files/inittab.sysvinit $(IDIR_BASE_FILES)/etc/inittab
+endif
+ifeq ($(ADK_RUNTIME_MOUNT_DEBUGFS),y)
+	echo debugfs    /sys/kernel/debug      debugfs  defaults  0 0 >> $(IDIR_BASE_FILES)/etc/fstab
+	echo null::sysinit:/bin/mount -a -t debugfs >> $(IDIR_BASE_FILES)/etc/inittab
 endif
 	test -z $(ADK_RUNTIME_HOSTNAME) || \
 	    echo $(ADK_RUNTIME_HOSTNAME) > $(IDIR_BASE_FILES)/etc/hostname; \

+ 6 - 0
target/config/Config.in.runtime

@@ -188,6 +188,12 @@ config ADK_RUNTIME_USER_SHELL
 	help
 	  Set the shell to use.
 
+config ADK_RUNTIME_MOUNT_DEBUGFS
+	bool "mount debugfs"
+	depends on !ADK_RUNTIME_INIT_SYSTEMD
+	help
+	  mount debugfs under /sys/kernel/debug
+
 config ADK_RUNTIME_START_SERVICES
 	bool "start services by default"
 	default n