Install modules in kernel deb
Change-Id: I8f0c831ac55b8615bd49a773b090db8d1c48c6fa
diff --git a/debian/rules b/debian/rules
index 6959042..afc2ffe 100755
--- a/debian/rules
+++ b/debian/rules
@@ -27,9 +27,10 @@
true
override_dh_auto_build:
- +make ${KERNEL_OPTIONS} mt8167s_excelsior_defconfig
- +make ${KERNEL_OPTIONS} -j$(shell nproc) Image modules dtbs
- ${CROSS_COMPILE}objcopy -O binary -R .note -R .comment -S vmlinux linux.bin
+ +make $(KERNEL_OPTIONS) mt8167s_excelsior_defconfig
+ +make $(KERNEL_OPTIONS) olddefconfig
+ +make $(KERNEL_OPTIONS) -j$(shell nproc) Image modules dtbs
+ $(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S vmlinux linux.bin
/boot/compress_lz4.sh linux.bin
@@ -37,5 +38,9 @@
mtk-mkimage -D "-I dts -O dtb -p 1024" -k /boot/keys -f kernel-fit-image.its boot.img
override_dh_auto_install:
+ +make $(KERNEL_OPTIONS) INSTALL_MOD_PATH=$(DESTDIR) modules_install
+ rm $(DESTDIR)/lib/modules/$(VERSION)/build
+ rm $(DESTDIR)/lib/modules/$(VERSION)/source
+
install -d $(DESTDIR)/boot
install -p -m 655 boot.img $(DESTDIR)/boot