[OpenWrt-Devel] How to get OpenWRT to leave kernel .config the f alone?

Daniel Santos daniel.santos at pobox.com
Fri Mar 9 11:07:22 EST 2018

On 03/09/2018 01:46 AM, Alexandru Ardelean wrote:
> On Fri, Mar 9, 2018 at 7:24 AM, Daniel Santos <daniel.santos at pobox.com> wrote:
>> Hello. I'm not very good with make and I need to make many changes to my
>> kernel .config for debugging. I wrote a patch to add an option to tell
>> OpenWRT to leave it alone, but I don't understand this build system very
>> well and it seems to always prevent the kernel .config from being
>> modified as well as leading to modules & kernel always being rebuilt.
>> Would somebody be kind enough to fix it for me? :)
> The problem is not the OpenWrt build system here.
> It's likely the kernel's Kconfig system and dependency chain.
> Your patch is going about it from the wrong angle.
> Most symbols in the .config [whether OpenWrt's .config or kernel's
> .config] have a dependency chain.
> Example: driver bcm2708-spi [don't remember the actual driver name
> here] will not be built/installed if CONFIG_SPI is not enabled in
> .config.
> So, if the symbol for building bcm2708-spi [let's call it
> CONFIG_BCM2708_SPI] disappears during build, it's a symptom that the
> dependency chain is not correct.
> In a way, you may want this behavior, versus leaving it there and not
> building it anyway.
> What you can do is [in the OpenWrt context]:
> * make kernel_menuconfig
> * hit the slash key " / "
> * type/search for the symbol you want to enable
> * once you find it, it will list all symbols it depends on ; and which
> you also want enabled
> * add those symbols to your kernel config, or enable them via this
> menuconfig you are in
> Note that this Kconfig build-system is present in many projects [
> Linux kernel, OpenWrt, buildroot, etc ].
> So, if you learn to use it, the skill will be useful later on.
> Typically, what I've noticed, is that the Linux kernel [in newer
> versions] will enforce dependencies in drivers/code that were
> previously not there, and when you update your kernel, stuff
> disappears/gets disabled.
> So, if you using an older .config in a newer kernel, or some other
> mix, this is possible.

Thanks for the response.  This isn't the problem however.  I simply want
to be able to manage my own .config separate from OpenWRT.  I realize
this breaks the scheme, but I'm having a lot of problems getting the
kernel .config that I need using OpenWRT.  Currently, after having run
make kernel_menuconfig, oldconfig is now prompting me for a choice that
I have attempted to already make (and I'm not sure why).  This is
inhibiting a parallel build.  So as a work-around and also just another
option, I would like to manage the .config myself.

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list