diff options
author | Amarnath Valluri <amarnath.valluri@intel.com> | 2017-06-15 13:32:39 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-06 14:38:15 +0100 |
commit | 96e3848ba08fa68ccdfd0cc41cb790931f7541eb (patch) | |
tree | ceda7c10c063d3bf0674fcfc03a6159b08d05593 /meta/classes | |
parent | 2ea87f74da88566c2c8017dbd545632f7acea4fd (diff) | |
download | poky-96e3848ba08fa68ccdfd0cc41cb790931f7541eb.tar.gz |
image.bbclass: create root symlinks in nativesdk target sysroot
To match with the target image, the generated nativesdk's target sysroot also
should have the root symlinks(/lib*, /bin/, /sbin). So, extended the
'create_merged_usr_symlinks' to reuse symlink creation part even for nativesdk
using POPULATE_SDK_PRE_TARGET_COMMAND.
(From OE-Core rev: 2d7a58ef7a9597fde868a0582153d1f9a3007f1e)
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image.bbclass | 29 |
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. |
622 | create_merged_usr_symlinks() { | 622 | create_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 | } |
640 | ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks; ', '',d)}" | 641 | |
642 | create_merged_usr_symlinks_rootfs() { | ||
643 | create_merged_usr_symlinks ${IMAGE_ROOTFS} | ||
644 | } | ||
645 | |||
646 | create_merged_usr_symlinks_sdk() { | ||
647 | create_merged_usr_symlinks ${SDK_OUTPUT}${SDKTARGETSYSROOT} | ||
648 | } | ||
649 | |||
650 | ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_rootfs; ', '',d)}" | ||
651 | POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}" | ||