Explorar o código

Add option to mount debugfs at startup

@upstream
dir %!s(int64=6) %!d(string=hai) anos
pai
achega
4081694d00
Modificáronse 2 ficheiros con 10 adicións e 0 borrados
  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