2017年9月7日 星期四

Ubuntu 17.04編譯kernel 4.13

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.04
Release: 17.04
Codename: zesty

# uname -a
Linux instance-1 4.10.0-32-generic #36-Ubuntu SMP Tue Aug 8 12:10:06 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

# wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.13.tar.xz
# tar Jxvf linux-4.13.tar.xz
# apt-get install libncurses5-dev make gcc bc libssl-dev
# make menuconfig


# make -j 2
# make modules_install install

# ls /boot/*4.13*
/boot/config-4.13.0
/boot/initrd.img-4.13.0
/boot/System.map-4.13.0
/boot/vmlinuz-4.13.0

How to create Linux Kernel Headers from Linux Kernel Source?
➠ Ubuntu distribution
# apt-get install linux-headers-$(uname -r)
dpkg -l | grep linux-headers-$(uname -r)
ii  linux-headers-3.16.0-77-generic        3.16.0-77.99~14.04.1                       amd64        Linux kernel headers for version 3.16.0 on 64 bit x86 SMP

# ls -al /lib/modules/`uname -r`/
lrwxrwxrwx  1 root root     40 Jun 28  2016 build -> /usr/src/linux-headers-3.16.0-77-generic
ls /usr/src/linux-headers-3.16.0-77
arch  block  crypto  Documentation  drivers  firmware  fs  include  init  ipc  Kbuild  Kconfig  kernel  lib  Makefile  mm  net  samples  scripts  security  sound  tools  ubuntu  usr  virt

➠ Kernel.org
# make headers_install
http://smilejay.com/2013/03/update-linux-headers/

參考資料:
kernel source code

沒有留言:

張貼留言