Jordan
Jordan

Reputation: 9114

make oldconfig overwriting value in .config

I'm attempting to compile the linux kernel and use a custom .config file.

So I copy the .config to my folder where the kernel source is, and run "make oldconfig" on the file to see if I'm missing anything. However, it appears that doing so modifies a few of my values back to what they were before I edited them:

< CONFIG_TRACEPOINTS=y
---
> CONFIG_TRACEPOINTS=n
< # CONFIG_DEBUG_RODATA is not set
< # CONFIG_DEBUG_SET_MODULE_RONX is not set
---
> CONFIG_DEBUG_RODATA=n
> CONFIG_DEBUG_SET_MODULE_RONX=n

How can I get oldconfig to keep the values as they were modified?

Thanks

Upvotes: 2

Views: 3730

Answers (1)

Milind Dumbare
Milind Dumbare

Reputation: 3244

Usually kernel config options are dependent on other config options. So even if you disable one config option, as its enabled by some other config option it will fall back to its original value after you do make oldconfig

In case of CONFIG_TRACEPOINTS it depends on or set by several other flags TRACING [=y] || BLK_DEV_IO_TRACE [=y] && TRACING_SUPPORT [=y] && FTRACE [=y] && SYSFS [=y] && BLOCK [=y]

Try setting one by one of them to =n along with CONFIG_TRACEPOINTS=n and see if its persistent after doing make oldconfig. For me setting CONFIG_FTRACE=n worked

How to find dependency. Run make menuconfig. Press / to search the config option and see the Selected by. Those are the config flags who are also setting your config option. See their current value next to them. For e.g. above you can see that TRACING_SUPPORT is set to y

Upvotes: 1

Related Questions