diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2015-09-03 20:42:28 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-06 15:26:24 +0100 |
commit | 858279168379c645f82802cca896ef243915ca5e (patch) | |
tree | 519f66d04f9dc97ab3e7d7290159e54e0e633b95 /meta/recipes-core | |
parent | cc9ff1a86a3a6f921d2a2409b9ce313b870f61db (diff) | |
download | poky-858279168379c645f82802cca896ef243915ca5e.tar.gz |
initramfs-live-boot: create /dev/console
Some kernels, for example linux-yocto 3.19 for qemux86, fail to
execute /init in an initramfs unless there is already a /dev/console
char device in the initramfs. Booting then fails with:
Kernel panic - not syncing: /dev/console is missing or not a character device!
Please ensure your rootfs is properly configured
The panic itself comes from a linux-yocto specific patch to
kernel_init_freeable in init/main.c, but even without it, that
function will print an error when /dev/console is missing. The
kernel's Documentation/initrd.txt also mentions creating that device.
It remained unclear why this is not a problem on other machines. On
intel-corei7-64 from meta-intel, something (the kernel?) creates
/dev/console and /dev/[012] before transfering control to the init
script. In that case, creating /dev/console in advance is not
necessary, but does not cause any problem either.
(From OE-Core rev: 1b64664f0c388f41084f5db6e46e3e68c53fb6d9)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb index b54cb619f1..57b30254a6 100644 --- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb | |||
@@ -11,9 +11,11 @@ S = "${WORKDIR}" | |||
11 | 11 | ||
12 | do_install() { | 12 | do_install() { |
13 | install -m 0755 ${WORKDIR}/init-live.sh ${D}/init | 13 | install -m 0755 ${WORKDIR}/init-live.sh ${D}/init |
14 | install -d ${D}/dev | ||
15 | mknod -m 622 ${D}/dev/console c 5 1 | ||
14 | } | 16 | } |
15 | 17 | ||
16 | FILES_${PN} += " /init " | 18 | FILES_${PN} += " /init /dev " |
17 | 19 | ||
18 | # Due to kernel dependency | 20 | # Due to kernel dependency |
19 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 21 | PACKAGE_ARCH = "${MACHINE_ARCH}" |