* [PATCH] ARM: versatile: automatically pick a board in Kconfig
@ 2012-03-06 22:49 mathieu.poirier
2012-03-06 23:02 ` Grant Likely
2012-03-06 23:13 ` Russell King - ARM Linux
0 siblings, 2 replies; 4+ messages in thread
From: mathieu.poirier @ 2012-03-06 22:49 UTC (permalink / raw)
To: linux; +Cc: linux-kernel, arnd, grant.likely
From: Arnd Bergmann <arnd@arndb.de>
The versatile platform supports building any combination of the
three board types (AB, PB, DT), but at least one of them has
to be enabled. This adds the necessary Kconfig statement to
enforce that at least one of the three is selected.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---
arch/arm/mach-versatile/Kconfig | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
index c1f38f6..31da352 100644
--- a/arch/arm/mach-versatile/Kconfig
+++ b/arch/arm/mach-versatile/Kconfig
@@ -25,4 +25,10 @@ config MACH_VERSATILE_DT
Include support for the ARM(R) Versatile/PB platform,
using the device tree for discovery
+config MACH_VERSATILE_AUTO
+ def_bool y
+ depends on !ARCH_VERSATILE_PB
+ depends on !MACH_VERSATILE_AB
+ select MACH_VERSATILE_DT
+
endmenu
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: versatile: automatically pick a board in Kconfig
2012-03-06 22:49 [PATCH] ARM: versatile: automatically pick a board in Kconfig mathieu.poirier
@ 2012-03-06 23:02 ` Grant Likely
2012-03-06 23:13 ` Russell King - ARM Linux
1 sibling, 0 replies; 4+ messages in thread
From: Grant Likely @ 2012-03-06 23:02 UTC (permalink / raw)
To: mathieu.poirier; +Cc: linux, linux-kernel, arnd
On Tue, Mar 6, 2012 at 3:49 PM, <mathieu.poirier@linaro.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The versatile platform supports building any combination of the
> three board types (AB, PB, DT), but at least one of them has
> to be enabled. This adds the necessary Kconfig statement to
> enforce that at least one of the three is selected.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> arch/arm/mach-versatile/Kconfig | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
> index c1f38f6..31da352 100644
> --- a/arch/arm/mach-versatile/Kconfig
> +++ b/arch/arm/mach-versatile/Kconfig
> @@ -25,4 +25,10 @@ config MACH_VERSATILE_DT
> Include support for the ARM(R) Versatile/PB platform,
> using the device tree for discovery
>
> +config MACH_VERSATILE_AUTO
> + def_bool y
> + depends on !ARCH_VERSATILE_PB
> + depends on !MACH_VERSATILE_AB
> + select MACH_VERSATILE_DT
> +
> endmenu
> --
> 1.7.5.4
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: versatile: automatically pick a board in Kconfig
2012-03-06 22:49 [PATCH] ARM: versatile: automatically pick a board in Kconfig mathieu.poirier
2012-03-06 23:02 ` Grant Likely
@ 2012-03-06 23:13 ` Russell King - ARM Linux
2012-03-09 13:44 ` Arnd Bergmann
1 sibling, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2012-03-06 23:13 UTC (permalink / raw)
To: mathieu.poirier; +Cc: linux-kernel, arnd, grant.likely
On Tue, Mar 06, 2012 at 03:49:22PM -0700, mathieu.poirier@linaro.org wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The versatile platform supports building any combination of the
> three board types (AB, PB, DT), but at least one of them has
> to be enabled. This adds the necessary Kconfig statement to
> enforce that at least one of the three is selected.
This approach to 'fixing' the Kconfig doesn't scale particularly well
when we've got lots of platforms to deal with.
I much prefer using KALLCONFIG= to seed allno/allyes/allmod/rand configs.
If you want to target a particular SoC you have to do that anyway. And
you have to use that to ensure that you get a sane config state so that
Kconfig doesn't try and ask for the PHYS_OFFSET value - it will decide
to make that empty and then refuse to reprocess the Kconfig when you
try to build the kernel.
So I don't think there's any point to adding stuff like this.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: versatile: automatically pick a board in Kconfig
2012-03-06 23:13 ` Russell King - ARM Linux
@ 2012-03-09 13:44 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2012-03-09 13:44 UTC (permalink / raw)
To: Russell King - ARM Linux; +Cc: mathieu.poirier, linux-kernel, grant.likely
On Tuesday 06 March 2012, Russell King - ARM Linux wrote:
> On Tue, Mar 06, 2012 at 03:49:22PM -0700, mathieu.poirier@linaro.org wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > The versatile platform supports building any combination of the
> > three board types (AB, PB, DT), but at least one of them has
> > to be enabled. This adds the necessary Kconfig statement to
> > enforce that at least one of the three is selected.
>
> This approach to 'fixing' the Kconfig doesn't scale particularly well
> when we've got lots of platforms to deal with.
>
> I much prefer using KALLCONFIG= to seed allno/allyes/allmod/rand configs.
> If you want to target a particular SoC you have to do that anyway. And
> you have to use that to ensure that you get a sane config state so that
> Kconfig doesn't try and ask for the PHYS_OFFSET value - it will decide
> to make that empty and then refuse to reprocess the Kconfig when you
> try to build the kernel.
>
> So I don't think there's any point to adding stuff like this.
I don't like the this particular way of working around Kconfig too
much either, but I would really like to see it get resolved in a way
that lets randconfig pick an arbitrary set and still finish the
build. Two other ways to get there that I can see are:
* Add a "multichoice" keyword in Kconfig that lets you write a
list of which at one or more items can be enabled, but not all
disabled. This might be the cleanest solution but it will take
some time to get implemented and have everyone convinced that it's
actually a good idea.
* Remove the ASSERT() for missing machine types, and if possible turn
it into a warning instead. This one would be for you to decide.
I think hardcoding the combination of boards using KCONFIG_ALLCONFIG
is not ideal because that will not fail to catch a lot of real bugs
that I found for unexpected combinations of boards.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-09 13:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06 22:49 [PATCH] ARM: versatile: automatically pick a board in Kconfig mathieu.poirier
2012-03-06 23:02 ` Grant Likely
2012-03-06 23:13 ` Russell King - ARM Linux
2012-03-09 13:44 ` Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.