[oe-commits] [openembedded-core] 05/24: busybox: avoid circular dependency when using initramfs
git at git.openembedded.org
git at git.openembedded.org
Wed Sep 7 23:37:48 UTC 2016
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 82de49b899bca915259ea7ea149f50e1401c2426
Author: Stefan Agner <stefan at agner.ch>
AuthorDate: Sun Sep 4 13:25:55 2016 -0700
busybox: avoid circular dependency when using initramfs
The kernel does not automatically mount devtmpfs when using initramfs
based booting (even when using CONFIG_DEVTMPFS_MOUNT). If the rootfs
is built with USE_DEVFS=1 (which is the default), the system ends up
with a completely empty /dev to begin with.
Busybox uses the first entry in inittab slightly different than
other init systems:
<id>: WARNING: This field has a non-traditional meaning for BusyBox init!
The id field is used by BusyBox init to specify the controlling tty for
the specified process to run on. The contents of this field are
appended to "/dev/" and used as-is.
Since /dev/null is not there yet, Busybox throws errors instead of
executing the commands, and hence never mounts devtmpfs:
init started: BusyBox v1.24.1 (2016-09-04 11:53:14 PDT)
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
Avoid this circular dependency by not specifing <id>. With that
Busybox ends up using the stdio of the init process and executes
the inittab just fine.
Signed-off-by: Stefan Agner <stefan at agner.ch>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/recipes-core/busybox/files/inittab | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/meta/recipes-core/busybox/files/inittab b/meta/recipes-core/busybox/files/inittab
index bfec4a7..2bc831c 100644
--- a/meta/recipes-core/busybox/files/inittab
+++ b/meta/recipes-core/busybox/files/inittab
@@ -1,13 +1,13 @@
# This is run first except when booting in single-user mode.
# Startup the system
-null::sysinit:/bin/mount -t proc proc /proc
-null::sysinit:/bin/mount -t sysfs sysfs /sys
-null::sysinit:/bin/mount -t devtmpfs devtmpfs /dev
-null::sysinit:/bin/mount -o remount,rw /
-null::sysinit:/bin/mkdir -p /dev/pts
-null::sysinit:/bin/mount -t devpts devpts /dev/pts
-null::sysinit:/bin/mount -a
+::sysinit:/bin/mount -t proc proc /proc
+::sysinit:/bin/mount -t sysfs sysfs /sys
+::sysinit:/bin/mount -t devtmpfs devtmpfs /dev
+::sysinit:/bin/mount -o remount,rw /
+::sysinit:/bin/mkdir -p /dev/pts
+::sysinit:/bin/mount -t devpts devpts /dev/pts
+::sysinit:/bin/mount -a
::sysinit:/etc/init.d/rcS
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list