From patchwork Fri Oct 16 03:17:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenwen Fu X-Patchwork-Id: 101087 X-Patchwork-Delegate: yoann.congal@smile.fr 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 165B3CCF2C1 for ; Fri, 16 Oct 2026 14:22:13 +0000 (UTC) Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.14479.1792123208196698116 for ; Thu, 15 Oct 2026 21:00:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=EfENBb9S; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: qualcomm.com, ip: 205.220.168.131, mailfrom: wenwfu@qualcomm.com) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69G1mUBC3202281; Fri, 16 Oct 2026 03:17:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=82jLyPx1wwxC0lOTn+DlQSqo86GVV/elWMd S3O7KUAQ=; b=EfENBb9SUQDbCyqWEoukFuOVubobX8NgyCPdPz8m+41rJkjvMzW lO+41qYj8Y02Ry2YDX3KDkWbQUAUhnbnbACcz+0znZ7tXKDh/v9l7NhtsJx0P73R gJHXkdmE2aQfpVUFuY5g1xT0GDWOmZSr7LhjYdGye2j0Mbj/h3M3F/qaG64G+qFG /qJQeU7cAfkryb1a8JEK1mjBvsZLh6N4e5jz9srIWlvTghq7s+fpSPlQZf2x3N0l XDB1YeOeZXfx8lokkcUpMz3RTIc9yonAo6Sy/xkOetLW0gRgNVrRojSyQkqLhz9i 99E27BSaXpEFbScL7s5FP16iYeeqZnvqK7Q== Received: from aptaippmta02.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hb3r39te3-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:17:25 +0000 (GMT) Received: from pps.filterd (aptaippmta02.qualcomm.com [127.0.0.1]) by APTAIPPMTA02.qualcomm.com (8.18.1.11/8.18.1.11) with ESMTP id 69G3HO7w2742999; Fri, 16 Oct 2026 03:17:24 GMT Received: from perf-sh02-lnx.ap.qualcomm.com (smtphost-taiwan.qualcomm.com [10.249.136.33]) by APTAIPPMTA02.qualcomm.com (PPS) with ESMTPS id 69G3HNvt2742985 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:17:24 +0000 (GMT) Received: by perf-sh02-lnx.ap.qualcomm.com (Postfix, from userid 3975139) id 1B8D7AC5; Fri, 16 Oct 2026 11:17:23 +0800 (CST) From: Wenwen Fu To: openembedded-core@lists.openembedded.org Cc: Wenwen Fu , Mathieu Dubois-Briand , Richard Purdie Subject: [PATCH wrynose 1/7] initramfs-framework: add opt-in root-only udev trigger Date: Fri, 16 Oct 2026 11:17:21 +0800 Message-ID: <20261016031721.693971-1-wenwfu@qti.qualcomm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Proofpoint-Reinject: loops=2 maxloops=12 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfX3dlxp6nDRYkH WXFYroRDQ0vmnchg2ijEFKb1NuIVfXVXp2T7DkMdpIZkCrlEhNhm2Uw5Y8w/NDQ7UKBZ/VGD8wL PdzlXGUiI0hvQ3RbTvQDLzHIa7A9TH5aMaeIQsOBhmuvyS3l+l8IOqSCvNbi3n+SP1NDj6dlqjr Q5aEKTdbTsAIvlXl+94BcQNZI5CPGFys9KnfOvNgY9lFM7pYLri60xKTuWYEh7cfj+MqVhRNLEJ PdPPc/d6K4fvGKh6zG2oxoI9XkldvaAllXbmiSJNkQTngzZOOg44RFtgmj2p8OVNIV9P1q42z+x +pQUQdOVs94TgiQo0H+gSDDbOSYWpeF+AcOcPLm7k2x4YwMdl3/YDY5cKhc9haeYhK7LlZHHCG8 1RiAxVWwA3gJJJ2c9LgPe2LOR8VAxo3HowBLZLUKGJ+8VWdqtzF9NRnuE91vb3n+uOsog37xePY 4e5OGQXMzdPWxAVT2tw== X-Proofpoint-GUID: pQsJD-puvaNqLOEes8z0-FI6Zd_Fqa6a X-Proofpoint-ORIG-GUID: pQsJD-puvaNqLOEes8z0-FI6Zd_Fqa6a X-Proofpoint-Spam-Info: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfX+dQCAgddIeqw BZ07bZZ7fYPcGbQKotQSfdQ0JCP30d7q6CvodBb5+jdM/XZFuQPDyvHC9UhHl8ACsTZ+yNzbeAJ 6sbxBHvAFrEp6sdRJF/v+gUS+Hu6RIc= X-Authority-Analysis: v=2.4 cv=INGXmQvG c=1 sm=1 tr=0 ts=6ad19746 cx=c_pps a=nuhDOHQX5FNHPW3J6Bj6AA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=660iZSQnnn4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=P-IC7800AAAA:8 a=ag1SF4gXAAAA:8 a=iqAYPJ_ooOm7jgwe6rsA:9 a=d3PnA9EDa4IxuAV0gXij:22 a=Yupwre4RP9_Eg_Bd0iYG:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-10-14_01,2026-10-14_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1011 spamscore=0 adultscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 bulkscore=0 phishscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610080000 definitions=main-2610160012 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 Oct 2026 14:22:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/248033 The initramfs udev module replays add events for the complete device tree and waits for every resulting event. This can significantly delay mounting the root filesystem when unrelated devices take time to initialize. On a Qualcomm RB3 Gen 2 Core Kit (MACHINE=rb3gen2-core-kit) running Linux 6.18, using initramfs-rootfs-image with root=PARTLABEL=rootfs, the following average times were measured: Full coldplug Root-only udev trigger + settle 981.6 ms 109.8 ms /init to rootfs EXT4 mount 1340.2 ms 441.1 ms The root-only trigger reduced these times by 88.8% and 67.1%, respectively. The values are averages of three full-coldplug boots and two root-only boots. Add the opt-in initramfs.udev-root-only=1 kernel parameter. When root uses PARTLABEL or PARTUUID, trigger only the matching block device. For PARTLABEL roots, match the PARTNAME property exposed by udev. Keep the existing full trigger as the default so current users and other initramfs modules retain their existing behaviour. If the root device cannot be matched safely or the targeted trigger fails, fall back to the original full coldplug. Signed-off-by: Wenwen Fu Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit d3a196f5742425fb24cfc21bb380f3e96c49253c) --- .../initrdscripts/initramfs-framework/udev | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/udev b/meta/recipes-core/initrdscripts/initramfs-framework/udev index 4898b89246..8f67e78a7c 100644 --- a/meta/recipes-core/initrdscripts/initramfs-framework/udev +++ b/meta/recipes-core/initrdscripts/initramfs-framework/udev @@ -35,6 +35,31 @@ udev_enabled() { return 0 } +udev_trigger_root_device() { + case "${bootparam_root:-}" in + PARTLABEL=?*) + root_match="PARTNAME=${bootparam_root#PARTLABEL=}" + ;; + PARTUUID=?*) + root_match="PARTUUID=${bootparam_root#PARTUUID=}" + ;; + *) + return 1 + ;; + esac + + root_devices=$(udevadm trigger --dry-run --verbose \ + --subsystem-match=block "--property-match=$root_match") || return 1 + + # udevadm succeeds even when no devices match, so check its dry-run output. + [ -n "$root_devices" ] || return 1 + + udevadm trigger --subsystem-match=block \ + "--property-match=$root_match" --action=add || return 1 + + return 0 +} + udev_run() { add_module_pre_hook "udev_shutdown_hook_handler" @@ -45,6 +70,11 @@ udev_run() { sh -c "exec 4< /dev/console" || { exec 0> /dev/null; exec 1> /dev/null; exec 2> /dev/null; } $_UDEV_DAEMON --daemon - udevadm trigger --action=add + if [ "${bootparam_initramfs_udev_root_only:-}" = "1" ] && + udev_trigger_root_device; then + debug "Triggered udev for root partition only" + else + udevadm trigger --action=add + fi udevadm settle } From patchwork Fri Oct 16 03:17:35 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenwen Fu X-Patchwork-Id: 101082 X-Patchwork-Delegate: yoann.congal@smile.fr 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 38981CCA46C for ; Fri, 16 Oct 2026 14:21:33 +0000 (UTC) Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.14239.1792122013460026446 for ; Thu, 15 Oct 2026 20:40:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=pFU7f7F1; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: qualcomm.com, ip: 205.220.180.131, mailfrom: wenwfu@qualcomm.com) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69FKW9nn3462792; Fri, 16 Oct 2026 03:17:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=PU48WrUdZUAvJUmiJcDjJYWIlSily2rcQfk ebrIfyS0=; b=pFU7f7F1L1ci/A/xHw9lVjwVTb8+jyulDyPqd937qm5cSRqO/gT WvOHINnBo5mZ0JyfRHiEj+fpZxU1Z9O08GMsoqu3SAX3ePeiE6YV65w1eNH4nmuw K78gao4KALlXqIpQUmllnHmziixEBb8Xj/qz5KujRje/FKBJDVcJdmAbhT13Htjk 1288wUuXq940qF67xhRBPgS7SnHdwFrw41nDr0ncOxsdOXU31Cuhe+q/g+q9OkzV XsJlPyaCvkEssr16JB1Z2FrTy/1zTqc+qO1bFpJI8pOeDdq0lbC2Yf8/T31tfXcH DFEWOeD/5BC24VGEy5bc9RROuBbfBDQkmHA== Received: from aptaippmta02.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hayu6awsq-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:17:40 +0000 (GMT) Received: from pps.filterd (aptaippmta02.qualcomm.com [127.0.0.1]) by APTAIPPMTA02.qualcomm.com (8.18.1.11/8.18.1.11) with ESMTP id 69G3Hc5S2743148; Fri, 16 Oct 2026 03:17:38 GMT Received: from perf-sh02-lnx.ap.qualcomm.com (smtphost-taiwan.qualcomm.com [10.249.136.33]) by APTAIPPMTA02.qualcomm.com (PPS) with ESMTPS id 69G3HbdT2743139 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:17:38 +0000 (GMT) Received: by perf-sh02-lnx.ap.qualcomm.com (Postfix, from userid 3975139) id CC936AC5; Fri, 16 Oct 2026 11:17:36 +0800 (CST) From: Wenwen Fu To: openembedded-core@lists.openembedded.org Cc: Wenwen Fu , Mathieu Dubois-Briand , Richard Purdie Subject: [PATCH wrynose 2/7] initramfs-framework: support LABEL with root-only udev trigger Date: Fri, 16 Oct 2026 11:17:35 +0800 Message-ID: <20261016031735.694414-1-wenwfu@qti.qualcomm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Proofpoint-Reinject: loops=2 maxloops=12 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-ORIG-GUID: wnn861afaq0RuJh85xioTMNxCW3FPFdw X-Authority-Analysis: v=2.4 cv=ff04WEQF c=1 sm=1 tr=0 ts=6ad19755 cx=c_pps a=nuhDOHQX5FNHPW3J6Bj6AA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=660iZSQnnn4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=P-IC7800AAAA:8 a=ag1SF4gXAAAA:8 a=i1QJoHD1dn0bM1Lglh4A:9 a=d3PnA9EDa4IxuAV0gXij:22 a=Yupwre4RP9_Eg_Bd0iYG:22 X-Proofpoint-GUID: wnn861afaq0RuJh85xioTMNxCW3FPFdw X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfX4Kl9MPqqDISx KEkpdna46/GkZdy+Wgplu7NWo1Veaq3FJE44qKZDtRGggYEjZIMHmJLlV8lcpHabLYU2rv1j+cc R86Lqo2038E5Kh6iKtbSJaGS66YDBUmOkUVpaf8t2EsSwmSPeSjq5i6+rEu+WwQjgremLx3ynyX SbswHW7pIJXeWwvZ2rNlbIHfvSyqbf45N+6HFL5cgVbmysj5tbzquDR5BPjQgntSD8E+LWyqQ4y 6eteyheyhjlQB7I6/22RkyfAsMurgTi+PTDV+VMgKCGPN98c4YdCkwnUu9mPAjSXbHS8WIrLfP1 9c3EGPrWfgtwqEVaLj/6T+JY8fhZinaV8F702IiLOXx1vvs4EVQ+YlAVoS8O2dNe9Ztf2xFWdvo 33QRbx6ovBiC06naVQgWH8bC9ACvBjGbsx8VLcx2rq2V7qSGaREw8L+Q9ojfsqtBFbGT0CxvI/t uKyTY/PJaDIZIIfJ+IQ== X-Proofpoint-Spam-Info: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfX3W2jloOW3PrT HhepWQ295+0DBOhUrH56C9gc6fbIpI6BdeH4ExQfuA7hswT6e0c1YaOIdJrxB+Y5HPGMY7VwRoC AcFA2HXBueakMMGHF//JDRcwkuX7Jg0= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-10-14_01,2026-10-14_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1011 lowpriorityscore=0 malwarescore=0 spamscore=0 phishscore=0 bulkscore=0 suspectscore=0 priorityscore=1501 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610080000 definitions=main-2610160012 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 Oct 2026 14:21:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/248028 Filesystem labels are not available in kernel uevents. Add util-linux-findfs to initramfs-module-udev and use findfs to resolve root=LABEL= to a device. Read the kernel-provided PARTUUID from sysfs and trigger only that partition, falling back to a full trigger if the label cannot be resolved safely. Keeping findfs out of the BusyBox defconfig avoids increasing BusyBox for unrelated users. Exclude the util-linux dependency from signature propagation because this allarch recipe only invokes findfs at runtime. Tested with bitbake -p, the core-image-minimal-initramfs dependency graph, and the sstatetests.SStateHashSameSigs2.test_sstate_allarch_samesigs selftest. AI-Generated: OpenAI Codex Signed-off-by: Wenwen Fu Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit fda394c2b91b3c66545f75dc13f7e8649e3cdb6d) --- meta/conf/layer.conf | 1 + .../initrdscripts/initramfs-framework/udev | 12 ++++++++++++ .../initrdscripts/initramfs-framework_1.0.bb | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf index b097c34c7b..dabdf55c25 100644 --- a/meta/conf/layer.conf +++ b/meta/conf/layer.conf @@ -61,6 +61,7 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \ initramfs-framework->${VIRTUAL-RUNTIME_base-utils} \ initramfs-framework->eudev \ initramfs-framework->systemd \ + initramfs-framework->util-linux \ initramfs-module-install-efi->dosfstools \ initramfs-module-install-efi->e2fsprogs \ initramfs-module-install-efi->parted \ diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/udev b/meta/recipes-core/initrdscripts/initramfs-framework/udev index 8f67e78a7c..85c5ba1178 100644 --- a/meta/recipes-core/initrdscripts/initramfs-framework/udev +++ b/meta/recipes-core/initrdscripts/initramfs-framework/udev @@ -43,6 +43,18 @@ udev_trigger_root_device() { PARTUUID=?*) root_match="PARTUUID=${bootparam_root#PARTUUID=}" ;; + LABEL=?*) + # The kernel does not export the filesystem LABEL in the + # uevent, so resolve it to a device node with findfs and + # match on that device's kernel-provided PARTUUID. + root_label="${bootparam_root#LABEL=}" + root_dev=$(findfs "LABEL=$root_label" 2>/dev/null) || return 1 + [ -n "$root_dev" ] || return 1 + root_partuuid=$(sed -n 's/^PARTUUID=//p' \ + "/sys/class/block/${root_dev#/dev/}/uevent" 2>/dev/null) + [ -n "$root_partuuid" ] || return 1 + root_match="PARTUUID=$root_partuuid" + ;; *) return 1 ;; diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb index 2ec03bc34c..936cd0c995 100644 --- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb @@ -88,7 +88,7 @@ RDEPENDS:initramfs-module-mdev = "${PN}-base busybox-mdev" FILES:initramfs-module-mdev = "/init.d/01-mdev" SUMMARY:initramfs-module-udev = "initramfs support for udev" -RDEPENDS:initramfs-module-udev = "${PN}-base udev" +RDEPENDS:initramfs-module-udev = "${PN}-base udev util-linux-findfs" FILES:initramfs-module-udev = "/init.d/01-udev" SUMMARY:initramfs-module-e2fs = "initramfs support for ext4/ext3/ext2 filesystems" From patchwork Fri Oct 16 03:17:56 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenwen Fu X-Patchwork-Id: 101088 X-Patchwork-Delegate: yoann.congal@smile.fr 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 17351CC6B38 for ; Fri, 16 Oct 2026 14:22:23 +0000 (UTC) Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14448.1792124070311808927 for ; Thu, 15 Oct 2026 21:14:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=a0VpN893; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: qualcomm.com, ip: 205.220.180.131, mailfrom: wenwfu@qualcomm.com) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69FMA8Pj4126428; Fri, 16 Oct 2026 03:18:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=2VDlW4vNklf2n6THnJ+jw29DJnbHl6VUyEg RBB707PE=; b=a0VpN893/k6gP6auIRwBSmuV2uffjWq/uis7a1AEXnlODJFUW52 RYuI25RFswxaH2Ewsxe+JpjtsfaoJQgviESQgytsCedfHqMKp5YynC6PhzTkW+YS 0j8rgFRUnHA/xAI8LVeFiooAHr3aw+mTqKG/m0I3+VBy3NNPGoejtyuFwBSKuCn1 7UDJmClDDy0VkQyo4CPeGg3ekIp7ajzS6YYvp9JZxz4u7eU8Wv9fK/XgdXlTKh/h I5y0emgq12XADGTSHxboGOr233tctwV0LXYblAdMzxAf2BUunGvPqb+5crMKFi2F nNF3bekcH9eCJsAhyhj2G83OlTV88LyaKdQ== Received: from aptaippmta01.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hb19m2ecv-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:18:03 +0000 (GMT) Received: from pps.filterd (aptaippmta01.qualcomm.com [127.0.0.1]) by APTAIPPMTA01.qualcomm.com (8.18.1.11/8.18.1.11) with ESMTP id 69G3I0Os2744188; Fri, 16 Oct 2026 03:18:00 GMT Received: from perf-sh02-lnx.ap.qualcomm.com (smtphost-taiwan.qualcomm.com [10.249.136.33]) by APTAIPPMTA01.qualcomm.com (PPS) with ESMTPS id 69G3I0I02744177 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:18:00 +0000 (GMT) Received: by perf-sh02-lnx.ap.qualcomm.com (Postfix, from userid 3975139) id 3ED5FAC8; Fri, 16 Oct 2026 11:17:59 +0800 (CST) From: Wenwen Fu To: openembedded-core@lists.openembedded.org Cc: Wenwen Fu , Richard Purdie Subject: [PATCH wrynose 3/7] busybox: enable findfs for initramfs LABEL support Date: Fri, 16 Oct 2026 11:17:56 +0800 Message-ID: <20261016031756.695339-1-wenwfu@qti.qualcomm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Proofpoint-Reinject: loops=2 maxloops=12 X-QCInternal: smtphost X-QCInternal: smtphost X-Authority-Analysis: v=2.4 cv=aLdlOr9m c=1 sm=1 tr=0 ts=6ad1976b cx=c_pps a=nuhDOHQX5FNHPW3J6Bj6AA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=660iZSQnnn4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=ag1SF4gXAAAA:8 a=skronstXEd1RZOU6cfsA:9 a=Yupwre4RP9_Eg_Bd0iYG:22 X-Proofpoint-ORIG-GUID: aWTDNtDmxuPaZX9Yq8Ftjp_KeufvdD8K X-Proofpoint-Spam-Info: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfX7Ngjq4A/4/zh yPmOdCcsjk5zv6iG6c5+d1A8KAg0+j/45Ds+jOaZB/6v8hgk6tAdL5hxQK8pKVAIKlutzzc4lJ0 rmoE73Ou/Gy2DWT9zo3774t0MAMeAfw= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfX/7XSsukKAqRw 0gXi8H7zi2iAiG0jgNBZrO5x2F0B6do4hL2VfLb7I3FHZ0xq4godeo0gLzkRZMxTi4p0+wpn816 LvypJsxulwDIG47ag3hK2kFylOI0hkLJsU65JeyXugOLSoA9/rFtL0YNPqtfjekzYOYWBoGVR4K zSWOJfw/ZPIJDoem/BYK8E3MGNQrLVjG3tqWUM+eVG/7G4O+3CFRZAXKmgYxd0tYHaMW9/xmwnA 5AftPt5ezDSZM1mnwaI2TbvFhX4/9pxe1O4CnSMyw7OR4X5sE3Wvv9WLA5m2X7Vh3jb20LiUaAW 3R382VFmzP68kU6iMOTQMy70T4veXzkcSoeg3FtKVPPyLIG9Of/BkboVU9NRzYiI6R0omq89SOn lG434lYVBhtFELdoSSiZm0KOzKRhI1UDWoRLviJ5S/UoZSaHl+LGMt6B0053L6+kDW3sP1aUSYZ QsyUnugFFWiK2/7aJuA== X-Proofpoint-GUID: aWTDNtDmxuPaZX9Yq8Ftjp_KeufvdD8K X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-10-14_01,2026-10-14_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 clxscore=1011 malwarescore=0 adultscore=0 suspectscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610080000 definitions=main-2610160012 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 Oct 2026 14:22:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/248035 Use the BusyBox findfs applet for initramfs-framework root=LABEL= resolution and drop the util-linux-findfs runtime dependency. This keeps the root-only udev trigger implementation lightweight and removes the util-linux signature exception. Signed-off-by: Wenwen Fu Signed-off-by: Richard Purdie (cherry picked from commit c2b681e39421ae5b4fea917b3c3ed69bd1020b6c) --- meta/conf/layer.conf | 1 - meta/recipes-core/busybox/busybox/defconfig | 2 +- meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf index dabdf55c25..b097c34c7b 100644 --- a/meta/conf/layer.conf +++ b/meta/conf/layer.conf @@ -61,7 +61,6 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \ initramfs-framework->${VIRTUAL-RUNTIME_base-utils} \ initramfs-framework->eudev \ initramfs-framework->systemd \ - initramfs-framework->util-linux \ initramfs-module-install-efi->dosfstools \ initramfs-module-install-efi->e2fsprogs \ initramfs-module-install-efi->parted \ diff --git a/meta/recipes-core/busybox/busybox/defconfig b/meta/recipes-core/busybox/busybox/defconfig index 22c9dafcb3..8b344f8960 100644 --- a/meta/recipes-core/busybox/busybox/defconfig +++ b/meta/recipes-core/busybox/busybox/defconfig @@ -629,7 +629,7 @@ CONFIG_FEATURE_FDISK_WRITABLE=y # CONFIG_FEATURE_OSF_LABEL is not set # CONFIG_FEATURE_GPT_LABEL is not set # CONFIG_FEATURE_FDISK_ADVANCED is not set -# CONFIG_FINDFS is not set +CONFIG_FINDFS=y CONFIG_FLOCK=y # CONFIG_FDFLUSH is not set # CONFIG_FREERAMDISK is not set diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb index 936cd0c995..2ec03bc34c 100644 --- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb @@ -88,7 +88,7 @@ RDEPENDS:initramfs-module-mdev = "${PN}-base busybox-mdev" FILES:initramfs-module-mdev = "/init.d/01-mdev" SUMMARY:initramfs-module-udev = "initramfs support for udev" -RDEPENDS:initramfs-module-udev = "${PN}-base udev util-linux-findfs" +RDEPENDS:initramfs-module-udev = "${PN}-base udev" FILES:initramfs-module-udev = "/init.d/01-udev" SUMMARY:initramfs-module-e2fs = "initramfs support for ext4/ext3/ext2 filesystems" From patchwork Fri Oct 16 03:18:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenwen Fu X-Patchwork-Id: 101083 X-Patchwork-Delegate: yoann.congal@smile.fr 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 18FDECCA46C for ; Fri, 16 Oct 2026 14:21:43 +0000 (UTC) Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14096.1792122334759674810 for ; Thu, 15 Oct 2026 20:45:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=khJ2aqc8; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: qualcomm.com, ip: 205.220.180.131, mailfrom: wenwfu@qualcomm.com) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69G2BWxH3902225; Fri, 16 Oct 2026 03:18:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=+ixb8MvLqE2x3uT3iCQrHs/vbfVC8fgpx5X 9f0OClfA=; b=khJ2aqc8XmgdYkZdsHtLmaEQFzXAPw/CrfUsNcMaxmwnhE3yxzk GrrMF5jh6/VCBTXj9pfLs8W05cwfL35r+MvuAcD6xpaPzVyiAC33pFqY2J2b/136 noM8B+5vW4hwWj6JucPCQVoaJErMRhB2+xWb+Am/bseol5NecTpmjqhto2yz2p95 Ykws6FEYC1JrttURwoWw5DaE7oyhWr3gKnfKUV8kW387KolRN/NoF4hTmjUs6AUJ UHQslkxECPEh9WA6/DhHpsAWyt9Lw0txDn6LQK+g+O+ecrIkor9BbtxE0puxNE/b 6TUuR7kePdUoIV9x9zSN7rXHFfyt6I+M++A== Received: from aptaippmta02.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hb3sesrxx-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:18:19 +0000 (GMT) Received: from pps.filterd (aptaippmta02.qualcomm.com [127.0.0.1]) by APTAIPPMTA02.qualcomm.com (8.18.1.11/8.18.1.11) with ESMTP id 69G3HOFI2742998; Fri, 16 Oct 2026 03:18:17 GMT Received: from perf-sh02-lnx.ap.qualcomm.com (smtphost-taiwan.qualcomm.com [10.249.136.33]) by APTAIPPMTA02.qualcomm.com (PPS) with ESMTPS id 69G3IHFP2743879 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:18:17 +0000 (GMT) Received: by perf-sh02-lnx.ap.qualcomm.com (Postfix, from userid 3975139) id 62C2AAC8; Fri, 16 Oct 2026 11:18:16 +0800 (CST) From: Wenwen Fu To: openembedded-core@lists.openembedded.org Cc: Wenwen Fu , Richard Purdie Subject: [PATCH wrynose 4/7] initramfs-framework: avoid external commands in rootfs resolution Date: Fri, 16 Oct 2026 11:18:14 +0800 Message-ID: <20261016031814.705324-1-wenwfu@qti.qualcomm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Proofpoint-Reinject: loops=2 maxloops=12 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-ORIG-GUID: rSuAUh7QN2tMipZiLB5hgDJbOScV5365 X-Proofpoint-GUID: rSuAUh7QN2tMipZiLB5hgDJbOScV5365 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfXyD/6wFZ7fHcm ioKh72YVRCs/HMnXfpfQGKjHTQBqkU8JYeNACjGbB7WtMfJdi/hTmmvJafLCXYnzRBdD7Qwz9qz dEGTnNbphR7HxKAWpkuoYbuagn7/NLQ= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfX18t8zISrp6ly pUcrYXeN2OSa51CJUjik/GUDS17t5FJCzHD9TbKG0hud0OqkX3kfBPLuPzL62XEpy4+BPMLJ+t0 ctq9A4nIv22Frd4oeq9s+DOxHA4r8yJxCNMBpsBSVytcdoBQQjf5m+/V3YGLrKF3WQw+2fxz6Dh 30y1oklQj0QbWWIj6oFOr8G+enh0yELfbLFvfuDHuSlFR7ES4d59lirlpSaYN3sJF9VSZeOCZgd VKuNwG+deGkok1HMXwS64OB8MOahDKh0K+s5kacF/SBRdGzurUkmF+aFwaHJTiL33sQDidNCeQ/ wcDjihDSMtSj242FIN7hrmj9mCcQvHj4KfnqnooZ7EDjDeqq/r7WkW75e/+aCZfnMajbhl9Q7dj voH1exQ3RHrocuP9JI9IZnzVI5qVtMyAQdemfk5CF+7sS0pkg5/q93ZTBE2j5Kb5ZiIfVSVXdMj UvmJ2vRqNNI92SUypig== X-Authority-Analysis: v=2.4 cv=Se1i5fRu c=1 sm=1 tr=0 ts=6ad1977c cx=c_pps a=nuhDOHQX5FNHPW3J6Bj6AA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=660iZSQnnn4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=ag1SF4gXAAAA:8 a=OXCmtkTqLOmlyALPhyEA:9 a=Yupwre4RP9_Eg_Bd0iYG:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-10-14_01,2026-10-14_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 adultscore=0 spamscore=0 malwarescore=0 priorityscore=1501 phishscore=0 bulkscore=0 suspectscore=0 lowpriorityscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610080000 definitions=main-2610160012 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 Oct 2026 14:21:43 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/248029 The rootfs module uses echo, cut, and grep to resolve root= identifiers. This starts several short-lived processes before checking the root device. Use POSIX shell case matching and parameter expansion for UUID, PARTUUID, PARTLABEL, and LABEL identifiers. Validate ubiN: identifiers with shell pattern matching while preserving the existing behavior. Measured on rb3gen2-core-kit with root=LABEL=otaroot using rootfs-resolve-start and rootfs-resolve-end kernel markers: before: 18.195 ms after: 0.089 ms improvement: 18.106 ms (99.5%) The overall rootfs time is also affected by storage mount variability, so the resolution interval is the direct measurement. Tested with dash and BusyBox sh syntax checks. Signed-off-by: Wenwen Fu Signed-off-by: Richard Purdie (cherry picked from commit d6e8e722763f87ceef9c0dbd1ec7f38088e7f0df) --- .../initrdscripts/initramfs-framework/rootfs | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs index df0cbfb091..05557be211 100644 --- a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs +++ b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs @@ -21,21 +21,28 @@ rootfs_run() { if [ -n "$bootparam_root" ]; then debug "No e2fs compatible filesystem has been mounted, mounting $bootparam_root..." - if [ "`echo ${bootparam_root} | cut -c1-5`" = "UUID=" ]; then - root_uuid=`echo $bootparam_root | cut -c6-` - bootparam_root="/dev/disk/by-uuid/$root_uuid" - elif [ "`echo ${bootparam_root} | cut -c1-9`" = "PARTUUID=" ]; then - root_partuuid=`echo $bootparam_root | cut -c10-` - bootparam_root="/dev/disk/by-partuuid/$root_partuuid" - elif [ "`echo ${bootparam_root} | cut -c1-10`" = "PARTLABEL=" ]; then - root_partlabel=`echo $bootparam_root | cut -c11-` - bootparam_root="/dev/disk/by-partlabel/$root_partlabel" - elif [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then - root_label=`echo $bootparam_root | cut -c7-` - bootparam_root="/dev/disk/by-label/$root_label" - elif echo "${bootparam_root}" | grep -q '^ubi[0-9]\+:'; then - bootparam_rootfstype="ubifs" - fi + case "$bootparam_root" in + UUID=*) + bootparam_root="/dev/disk/by-uuid/${bootparam_root#UUID=}" + ;; + PARTUUID=*) + bootparam_root="/dev/disk/by-partuuid/${bootparam_root#PARTUUID=}" + ;; + PARTLABEL=*) + bootparam_root="/dev/disk/by-partlabel/${bootparam_root#PARTLABEL=}" + ;; + LABEL=*) + bootparam_root="/dev/disk/by-label/${bootparam_root#LABEL=}" + ;; + ubi[0-9]*:*) + ubi_prefix=${bootparam_root%%:*} + ubi_digits=${ubi_prefix#ubi} + case "$ubi_digits" in + ''|*[!0-9]*) ;; + *) bootparam_rootfstype="ubifs" ;; + esac + ;; + esac if [ -e "$bootparam_root" ] || [ -n "$bootparam_rootfstype" ]; then flags="" From patchwork Fri Oct 16 03:18:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenwen Fu X-Patchwork-Id: 101086 X-Patchwork-Delegate: yoann.congal@smile.fr 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 18150CC6B38 for ; Fri, 16 Oct 2026 14:22:03 +0000 (UTC) Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.14464.1792123131764680153 for ; Thu, 15 Oct 2026 20:58:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=ig1tiGTs; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: qualcomm.com, ip: 205.220.168.131, mailfrom: wenwfu@qualcomm.com) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69G1C3cn1890584; Fri, 16 Oct 2026 03:18:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=kbiEkiGrILliDyx99sQVF1xDsRx+mwg5v9G uyDpR4es=; b=ig1tiGTsMZmeI/KnETnIF+hIHUokkRj6H2P9Ev6hKTFjVgA+UFp xZC5V7ex/3/hSAJQLIMbDIXry2nyEw7T6l/FfO0pqXcrRlYozPZKefiTm4Dd1AC3 1UE7vivfGqlV67skkQYKXkElmXCMTLKtCKoW/1hWu0vCzO4D0TPUt+nXPTbIZ5S7 sy9CPyhCtRPOD80X9sFyXKknwstI2LphFbLDuFRks05Cu2fX3fY14IUGmffJu/G+ t9+/t2Xjl7+EfBW0Pf5Z1bgFgYedBjzWr+SYv7c39Kuzpy19Yeti5uZE7sN7jTxi Q1gGoOKCVMa6qfJ3mOlbreNWX7NUGNH99+Q== Received: from aptaippmta02.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hba260bhq-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:18:28 +0000 (GMT) Received: from pps.filterd (aptaippmta02.qualcomm.com [127.0.0.1]) by APTAIPPMTA02.qualcomm.com (8.18.1.11/8.18.1.11) with ESMTP id 69G3Hc5T2743148; Fri, 16 Oct 2026 03:18:27 GMT Received: from perf-sh02-lnx.ap.qualcomm.com (smtphost-taiwan.qualcomm.com [10.249.136.33]) by APTAIPPMTA02.qualcomm.com (PPS) with ESMTPS id 69G3IQwf2743967 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:18:26 +0000 (GMT) Received: by perf-sh02-lnx.ap.qualcomm.com (Postfix, from userid 3975139) id BC2DAAC8; Fri, 16 Oct 2026 11:18:25 +0800 (CST) From: Wenwen Fu To: openembedded-core@lists.openembedded.org Cc: Wenwen Fu , Richard Purdie Subject: [PATCH wrynose 5/7] initramfs-framework: allow opting out of efivarfs mount Date: Fri, 16 Oct 2026 11:18:24 +0800 Message-ID: <20261016031824.706656-1-wenwfu@qti.qualcomm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Proofpoint-Reinject: loops=2 maxloops=12 X-QCInternal: smtphost X-QCInternal: smtphost X-Authority-Analysis: v=2.4 cv=bsHZl0ai c=1 sm=1 tr=0 ts=6ad19784 cx=c_pps a=nuhDOHQX5FNHPW3J6Bj6AA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=660iZSQnnn4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=ag1SF4gXAAAA:8 a=aNJ5eksCtXL9qKsYOLUA:9 a=Yupwre4RP9_Eg_Bd0iYG:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfX0XnfBQaaMmb9 w3Ot4xOaqkXHAIMa9GnPfjg4pBAxgYOP6Ioy5sHHw2/FlQhDaOVnPO7JLx7EAh/7XASRL3wGKx/ lgb1fbR8+nwyBGbzUq/eWL59lA4gV5U/94HEC8UejSA9529LZ5sTa+EJzc3tNR/fq6VZJggmi6W e41N1ro5W5yxZI48TKH18HWu3VHBIfweqXkeHGShwFSGwrsuOFM02fG060BWLAYlRvoJFgA6BOA IfUSCgY67+m8oI69MPryM3cWUiBhlDKQ+F2/zRpZTGCCUhgiawPSS4BmZnGQGnohpEItaxeAmT/ qyQVYDwU4oaVioYE0kGEcwvriD5oCOMQFumu3UHZVQKVNI391iBUGOl36vtEbLsmOWxmZ+J1nOr LxH7jROqNWyii/9pUTgZ974QG3F7uwGEkXJZ4YP5PdBR/lFP6m5UIntIwrkQlGqG850Ns+QeoLE bMvb3w1KAPoa59yhdgA== X-Proofpoint-ORIG-GUID: C9GJri0uEcfZNlPnTUJ-AFIwrHWd6qyR X-Proofpoint-GUID: C9GJri0uEcfZNlPnTUJ-AFIwrHWd6qyR X-Proofpoint-Spam-Info: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfX9D3BQykSePeP mzNW+sxmFdns1EEVg2fWfaS2vO9/F/Q5BIcknjhJ0mLAF+iTCA9giNkLmKRTkMBXlNTtUVffhJP avr0bJdKZrZlK60yrmVz0eTthDYQ5UE= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-10-14_01,2026-10-14_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 lowpriorityscore=0 bulkscore=0 malwarescore=0 impostorscore=0 suspectscore=0 phishscore=0 spamscore=0 priorityscore=1501 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610080000 definitions=main-2610160012 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 Oct 2026 14:22:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/248032 The initramfs mounts efivarfs before parsing the kernel command line. This was added so EFI metadata is available to early consumers such as mdadm when assembling Intel VROC RAID root devices. On systems where the real root filesystem mounts efivarfs later, the early mount is redundant and adds work to the initramfs critical path. Allow these systems to opt out with initramfs.efivarfs=0. Parse the command line before deciding whether to mount efivarfs. Keep the existing mount behavior by default for initramfs users that need EFI variables before switch_root. Signed-off-by: Wenwen Fu Signed-off-by: Richard Purdie (cherry picked from commit 9147744020f9b948f656a116ac03a9656e5a254b) --- .../initrdscripts/initramfs-framework/init | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init index 67590ad765..e3bf97bba9 100755 --- a/meta/recipes-core/initrdscripts/initramfs-framework/init +++ b/meta/recipes-core/initrdscripts/initramfs-framework/init @@ -87,10 +87,6 @@ mount -t sysfs sysfs /sys mount -t tmpfs tmpfs /run mkdir -p /run/lock -if [ -d $EFI_DIR ];then - mount -t efivarfs none /sys/firmware/efi/efivars -fi - # populate bootparam environment for p in `cat /proc/cmdline`; do if [ -n "$quoted" ]; then @@ -130,6 +126,12 @@ for p in `cat /proc/cmdline`; do fi done +# Keep efivarfs available in the initramfs by default. Systems which +# provide it from the real root filesystem can opt out of the early mount. +if [ "${bootparam_initramfs_efivarfs:-1}" != "0" ] && [ -d "$EFI_DIR" ]; then + mount -t efivarfs none /sys/firmware/efi/efivars +fi + # use /dev with devtmpfs if grep -q devtmpfs /proc/filesystems; then mkdir -p /dev From patchwork Fri Oct 16 03:18:33 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenwen Fu X-Patchwork-Id: 101085 X-Patchwork-Delegate: yoann.congal@smile.fr 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 17968CCF2C2 for ; Fri, 16 Oct 2026 14:21:53 +0000 (UTC) Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.14186.1792122904133054427 for ; Thu, 15 Oct 2026 20:55:04 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=DR4OsImp; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: qualcomm.com, ip: 205.220.168.131, mailfrom: wenwfu@qualcomm.com) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69FNCo6S557676; Fri, 16 Oct 2026 03:18:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=sS+Y7dMklOrXTWU/R27uaEl5UsPiaHsjJTL 3nx/LF+M=; b=DR4OsImpWojXM+MlIut8AwWx4JdrzGcbygR0D4Jm83+zLC4VoD+ 0ycG+zUjQCpoQq+ae19f07QSM3S6byUfhC9EQBCB4ayjVaKa5S1p5v7MuUk21Mzb KHAHkdyptA65A+fvmssNyd0jhIPF9vT2UsLqJLKKhLu+nD6xsZm8QIJn/X7vEPkb QHGyVizVuZUprerohDQpC2VUiCnkebMfDdrtJepNLHlTSJyxcydk+bOLNeXM+5BV H2v7veCaB7LFvkVe4a7pIap9IypcLaW0k4eGJXZsrvy2K7Dox8ZXK0Jj7TYRwV9d 6sfC2IIpggx6rUIjWRcKE1Zdbu4hV1Pzzlw== Received: from aptaippmta02.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hb8a88nqs-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:18:38 +0000 (GMT) Received: from pps.filterd (aptaippmta02.qualcomm.com [127.0.0.1]) by APTAIPPMTA02.qualcomm.com (8.18.1.11/8.18.1.11) with ESMTP id 69G3HO7x2742999; Fri, 16 Oct 2026 03:18:36 GMT Received: from perf-sh02-lnx.ap.qualcomm.com (smtphost-taiwan.qualcomm.com [10.249.136.33]) by APTAIPPMTA02.qualcomm.com (PPS) with ESMTPS id 69G3Iah32744063 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:18:36 +0000 (GMT) Received: by perf-sh02-lnx.ap.qualcomm.com (Postfix, from userid 3975139) id 89C75AC5; Fri, 16 Oct 2026 11:18:35 +0800 (CST) From: Wenwen Fu To: openembedded-core@lists.openembedded.org Cc: Wenwen Fu , Antonin Godard , Richard Purdie Subject: [PATCH wrynose 6/7] initramfs-framework: avoid processes when parsing cmdline Date: Fri, 16 Oct 2026 11:18:33 +0800 Message-ID: <20261016031833.708267-1-wenwfu@qti.qualcomm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Proofpoint-Reinject: loops=2 maxloops=12 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Spam-Info: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfX+kBRt3hk9Pmw GCt/b5LpVc9Gy9boLcca/f5QtkiUQTHclQzEjUCLXiMOg/8A+uGh4Lif6BoRfDdfJXJnpt5HgtA dB8feu7NP5XECf1gD2PCBlkS3t3hInc= X-Proofpoint-ORIG-GUID: -eM4uljuD36DZG-0S-8IjaPa-GxWpTBK X-Authority-Analysis: v=2.4 cv=GJadgeNK c=1 sm=1 tr=0 ts=6ad1978e cx=c_pps a=nuhDOHQX5FNHPW3J6Bj6AA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=660iZSQnnn4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=P-IC7800AAAA:8 a=ag1SF4gXAAAA:8 a=iFOcMdv-CBwm9g4JKMcA:9 a=d3PnA9EDa4IxuAV0gXij:22 a=Yupwre4RP9_Eg_Bd0iYG:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfX/agwm9FO1PwV O0y+loK0wtohrXSHCvmNPvsZtJ/gN0am944aiV1RZD+ZirGwokrNfYUKe2TxW4wGKXux78smWx2 7jTyBgs05T5t7UOfOEcW6umVJlqJ65DrGcL9wB6P59yT9pAYQGB2eTY/LbVqjyebUk8pGwuawVr u0/QY53Q4qYsDauF/N9zW8mzHGuqWcUllRQrkYvElpMZOqHiBenfEqgyo44GDbrGIcMZD0y5ldO ZfjjyiKUKQFZ2PBvSc04U2D/Wrmrt8QQI29bXUeOHRfva/Zvb0TYy3AK5EfTxLar1moqlPS+jjx E9xa1BzVf9TXx42Gj9dwQi8OUnfeqJKk263yMgSe5fC7HT6MK+eTnnlK+0L5uAW7PHJ6fS/+2i5 H98M38ZpQGFqSnoq0EWDMlQBImb1YnTyYI3hAqQRqj/Ciu/XW9Rhu/klgkntZc+mfbJLgz1p/1V Nx0osPSkJWjOvPaYbfg== X-Proofpoint-GUID: -eM4uljuD36DZG-0S-8IjaPa-GxWpTBK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-10-14_01,2026-10-14_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 impostorscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 phishscore=0 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610080000 definitions=main-2610160012 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 Oct 2026 14:21:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/248030 Use POSIX shell parameter expansion instead of external cut and sed while parsing kernel command-line parameters. This keeps the parser compatible with /bin/sh implementations that do not support Bash-style pattern substitution while avoiding per-parameter processes. On QEMU, cmdline parsing decreased from 1.381871 s to 0.056985 s, a 95.9% reduction. Tested with dash and BusyBox sh syntax checks and QEMU. AI-Generated: OpenAI Codex Signed-off-by: Wenwen Fu Signed-off-by: Antonin Godard Signed-off-by: Richard Purdie (cherry picked from commit b560c7527a66b8fa90817a92b16b323493fb394d) --- .../initrdscripts/initramfs-framework/init | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init index e3bf97bba9..e03685175f 100755 --- a/meta/recipes-core/initrdscripts/initramfs-framework/init +++ b/meta/recipes-core/initrdscripts/initramfs-framework/init @@ -100,13 +100,20 @@ for p in `cat /proc/cmdline`; do continue fi - opt=`echo $p | cut -d'=' -f1` - opt=`echo $opt | sed -e 'y/.-/__/'` - if [ "`echo $p | cut -d'=' -f1`" = "$p" ]; then + key=${p%%=*} + opt=$key + while :; do + case "$opt" in + *.*) opt=${opt%%.*}_${opt#*.} ;; + *-*) opt=${opt%%-*}_${opt#*-} ;; + *) break ;; + esac + done + if [ "$key" = "$p" ]; then # opt parameter eval "bootparam_${opt}=true" else - value="`echo $p | cut -d'=' -f2-`" # Option value + value=${p#*=} # Option value value_lstripped=${value#\"} value_rstripped=${value%\"} From patchwork Fri Oct 16 03:18:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenwen Fu X-Patchwork-Id: 101084 X-Patchwork-Delegate: yoann.congal@smile.fr 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 26B17CC6B38 for ; Fri, 16 Oct 2026 14:21:53 +0000 (UTC) Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.14460.1792123110746919569 for ; Thu, 15 Oct 2026 20:58:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=gPw/lcGQ; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: qualcomm.com, ip: 205.220.168.131, mailfrom: wenwfu@qualcomm.com) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69G1Brpt1890469; Fri, 16 Oct 2026 03:18:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=j0x6Z0iugJyYd9AkPf7mGsWz8hUvT0sHler Dqx4lA+A=; b=gPw/lcGQ77lnTIXOBxMVExBaGHdDkvSx8JtDQsoWsbiYpugOhAS duFbvpxMzINVYLOv0bgujrbbbap3hTbyx6QIFjS2i6oBeCcgYqX6ZeP6fZlDGgAn HJm/WZz6zO8VbLPbPrd8YRdWIwulT3j5FrtD5eoXmkuQANUep+r4eWFhC3m2fbSG 2P1ztpDaSMzbRsYoUEIkDJRKUIQWvsn8hy83Likge/ZXIJfpig3+QxcbsYKjguLS 73Chle/i1kr8kQZgc8+Z6d1jX1XHCtGHciV/+gbTx/27/CzRNaeltyZyof5iovG0 +ERyIAZbyp1nl++KLU+j/lXl7vDfACMuiOg== Received: from aptaippmta02.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hba260bjm-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:18:46 +0000 (GMT) Received: from pps.filterd (aptaippmta02.qualcomm.com [127.0.0.1]) by APTAIPPMTA02.qualcomm.com (8.18.1.11/8.18.1.11) with ESMTP id 69G3Hcw32743147; Fri, 16 Oct 2026 03:18:45 GMT Received: from perf-sh02-lnx.ap.qualcomm.com (smtphost-taiwan.qualcomm.com [10.249.136.33]) by APTAIPPMTA02.qualcomm.com (PPS) with ESMTPS id 69G3IiRG2744153 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 16 Oct 2026 03:18:45 +0000 (GMT) Received: by perf-sh02-lnx.ap.qualcomm.com (Postfix, from userid 3975139) id 19E7BAC5; Fri, 16 Oct 2026 11:18:44 +0800 (CST) From: Wenwen Fu To: openembedded-core@lists.openembedded.org Cc: Wenwen Fu , Antonin Godard , Richard Purdie Subject: [PATCH wrynose 7/7] initramfs-framework: avoid external commands in module loop Date: Fri, 16 Oct 2026 11:18:42 +0800 Message-ID: <20261016031842.709431-1-wenwfu@qti.qualcomm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Proofpoint-Reinject: loops=2 maxloops=12 X-QCInternal: smtphost X-QCInternal: smtphost X-Authority-Analysis: v=2.4 cv=bsHZl0ai c=1 sm=1 tr=0 ts=6ad19797 cx=c_pps a=nuhDOHQX5FNHPW3J6Bj6AA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=660iZSQnnn4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=P-IC7800AAAA:8 a=ag1SF4gXAAAA:8 a=TUV-FE7MVKuhXN5Lm6EA:9 a=d3PnA9EDa4IxuAV0gXij:22 a=Yupwre4RP9_Eg_Bd0iYG:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfX5ryhXe5wXfw+ jDy/xTzThjDSeKgVcxmLU5mKTsI5NRiZs++7OKsHFqRlVyGc7qgmMiNICfdmzxGH1YJh9gtMAV6 GtnTkzAZvUnU1BJIstECdpJQr2Qoe4V03lHAVfImfWDaFsAxbfn1CZ9zzZjlakJSrtLpX+58Xmx uxiDWA68DADUCKzghSgPsgOUrIACkYMyYQcPnXmmtGc/AW/3S0JMqQsGC+rBeGvWPyShQHApZ1f HWqjVR8Fhi1OhlfysEP0R4sx3XIh63BCsf9twiFVsS0ZlYx3DW8QnrUkIYioDO7yPiib1aDkU1g wvqlrIRF1Y0ixhzoXThy40R3EgKWKfvdjrVT8yW4QYDObtn2g2Q4syDKVhpM/M5OChCoD4HgGjA Z+25Om/HEAXgRcow3rFVob9zcpQXsyNXSDT2zs0btJFGbPylVfz/K4V1BsvMZhOE9Vcz5uDgCuH XZM324Iw0Dw+j26Iheg== X-Proofpoint-ORIG-GUID: 6qft52SfoZBHkCeWFVdAmULpseuB_VTb X-Proofpoint-GUID: 6qft52SfoZBHkCeWFVdAmULpseuB_VTb X-Proofpoint-Spam-Info: AW1haW4tMjYxMDE2MDAxMiBTYWx0ZWRfX3vg7Ylp+i5iF 7V7KURrxpMr9/gNnhId5AhFC5UWGjuOFbklamV9ogeJAGfJB3WyYX8OatUAzmhliGa2t8S8XlZE FT1PIHn8KLWKqpkFPc06DMTYg9BVGcU= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-10-14_01,2026-10-14_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 malwarescore=0 impostorscore=0 suspectscore=0 phishscore=0 spamscore=0 priorityscore=1501 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610080000 definitions=main-2610160012 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 Oct 2026 14:21:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/248031 Use shell pattern matching and parameter expansion to skip backup modules and derive module names without invoking sed, basename, or cut during initramfs module loading. On QEMU, backup filtering decreased from 104.529 ms to 3.731 ms, and module name parsing decreased from 115.657 ms to 4.071 ms. Together, these stages decreased from 220.186 ms to 7.802 ms. Tested with dash and BusyBox sh syntax checks and QEMU. AI-Generated: OpenAI Codex Signed-off-by: Wenwen Fu Signed-off-by: Antonin Godard Signed-off-by: Richard Purdie (cherry picked from commit f7097b98a32ff3b672e5340767cb2ca2709dfd9a) --- .../initrdscripts/initramfs-framework/init | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init index e03685175f..5dbf32a12d 100755 --- a/meta/recipes-core/initrdscripts/initramfs-framework/init +++ b/meta/recipes-core/initrdscripts/initramfs-framework/init @@ -154,11 +154,15 @@ mkdir $ROOTFS_DIR # Load and run modules for m in $MODULES_DIR/*; do # Skip backup files - if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then - continue - fi + case "$m" in + *~) + continue + ;; + esac - module=`basename $m | cut -d'-' -f 2` + module=${m##*/} + module=${module#*-} + module=${module%%-*} debug "Loading module $module" # pre hooks