diff options
author | Stefan Agner <stefan@agner.ch> | 2016-09-04 13:25:55 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-08 00:32:43 +0100 |
commit | a477fcd75249f5ec06e16973a31dac663fbaf356 (patch) | |
tree | f4c1b3865331b6c7cb6172ccf217434170a7de7b /meta/recipes-core | |
parent | b4f2c760aa4e9a92d5ce829136b60ab0ebed186c (diff) | |
download | poky-a477fcd75249f5ec06e16973a31dac663fbaf356.tar.gz |
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.
(From OE-Core rev: 82de49b899bca915259ea7ea149f50e1401c2426)
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/busybox/files/inittab | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/recipes-core/busybox/files/inittab b/meta/recipes-core/busybox/files/inittab index bfec4a7743..2bc831c7c6 100644 --- a/meta/recipes-core/busybox/files/inittab +++ b/meta/recipes-core/busybox/files/inittab | |||
@@ -1,13 +1,13 @@ | |||
1 | # This is run first except when booting in single-user mode. | 1 | # This is run first except when booting in single-user mode. |
2 | 2 | ||
3 | # Startup the system | 3 | # Startup the system |
4 | null::sysinit:/bin/mount -t proc proc /proc | 4 | ::sysinit:/bin/mount -t proc proc /proc |
5 | null::sysinit:/bin/mount -t sysfs sysfs /sys | 5 | ::sysinit:/bin/mount -t sysfs sysfs /sys |
6 | null::sysinit:/bin/mount -t devtmpfs devtmpfs /dev | 6 | ::sysinit:/bin/mount -t devtmpfs devtmpfs /dev |
7 | null::sysinit:/bin/mount -o remount,rw / | 7 | ::sysinit:/bin/mount -o remount,rw / |
8 | null::sysinit:/bin/mkdir -p /dev/pts | 8 | ::sysinit:/bin/mkdir -p /dev/pts |
9 | null::sysinit:/bin/mount -t devpts devpts /dev/pts | 9 | ::sysinit:/bin/mount -t devpts devpts /dev/pts |
10 | null::sysinit:/bin/mount -a | 10 | ::sysinit:/bin/mount -a |
11 | 11 | ||
12 | ::sysinit:/etc/init.d/rcS | 12 | ::sysinit:/etc/init.d/rcS |
13 | 13 | ||