* [PATCH] initramfs-framework: support LABEL with root-only udev trigger @ 2026-08-26 9:25 Wenwen Fu 2026-08-27 13:04 ` Paul Barker 2026-08-27 15:11 ` [PATCH v2] " Wenwen Fu 0 siblings, 2 replies; 5+ messages in thread From: Wenwen Fu @ 2026-08-26 9:25 UTC (permalink / raw) To: openembedded-core; +Cc: Wenwen Fu Filesystem labels are not available in kernel uevents. Enable the BusyBox findfs applet and use it to resolve root=LABEL= to a device. Read the kernel-provided PARTUUID from sysfs and trigger only that partition. Fall back to the full trigger when the label cannot be resolved safely. Signed-off-by: Wenwen Fu <wenwfu@qti.qualcomm.com> --- meta/recipes-core/busybox/busybox/defconfig | 2 +- .../initrdscripts/initramfs-framework/udev | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/busybox/busybox/defconfig b/meta/recipes-core/busybox/busybox/defconfig index 1f4b5e3d1e..a282370a8f 100644 --- a/meta/recipes-core/busybox/busybox/defconfig +++ b/meta/recipes-core/busybox/busybox/defconfig @@ -634,7 +634,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/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 ;; -- 2.43.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] initramfs-framework: support LABEL with root-only udev trigger 2026-08-26 9:25 [PATCH] initramfs-framework: support LABEL with root-only udev trigger Wenwen Fu @ 2026-08-27 13:04 ` Paul Barker 2026-08-27 14:25 ` Wenwen Fu 2026-08-27 15:11 ` [PATCH v2] " Wenwen Fu 1 sibling, 1 reply; 5+ messages in thread From: Paul Barker @ 2026-08-27 13:04 UTC (permalink / raw) To: Wenwen Fu, openembedded-core On Wed, 2026-08-26 at 17:25 +0800, Wenwen Fu wrote: > Filesystem labels are not available in kernel uevents. Enable the > BusyBox findfs applet and use it to resolve root=LABEL= to a device. > Read the kernel-provided PARTUUID from sysfs and trigger only that > partition. Fall back to the full trigger when the label cannot be > resolved safely. > > Signed-off-by: Wenwen Fu <wenwfu@qti.qualcomm.com> > --- > meta/recipes-core/busybox/busybox/defconfig | 2 +- > .../initrdscripts/initramfs-framework/udev | 12 ++++++++++++ > 2 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/meta/recipes-core/busybox/busybox/defconfig b/meta/recipes-core/busybox/busybox/defconfig > index 1f4b5e3d1e..a282370a8f 100644 > --- a/meta/recipes-core/busybox/busybox/defconfig > +++ b/meta/recipes-core/busybox/busybox/defconfig > @@ -634,7 +634,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 Does this really need enabling in the defconfig, i.e. for all users? We try to keep the default busybox configuration small. Best regards, -- Paul Barker ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] initramfs-framework: support LABEL with root-only udev trigger 2026-08-27 13:04 ` Paul Barker @ 2026-08-27 14:25 ` Wenwen Fu 0 siblings, 0 replies; 5+ messages in thread From: Wenwen Fu @ 2026-08-27 14:25 UTC (permalink / raw) To: Paul Barker, openembedded-core@lists.openembedded.org; +Cc: Zhuo Fu [-- Attachment #1: Type: text/plain, Size: 2003 bytes --] Hi Pual, Thank you for your review, Good point. It does not need to be enabled globally. I'll send a v2 using the separately packaged util-linux-findfs as a runtime dependency of initramfs-module-udev, leaving the default BusyBox configuration unchanged. Thanks Wenwen ________________________________ From: Paul Barker <paul@pbarker.dev> Sent: Thursday, August 27, 2026 21:04 To: Wenwen Fu <wenwfu@qti.qualcomm.com>; openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> Subject: Re: [PATCH] initramfs-framework: support LABEL with root-only udev trigger WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros. On Wed, 2026-08-26 at 17:25 +0800, Wenwen Fu wrote: > Filesystem labels are not available in kernel uevents. Enable the > BusyBox findfs applet and use it to resolve root=LABEL= to a device. > Read the kernel-provided PARTUUID from sysfs and trigger only that > partition. Fall back to the full trigger when the label cannot be > resolved safely. > > Signed-off-by: Wenwen Fu <wenwfu@qti.qualcomm.com> > --- > meta/recipes-core/busybox/busybox/defconfig | 2 +- > .../initrdscripts/initramfs-framework/udev | 12 ++++++++++++ > 2 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/meta/recipes-core/busybox/busybox/defconfig b/meta/recipes-core/busybox/busybox/defconfig > index 1f4b5e3d1e..a282370a8f 100644 > --- a/meta/recipes-core/busybox/busybox/defconfig > +++ b/meta/recipes-core/busybox/busybox/defconfig > @@ -634,7 +634,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 Does this really need enabling in the defconfig, i.e. for all users? We try to keep the default busybox configuration small. Best regards, -- Paul Barker [-- Attachment #2: Type: text/html, Size: 4230 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] initramfs-framework: support LABEL with root-only udev trigger 2026-08-26 9:25 [PATCH] initramfs-framework: support LABEL with root-only udev trigger Wenwen Fu 2026-08-27 13:04 ` Paul Barker @ 2026-08-27 15:11 ` Wenwen Fu 2026-08-28 13:05 ` [OE-core] " Mathieu Dubois-Briand 1 sibling, 1 reply; 5+ messages in thread From: Wenwen Fu @ 2026-08-27 15:11 UTC (permalink / raw) To: openembedded-core; +Cc: Wenwen Fu 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. Tested with bitbake -p and by generating the core-image-minimal-initramfs dependency graph. AI-Generated: OpenAI Codex Signed-off-by: Wenwen Fu <wenwfu@qti.qualcomm.com> --- Changes in v2: - Keep findfs out of the default BusyBox configuration. - Add util-linux-findfs as an initramfs-module-udev runtime dependency. --- .../initrdscripts/initramfs-framework/udev | 12 ++++++++++++ .../initrdscripts/initramfs-framework_1.0.bb | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) 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" -- 2.43.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH v2] initramfs-framework: support LABEL with root-only udev trigger 2026-08-27 15:11 ` [PATCH v2] " Wenwen Fu @ 2026-08-28 13:05 ` Mathieu Dubois-Briand 0 siblings, 0 replies; 5+ messages in thread From: Mathieu Dubois-Briand @ 2026-08-28 13:05 UTC (permalink / raw) To: wenwfu, openembedded-core On Thu Aug 27, 2026 at 5:11 PM CEST, Wenwen Fu via lists.openembedded.org wrote: > 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. > > Tested with bitbake -p and by generating the > core-image-minimal-initramfs dependency graph. > > AI-Generated: OpenAI Codex > Signed-off-by: Wenwen Fu <wenwfu@qti.qualcomm.com> > --- > Changes in v2: > - Keep findfs out of the default BusyBox configuration. > - Add util-linux-findfs as an initramfs-module-udev runtime dependency. > --- Hi, Thanks for the new version, but it looks like this is now breaking the sstatetests.SStateHashSameSigs2.test_sstate_allarch_samesigs selftest: 2026-08-28 11:52:19,276 - oe-selftest - INFO - 11: 37/71 648/764 (178.91s) (0 failed) (sstatetests.SStateHashSameSigs2.test_sstate_allarch_samesigs) 2026-08-28 11:52:19,277 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last): File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/sstatetests.py", line 474, in test_sstate_allarch_samesigs self.sstate_common_samesigs(configA, configB, allarch=True) ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/sstatetests.py", line 207, in sstate_common_samesigs self.assertEqual(files1, files2) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.13/unittest/case.py", line 907, in assertEqual assertion_func(first, second, msg=msg) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.13/unittest/case.py", line 1206, in assertDictEqual self.fail(self._formatMessage(msg, standardMsg)) ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.13/unittest/case.py", line 732, in fail raise self.failureException(msg) AssertionError: {'nat[225943 chars]k/do_create_package_spdx': '89409e9454bed0d549[78392 chars]4bc'} != {'nat[225943 chars]k/do_recipe_qa': '164b683aa2faabba13f23d8003ac[78392 chars]4bc'} ... - 'initramfs-framework/do_create_package_spdx': '89409e9454bed0d5494c8686b6418dc7fdd8c7c0d0e97dd87dd3e8342b621da4', + 'initramfs-framework/do_create_package_spdx': 'c7ab0c1500e7106e8265cef8bd1fe05be652789acf69432215a7e172408676b7', ... - 'initramfs-framework/do_package_qa': 'b6819a7ecf80c6bf03ff749c968ce24754dd7a07d05fd0fc2fcc9a53efd87bfb', - 'initramfs-framework/do_package_write_rpm': '5a3cc5880fa17990df7847741014ff9188f80d91e48d789665ff82b1016028f1', + 'initramfs-framework/do_package_qa': '9b79d0a3fb13d27058711597b04fe0d62f4cd54f250db04408ceb02e35d09a12', + 'initramfs-framework/do_package_write_rpm': '937c8f39225bc46d8d8abaa38ba17af2b428b690ecb5f4a7706a711824a52af2', ... https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/4693 https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/4737 https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/4514 Can you have a look at the issue? Thanks, Mathieu -- Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-08-28 13:24 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-08-26 9:25 [PATCH] initramfs-framework: support LABEL with root-only udev trigger Wenwen Fu 2026-08-27 13:04 ` Paul Barker 2026-08-27 14:25 ` Wenwen Fu 2026-08-27 15:11 ` [PATCH v2] " Wenwen Fu 2026-08-28 13:05 ` [OE-core] " Mathieu Dubois-Briand
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox