Acabei de recompilar o kernel Ubuntu Jammy HWE 6.8.0-45 usando estes passos:
# Clone Ubuntu stock Kernel repo
git clone git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy
cd jammy
git checkout Ubuntu-hwe-6.8-6.8.0-45.45_22.04.1
# Build deps
sudo 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 all
fakeroot debian/rules clean && make ARCH=x86 mrproper && git clean -fd && git restore . && git clean -fd && git restore .
# do custom changes
code debian.hwe-6.8/changelog # Append custom version
code include/linux/uts.h # Modify UTS_SYSNAME
# Update Debian configs
chmod a+x debian/rules && chmod a+x debian/scripts/* && chmod a+x debian/scripts/misc/*
fakeroot debian/rules clean
fakeroot debian/rules editconfigs
# Start build
fakeroot debian/rules binary-headers binary-generic
Eu estava pensando em como posso recompilar apenas o módulo ' iwlwifi.ko ' sem recompilar o kernel inteiro.
Tentei executar a recompilação padrão a partir da raiz das fontes do kernel executando:
make -j$(nproc) M=drivers/net/wireless/intel/iwlwifi modules
Mas quando tento inserir isso, recebo:
> sudo insmod drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
insmod: ERROR: could not insert module drivers/net/wireless/intel/iwlwifi/iwlwifi.ko: Invalid parameters
E dmesg
diz:
[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
Acho que deve haver uma maneira de explorar o fakeroot debian/rules
mecanismo para recompilar apenas um único módulo sem limpar tudo e construir o kernel inteiro novamente.
Obrigado pelo apoio.