mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00

* depmod already gets executed by pkg_postinst_kernel-image. * If you build a module using module.bbclass, pkg_postinst returns 1 in do_rootfs, causing pkg_postinst to run again on first boot. To improve this situation, I copied pkg_postinst from kernel.bbclass to module.bbclass. This was rejected by Koen, because he doesn't like the code from kernel.bblcass, which uses ${STAGING_DIR_KERNEL}. Richard then suggested that calling depmod during do_rootfs wasn't necessary at all, because it already gets done by kernel-image. (From OE-Core rev: c7809c03080925b5e9171df5c9175c7c6420b376) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
53 lines
1.3 KiB
Plaintext
53 lines
1.3 KiB
Plaintext
RDEPENDS += "kernel-image update-modules"
|
|
DEPENDS += "virtual/kernel"
|
|
|
|
inherit module-base
|
|
|
|
#
|
|
# Ensure the hostprogs are available for module compilation. Modules that
|
|
# inherit this recipe and override do_compile() should be sure to call
|
|
# do_make_scripts() or ensure the scripts are built independently.
|
|
#
|
|
do_make_scripts() {
|
|
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
|
|
oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
|
|
-C ${STAGING_KERNEL_DIR} scripts
|
|
}
|
|
|
|
addtask make_scripts before do_compile
|
|
do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
|
|
do_make_scripts[deptask] = "do_populate_sysroot"
|
|
|
|
module_do_compile() {
|
|
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
|
|
oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
|
|
KERNEL_SRC=${STAGING_KERNEL_DIR} \
|
|
KERNEL_VERSION=${KERNEL_VERSION} \
|
|
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
|
|
AR="${KERNEL_AR}" \
|
|
${MAKE_TARGETS}
|
|
}
|
|
|
|
module_do_install() {
|
|
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
|
|
oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
|
|
KERNEL_SRC=${STAGING_KERNEL_DIR} \
|
|
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
|
|
modules_install
|
|
}
|
|
|
|
pkg_postinst_append () {
|
|
if [ -z "$D" ]; then
|
|
depmod -a
|
|
update-modules || true
|
|
fi
|
|
}
|
|
|
|
pkg_postrm_append () {
|
|
update-modules || true
|
|
}
|
|
|
|
EXPORT_FUNCTIONS do_compile do_install
|
|
|
|
FILES_${PN} = "/etc /lib/modules"
|