1.19

编译

预先安装以下apt包:build-essential、libncurses5-dev、fakeroot、libqt4-dev(make xconfig需要)、libglalde2-dev和libgtk2.0-dev(make gconfig需要)、flex、bison、bc、libelf-dev、libssl-dev

或者:

sudo apt install build-essential fakeroot
sudo apt build-dep linux
sudo apt install devscripts #简单修补
  1. /boot/config-version 当前内核配置文件
    1. cp /boot/configxxx .config 拷贝当前配置到内核目录
    2. make olddefconfig 转换为缺省应答
    3. make oldnoconfig 转换为相反应答
    4. make oldconfig 人工应答
    5. make clean 清除当前编译内容
    6. make distclean清除编译内容和配置
    7. make defconfig 自定义配置
    8. make localmodconfig 基于当前加载模块生成配置
    9. scripts/config --disable MODULE_SIG 禁用模块签名
    10. scripts/config --disable DEBUG_INFO 禁用调试信息
  2. linux-source 内核源文件
    1. https://www.kernel.org/
  3. make menuconfig 文本模式(libncurses5-dev)
    1. make xconfig 图形qt(libqt4-dev)
    2. make gconfig 图形GTK+(libglade2-dev/libgtk2.0-dev)
  4. arch/arch/configs/*_defconfig 默认配置
  5. sudo make deb-pkg -j4 编译成deb包,j4表示4线程
    1. linux-image-version
    2. linux-headers-version
    3. linux-firmware-image-version
    4. linux-image-version-dbg
    5. linux-libc-dev
  6. sudo dkms status 查询动态模块
    1. /var/lib/dkms 自动管理的模块
    2. 状态流程:add -> build -> install <- uninstall
      1. sudo dkms add -m xxx/1.1 -k linux5.1.1
      2. sudo dkms build -m xxx/1.1
      3. sudo dkms install -m xxx/1.1
      4. sudo dkms uninstall -m xxx/1.1
Copyright © DOSU community 2020 all right reserved,powered by Gitbook该文章修订时间: 2020-09-12 12:06:10

results matching ""

    No results matching ""