当前位置: > 财经>正文

ubuntu源码的 .config 位置 海汇保险跟单怎么样知乎文章

2023-08-13 06:22:39 互联网 未知 财经
在系统源码中

都是在 xx-generic下面 以我当前的内核为例: /usr/src/linux-headers-4.15.0-91-generic

ubuntu:/usr/src/linux-headers-4.15.0-91-generic$ lltotal 2060drwxr-xr-x 8 root root 4096 Apr 3 09:03 ./drwxr-xr-x 6 root root 4096 Apr 3 09:03 ../drwxr-xr-x 3 root root 4096 Apr 3 09:03 arch/lrwxrwxrwx 1 root root 32 Feb 28 10:45 block -> ../linux-headers-4.15.0-91/block/-rw-r--r-- 1 root root 71896 Feb 28 10:45 .cache.mklrwxrwxrwx 1 root root 32 Feb 28 10:45 certs -> ../linux-headers-4.15.0-91/certs/-rw-r--r-- 1 root root 217344 Feb 28 10:45 .config-rw-r--r-- 1 root root 217468 Feb 28 10:45 .config.oldlrwxrwxrwx 1 root root 33 Feb 28 10:45 crypto -> ../linux-headers-4.15.0-91/crypto/lrwxrwxrwx 1 root root 40 Feb 28 10:45 Documentation -> ../linux-headers-4.15.0-91/Documentation/lrwxrwxrwx 1 root root 34 Feb 28 10:45 drivers -> ../linux-headers-4.15.0-91/drivers/lrwxrwxrwx 1 root root 35 Feb 28 10:45 firmware -> ../linux-headers-4.15.0-91/firmware/lrwxrwxrwx 1 root root 29 Feb 28 10:45 fs -> ../linux-headers-4.15.0-91/fs/drwxr-xr-x 4 root root 4096 Apr 3 09:03 include/lrwxrwxrwx 1 root root 31 Feb 28 10:45 init -> ../linux-headers-4.15.0-91/init/lrwxrwxrwx 1 root root 30 Feb 28 10:45 ipc -> ../linux-headers-4.15.0-91/ipc/lrwxrwxrwx 1 root root 33 Feb 28 10:45 Kbuild -> ../linux-headers-4.15.0-91/Kbuildlrwxrwxrwx 1 root root 34 Feb 28 10:45 Kconfig -> ../linux-headers-4.15.0-91/Kconfigdrwxr-xr-x 2 root root 4096 Apr 3 09:03 kernel/lrwxrwxrwx 1 root root 30 Feb 28 10:45 lib -> ../linux-headers-4.15.0-91/lib/lrwxrwxrwx 1 root root 35 Feb 28 10:45 Makefile -> ../linux-headers-4.15.0-91/Makefile-rw-r--r-- 1 root root 962 Feb 28 10:45 .missing-syscalls.dlrwxrwxrwx 1 root root 29 Feb 28 10:45 mm -> ../linux-headers-4.15.0-91/mm/-rw-r--r-- 1 root root 1544274 Feb 28 10:45 Module.symverslrwxrwxrwx 1 root root 30 Feb 28 10:45 net -> ../linux-headers-4.15.0-91/net/lrwxrwxrwx 1 root root 34 Feb 28 10:45 samples -> ../linux-headers-4.15.0-91/samples/drwxr-xr-x 6 root root 12288 Apr 3 09:03 scripts/lrwxrwxrwx 1 root root 35 Feb 28 10:45 security -> ../linux-headers-4.15.0-91/security/lrwxrwxrwx 1 root root 32 Feb 28 10:45 sound -> ../linux-headers-4.15.0-91/sound/drwxr-xr-x 2 root root 4096 Feb 28 10:45 .tmp_versions/drwxr-xr-x 3 root root 4096 Apr 3 09:03 tools/lrwxrwxrwx 1 root root 33 Feb 28 10:45 ubuntu -> ../linux-headers-4.15.0-91/ubuntu/lrwxrwxrwx 1 root root 30 Feb 28 10:45 usr -> ../linux-headers-4.15.0-91/usr/lrwxrwxrwx 1 root root 31 Feb 28 10:45 virt -> ../linux-headers-4.15.0-91/virt/在待编译的源码中

在待编译的源码根目录中,没有 .config 用指令 sudo fakeroot debian/rules editconfigs 设定的config,其实是对 debian.master/config/ 里面的文件设定, 例如 设定的是 amd64

linux-4.15$ sudo fakeroot debian/rules editconfigsdh_testdir;/bin/bash -e debian/scripts/misc/kernelconfig editconfigsDo you want to edit config: amd64/config.flavour.generic? [Y/n] Y

是在设定 debian.master/config/amd64/config.flavour.generic 它一并存储到 debian.master/config/amd64/config.common.amd64

当你使用指令编译 sudo fakeroot debian/rules binary-headers binary-generic skipmodule=true

或者其他指令编译后,生成几个deb linux-headers-xxx_all.deb linux-headers-xx-generic_xx_amd64.deb linux-modules-xxx.deb

把header解压 sudo dpkg -x linux-headers-xxx_all.deb folder sudo dpkg -x linux-headers-xx-generic_xx_amd64.deb folder 会生成 folder/usr/src/linux-headers-xx folder/usr/src/linux-headers-xx-generic

.config 就出现在 folder/usr/src/linux-headers-xx-generic 里面 可以查看它的内容, 以确认之前编译之前,设定的内容确实有跟着编译进去了

:有不对的地方请指出,感谢~

版权声明: 本站仅提供信息存储空间服务,旨在传递更多信息,不拥有所有权,不承担相关法律责任,不代表本网赞同其观点和对其真实性负责。如因作品内容、版权和其它问题需要同本网联系的,请发送邮件至 举报,一经查实,本站将立刻删除。