From 07b2d077c79c44e9e224ef56f541d46591d4cde7 Mon Sep 17 00:00:00 2001 From: Christos Gavros Date: Mon, 7 Apr 2025 18:44:56 +0200 Subject: [PATCH] initramfs-framework: remove hard dependency with busybox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 CC: Randy MacLeod CC: jbk CC: Raj Khem CC: Adrian Freihofer (From OE-Core rev: 0f745024fd40518f98390008b4f613d5641df416) Signed-off-by: Christos Gavros Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- 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