Re: [OpenWrt-Devel] [PATCH 1/2] kernel: Use defconfig instead of full fledged kernel configuration

2014-11-24 Thread Maxime Ripard
Hi Florian,

On Sun, Nov 23, 2014 at 06:42:25PM -0800, Florian Fainelli wrote:
> Le 18/11/2014 02:27, Maxime Ripard a écrit :
> > Hi Felix,
> > 
> > On Sun, Nov 09, 2014 at 11:54:15AM +0100, Felix Fietkau wrote:
> >> On 2014-11-07 11:58, Maxime Ripard wrote:
> >>> Rely on the Kconfig defconfig mechanism to fill all the missing options,
> >>> instead of needing to set them all in the kernel configurations like what 
> >>> was
> >>> previously done.
> >>>
> >>> This will allow to trim down a lot the configuration files, avoid carrying
> >>> unused configuration options and preserve the developpers mental health.
> >>>
> >>> Signed-off-by: Maxime Ripard 
> >> I think this is a very good idea. Did you verify on all relevant
> >> architectures that the resulting kernel config stays the same with this
> >> change?
> > 
> > I've given a test-run on all the supported architectures, both with
> > and without the patch.
> > 
> > It pointed out that there was an incorrect assumption on my side that
> > $(ARCH) would be the Linux architecture, which it isn't. A second
> > version will follow shortly to address this.
> 
> I have not seen a v2 patchset which addresses that? Thanks!

Sorry for the delay, I just sent it.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


signature.asc
Description: Digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/2] kernel: Use defconfig instead of full fledged kernel configuration

2014-11-23 Thread Florian Fainelli
Le 18/11/2014 02:27, Maxime Ripard a écrit :
> Hi Felix,
> 
> On Sun, Nov 09, 2014 at 11:54:15AM +0100, Felix Fietkau wrote:
>> On 2014-11-07 11:58, Maxime Ripard wrote:
>>> Rely on the Kconfig defconfig mechanism to fill all the missing options,
>>> instead of needing to set them all in the kernel configurations like what 
>>> was
>>> previously done.
>>>
>>> This will allow to trim down a lot the configuration files, avoid carrying
>>> unused configuration options and preserve the developpers mental health.
>>>
>>> Signed-off-by: Maxime Ripard 
>> I think this is a very good idea. Did you verify on all relevant
>> architectures that the resulting kernel config stays the same with this
>> change?
> 
> I've given a test-run on all the supported architectures, both with
> and without the patch.
> 
> It pointed out that there was an incorrect assumption on my side that
> $(ARCH) would be the Linux architecture, which it isn't. A second
> version will follow shortly to address this.

I have not seen a v2 patchset which addresses that? Thanks!

> 
> Beside ramips that failed to build on my build machine, and um that
> was missing the needed exception to convert it to the linux
> architecture, the only change in *all* the generated configuration is
> CONFIG_INITRAMFS_SOURCE being at a different location in the file.
> 
> Note that this is just with this patch applied, so there was no
> trimmed version of the configuration files involved.
> 
> You can find the build logs and kernel configuration files there:
> http://free-electrons.com/~maxime/pub/openwrt/, both with and without
> the patch applied.
> 
> Maxime
> 
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/2] kernel: Use defconfig instead of full fledged kernel configuration

2014-11-18 Thread Maxime Ripard
Hi Felix,

On Sun, Nov 09, 2014 at 11:54:15AM +0100, Felix Fietkau wrote:
> On 2014-11-07 11:58, Maxime Ripard wrote:
> > Rely on the Kconfig defconfig mechanism to fill all the missing options,
> > instead of needing to set them all in the kernel configurations like what 
> > was
> > previously done.
> > 
> > This will allow to trim down a lot the configuration files, avoid carrying
> > unused configuration options and preserve the developpers mental health.
> > 
> > Signed-off-by: Maxime Ripard 
> I think this is a very good idea. Did you verify on all relevant
> architectures that the resulting kernel config stays the same with this
> change?

I've given a test-run on all the supported architectures, both with
and without the patch.

It pointed out that there was an incorrect assumption on my side that
$(ARCH) would be the Linux architecture, which it isn't. A second
version will follow shortly to address this.

Beside ramips that failed to build on my build machine, and um that
was missing the needed exception to convert it to the linux
architecture, the only change in *all* the generated configuration is
CONFIG_INITRAMFS_SOURCE being at a different location in the file.

Note that this is just with this patch applied, so there was no
trimmed version of the configuration files involved.

You can find the build logs and kernel configuration files there:
http://free-electrons.com/~maxime/pub/openwrt/, both with and without
the patch applied.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


signature.asc
Description: Digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/2] kernel: Use defconfig instead of full fledged kernel configuration

2014-11-09 Thread Maxime Ripard
Hi Felix,

On Sun, Nov 09, 2014 at 11:54:15AM +0100, Felix Fietkau wrote:
> On 2014-11-07 11:58, Maxime Ripard wrote:
> > Rely on the Kconfig defconfig mechanism to fill all the missing options,
> > instead of needing to set them all in the kernel configurations like what 
> > was
> > previously done.
> > 
> > This will allow to trim down a lot the configuration files, avoid carrying
> > unused configuration options and preserve the developpers mental health.
> > 
> > Signed-off-by: Maxime Ripard 
> I think this is a very good idea. Did you verify on all relevant
> architectures that the resulting kernel config stays the same with this
> change?

I've tested this only for mvebu so far, but I can test it on more
platforms if you want to next week.

The result for mvebu was almost identical, only one or two meaningless
configuration options were not at the same values during a run before
and after.

Getting more test coverage should provide more samples :)

Maxime


-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


signature.asc
Description: Digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/2] kernel: Use defconfig instead of full fledged kernel configuration

2014-11-09 Thread Felix Fietkau
On 2014-11-07 11:58, Maxime Ripard wrote:
> Rely on the Kconfig defconfig mechanism to fill all the missing options,
> instead of needing to set them all in the kernel configurations like what was
> previously done.
> 
> This will allow to trim down a lot the configuration files, avoid carrying
> unused configuration options and preserve the developpers mental health.
> 
> Signed-off-by: Maxime Ripard 
I think this is a very good idea. Did you verify on all relevant
architectures that the resulting kernel config stays the same with this
change?

Thanks,

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] kernel: Use defconfig instead of full fledged kernel configuration

2014-11-07 Thread Maxime Ripard
Rely on the Kconfig defconfig mechanism to fill all the missing options,
instead of needing to set them all in the kernel configurations like what was
previously done.

This will allow to trim down a lot the configuration files, avoid carrying
unused configuration options and preserve the developpers mental health.

Signed-off-by: Maxime Ripard 
---
 include/kernel-defaults.mk | 24 
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 8abd32d7141d..e78ced7e818a 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -100,16 +100,24 @@ define Kernel/SetNoInitramfs
echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config
 endef
 
+DEFCONFIG_DIR = $(LINUX_DIR)/arch/$(ARCH)/configs
+DEFCONFIG_NAME = openwrt_defconfig
+
 define Kernel/Configure/Default
-   $(LINUX_CONF_CMD) > $(LINUX_DIR)/.config.target
+   $(LINUX_CONF_CMD) > $(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target
 # copy CONFIG_KERNEL_* settings over to .config.target
-   awk 
'/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' 
$(TOPDIR)/.config >> $(LINUX_DIR)/.config.target
-   echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> 
$(LINUX_DIR)/.config.target
-   echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target
-   echo "# CONFIG_KALLSYMS_UNCOMPRESSED is not set" >> 
$(LINUX_DIR)/.config.target
-   echo "# CONFIG_KPROBES is not set" >> $(LINUX_DIR)/.config.target
-   $(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo 
$(TOPDIR)/.config > $(LINUX_DIR)/.config.override
-   $(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null 
$(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config
+   awk 
'/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' \
+   $(TOPDIR)/.config >> $(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target
+   echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> 
$(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target
+   echo "# CONFIG_KALLSYMS_ALL is not set" >> 
$(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target
+   echo "# CONFIG_KALLSYMS_UNCOMPRESSED is not set" >> 
$(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target
+   echo "# CONFIG_KPROBES is not set" >> 
$(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target
+   $(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo 
$(TOPDIR)/.config > \
+   $(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).override
+   $(SCRIPT_DIR)/kconfig.pl 'm+' '+' 
$(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target \
+/dev/null $(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).override > \
+   $(DEFCONFIG_DIR)/$(DEFCONFIG_NAME)
+   +$(MAKE) $(KERNEL_MAKEOPTS) $(DEFCONFIG_NAME)
$(call Kernel/SetNoInitramfs)
rm -rf $(KERNEL_BUILD_DIR)/modules
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(MAKE) 
$(KERNEL_MAKEOPTS) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
-- 
2.1.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel