V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
liyongjun0803
V2EX  ›  问与答

buildroot 如何重新编译 kernel

  •  
  •   liyongjun0803 · Jul 30, 2021 · 1992 views
    This topic created in 1732 days ago, the information mentioned may be changed or developed.

    使用 buildroot 编译系统镜像,我修改了 output/build/linux-4.18.12/ 中的 dts 文件,请问怎么重新编译 kernel?

    我试了几种办法都不行,如下:
    make linux-dirclean
    make linux-rebuild
    这样会把 output/build/linux-4.18.12/ 整个目录删掉,我修改的部分也就被删掉了。

    有没有大佬熟悉 buildroot 的,支个招。

    2 replies    2021-07-31 10:45:08 +08:00
    t123yh
        1
    t123yh  
       Jul 31, 2021 via Android   ❤️ 1
    修改源码的话,建议用 Buildroot 的 OVERRIDE_SRCDIR 功能,在 Buildroot 以外修改源码,具体可以搜一下官方文档。如果直接在 output 里面修改,哪天不小心 clean 了,修改就没了。

    修改代码后,不用运行 linux-dirclean,只用 linux-rebuild 即可。Buildroot 会影 rsync 将你外部的源码同步到 output/build 并且编译,并且不会删掉上次编译的缓存文件,自动只编译你修改的部分。
    signalyc
        2
    signalyc  
       Jul 31, 2021   ❤️ 1
    buildroot 的源码基本都是从网上 pull 的,所以,找到 kernel 那一部分,修改为取代码方式为本地,然后把 pull 下来的 kernel 的 tar 包里的文件修改了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1250 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 70ms · UTC 23:36 · PVG 07:36 · LAX 16:36 · JFK 19:36
    ♥ Do have faith in what you're doing.