[oe-commits] Patrick Ohly : initramfs-framework: support init boot parameter

git at git.openembedded.org git at git.openembedded.org
Wed Sep 9 21:58:31 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: 200e8e3f11b35c72534fa31aecb97dd2a2b728c2
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=200e8e3f11b35c72534fa31aecb97dd2a2b728c2

Author: Patrick Ohly <patrick.ohly at intel.com>
Date:   Tue Sep  8 13:19:01 2015 +0200

initramfs-framework: support init boot parameter

It can be useful for debugging to override the default /sbin/init.
This is something typically done via the init boot parameter which
then gets interpreted by the kernel. But when using an initramfs, it
is the initramfs which must react to the option.

Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 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 a8806aa..e712ff0 100755
--- a/meta/recipes-core/initrdscripts/initramfs-framework/finish
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/finish
@@ -53,7 +53,7 @@ finish_run() {
 		mount --move /sys $ROOTFS_DIR/sys
 
 		cd $ROOTFS_DIR
-		exec switch_root -c /dev/console $ROOTFS_DIR /sbin/init
+		exec switch_root -c /dev/console $ROOTFS_DIR ${bootparam_init:-/sbin/init}
 	else
 		debug "No rootfs has been set"
 	fi



More information about the Openembedded-commits mailing list