[oe-commits] [openembedded-core] 04/07: image: create symlinks needed for merged /usr
git at git.openembedded.org
git at git.openembedded.org
Fri Jun 30 08:03:58 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 86a181593f0207c0b4afda83b91a206a8975a0ac
Author: Amarnath Valluri <amarnath.valluri at intel.com>
AuthorDate: Wed Jun 14 14:30:45 2017 +0300
image: create symlinks needed for merged /usr
Prepare the symlinks required for merged /usr at the time of rootfs creation.
The links created in rootfs are:
/bin --> /usr/sbin
/sbin --> /usr/sbin
/lib --> /usr/lib
/lib64 --> /usr/lib64
We cannot make these symlinks as part of 'base-files' or some other package.
Because at rootfs creation, installation of the package(say kernel) that depends
on these root folders/links fails, if package manager installs this package
prior to base-files.
These symbolic links in top level folder should be present as long as
- kernel tools use /lib/{module,firmware}
- shell scripts uses "#!/bin/sh"
Signed-off-by: Amarnath Valluri <amarnath.valluri at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/image.bbclass | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 6e30b96..6e5a8ba 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -617,3 +617,24 @@ do_bundle_initramfs () {
:
}
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}
+
+ if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
+ install -d ${IMAGE_ROOTFS}${nonarch_base_libdir}
+ lnr ${IMAGE_ROOTFS}${nonarch_base_libdir} ${IMAGE_ROOTFS}/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
+ done
+}
+ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks; ', '',d)}"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list