summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image.bbclass21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 6e30b96745..6e5a8ba7fb 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -617,3 +617,24 @@ do_bundle_initramfs () {
617 : 617 :
618} 618}
619addtask bundle_initramfs after do_image_complete 619addtask bundle_initramfs after do_image_complete
620
621# Prepare the root links to point to the /usr counterparts.
622create_merged_usr_symlinks() {
623 install -d ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}${base_libdir}
624 lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin
625 lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin
626 lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}
627
628 if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
629 install -d ${IMAGE_ROOTFS}${nonarch_base_libdir}
630 lnr ${IMAGE_ROOTFS}${nonarch_base_libdir} ${IMAGE_ROOTFS}/lib
631 fi
632
633 # create base links for multilibs
634 multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
635 for d in $multi_libdirs; do
636 install -d ${IMAGE_ROOTFS}${exec_prefix}/$d
637 lnr ${IMAGE_ROOTFS}${exec_prefix}/$d ${IMAGE_ROOTFS}/$d
638 done
639}
640ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks; ', '',d)}"