* [PATCH v2] initramfs-framework: remove hard dependency with busybox [not found] <20250407164456.4845-1-gavrosc.ref@yahoo.com> @ 2025-04-07 16:44 ` Christos Gavros 2025-04-07 17:04 ` Khem Raj 0 siblings, 1 reply; 4+ messages in thread From: Christos Gavros @ 2025-04-07 16:44 UTC (permalink / raw) To: openembedded-core Cc: Christos Gavros, Yoann Congal, Randy MacLeod, jbk, Raj Khem, Adrian Freihofer In 'finish'script the Switch_root command with option -c is busybox specific. When package-core-base-utils is selected the boot is breaking with message "Switch_root: invalid option — ‘c’.It was reproduced using qemu. Remove -c option to make it compatible with both providers. It is tested using qemu with busybox and package-core-base-utils. In both cases qemu boots successfully and filesystem is accessible. Fixes [YOCTO #15716] CC: Yoann Congal <yoann.congal@smile.fr> CC: Randy MacLeod <randy.macleod@windriver.com> CC: jbk <jbk@mm-software.com> CC: Raj Khem <raj.khem@gmail.com> CC: Adrian Freihofer <adrian.freihofer@gmail.com> Signed-off-by: Christos Gavros <gavrosc@yahoo.com> --- v1->v2 * the commit message is extended with more info --- meta/recipes-core/initrdscripts/initramfs-framework/finish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/finish b/meta/recipes-core/initrdscripts/initramfs-framework/finish index ac0de9f996..716c2f44af 100755 --- a/meta/recipes-core/initrdscripts/initramfs-framework/finish +++ b/meta/recipes-core/initrdscripts/initramfs-framework/finish @@ -41,7 +41,7 @@ finish_run() { mount --move /sys $ROOTFS_DIR/sys cd $ROOTFS_DIR - exec switch_root -c /dev/console $ROOTFS_DIR ${bootparam_init:-/sbin/init} + exec switch_root $ROOTFS_DIR ${bootparam_init:-/sbin/init} else debug "No rootfs has been set" fi -- 2.34.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] initramfs-framework: remove hard dependency with busybox 2025-04-07 16:44 ` [PATCH v2] initramfs-framework: remove hard dependency with busybox Christos Gavros @ 2025-04-07 17:04 ` Khem Raj 2025-04-08 0:19 ` Randy MacLeod 0 siblings, 1 reply; 4+ messages in thread From: Khem Raj @ 2025-04-07 17:04 UTC (permalink / raw) To: Christos Gavros Cc: openembedded-core, Yoann Congal, Randy MacLeod, jbk, Adrian Freihofer On Mon, Apr 7, 2025 at 9:45 AM Christos Gavros <gavrosc@yahoo.com> wrote: > > In 'finish'script the Switch_root command with option -c is busybox specific. > When package-core-base-utils is selected the boot is breaking with message > "Switch_root: invalid option — ‘c’.It was reproduced using qemu. > Remove -c option to make it compatible with both providers. > It is tested using qemu with busybox and package-core-base-utils. In both cases > qemu boots successfully and filesystem is accessible. > Fixes [YOCTO #15716] > Looks good > CC: Yoann Congal <yoann.congal@smile.fr> > CC: Randy MacLeod <randy.macleod@windriver.com> > CC: jbk <jbk@mm-software.com> > CC: Raj Khem <raj.khem@gmail.com> > CC: Adrian Freihofer <adrian.freihofer@gmail.com> > Signed-off-by: Christos Gavros <gavrosc@yahoo.com> > --- > v1->v2 > * the commit message is extended with more info > --- > meta/recipes-core/initrdscripts/initramfs-framework/finish | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/finish b/meta/recipes-core/initrdscripts/initramfs-framework/finish > index ac0de9f996..716c2f44af 100755 > --- a/meta/recipes-core/initrdscripts/initramfs-framework/finish > +++ b/meta/recipes-core/initrdscripts/initramfs-framework/finish > @@ -41,7 +41,7 @@ finish_run() { > mount --move /sys $ROOTFS_DIR/sys > > cd $ROOTFS_DIR > - exec switch_root -c /dev/console $ROOTFS_DIR ${bootparam_init:-/sbin/init} > + exec switch_root $ROOTFS_DIR ${bootparam_init:-/sbin/init} > else > debug "No rootfs has been set" > fi > -- > 2.34.1 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] initramfs-framework: remove hard dependency with busybox 2025-04-07 17:04 ` Khem Raj @ 2025-04-08 0:19 ` Randy MacLeod 2025-04-08 1:34 ` Kevin Hao 0 siblings, 1 reply; 4+ messages in thread From: Randy MacLeod @ 2025-04-08 0:19 UTC (permalink / raw) To: Khem Raj, Christos Gavros, Hao, Kexin Cc: openembedded-core, Yoann Congal, jbk, Adrian Freihofer [-- Attachment #1: Type: text/plain, Size: 2902 bytes --] On 2025-04-07 1:04 p.m., Khem Raj wrote: > On Mon, Apr 7, 2025 at 9:45 AM Christos Gavros<gavrosc@yahoo.com> wrote: >> In 'finish'script the Switch_root command with option -c is busybox specific. >> When package-core-base-utils is selected the boot is breaking with message >> "Switch_root: invalid option — ‘c’.It was reproduced using qemu. >> Remove -c option to make it compatible with both providers. >> It is tested using qemu with busybox and package-core-base-utils. In both cases >> qemu boots successfully and filesystem is accessible. >> Fixes [YOCTO #15716] >> > Looks good Probably, and it's a small change, but : 1. Usually the busybox version has fewer features but here util-linux doesn't have the option, which is a bit odd. I also checked the git repo/master branch and it hasn't been added. Note that toybox, a BSD-Zero licensed, re-implementation of busybox *does* have the -c option. I wonder if anyone has asked util-linux if they'd like that feature for embedded boards... No sign of that as PR or issue: https://github.com/util-linux/util-linux/pulls?q=is%3Apr++switch_root https://github.com/util-linux/util-linux/issues?q=is%3Aissue%20switch_root and 2. More importantly, embedded folks are often emotionally attached to there serial lines/ console for doing BSP development and low-level debug work. CCing Kexin who will hopefully comment on whether he and the WR team would care if we drop the console specification. If not, then I have no objection since one can easily enable the -c option when debugging and then ship without it. ../Randy > >> CC: Yoann Congal<yoann.congal@smile.fr> >> CC: Randy MacLeod<randy.macleod@windriver.com> >> CC: jbk<jbk@mm-software.com> >> CC: Raj Khem<raj.khem@gmail.com> >> CC: Adrian Freihofer<adrian.freihofer@gmail.com> >> Signed-off-by: Christos Gavros<gavrosc@yahoo.com> >> --- >> v1->v2 >> * the commit message is extended with more info >> --- >> meta/recipes-core/initrdscripts/initramfs-framework/finish | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/finish b/meta/recipes-core/initrdscripts/initramfs-framework/finish >> index ac0de9f996..716c2f44af 100755 >> --- a/meta/recipes-core/initrdscripts/initramfs-framework/finish >> +++ b/meta/recipes-core/initrdscripts/initramfs-framework/finish >> @@ -41,7 +41,7 @@ finish_run() { >> mount --move /sys $ROOTFS_DIR/sys >> >> cd $ROOTFS_DIR >> - exec switch_root -c /dev/console $ROOTFS_DIR ${bootparam_init:-/sbin/init} >> + exec switch_root $ROOTFS_DIR ${bootparam_init:-/sbin/init} >> else >> debug "No rootfs has been set" >> fi >> -- >> 2.34.1 >> -- # Randy MacLeod # Wind River Linux [-- Attachment #2: Type: text/html, Size: 4763 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] initramfs-framework: remove hard dependency with busybox 2025-04-08 0:19 ` Randy MacLeod @ 2025-04-08 1:34 ` Kevin Hao 0 siblings, 0 replies; 4+ messages in thread From: Kevin Hao @ 2025-04-08 1:34 UTC (permalink / raw) To: Randy MacLeod Cc: Khem Raj, Christos Gavros, openembedded-core, Yoann Congal, jbk, Adrian Freihofer [-- Attachment #1: Type: text/plain, Size: 3481 bytes --] On Mon, Apr 07, 2025 at 08:19:50PM -0400, Randy MacLeod wrote: > On 2025-04-07 1:04 p.m., Khem Raj wrote: > > On Mon, Apr 7, 2025 at 9:45 AM Christos Gavros <gavrosc@yahoo.com> wrote: > > In 'finish'script the Switch_root command with option -c is busybox specific. > When package-core-base-utils is selected the boot is breaking with message > "Switch_root: invalid option — ‘c’.It was reproduced using qemu. > Remove -c option to make it compatible with both providers. > It is tested using qemu with busybox and package-core-base-utils. In both cases > qemu boots successfully and filesystem is accessible. > Fixes [YOCTO #15716] > > > Looks good > > Probably, and it's a small change, but : > > 1. Usually the busybox version has fewer features but > here util-linux doesn't have the option, which is a bit odd. > > I also checked the git repo/master branch and it hasn't been added. > Note that toybox, a BSD-Zero licensed, re-implementation of busybox *does* have > the -c option. > > I wonder if anyone has asked util-linux if they'd like that feature for > embedded boards... > > No sign of that as PR or issue: > > https://github.com/util-linux/util-linux/pulls?q=is%3Apr++switch_root > https://github.com/util-linux/util-linux/issues?q=is%3Aissue%20switch_root > > and > > 2. More importantly, embedded folks are often emotionally attached to there > serial lines/ console > for doing BSP development and low-level debug work. > > CCing Kexin who will hopefully comment on whether he and the WR team would > care if we drop the console specification. Appreciate the notification. This change appears safe for our use case, as our primary focus is kernel console functionality. No objections from my side. Thanks, Kevin > > > If not, then I have no objection since one can easily enable the -c option > when debugging and then ship without it. > > > ../Randy > > > > > CC: Yoann Congal <yoann.congal@smile.fr> > CC: Randy MacLeod <randy.macleod@windriver.com> > CC: jbk <jbk@mm-software.com> > CC: Raj Khem <raj.khem@gmail.com> > CC: Adrian Freihofer <adrian.freihofer@gmail.com> > Signed-off-by: Christos Gavros <gavrosc@yahoo.com> > --- > v1->v2 > * the commit message is extended with more info > --- > meta/recipes-core/initrdscripts/initramfs-framework/finish | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/finish b/meta/recipes-core/initrdscripts/initramfs-framework/finish > index ac0de9f996..716c2f44af 100755 > --- a/meta/recipes-core/initrdscripts/initramfs-framework/finish > +++ b/meta/recipes-core/initrdscripts/initramfs-framework/finish > @@ -41,7 +41,7 @@ finish_run() { > mount --move /sys $ROOTFS_DIR/sys > > cd $ROOTFS_DIR > - exec switch_root -c /dev/console $ROOTFS_DIR ${bootparam_init:-/sbin/init} > + exec switch_root $ROOTFS_DIR ${bootparam_init:-/sbin/init} > else > debug "No rootfs has been set" > fi > -- > 2.34.1 > > > > -- > # Randy MacLeod > # Wind River Linux > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-08 1:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250407164456.4845-1-gavrosc.ref@yahoo.com>
2025-04-07 16:44 ` [PATCH v2] initramfs-framework: remove hard dependency with busybox Christos Gavros
2025-04-07 17:04 ` Khem Raj
2025-04-08 0:19 ` Randy MacLeod
2025-04-08 1:34 ` Kevin Hao
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox