Cześć! Oto moje uwagi na temat kompilacji najnowszej wersji jądra Linuksa, w tej chwili wersji 5.8.18, na Debianie 10 'Buster’, z kodu źródłowego. Pamiętaj, aby w razie potrzeby zmienić wersje i/lub ścieżki dostępu, aby dopasować je do swoich preferencji.
## Pobierz kod źródłowy i sygnaturę pgp z https://www.kernel.org/
## do wybranego przez siebie katalogu
mkdir -p /usr/src/
cd /usr/src/
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.7.9.tar.xz
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.7.9.tar.sign
## Rozpakuj kod źródłowy i sprawdź sygnaturę
xz -d -v linux-5.7.9.tar.xz
gpg --verify linux-5.7.9.tar.sign
## Wypakuj kod źródłowy i wejdź do katalogu
tar xf linux-5.7.9.tar
cd linux-5.7.9/
## Skopiuj aktualny plik konfiguracyjny jądra i uruchom 'make menuconfig'
cp -v /boot/config-$(uname -r) .config
## Zainstaluj niezbędne pakiety
apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev bc
make menuconfig
## Przejdź do Cryptographic API ---> Certificates for signature checking --->.
## i zostaw 'File name or PKCS#11 URI of module signing key' oraz
## 'Additional X.509 keys for default system keyring' puste, jeśli nie jest już puste
## Skompiluj używając make lub make -j n gdzie n jest liczbą procesorów do użycia make
make -j 4
## Zainstaluj moduły jądra
make modules_install
## Zoptymalizuj i skompiluj nowy kernel
cd /lib/modules/linux-5.7.9/
find . -name *.ko -exec strip --strip-unneeded {} +
cd /usr/src/linux-5.7.9/
make install
## Gotowe ## Download the source code and pgp signature from https://www.kernel.org/
## to a directory of your choice
mkdir -p /usr/src/
cd /usr/src/
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.1.16.tar.xz
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.1.16.tar.sign
## Uncompress the source code and check the signature
xz -d -v linux-5.1.16.tar.xz
gpg --verify linux-5.1.16.tar.sign
## Untar the source code and cd into the directory
tar xf linux-5.1.16.tar
cd linux-5.1.16/
## Copy over actual kernel config file and run 'make menuconfig'
cp -v /boot/config-$(uname -r) .config
## Install necessary packages
apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev bc
make menuconfig
## Go to Cryptographic API ---> Certificates for signature checking --->
## and leave 'File name or PKCS#11 URI of module signing key' and
## 'Additional X.509 keys for default system keyring' blank if not
## already blank
## Compile using make or make -j n where n is the number of processors to use
#make
make -j 4
## Install kernel modules
make modules_install
## Optimize and compile new kernel
cd /lib/modules/5.1.16/
find . -name *.ko -exec strip --strip-unneeded {} +
cd /usr/src/linux-5.1.16/
make install
## Done Źródło: https://hacksncloud.com/2019/07/08/compile-and-install-latest-kernel-5-1-16-on-debian-buster/







