summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmarnath Valluri <amarnath.valluri@intel.com>2017-06-15 13:32:39 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-06 14:38:09 +0100
commit2d7a58ef7a9597fde868a0582153d1f9a3007f1e (patch)
treebfab23c3924fd374d30b3dd06d91ccccf3c709f9
parent9f52f9f60f5680d7a824dafb3334de624eceed4c (diff)
downloadopenembedded-core-contrib-2d7a58ef7a9597fde868a0582153d1f9a3007f1e.tar.gz
openembedded-core-contrib-2d7a58ef7a9597fde868a0582153d1f9a3007f1e.tar.bz2
openembedded-core-contrib-2d7a58ef7a9597fde868a0582153d1f9a3007f1e.zip
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. Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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
# Prepare the root links to point to the /usr counterparts.
create_merged_usr_symlinks() {
- install -d ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}${base_libdir}
- lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin
- lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin
- lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}
+ root="$1"
+ install -d $root${base_bindir} $root${base_sbindir} $root${base_libdir}
+ lnr $root${base_bindir} $root/bin
+ lnr $root${base_sbindir} $root/sbin
+ lnr $root${base_libdir} $root/${baselib}
if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
- install -d ${IMAGE_ROOTFS}${nonarch_base_libdir}
- lnr ${IMAGE_ROOTFS}${nonarch_base_libdir} ${IMAGE_ROOTFS}/lib
+ install -d $root${nonarch_base_libdir}
+ lnr $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 ${IMAGE_ROOTFS}${exec_prefix}/$d
- lnr ${IMAGE_ROOTFS}${exec_prefix}/$d ${IMAGE_ROOTFS}/$d
+ install -d $root${exec_prefix}/$d
+ lnr $root${exec_prefix}/$d $root/$d
done
}
-ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks; ', '',d)}"
+
+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)}"