星期四, 5月 17, 2018

Quick kernel compile guide under CentOS 7

1. Download linux kernel source form the following link, linux-4.16.8.tar.xz in this case.
https://www.kernel.org/

2. Install a CentOS 7 as Workstation and choose most of development package set.
Or you could install as follows later.

  • yum update
  • yum install -y ncurses-devel openssl-devel (make gcc bc  grub2, depends on your installation)


3. copy kernel file and extract file as "tar xvf linux-4.16.8.tar.xz"
--> create a linux-4.16.8 folder

4. Then copy /boot/config-3.10xxxxxx to /linux-4-16.8/.config

5. Compile
make oldconfig (this will compare with new config)
make menuconfig
make -j 4

make -j 4 bzImage (user 4 cores to compile, speed up)
make -j 4 modules
make -j 4 install
make -j 4 modules_install

沒有留言: