Sources:
- https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel#apt-get
- https://www.maketecheasier.com/build-custom-kernel-ubuntu/
- https://stackoverflow.com/a/75622441
The algorithm:
- Make source directory (I have named it 'lab') and go there: `mkdir ~/lab; cd ~/lab`
- Download linux sources of your distributes: `apt-get source linux-image-unsigned-$(uname -r)`
- Download linux sources from git repository: `git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git`
- Go to the Linus' source directory: `cd ~/lab/linux`
- Copy your distribution's config: `cp /boot/config-$(uname -r) .config`
- Apply the config: `make olddefconfig`
- Copy a directory of your distribution's source in order to sign your build: `cp -avr ~/lab/linux-hwe-5.15-5.15.0/debian ~/lab/linux/debian`
- Build the kernel: `make clean && make -j8`
- Build deb-package: `make deb-pkg LOCALVERSION=-custom`
- Install deb-packages: `sudo dpkg -i ~/lab/linux-*.deb`
- Reboot your system with a new kernel =)
Комментариев нет:
Отправить комментарий