[Openembedded-users] Is staging really deprecated?

Maurus Frey maurus at vritz.ch
Mon Jan 24 15:05:49 UTC 2011


I have question about how to write recipes to build LKMs with dependencies:

Situation: The Linux Kernel Modules (LKM) B depends on Symbols provided by
LKM A.

Thus the following is required to build LKM B:

    * Header files from LKM A
    * Symbol-table (see Kbuild Documentation for details)

I use a BitBake recipe to build LKMs A and B. What I do:

    * I propagate the header files and the symbol-table of LKM A into the
staging include directory ${STAGING_INCDIR}.
    * I feed the staging include and the path to the symbol-table as
KBUILD_EXTRA_SYMBOLSvariable into the Makefile of LKM B

Example:

#BB-recipe  for LKM A
# Staging of .h files and symbol-table
do_install_append () {
  install -d ${STAGING_INCDIR}
  install ${WORKDIR}/${PN}/src/*.h ${STAGING_INCDIR}/
  install ${WORKDIR}/${PN}/Module.symvers ${STAGING_INCDIR}/rtserial.symvers
}

#BB-recipe for LKM B
do_compile () {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP
cd "${WORKDIR}/mstp"
oe_runmake KDIR="${KERNEL_SOURCE}" \
         ARCH="${ARCH}" \
         CROSS_COMPILE="${CROSS_COMPILE}" \
         IDIR="${STAGING_INCDIR}" \
         KBUILD_EXTRA_SYMBOLS="${STAGING_INCDIR}/rtserial.symvers" \
         build
 }

Questions:

    * Is the do_install_append the right task to stage shared resources? I
read that do_staging() is somewhat deprecated >>
http://www.openembedded.org/index.php/Legacy_staging
    * Where to stage the symbol-table?

Thanks for any Best Practices hints.

maurus






More information about the Openembedded-users mailing list