Re: [RFC] ARM: add bcm2711_defconfig
From: Nicolas Saenz Julienne
Date: Wed Jan 08 2020 - 08:53:27 EST
On Tue, 2020-01-07 at 10:28 -0800, Florian Fainelli wrote:
> On 1/7/20 10:11 AM, Nicolas Saenz Julienne wrote:
> > On Tue, 2020-01-07 at 19:06 +0100, Stefan Wahren wrote:
> > > Hi Nicolas,
> > >
> > > Am 07.01.20 um 18:24 schrieb Nicolas Saenz Julienne:
> > > > The Raspberry Pi 4 depends on LPAE in order to use its PCIe port, which
> > > > is essential, as it ultimately provides USB2/3 connectivity. As this
> > > > setup doesn't fit any generic purpose configuration this adds
> > > > bcm2711_defconfig which is based on the current Raspberry Pi foundation
> > > > config file[1] with as little changes as possible
> > >
> > > i really dislike the Foundation config file, because it contains so many
> > > unnecessary features. Bisecting with such a kernel config is horrible.
> > >
> > > How about finding a compromise between bcm2835_defconfig and
> > > multi_v7_defconfig + LPAE?
> >
> > If there is a consensus this is the right approach (creating a new config
> > file), I'll be happy to try that out.
> >
> > Now that I think of it, maybe we shouldn't add bcm2711_thermal into
> > multi_v7_defconfig.
>
> It there a mechanism that can be used such that bcm2711_defconfig would
> be simply a fragment that enables CONFIG_ARM_LPAE=y (and other relevant
> 2711 only options) and that you could easily run/test with, something like:
>
> ARCH=arm make bcm2835_defconfig+bcm2711_defconfig
>
> or something along those lines?
Well I found out about: 'scripts/kconfig/merge_config.sh' which more or less
does that. I think we could use it to build bcm2711_defconfig based off
bcm2835_defconfig. Or even better, create a multi_v7_lpae_defconfig. See:
Author: Nicolas Saenz Julienne <nsaenzjulienne@xxxxxxx>
Date: Wed Jan 8 14:30:56 2020 +0100
ARM: Add multi_v7_lpae_defconfig
The only missing configuration option preventing us from using
multi_v7_defconfig with the RPi4 is ARM_LPAE. It's needed as the PCIe
controller found on the SoC depends on 64bit addressing, yet can't be
included as not all v7 boards support LPAE.
Introduce multi_v7_lpae_defconfig, built off multi_v7_defconfig, which will
avoid us having to duplicate and maintain multiple similar configurations.
Note that merge_into_defconfig was taken from arch/powerpc/Makefile.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@xxxxxxx>
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 16d41efea7f2..bf6379c718ee 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -359,6 +359,20 @@ archclean:
# My testing targets (bypasses dependencies)
bp:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage
+# Used to create 'merged defconfigs'
+# To use it $(call) it with the first argument as the base defconfig
+# and the second argument as a space separated list of .config files to merge,
+# without the .config suffix.
+define merge_into_defconfig
+ $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
+ -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/$(1) \
+ $(foreach
config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config)
+ +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
+endef
+
+PHONY += multi_v7_lpae_defconfig
+multi_v7_lpae_defconfig:
+ $(call merge_into_defconfig,multi_v7_defconfig,lpae)
define archhelp
echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
diff --git a/arch/arm/configs/lpae.config b/arch/arm/configs/lpae.config
new file mode 100644
index 000000000000..19bab134e014
--- /dev/null
+++ b/arch/arm/configs/lpae.config
@@ -0,0 +1 @@
+CONFIG_ARM_LPAE=y
Any thoughts? Is this a little bit too much?
Regards,
Nicolas
Attachment:
signature.asc
Description: This is a digitally signed message part