Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] fs/cpio: make initramfs init script survive 'console=' kernel argument
Date: Sat, 25 Apr 2020 14:08:25 +0200	[thread overview]
Message-ID: <20200425120825.GP5035@scaer> (raw)
In-Reply-To: <80e3e080-0af3-99de-ff8f-9de5e3dca8a6@exertus.fi>

Timo, All,

On 2019-09-23 10:58 +0000, Timo Ketola spake thusly:
> 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>

I've applied to master, after extending the commit log with all the gory
details explaininng why we can indeed safely remove those redisrections
now.

Thank you for the patience on this patch.

Thanks also to Peter for helping on IRC about this research.

Regards,
Yann E. MORIN.

> ---
>  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
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  parent reply	other threads:[~2020-04-25 12:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-05-08  9:52   ` Peter Korsgaard
2020-08-20 16:42   ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200425120825.GP5035@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox