【linux内核】Debian内核编译

列出 Debian 内各种版本的核心软件包

$ apt search ^linux-source

Sorting... Done
Full Text Search... Done
linux-source/unknown 3.16+63+deb8u2 all
  Linux kernel source (meta-package)

linux-source-3.16/unknown 3.16.56-1+deb8u1 all
  Linux kernel source for version 3.16 with Debian patches

apt安装软件包

$ apt install libncurses5-dev
$ apt-get install  dpkg-dev

$ apt install linux-source-3.16

编译内核源码

$ mkdir ~/kernel; cd ~/kernel
$ tar -xaf /usr/src/linux-source-3.16.tar.xz
$ cp /boot/config-3.16.0-6-amd64 ~/kernel/linux-source-3.16/.config
$ cd ~/kernel/linux-source-3.16/
$ make menuconfig
$ make deb-pkg -j8

安装内核

$ cd ~/kernel
$ dpkg -i linux-image-3.16.56_3.16.56-2_amd64.deb
$ dpkg -i linux-headers-3.16.56_3.16.56-2_amd64.deb

更新grub

$ update-grub

参考:

8.10. 编译内核 (debian.org)

Debian编译内核教程 - 时光旅行的懒猫 - 博客园 (cnblogs.com)

内核编译方法-tony_ayuan-ChinaUnix博客

你可能感兴趣的:(linux内核,编程,linux,linux,debian)