mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02:00
kernel: Fix depmod for multilib
Using populate_sysroot for this data was a nice idea but flawed as it doesn't work in multilib builds. Instead we can use PKGDATA_DIR since this is consistent over multilib builds. It also turns out to be slightly neater code too. Hopefully this resolves the problem once and for all. (From OE-Core rev: 6cccae3ca54c1177a1d91d23c3e151d74e735ee9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -231,16 +231,20 @@ kernel_do_install() {
|
||||
[ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
|
||||
install -d ${D}${sysconfdir}/modules-load.d
|
||||
install -d ${D}${sysconfdir}/modprobe.d
|
||||
|
||||
# Stash data for depmod
|
||||
install -d ${D}${datadir}/kernel-depmod/
|
||||
echo "${KERNEL_VERSION}" > ${D}${datadir}/kernel-depmod/kernel-abiversion
|
||||
cp System.map ${D}${datadir}/kernel-depmod/System.map-${KERNEL_VERSION}
|
||||
}
|
||||
do_install[prefuncs] += "package_get_auto_pr"
|
||||
|
||||
addtask shared_workdir after do_compile before do_install
|
||||
|
||||
emit_depmod_pkgdata() {
|
||||
# Stash data for depmod
|
||||
install -d ${PKGDESTWORK}/kernel-depmod/
|
||||
echo "${KERNEL_VERSION}" > ${PKGDESTWORK}/kernel-depmod/kernel-abiversion
|
||||
cp System.map ${PKGDESTWORK}/kernel-depmod/System.map-${KERNEL_VERSION}
|
||||
}
|
||||
|
||||
PACKAGEFUNCS += "emit_depmod_pkgdata"
|
||||
|
||||
do_shared_workdir () {
|
||||
cd ${B}
|
||||
|
||||
@@ -285,21 +289,13 @@ do_shared_workdir () {
|
||||
fi
|
||||
}
|
||||
|
||||
# Only stage the files we need for depmod, not the modules/firmware
|
||||
# We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware
|
||||
sysroot_stage_all () {
|
||||
sysroot_stage_dir ${D}${datadir}/kernel-depmod ${SYSROOT_DESTDIR}${datadir}/kernel-depmod
|
||||
:
|
||||
}
|
||||
|
||||
KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig"
|
||||
|
||||
PACKAGE_PREPROCESS_FUNCS += "kernel_package_preprocess"
|
||||
|
||||
kernel_package_preprocess () {
|
||||
rm -rf ${PKGD}${datadir}/kernel-depmod
|
||||
rmdir ${PKGD}${datadir}
|
||||
rmdir ${PKGD}${exec_prefix}
|
||||
}
|
||||
|
||||
kernel_do_configure() {
|
||||
# fixes extra + in /lib/modules/2.6.37+
|
||||
# $ scripts/setlocalversion . => +
|
||||
|
||||
Reference in New Issue
Block a user