diff mbox series

image/populate_sdk: Support usrmerge for nativesdk in SDK builds

Message ID 20250117130851.4055166-1-sean@geanix.com
State New
Headers show
Series image/populate_sdk: Support usrmerge for nativesdk in SDK builds | expand

Commit Message

Sean Nyekjaer Jan. 17, 2025, 1:08 p.m. UTC
Some recipes(systemd) requires usrmerge. Create the required
symlinks for `/bin`, `/lib` and `/sbin`, when installing nativesdk
packages.
Enable the symlink creation by setting the `usrmerge` flag in
DISTRO_FEATURES_NATIVESDK.

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
---
 meta/classes-recipe/populate_sdk_base.bbclass | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/populate_sdk_base.bbclass b/meta/classes-recipe/populate_sdk_base.bbclass
index 98ac723552c..edd9da91712 100644
--- a/meta/classes-recipe/populate_sdk_base.bbclass
+++ b/meta/classes-recipe/populate_sdk_base.bbclass
@@ -200,7 +200,14 @@  create_merged_usr_symlinks_sdk() {
     create_merged_usr_symlinks ${SDK_OUTPUT}${SDKTARGETSYSROOT}
 }
 
-POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk', '',d)}"
+create_merged_usr_symlinks_nativesdk() {
+    create_merged_usr_symlinks ${SDK_OUTPUT}${SDKPATHNATIVE}
+}
+
+POPULATE_SDK_PRE_TARGET_COMMAND += " \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk', '',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES_NATIVESDK', 'usrmerge', 'create_merged_usr_symlinks_nativesdk', '',d)} \
+"
 
 SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC}' if '${SDK_PACKAGING_FUNC}' else ''}"
 SDK_POSTPROCESS_COMMAND = "create_sdk_files check_sdk_sysroots archive_sdk ${SDK_PACKAGING_COMMAND}"