From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Amarnath Valluri <amarnath.valluri@intel.com>,
"openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v5] image.bbclass: create root symlinks in nativesdk target sysroot
Date: Thu, 15 Jun 2017 09:32:37 +0000 [thread overview]
Message-ID: <ba4d34ea616f45249fb2bed1c4a4e3a3@XBOX02.axis.com> (raw)
In-Reply-To: <1497515577-40707-1-git-send-email-amarnath.valluri@intel.com>
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Amarnath Valluri
> Sent: den 15 juni 2017 10:33
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH v5] 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>
> ---
> meta/classes/image.bbclass | 29 ++++++++++++++++++++---------
> 1 file changed, 20 insertions(+), 9 deletions(-)
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 2a3c1e3..7c5cfc5 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 -m 0755 -d $root${nonarch_base_libdir}
Meh, missed this the first time, but you reintroduce an unnecessary
-m 0755 here.
> + 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 -m 0755 -d $root${exec_prefix}/$d
And the same here.
> + 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)}"
> --
> 2.7.4
//Peter
next prev parent reply other threads:[~2017-06-15 9:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 11:30 [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 1/7] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge Amarnath Valluri
2017-06-14 11:48 ` Richard Purdie
2017-06-14 13:00 ` Valluri, Amarnath
2017-06-14 13:05 ` [PATCH v5] " Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 2/7] cross.bbclass: merged /usr support Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 3/7] systemd: changes to support merged /usr Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 4/7] image: create symlinks needed for " Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 5/7] insane.bbclass: Add package QA check " Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 6/7] meta/lib/oe/sdk.py: support added for executing pre-target commands Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 7/7] image.bbclass: create root symlinks in nativesdk target sysroot Amarnath Valluri
2017-06-14 13:37 ` Peter Kjellerstedt
2017-06-15 8:32 ` [PATCH v5] " Amarnath Valluri
2017-06-15 9:32 ` Peter Kjellerstedt [this message]
2017-06-15 10:28 ` Valluri, Amarnath
2017-06-15 10:32 ` [PATCH v6] " Amarnath Valluri
2017-06-30 7:03 ` [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Valluri, Amarnath
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ba4d34ea616f45249fb2bed1c4a4e3a3@XBOX02.axis.com \
--to=peter.kjellerstedt@axis.com \
--cc=amarnath.valluri@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox