From: Mike Looijmans Date: Tue, 20 Oct 2015 06:43:47 +0000 (+0200) Subject: initscripts/sysfs.sh: Mount devtmpfs on /dev/ if needed X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~28551 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1cfb8a2691ed36700c96cbc1a0e744494294d2b;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git initscripts/sysfs.sh: Mount devtmpfs on /dev/ if needed When booting from an initrd disk, or when the kernel config option DEVTMPFS_MOUNT isn't provided, /dev/ will not be mounted at boot. This small addition will check if /dev/ is "useful", and if not, will mount devtmpfs if the kernel provides it. With this change, it is possible to set an initscripts style image type to "cpio.gz" and boot it as initrd. Without this change, the image won't work properly because of the missing devices. Signed-off-by: Mike Looijmans Signed-off-by: Ross Burton --- diff --git a/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh index 0cfe76e2305..0a52c90dacd 100644 --- a/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh @@ -21,3 +21,7 @@ fi if [ -e /sys/kernel/debug ] && grep -q debugfs /proc/filesystems; then mount -t debugfs debugfs /sys/kernel/debug fi + +if ! [ -e /dev/zero ] && [ -e /dev ] && grep -q devtmpfs /proc/filesystems; then + mount -n -t devtmpfs devtmpfs /dev +fi