I just recompiled the Ubuntu Jammy HWE kernel 6.8.0-45 using these steps:
# Clone Ubuntu stock Kernel repogit clone git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammycd jammygit checkout Ubuntu-hwe-6.8-6.8.0-45.45_22.04.1# Build depssudo apt build-dep linux linux-image-unsigned-`uname -r`sudo apt install build-essential libncurses-dev bison flex libssl-dev libelf-dev fakeroot libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf llvm dwarves# Clean allfakeroot debian/rules clean && make ARCH=x86 mrproper && git clean -fd && git restore . && git clean -fd && git restore .# do custom changescode debian.hwe-6.8/changelog # Append custom versioncode include/linux/uts.h # Modify UTS_SYSNAME# Update Debian configschmod a+x debian/rules && chmod a+x debian/scripts/* && chmod a+x debian/scripts/misc/*fakeroot debian/rules cleanfakeroot debian/rules editconfigs# Start buildfakeroot debian/rules binary-headers binary-generic
I was wondering on how can I just recompile the single 'iwlwifi.ko' module without re-compile the whole kernel.
I tried to perform standard recompilation from the root of kernel sources by running:
make -j$(nproc) M=drivers/net/wireless/intel/iwlwifi modules
But when tying to insert this I get:
> sudo insmod drivers/net/wireless/intel/iwlwifi/iwlwifi.koinsmod: ERROR: could not insert module drivers/net/wireless/intel/iwlwifi/iwlwifi.ko: Invalid parameters
And dmesg
says:
[10754.522405] BPF: [139328] ENUM x509_key_exit [10754.522410] BPF: size=4 vlen=34[10754.522410] BPF: [10754.522411] BPF: Invalid name[10754.522412] BPF: [10754.522413] failed to validate module [iwlwifi] BTF: -22
I guess there must be a way to exploit the fakeroot debian/rules
mechanism for just re-compile a single module without clean everything all and build the whole kernel again.
Thank you for support.