How to modify kernel DTB file

前端 未结 2 1011
执笔经年
执笔经年 2021-02-06 05:58

Summary

I am currently compiling the Linux kernel (kernel, modules and DTB) with some custom drivers for a custom board. Occasionally I\'ll compile the

2条回答
  •  后悔当初
    2021-02-06 06:38

    Just want to update this with 2 years more experience on the subject.

    The DTS files in the Linux repository are a mixture of DTS and C preprocessor directives (#include, #define, etc.). So when the original DTB is compiled, the preprocessor links to the referenced files to create a pure DTS file. dtc converts the single DTS file into a DTB file.

    So if you want to modify a kernel DTS file and compile it, then you have two options:

    1. Just run make dtbs which automatically handles all of this
    2. Manually run the preprocessor (cpp -nostdinc -I -undef -x assembler-with-cpp ...) and then compile the output with dtc.

提交回复
热议问题