-
Notifications
You must be signed in to change notification settings - Fork 1
Linux_Build
tdrozdovskiy edited this page Mar 1, 2018
·
2 revisions
- There are a few tools that are necessary in order to build your own kernel(s).
$ sudo apt-get install gcc make bc fakeroot dpkg-dev libncurses5-dev libssl-dev kernel-package ccache- Clone the mainline kernel git tree: ???????
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git- Change to directory linux:
$ cd linux- Copy the kernel config file from your existing system to the kernel tree:
$ cp /boot/config-`uname -r` .config- If you need to make any kernel config changes, do the following and save your changes when prompted:
$ make menuconfig- Build the linux-image and linux-header .deb files using a thread per core + 1. This process takes a lot of time:
$ sudo fakeroot make-kpkg -j 5 --initrd --append-to-version=-custom kernel_image kernel_headers- Change to one directory level up (this is where the linux-image and linux-header .deb files were put):
$ cd ..- Now install the .deb files. ??????
$ sudo dpkg -i linux-image-4.9.0-custom*.deb
$ sudo dpkg -i linux-headers-4.9.0-custom*.deb- Update grub configuration:
$ sudo update-grub- Now ready to boot into your new kernel. Just make sure you select the new kernel when you boot:
$ sudo reboot