[OpenWrt-Devel] [PATCH v4 4/4] kernel: 3.18: Strip off all the useless options
Jonas Gorski
jogo at openwrt.org
Sat Dec 13 13:50:52 EST 2014
On Sat, Dec 13, 2014 at 5:03 PM, Maxime Ripard
<maxime.ripard at free-electrons.com> wrote:
> On Fri, Dec 12, 2014 at 06:45:06PM +0100, Jonas Gorski wrote:
>> On Fri, Dec 12, 2014 at 5:02 PM, Maxime Ripard
>> <maxime.ripard at free-electrons.com> wrote:
>> > Now that we use the defconfigs, we can remove all the options at their default
>> > value.
>>
>> This causes a lot of kernel-config changes for e.g bcm63xx_smp with
>> 3.18, several of which are unwanted (e.g. enabling of the FPU
>> emulator).
>>
>> How did you determine which of these symbols were unneeded?
>
> I let Kconfig do that job.
>
> The only thing I did was copying the old config-3.18 as .config, and
> did a make savedefconfig.
>
> If somethings are missing, they're probably enabled either in your
> target config-3.18 or through the openwrt code itself.
>
>>
>> Here a diff of the resulting .config with patches 1-3 applied
>> (before), and with patch 4 in addition applied (after)
>>
>> --- config-3.18-before 2014-12-12 18:39:08.385702153 +0100
>> +++ config-3.18-after 2014-12-12 18:33:58.197708840 +0100
>> @@ -167,9 +167,9 @@
>> # CONFIG_PREEMPT is not set
>> # CONFIG_KEXEC is not set
>> # CONFIG_CRASH_DUMP is not set
>> -# CONFIG_SECCOMP is not set
>> +CONFIG_SECCOMP=y
>
> That one is odd. It's probably because SECCOMP has a default y on
> MIPS, and I used an ARM configured kernel.
[snip uninteresting remainder of diff]
> Ok, I think most of it is because of options enabled by default. I
> wonder why that happens, but I also wonder why it hasn't been picked
> up by my tests.
I already somewhat expected that.
So make savedefconfig then likely dropped any non-generic non-arm
config symbols regardless whether they are at their default or
non-default values, causing these discrepancies on non-arm targets.
The safest would be to create the reduced config-* as the union of all
target's savedefconfig results, but only using one for each ARCH might
also suffice.
> What configuration are you using? Do you have any modifications of
> some sort (beside the switch to 3.18?)
All I did was switch to 3.18, then did a make target/linux/compile (so
it generated and "cleaned up" the .config in
build_dir/target-*/linux-*/). I might have a few non-default values in
the openwrt-buildroot config, but I did not have any local patches
applied.
One other thing I just noticed: this currently makes "make
kernel_*config" unusable. "make kernel_oldconfig" will ask about about
everything that is at its defaultvalue, while finishing any *config
will result all default values to be added to the config-* in
target/linux/<target>/. This might be easily fixable by running make
savedefconfig first before the openwrt scripts create the difference
from the generic config-* and the new .config for the new target
config-*
Jonas
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list