فهرست منبع

Implement mdev logging output on demand

@upstream
dir 7 سال پیش
والد
کامیت
6ffa4d4338
3فایلهای تغییر یافته به همراه13 افزوده شده و 0 حذف شده
  1. 8 0
      package/base-files/Makefile
  2. 1 0
      package/base-files/files/rcdev.mdev
  3. 4 0
      target/config/Config.in.runtime

+ 8 - 0
package/base-files/Makefile

@@ -21,6 +21,12 @@ CONFIG_STYLE:=		manual
 BUILD_STYLE:=		manual
 INSTALL_STYLE:=		manual
 
+ifeq ($(ADK_RUNTIME_DEV_MDEV_LOGGING),y)
+ADK_RUNTIME_DEV_MDEV_LOGGING_LINE:='echo >/dev/mdev.log'
+else
+ADK_RUNTIME_DEV_MDEV_LOGGING_LINE:=''
+endif
+
 do-install:
 	$(CP) ./src/* $(IDIR_BASE_FILES)
 	mkdir -p $(IDIR_BASE_FILES)/{etc,dev,boot,root,sys,proc,tmp,run,var,mnt,media}
@@ -55,9 +61,11 @@ endif
 endif
 ifeq ($(ADK_RUNTIME_DEV_MDEV),y)
 	$(CP) ./files/rcdev.mdev $(IDIR_BASE_FILES)/etc/init.d/rcdev
+	$(SED) "s#@ADK_RUNTIME_DEV_MDEV_LOGGING@#"$(ADK_RUNTIME_DEV_MDEV_LOGGING_LINE)"#g" $(IDIR_BASE_FILES)/etc/init.d/rcdev
 	$(CP) ./files/mdev.conf $(IDIR_BASE_FILES)/etc
 	$(CP) ./files/mdev $(IDIR_BASE_FILES)/etc
 endif
+
 ifeq ($(ADK_RUNTIME_DEV_UDEV),y)
 	$(CP) ./files/rcdev.udev $(IDIR_BASE_FILES)/etc/init.d/rcdev
 endif

+ 1 - 0
package/base-files/files/rcdev.mdev

@@ -2,6 +2,7 @@
 mount -o remount,nosuid,size=128k,mode=0755 -t tmpfs mdev /dev
 # start mdev dynamic device node management
 echo >/dev/mdev.seq
+@ADK_RUNTIME_DEV_MDEV_LOGGING@
 if [ -f /proc/sys/kernel/hotplug ];then
 	echo "/sbin/mdev" >/proc/sys/kernel/hotplug
 fi

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

@@ -64,6 +64,10 @@ config ADK_RUNTIME_DEV_MDEV
 	depends on ADK_PACKAGE_BUSYBOX
 	depends on !ADK_RUNTIME_INIT_SYSTEMD
 
+config ADK_RUNTIME_DEV_MDEV_LOGGING
+	bool "Log mdev events into /dev/mdev.log"
+	depends on ADK_RUNTIME_DEV_MDEV
+
 config ADK_RUNTIME_DEV_UDEV
 	bool "Use udev"
 	select ADK_PACKAGE_UDEV