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 v4 7/7] image.bbclass: create root symlinks in nativesdk target sysroot
Date: Wed, 14 Jun 2017 13:37:12 +0000 [thread overview]
Message-ID: <c575a866af5f4e5bbf8af4ca2128cecf@XBOX02.axis.com> (raw)
In-Reply-To: <1497439848-29967-8-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 14 juni 2017 13:31
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH v4 7/7] 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..b6c3866 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}
> + 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
> + lnr ${root}${exec_prefix}/$d ${root}/$d
> done
> }
Change all references to "${root}" to "$root" in the above code.
It is a shell variable, not a bitbake variable.
> -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-14 13:37 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 [this message]
2017-06-15 8:32 ` [PATCH v5] " Amarnath Valluri
2017-06-15 9:32 ` Peter Kjellerstedt
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=c575a866af5f4e5bbf8af4ca2128cecf@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.