summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image.bbclass29
1 files changed, 20 insertions, 9 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 6e5a8ba7fb..de535ce6fc 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -620,21 +620,32 @@ addtask bundle_initramfs after do_image_complete
620 620
621# Prepare the root links to point to the /usr counterparts. 621# Prepare the root links to point to the /usr counterparts.
622create_merged_usr_symlinks() { 622create_merged_usr_symlinks() {
623 install -d ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}${base_libdir} 623 root="$1"
624 lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin 624 install -d $root${base_bindir} $root${base_sbindir} $root${base_libdir}
625 lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin 625 lnr $root${base_bindir} $root/bin
626 lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib} 626 lnr $root${base_sbindir} $root/sbin
627 lnr $root${base_libdir} $root/${baselib}
627 628
628 if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then 629 if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
629 install -d ${IMAGE_ROOTFS}${nonarch_base_libdir} 630 install -d $root${nonarch_base_libdir}
630 lnr ${IMAGE_ROOTFS}${nonarch_base_libdir} ${IMAGE_ROOTFS}/lib 631 lnr $root${nonarch_base_libdir} $root/lib
631 fi 632 fi
632 633
633 # create base links for multilibs 634 # create base links for multilibs
634 multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}" 635 multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
635 for d in $multi_libdirs; do 636 for d in $multi_libdirs; do
636 install -d ${IMAGE_ROOTFS}${exec_prefix}/$d 637 install -d $root${exec_prefix}/$d
637 lnr ${IMAGE_ROOTFS}${exec_prefix}/$d ${IMAGE_ROOTFS}/$d 638 lnr $root${exec_prefix}/$d $root/$d
638 done 639 done
639} 640}
640ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks; ', '',d)}" 641
642create_merged_usr_symlinks_rootfs() {
643 create_merged_usr_symlinks ${IMAGE_ROOTFS}
644}
645
646create_merged_usr_symlinks_sdk() {
647 create_merged_usr_symlinks ${SDK_OUTPUT}${SDKTARGETSYSROOT}
648}
649
650ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_rootfs; ', '',d)}"
651POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}"