From f92e4fa413521c07d92a1a29e7db5e2c03d887b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= Date: Fri, 23 Apr 2021 00:43:34 +0200 Subject: [PATCH] Build kernel modules and install them --- kernel/packages/prawnos-linux-image-armhf/makefile | 2 ++ kernel/packages/prawnos-linux-image-armhf/src/debian/install | 1 + scripts/BuildScripts/KernelScripts/buildKernel.sh | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/packages/prawnos-linux-image-armhf/makefile b/kernel/packages/prawnos-linux-image-armhf/makefile index ed832cd8..c9928457 100644 --- a/kernel/packages/prawnos-linux-image-armhf/makefile +++ b/kernel/packages/prawnos-linux-image-armhf/makefile @@ -40,6 +40,8 @@ $(PACKAGE_NAME_ORIG_TAR): rm -rf $(ORIG) rm -f $(PACKAGE)_*-*.orig.tar.gz mkdir $(ORIG) + mkdir -p $(ORIG)/lib + cp -r $(PRAWNOS_KERNEL_BUILD)/lib/modules $(ORIG)/lib/ cp $(PRAWNOS_KERNEL_BUILT) $(ORIG)/$(PACKAGE_NAME_ORIG) cp $(PRAWNOS_KERNEL_RESOURCES_SHARED)/FlashKernelPartition.sh $(ORIG)/ tar -czf $(PACKAGE_NAME_ORIG_TAR) -C $(ORIG)/ . diff --git a/kernel/packages/prawnos-linux-image-armhf/src/debian/install b/kernel/packages/prawnos-linux-image-armhf/src/debian/install index 56634b49..b2fbab13 100644 --- a/kernel/packages/prawnos-linux-image-armhf/src/debian/install +++ b/kernel/packages/prawnos-linux-image-armhf/src/debian/install @@ -1,2 +1,3 @@ +lib/modules prawnos-linux-image-armhf* boot FlashKernelPartition.sh etc/prawnos/kernel \ No newline at end of file diff --git a/scripts/BuildScripts/KernelScripts/buildKernel.sh b/scripts/BuildScripts/KernelScripts/buildKernel.sh index 88d3d67f..d0c1e17b 100755 --- a/scripts/BuildScripts/KernelScripts/buildKernel.sh +++ b/scripts/BuildScripts/KernelScripts/buildKernel.sh @@ -93,7 +93,8 @@ else sleep 10 fi -make -j $(($(nproc) +1)) CROSS_COMPILE=$CROSS_COMPILER ARCH=$KERNEL_ARCH $IMAGE +make -j $(($(nproc) +1)) CROSS_COMPILE=$CROSS_COMPILER ARCH=$KERNEL_ARCH $IMAGE modules +make -j $(($(nproc) +1)) CROSS_COMPILE=$CROSS_COMPILER ARCH=$KERNEL_ARCH INSTALL_MOD_PATH=. modules_install make -j $(($(nproc) +1)) CROSS_COMPILE=$CROSS_COMPILER ARCH=$KERNEL_ARCH DTC_FLAGS="-@" dtbs mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg dd if=/dev/zero of=bootloader.bin bs=512 count=1