[oe] Staging changes

Richard Purdie rpurdie at rpsys.net
Mon Oct 29 16:26:15 UTC 2007


At OEDEM, there was basic agreement amongst the core devs that OE's
current staging needs to evolve.

The aim of this evolution is to head towards a staging that looks like
the target system. This allows using the sysroot options of gcc/binutils
to help us remove hacks like the symlinks in cross and the sed "magic"
in pkgconfig.bbclass. In the future is could also lead to a staging task
which just copies files from ${WORKDIR}/image to staging, speeding up
builds a lot (make install is slow) as well as giving much more
possibilities to packaged staging.

I've had this working up to image generation with Poky. It does work and
does lead to clean easier to understand build structures. I've pulled
out a subset of my patches to Poky and checked them into OE. So far
there are no behaviour changes, just several new variables become
available to help us try and clean up the current staging references in
the metadata.

An example of these cleanups are those I've made to gnome-common as a
random example:

--- gnome-common_2.20.0.bb      (revision 2988)
+++ gnome-common_2.20.0.bb      (working copy)
@@ -19,7 +19,7 @@
        rm -rf ${STAGE_TEMP}
        mkdir -p ${STAGE_TEMP}
        make DESTDIR="${STAGE_TEMP}" install
-       cp -pPR ${STAGE_TEMP}${bindir}/* ${STAGING_DIR}/${BUILD_SYS}/bin
+       cp -pPR ${STAGE_TEMP}${bindir}/* ${STAGING_BINDIR_NATIVE}
        install -d ${STAGING_DATADIR}/gnome-common
        install -d ${STAGING_DATADIR}/aclocal
        cp -pPR ${STAGE_TEMP}${datadir}/gnome-common/* ${STAGING_DATADIR}/gnome-common

Why? This will break if we switch to /usr/bin...

The next step is to go through the metadata doing one of two things:

* correcting things where we have variables we can use
* listing problem areas (e.g. gcc configure options)

Bad references which can be grepped for are:

${STAGING_DIR}/${BUILD_SYS}
${STAGING_DIR}/${HOST_SYS}
${STAGING_LIBDIR}/.. (anything with a .. in is likely to cause problems)
${STAGING_DIR}

Python and Perl look like they're going to need special attention.

As an idea of where this leads, see my the attached patch to Poky which
gets it as far as generating images. It does not correct all the entries
that need fixing though.

As my attached patch hints, ultimately, we'll have access to variables
like ${STAGING_DIR_TARGET}${layout_libdir}. I've not introduced them
into OE yet but I could be tempted to, mirroring the staging layout so
the switchover will be one simple set of changes to bitbake.conf.

Cheers,

Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: staging-layout.patch
Type: text/x-patch
Size: 15137 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20071029/e6baa5c8/attachment-0002.bin>


More information about the Openembedded-devel mailing list