Note that there are some explanatory texts on larger screens.

plurals
  1. POBake Linux Kernel modules with dependencies with Openembedded
    text
    copied!<p>The Linux Kernel Modules (LKM) B depends on Symbols provided by LKM A.</p> <p>Thus the following is required to build LKM B: </p> <ul> <li>Header files from LKM A</li> <li>Symbol-table (see <a href="http://lxr.free-electrons.com/source/Documentation/kbuild/modules.txt#L484" rel="nofollow">Kbuild Documentation for details</a>)</li> </ul> <p>I use a BitBake recipe to build LKMs A and B. What I do:</p> <ul> <li>I propagate the header files and the symbol-table of LKM A into the staging include directory <code>${STAGING_INCDIR}</code>.</li> <li>I feed the staging include and the path to the symbol-table as <code>KBUILD_EXTRA_SYMBOLS</code>variable into the Makefile of LKM B</li> </ul> <p>Example:</p> <pre><code>#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 } </code></pre> <p><strong>Questions:</strong></p> <ul> <li>Is the do_install_append the right task to stage shared resources? I read that do_staging() is <a href="http://www.openembedded.org/index.php/Legacy_staging" rel="nofollow">somewhat deprecated </a>...</li> <li>Where to stage the symbol-table?</li> </ul> <p>Thanks for any Best Practices hints. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload