From patchwork Fri Jan 16 11:30:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ulrich_=C3=96lmann?= X-Patchwork-Id: 78941 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1025BD48981 for ; Fri, 16 Jan 2026 11:30:46 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.4072.1768563035710886459 for ; Fri, 16 Jan 2026 03:30:36 -0800 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: pengutronix.de, ip: 185.203.201.7, mailfrom: uol@pengutronix.de) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vgi2D-0005PC-Rz; Fri, 16 Jan 2026 12:30:33 +0100 Received: from dude03.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::39]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vgi2D-000uPu-2R; Fri, 16 Jan 2026 12:30:33 +0100 Received: from uol by dude03.red.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1vgi2C-0000000CO5h-4BXB; Fri, 16 Jan 2026 12:30:33 +0100 From: =?utf-8?q?Ulrich_=C3=96lmann?= To: OpenEmbedded Core Developers Cc: yocto@pengutronix.de, =?utf-8?q?Ulrich_=C3=96lmann?= Subject: [PATCH] initramfs-framework: add handover of PID 1's arguments Date: Fri, 16 Jan 2026 12:30:29 +0100 Message-ID: <20260116113029.2952509-1-u.oelmann@pengutronix.de> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: uol@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: openembedded-core@lists.openembedded.org List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 16 Jan 2026 11:30:46 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/229543 Although many PID 1 programs parse /proc/cmdline, let's follow the standard convention and forward the command-line arguments received from the kernel to the next PID 1 program. --- meta/recipes-core/initrdscripts/initramfs-framework/finish | 2 +- meta/recipes-core/initrdscripts/initramfs-framework/init | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/finish b/meta/recipes-core/initrdscripts/initramfs-framework/finish index 21eaa5739343..69d555368d4c 100755 --- a/meta/recipes-core/initrdscripts/initramfs-framework/finish +++ b/meta/recipes-core/initrdscripts/initramfs-framework/finish @@ -42,7 +42,7 @@ finish_run() { mount --move /run $ROOTFS_DIR/run cd $ROOTFS_DIR - exec switch_root $ROOTFS_DIR ${bootparam_init:-/sbin/init} + exec switch_root $ROOTFS_DIR ${bootparam_init:-/sbin/init} "$@" else debug "No rootfs has been set" fi diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init index fe6e3cbf0782..51db083e2e53 100755 --- a/meta/recipes-core/initrdscripts/initramfs-framework/init +++ b/meta/recipes-core/initrdscripts/initramfs-framework/init @@ -154,7 +154,7 @@ for m in $MODULES_DIR/*; do fi debug "Running ${module}_run" - eval "${module}_run" + eval "${module}_run" "$@" # post hooks for h in $MODULE_POST_HOOKS; do