mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
The code in module.bbclass was appending the pkg_postinst and pkg_prerm to all packages that are part of a given recipe, meaning that the -lic, -dev, -doc, ... packages all got the scriptlet This change uses only which macthes with the RDEPENDS and FILES already used in module.bbclass. The failure was that rootfs creation would fail due to the -lic package being installed before the kernel and the script would fail. [YOCTO #3803] (From OE-Core rev: cf05c4578c99c0cb885cf2706f7f2b39b100aeb8) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
RDEPENDS_${PN} += "kernel-image"
|
|
DEPENDS += "virtual/kernel"
|
|
|
|
inherit module-base
|
|
|
|
addtask make_scripts after do_patch 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_${PN}_append () {
|
|
if [ -z "$D" ]; then
|
|
depmod -a ${KERNEL_VERSION}
|
|
else
|
|
depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
|
|
fi
|
|
}
|
|
|
|
pkg_postrm_${PN}_append () {
|
|
if [ -z "$D" ]; then
|
|
depmod -a ${KERNEL_VERSION}
|
|
else
|
|
depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
|
|
fi
|
|
}
|
|
|
|
EXPORT_FUNCTIONS do_compile do_install
|
|
|
|
FILES_${PN} = "/etc /lib/modules"
|