diff options
author | Mike Looijmans <mike.looijmans@topic.nl> | 2015-10-20 08:43:47 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-24 12:19:36 +0100 |
commit | a1cfb8a2691ed36700c96cbc1a0e744494294d2b (patch) | |
tree | 4f9b431143632084658f30e75c2a471e808d910e /meta/recipes-core | |
parent | 5ed4332eeb96beff53242942a1eb878ab4831847 (diff) | |
download | openembedded-core-a1cfb8a2691ed36700c96cbc1a0e744494294d2b.tar.gz openembedded-core-a1cfb8a2691ed36700c96cbc1a0e744494294d2b.tar.bz2 openembedded-core-a1cfb8a2691ed36700c96cbc1a0e744494294d2b.zip |
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 <mike.looijmans@topic.nl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh index 0cfe76e230..0a52c90dac 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 |