简体   繁体   中英

How to create a consistent .config file to compile Linux kernel?

To compile Linux kernel, I created a default .config file using make defconfig . Since I didn't want to browse thousands of options through a menu-driven interface ( make menuconfig ), I set CONFIG_KALLSYMS=n manually, and then triggered the build ( make -j8 ). I noticed the build system overwrote my changes and set CONFIG_KALLSYMS=y again. I suspect there might be other options present in the configuration which rely on CONFIG_KALLSYMS . How can I create a consistent .config file without using any menu-driven interface?

It might be burdensome to browse thousands of options through a menu-driven interface (make menuconfig) . When you only want to change a couple of options and don't remember where they are in the menu hierarchy, you can use search to find any specific option. Just press / (slash) and type the full or partial name of the option. The result of the search will show where the options are located in the menu hierarchy, and what are the dependencies. Save and exit after you are done with the changes, and you should have a consistent .config file.

After you create a .config using make defconfig, to change just a few config options after that "make menuconfig" is the best way to do this. It also tells you about the dependencies and doesn't allow you to make a change unless the dependencies are met.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM