Saving a kernel config file through menuconfig results with different options?

5,765

Why would here be differences

Because you loaded my_config into menuconfig, made changes, then saved it as .config. Of course they are different. If you saved it twice, once with each name, then they would be the same.

If you mean, they are more different than you think they should be, keep in mind there is not a 1:1 correspondence between things you select in menuconfig and changes that appear in the config file.

Also, if my_config was the product of an earlier version of the kernel source, make menuconfig will notice this and convert the file to reflect the newer source version. This means even if you change nothing, just loading it and saving it will result in substantial changes to the text of the file. However, the actual configuration should be essentially the same (generally the changes are the addition of new options with appropriate default values).

Share:
5,765

Related videos on Youtube

TheMeaningfulEngineer
Author by

TheMeaningfulEngineer

I like to think of myself as a Hardware/Software guy who will gladly discuss referential transparency during a code review and the next moment take a circular saw to build a casing for a self made power supply. My main interest can be summarized into Linux related software development, low power electronics and general DIY projects.

Updated on September 18, 2022

Comments

  • TheMeaningfulEngineer
    TheMeaningfulEngineer over 1 year

    I'm experimenting with different kernel configuration files and wanted to keep a log on the ones I used.

    Here is the situation:

    • There is configuration file called my_config which i want to use as a template
    • I do make menuconfig, load my_config make NO changes and save as .config.
    • When i do diff .config my_config, there are differences in the files

    Why would here be differences between the old file and the new file?

  • TheMeaningfulEngineer
    TheMeaningfulEngineer over 10 years
    It was the third part (with different kernels), i formatted the question badly.