All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Valluri, Amarnath" <amarnath.valluri@intel.com>
To: "peter.kjellerstedt@axis.com" <peter.kjellerstedt@axis.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v3 7/8] image: create symlinks needed for merged /usr
Date: Tue, 13 Jun 2017 12:32:31 +0000	[thread overview]
Message-ID: <1497357195.39827.12.camel@intel.com> (raw)
In-Reply-To: <5b5d7bf2edde4d1a9bcffe8c9e6c6644@XBOX02.axis.com>

On Tue, 2017-06-13 at 08:05 +0000, Peter Kjellerstedt wrote:
> > 
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org
> > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> > Of
> > Amarnath Valluri
> > Sent: den 13 juni 2017 08:53
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH v3 7/8] 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 present as long as
> Change "should" to "should be".
> 
> > 
> >  - kerenl tools use /lib/{module,firmware}
> Change "kerenl" to "kernel".
> 
> > 
> >  - shell scripts uses "#!/bin/sh"
> > 
> > Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
> > ---
> >  meta/classes/image.bbclass | 23 +++++++++++++++++++++++
> >  1 file changed, 23 insertions(+)
> > 
> > diff --git a/meta/classes/image.bbclass
> > b/meta/classes/image.bbclass
> > index 85f6b9a..f08e3e1 100644
> > --- a/meta/classes/image.bbclass
> > +++ b/meta/classes/image.bbclass
> > @@ -617,3 +617,26 @@ do_bundle_initramfs () {
> >  	:
> >  }
> >  addtask bundle_initramfs after do_image_complete
> > +
> > +# Prepare the root links to point to the /usr counterparts.
> In the function below:
> * You do not need to specify -m 0755 to install, it is the default.
> * Change all "/${var}" to "${var}".
> 
> > 
> > +create_merged_usr_symlinks() {
> > +    install -m 0755 -d ${IMAGE_ROOTFS}/${base_bindir}
> > +    install -m 0755 -d ${IMAGE_ROOTFS}/${base_sbindir}
> > +    install -m 0755 -d ${IMAGE_ROOTFS}/${base_libdir}
> You can combine these three installs into one. Saves two forks.
> 
> > 
> > +    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
> Why do you check "${nonarch_base_libdir}" != "${base_libdir}" when
> you do not check the other three above?
Our intention here is to create /lib -> ${noarch_base_libdir}. This
might already been crated in the previous call : 
    lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}

because, for non-multilib builds both ${nonarch_base_libdir} and
${base_libdir} points to ${exec_prefix}/lib.

The condition can be rephrased to:
   if [ "${baselib}" != "lib" ]

This case does not apply for other two links., ie., /bin, /sbin.

- Amarnath

  reply	other threads:[~2017-06-13 12:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13  6:52 [PATCH v3 0/8] Fix for #7040 - Support for /usr merge Amarnath Valluri
2017-06-13  6:52 ` [PATCH v3 1/8] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge Amarnath Valluri
2017-06-13  6:52 ` [PATCH v3 2/8] cross.bbclass: merged /usr support Amarnath Valluri
2017-06-13  7:52   ` Peter Kjellerstedt
2017-06-13 13:27     ` [PATCH v4 " Amarnath Valluri
2017-06-13  6:52 ` [PATCH v3 3/8] systemd: chagnes to support merged /usr Amarnath Valluri
2017-06-13  7:56   ` Peter Kjellerstedt
2017-06-13 13:26     ` [PATCH v4 3/8] systemd: changes " Amarnath Valluri
2017-06-13  6:52 ` [PATCH v3 4/8] bash: " Amarnath Valluri
2017-06-15  9:50   ` Anton Eliasson
2017-06-13  6:52 ` [PATCH v3 5/8] busybox: " Amarnath Valluri
2017-06-13  6:52 ` [PATCH v3 6/8] sed: " Amarnath Valluri
2017-06-13  6:52 ` [PATCH v3 7/8] image: create symlinks needed for " Amarnath Valluri
2017-06-13  8:05   ` Peter Kjellerstedt
2017-06-13 12:32     ` Valluri, Amarnath [this message]
2017-06-13 13:23     ` [PATCH v4 " Amarnath Valluri
2017-06-13 14:16       ` Peter Kjellerstedt
2017-06-13 19:25         ` Amarnath Valluri
2017-06-13  6:52 ` [PATCH v3 8/8] insane.bbclass: Add package QA check " Amarnath Valluri

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=1497357195.39827.12.camel@intel.com \
    --to=amarnath.valluri@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter.kjellerstedt@axis.com \
    /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.