* [Buildroot] [PATCH] Linux kernel: add support for config fragment files
@ 2015-02-10 13:50 Floris Bos
2015-02-10 19:19 ` Baruch Siach
2015-02-14 9:01 ` Thomas Petazzoni
0 siblings, 2 replies; 6+ messages in thread
From: Floris Bos @ 2015-02-10 13:50 UTC (permalink / raw)
To: buildroot
Adds configuration option to merge additional kernel configuration files
to the main kernel configuration using scripts/kconfig/merge_config.sh
For use-cases in which it is desired to build a custom Linux kernel based on
the defconfig of the target device, but with a couple extra options/modules
enabled.
Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
---
linux/Config.in | 6 ++++++
linux/linux.mk | 3 +++
2 files changed, 9 insertions(+)
diff --git a/linux/Config.in b/linux/Config.in
index c981493..afa68b0 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -161,6 +161,12 @@ config BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE
help
Path to the kernel configuration file
+config BR2_LINUX_KERNEL_CONFIG_FRAGMENTS
+ string "Additional configuration fragment files"
+ help
+ A space-seperated list of kernel configuration fragment files,
+ that will be merged to the main kernel configuration file.
+
#
# Binary format
#
diff --git a/linux/linux.mk b/linux/linux.mk
index 29f59e8..02c3f66 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -39,6 +39,7 @@ endif # -rc
endif
LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH))
+LINUX_KERNEL_CONFIG_FRAGMENTS = $(call qstrip,$(BR2_LINUX_KERNEL_CONFIG_FRAGMENTS))
LINUX_INSTALL_IMAGES = YES
LINUX_DEPENDENCIES += host-kmod host-lzop
@@ -178,6 +179,8 @@ define LINUX_CONFIGURE_CMDS
$(INSTALL) -m 0644 $(KERNEL_SOURCE_CONFIG) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
+ $(if $(LINUX_KERNEL_CONFIG_FRAGMENTS),
+ $(@D)/scripts/kconfig/merge_config.sh -m -O $(@D) $(@D)/.config $(LINUX_KERNEL_CONFIG_FRAGMENTS))
$(if $(BR2_arm)$(BR2_armeb),
$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config))
$(if $(BR2_TARGET_ROOTFS_CPIO),
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] Linux kernel: add support for config fragment files
2015-02-10 13:50 [Buildroot] [PATCH] Linux kernel: add support for config fragment files Floris Bos
@ 2015-02-10 19:19 ` Baruch Siach
2015-02-10 21:09 ` Floris Bos
2015-02-14 9:01 ` Thomas Petazzoni
1 sibling, 1 reply; 6+ messages in thread
From: Baruch Siach @ 2015-02-10 19:19 UTC (permalink / raw)
To: buildroot
Hi Floris,
On Tue, Feb 10, 2015 at 02:50:21PM +0100, Floris Bos wrote:
> Adds configuration option to merge additional kernel configuration files
> to the main kernel configuration using scripts/kconfig/merge_config.sh
>
> For use-cases in which it is desired to build a custom Linux kernel based on
> the defconfig of the target device, but with a couple extra options/modules
> enabled.
>
> Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
> ---
[...]
> @@ -178,6 +179,8 @@ define LINUX_CONFIGURE_CMDS
> $(INSTALL) -m 0644 $(KERNEL_SOURCE_CONFIG) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
> $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
> rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
> + $(if $(LINUX_KERNEL_CONFIG_FRAGMENTS),
> + $(@D)/scripts/kconfig/merge_config.sh -m -O $(@D) $(@D)/.config $(LINUX_KERNEL_CONFIG_FRAGMENTS))
The merge_config.sh script is in the kernel since version 3.3. The -O
parameter is only supported since v3.9. How do you handle older kernels?
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] Linux kernel: add support for config fragment files
2015-02-10 19:19 ` Baruch Siach
@ 2015-02-10 21:09 ` Floris Bos
2015-02-10 21:16 ` Baruch Siach
0 siblings, 1 reply; 6+ messages in thread
From: Floris Bos @ 2015-02-10 21:09 UTC (permalink / raw)
To: buildroot
On 02/10/2015 08:19 PM, Baruch Siach wrote:
> On Tue, Feb 10, 2015 at 02:50:21PM +0100, Floris Bos wrote:
>> Adds configuration option to merge additional kernel configuration files
>> to the main kernel configuration using scripts/kconfig/merge_config.sh
>>
>> For use-cases in which it is desired to build a custom Linux kernel based on
>> the defconfig of the target device, but with a couple extra options/modules
>> enabled.
>>
>> Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
>> ---
> [...]
>
>> @@ -178,6 +179,8 @@ define LINUX_CONFIGURE_CMDS
>> $(INSTALL) -m 0644 $(KERNEL_SOURCE_CONFIG) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
>> $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
>> rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
>> + $(if $(LINUX_KERNEL_CONFIG_FRAGMENTS),
>> + $(@D)/scripts/kconfig/merge_config.sh -m -O $(@D) $(@D)/.config $(LINUX_KERNEL_CONFIG_FRAGMENTS))
> The merge_config.sh script is in the kernel since version 3.3. The -O
> parameter is only supported since v3.9. How do you handle older kernels?
Could make it use the merge_config.sh we have in buildroot (in
support/kconfig) instead, if support for old kernel versions is a
requirement.
Yours sincerely,
Floris Bos
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] Linux kernel: add support for config fragment files
2015-02-10 21:09 ` Floris Bos
@ 2015-02-10 21:16 ` Baruch Siach
0 siblings, 0 replies; 6+ messages in thread
From: Baruch Siach @ 2015-02-10 21:16 UTC (permalink / raw)
To: buildroot
Hi Floris,
On Tue, Feb 10, 2015 at 10:09:44PM +0100, Floris Bos wrote:
> On 02/10/2015 08:19 PM, Baruch Siach wrote:
> >On Tue, Feb 10, 2015 at 02:50:21PM +0100, Floris Bos wrote:
> >>Adds configuration option to merge additional kernel configuration files
> >>to the main kernel configuration using scripts/kconfig/merge_config.sh
> >>
> >>For use-cases in which it is desired to build a custom Linux kernel based on
> >>the defconfig of the target device, but with a couple extra options/modules
> >>enabled.
> >>
> >>Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
> >>---
> >[...]
> >
> >>@@ -178,6 +179,8 @@ define LINUX_CONFIGURE_CMDS
> >> $(INSTALL) -m 0644 $(KERNEL_SOURCE_CONFIG) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
> >> $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
> >> rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
> >>+ $(if $(LINUX_KERNEL_CONFIG_FRAGMENTS),
> >>+ $(@D)/scripts/kconfig/merge_config.sh -m -O $(@D) $(@D)/.config $(LINUX_KERNEL_CONFIG_FRAGMENTS))
> >The merge_config.sh script is in the kernel since version 3.3. The -O
> >parameter is only supported since v3.9. How do you handle older kernels?
>
> Could make it use the merge_config.sh we have in buildroot (in
> support/kconfig) instead, if support for old kernel versions is a
> requirement.
Sounds better, IMO. You may also consider going one further step, and add this
feature to the generic kconfig infrastructure.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] Linux kernel: add support for config fragment files
2015-02-10 13:50 [Buildroot] [PATCH] Linux kernel: add support for config fragment files Floris Bos
2015-02-10 19:19 ` Baruch Siach
@ 2015-02-14 9:01 ` Thomas Petazzoni
2015-02-14 13:47 ` Floris Bos
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-02-14 9:01 UTC (permalink / raw)
To: buildroot
Dear Floris Bos,
On Tue, 10 Feb 2015 14:50:21 +0100, Floris Bos wrote:
> +config BR2_LINUX_KERNEL_CONFIG_FRAGMENTS
> + string "Additional configuration fragment files"
> + help
> + A space-seperated list of kernel configuration fragment files,
> + that will be merged to the main kernel configuration file.
Instead of introducing a new option for this, can't we make the
existing option that provides the kernel configuration file path a
space-separated option that allows you to pass multiple kernel config
file fragments?
Or maybe you want to support the combination of a kernel defconfig +
some fragments?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] Linux kernel: add support for config fragment files
2015-02-14 9:01 ` Thomas Petazzoni
@ 2015-02-14 13:47 ` Floris Bos
0 siblings, 0 replies; 6+ messages in thread
From: Floris Bos @ 2015-02-14 13:47 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On 02/14/2015 10:01 AM, Thomas Petazzoni wrote:
> Dear Floris Bos,
>
> On Tue, 10 Feb 2015 14:50:21 +0100, Floris Bos wrote:
>
>> +config BR2_LINUX_KERNEL_CONFIG_FRAGMENTS
>> + string "Additional configuration fragment files"
>> + help
>> + A space-seperated list of kernel configuration fragment files,
>> + that will be merged to the main kernel configuration file.
> Instead of introducing a new option for this, can't we make the
> existing option that provides the kernel configuration file path a
> space-separated option that allows you to pass multiple kernel config
> file fragments?
>
> Or maybe you want to support the combination of a kernel defconfig +
> some fragments?
As mentioned in the commit message my use-case indeed involves combining
a kernel defconfig with a fragment.
To be more precise: I simply want to stay in sync with the Raspberry Pi
defconfig -which changes a lot-, with a few tiny modifications of my own.
--
Yours sincerely,
Floris Bos
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-02-14 13:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-10 13:50 [Buildroot] [PATCH] Linux kernel: add support for config fragment files Floris Bos
2015-02-10 19:19 ` Baruch Siach
2015-02-10 21:09 ` Floris Bos
2015-02-10 21:16 ` Baruch Siach
2015-02-14 9:01 ` Thomas Petazzoni
2015-02-14 13:47 ` Floris Bos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox