Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] fs/cpio: make initramfs init script survive 'console=' kernel argument
@ 2019-09-23 10:58 Timo Ketola
  2019-09-23 13:10 ` Peter Korsgaard
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Timo Ketola @ 2019-09-23 10:58 UTC (permalink / raw)
  To: buildroot

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@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 @@
 #!/bin/sh
 # 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 "$@"
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-08-20 16:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-23 10:58 [Buildroot] [PATCH 1/1] fs/cpio: make initramfs init script survive 'console=' kernel argument Timo Ketola
2019-09-23 13:10 ` Peter Korsgaard
2019-09-23 16:55   ` Timo Ketola
     [not found]   ` <dde1b129-f7fd-a444-fbd3-f1c017a311fd@exertus.fi>
2019-09-23 17:07     ` Peter Korsgaard
2019-09-23 19:31       ` Timo Ketola
2019-09-24  5:24 ` Timo Ketola
2019-10-24 19:00 ` Timo Ketola
2020-04-25 12:08 ` Yann E. MORIN
2020-05-08  9:52   ` Peter Korsgaard
2020-08-20 16:42   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox