linux: allow module builds after autoremove & unpack

This commit is contained in:
Andre Heider 2020-02-06 07:35:08 +01:00
parent e1ec1c7a5d
commit 5a57640b89

View File

@ -102,6 +102,15 @@ post_patch() {
sed -e "s|^CONFIG_DRM_LIMA=.*$|# CONFIG_DRM_LIMA is not set|" -i $PKG_BUILD/.config
sed -e "s|^CONFIG_DRM_PANFROST=.*$|# CONFIG_DRM_PANFROST is not set|" -i $PKG_BUILD/.config
fi
# prepare the tree for kernel packages if the build dir has been removed and linux get unpacked again
if [ -d $PKG_INSTALL/.image ]; then
kernel_make -C $PKG_BUILD oldconfig
kernel_make -C $PKG_BUILD prepare
# restore the required Module.symvers from an earlier build
cp -p $PKG_INSTALL/.image/Module.symvers $PKG_BUILD
fi
}
make_host() {
@ -229,7 +238,7 @@ make_target() {
makeinstall_target() {
mkdir -p $INSTALL/.image
cp -p arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET} System.map $INSTALL/.image/
cp -p arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET} System.map Module.symvers $INSTALL/.image/
kernel_make INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) modules_install
rm -f $INSTALL/$(get_kernel_overlay_dir)/lib/modules/*/build