@@ -681,37 +681,11 @@ deltask do_package_write_ipk
deltask do_package_write_deb
deltask do_package_write_rpm
-# Prepare the root links to point to the /usr counterparts.
-create_merged_usr_symlinks() {
- root="$1"
- install -d $root${base_bindir} $root${base_sbindir} $root${base_libdir}
- ln -rs $root${base_bindir} $root/bin
- ln -rs $root${base_sbindir} $root/sbin
- ln -rs $root${base_libdir} $root/${baselib}
-
- if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
- install -d $root${nonarch_base_libdir}
- ln -rs $root${nonarch_base_libdir} $root/lib
- fi
-
- # create base links for multilibs
- multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
- for d in $multi_libdirs; do
- install -d $root${exec_prefix}/$d
- ln -rs $root${exec_prefix}/$d $root/$d
- done
-}
-
create_merged_usr_symlinks_rootfs() {
create_merged_usr_symlinks ${IMAGE_ROOTFS}
}
-create_merged_usr_symlinks_sdk() {
- create_merged_usr_symlinks ${SDK_OUTPUT}${SDKTARGETSYSROOT}
-}
-
ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_rootfs', '',d)}"
-POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk', '',d)}"
reproducible_final_image_task () {
if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
@@ -175,6 +175,33 @@ POPULATE_SDK_POST_TARGET_COMMAND:append = " write_sdk_test_data"
POPULATE_SDK_POST_TARGET_COMMAND:append:task-populate-sdk = " write_target_sdk_manifest sdk_prune_dirs"
POPULATE_SDK_POST_HOST_COMMAND:append:task-populate-sdk = " write_host_sdk_manifest"
+# Prepare the root links to point to the /usr counterparts.
+create_merged_usr_symlinks() {
+ root="$1"
+ install -d $root${base_bindir} $root${base_sbindir} $root${base_libdir}
+ ln -rs $root${base_bindir} $root/bin
+ ln -rs $root${base_sbindir} $root/sbin
+ ln -rs $root${base_libdir} $root/${baselib}
+
+ if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
+ install -d $root${nonarch_base_libdir}
+ ln -rs $root${nonarch_base_libdir} $root/lib
+ fi
+
+ # create base links for multilibs
+ multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
+ for d in $multi_libdirs; do
+ install -d $root${exec_prefix}/$d
+ ln -rs $root${exec_prefix}/$d $root/$d
+ done
+}
+
+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)}"
+
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}"
SDKs which aren't built from an image recipe should also come with drop-in symlinks for `/bin`, `/lib` and `/sbin`. Support this by moving the common functionality into `populate_sdk_base` and enabling the symlink creation when the `usrmerge` DISTRO_FEATURE is on. Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de> --- meta/classes-recipe/image.bbclass | 26 ------------------ meta/classes-recipe/populate_sdk_base.bbclass | 27 +++++++++++++++++++ 2 files changed, 27 insertions(+), 26 deletions(-)