[Buildroot] [PATCH 1/1] fs/cpio: make initramfs init script survive 'console=' kernel argument

Timo Ketola Timo.Ketola at exertus.fi
Mon Sep 23 10:58:45 UTC 2019

When booting with 'console=<empty>' in the kernel command line (as e.g.
U-Boot does with silent flags in effect), opening /dev/console fails.
That is fatal in the /init script and kernel will panic. It is also
needless, because the kernel tries to open it anyway (well, as long as
we have console node in initramfs /dev; cpio.mk creates that alright).

Signed-off-by: Timo Ketola <timo.ketola at exertus.fi>
 fs/cpio/init | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/cpio/init b/fs/cpio/init
index dbe09ac..72b2401 100755
--- a/fs/cpio/init
+++ b/fs/cpio/init
@@ -1,7 +1,5 @@
 # devtmpfs does not get automounted for initramfs
 /bin/mount -t devtmpfs devtmpfs /dev
-exec 0</dev/console
-exec 1>/dev/console
-exec 2>/dev/console
 exec /sbin/init "$@"

More information about the buildroot mailing list