Re: ARM defconfig files

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Thursday, June 3, 2010 - 7:48 am

[ Continuation on the "ARM MSM updates" thread ]

On Thu, 3 Jun 2010, Russell King wrote:

Yeah, the thread started out as a "I got really bored with lots of msm 
patches", and then just expanded into what I think is wrong with the 
sub-architectures. 


I can understand that, but at the same time, I do think that the 
"defconfig" file concept as it is now is just broken. To the point of 
being unfixable. It's obviously just a copy of the final .config, and it's 
fundamentally not really readable (and especially not writable) by humans.

And that all actually made some sense way-back-when, back when it was 
originally done - back when our config files were tiny (compared to what 
they are now), and when it ended up being the default input for the 
config. It just doesn't make much sense any more. The Kconfig files 
themselves end up having defaults for the core things, and the non-core 
things are too many to list/edit sanely in that format.

So the original reason I want to remove them is that they are very 
annoying, but the reasoning that then takes that annoyance and makes me 
think seriously about removing them despite the inevitable pain factor is 
that I really don't think we can even use the concept for any better 
model.

Anything better would _have_ to be totally different. And no, I don't 
think your "diffs against a base" model work either, because while it 
would make them smaller, it would still make them basically unreadable and 
uneditable by any human, which means that it's not something we should 
check in - it's a generated file!

And I do think our kernel configurator language already should basically 
have the expressive power to do it *sanely*. We already support including 
other files, which is a requirement for any hierarchical model.

So I _think_ whatever "mach-xyz" file _should_ do something like

	# Kconfig file for OMAP4ABCXYZ chip

	.. set the particulars for this _particular_ chip,
	   ie select the particular drivers on this chip ..

	include "chip-family-details" (ie maybe "base OMAP details")

	include "architecture-family-details" (ie ARM Kconfig)

see? Not one flat file, and very much not something generated.

And I actually suspect we could do it with our current Kconfig file model. 
IOW, in the arch/arm/Kconfig file, I think it should be doable to have 
basically a

	choice
		prompt "ARM platform"

	config ARM_PLATFORM_OMAP
		bool PLATFORM_OMAP

	config ARM_PLATFORM_MSM
		bool PLATFORM_MSM
	...
	endchoice

	if ARK_PLATFORM_OMAP
	 include "Kconfig.omap"	# this will further have choices for OMAP versions
	elif ARM_PLATFORM_...

and then the individual "Kconfig.platform" files could select certain 
options, and then do a "include Kconfig.cpu" which would actually be the 
_current_ top-level arch/arm/Kconfig.

Or something. See? Making it hierarchical (so that each individual 
Kconfig.xyz file only handles a certain level of detail, and it doesn't 
grow unboundedly) and making it fundamentally human readable/writable 
would be a really good thing.

NOTE NOTE NOTE! I'm not at all saying it has to be done like the above 
with the current Kconfig language. The above is more of a "this is how we 
_could_ do it, and it would be a big conceptual improvement". 

And I don't think we can get there from here unless I at some point say "I 
just removed the xyz_defconfig files", at which point people will curse me 
and stumble about until they actually come up with something better.

Of course, if the ARM people do something proactive like the above 
_before_ I remove the defconfig files, I won't complain.

		Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: ARM defconfig files, Linus Torvalds, (Thu Jun 3, 7:48 am)
Re: ARM defconfig files, Tony Lindgren, (Thu Jun 3, 9:46 am)
Re: ARM defconfig files, Daniel Walker, (Thu Jun 3, 9:53 am)
Re: ARM defconfig files, Russell King, (Thu Jun 3, 11:10 am)
Re: ARM defconfig files, Russell King, (Thu Jun 3, 11:13 am)
Re: ARM defconfig files, Linus Torvalds, (Thu Jun 3, 11:18 am)
Re: ARM defconfig files, Daniel Walker, (Thu Jun 3, 11:20 am)
Re: ARM defconfig files, Linus Torvalds, (Thu Jun 3, 11:21 am)
Re: ARM defconfig files, Al Viro, (Thu Jun 3, 11:30 am)
Re: ARM defconfig files, Russell King, (Thu Jun 3, 11:41 am)
Re: ARM defconfig files, Linus Torvalds, (Thu Jun 3, 11:53 am)
Re: ARM defconfig files, Russell King, (Thu Jun 3, 11:53 am)
Re: ARM defconfig files, Linus Torvalds, (Thu Jun 3, 11:56 am)
Re: ARM defconfig files, Russell King, (Thu Jun 3, 12:20 pm)
Re: ARM defconfig files, Paul Mundt, (Thu Jun 3, 12:26 pm)
Re: ARM defconfig files, Daniel Walker, (Thu Jun 3, 12:35 pm)
Re: ARM defconfig files, Russell King, (Thu Jun 3, 12:45 pm)
Re: ARM defconfig files, Daniel Walker, (Thu Jun 3, 12:49 pm)
Re: ARM defconfig files, Russell King, (Thu Jun 3, 12:57 pm)
Re: ARM defconfig files, Linus Torvalds, (Thu Jun 3, 1:05 pm)
Re: ARM defconfig files, Daniel Walker, (Thu Jun 3, 1:06 pm)
Re: ARM defconfig files, Linus Torvalds, (Thu Jun 3, 1:09 pm)
Re: ARM defconfig files, Russell King, (Thu Jun 3, 1:18 pm)
Re: ARM defconfig files, Nicolas Pitre, (Thu Jun 3, 1:20 pm)
Re: ARM defconfig files, Linus Torvalds, (Thu Jun 3, 1:31 pm)
Re: ARM defconfig files, Nicolas Pitre, (Thu Jun 3, 1:34 pm)
Re: ARM defconfig files, Tony Lindgren, (Thu Jun 3, 2:17 pm)
Re: ARM defconfig files, Tony Lindgren, (Thu Jun 3, 2:33 pm)
Re: ARM defconfig files, Daniel Walker, (Thu Jun 3, 2:48 pm)
Re: ARM defconfig files, Grant Likely, (Thu Jun 3, 3:15 pm)
Re: ARM defconfig files, Daniel Walker, (Thu Jun 3, 3:24 pm)
Re: ARM defconfig files, Nicolas Pitre, (Thu Jun 3, 3:45 pm)
Re: ARM defconfig files, Kevin Hilman, (Thu Jun 3, 5:23 pm)
Re: ARM defconfig files, Paul Mackerras, (Thu Jun 3, 5:36 pm)
Re: ARM defconfig files, Benjamin Herrenschmidt, (Thu Jun 3, 6:02 pm)
Re: ARM defconfig files, Benjamin Herrenschmidt, (Thu Jun 3, 6:06 pm)
Re: ARM defconfig files, Tony Lindgren, (Thu Jun 3, 9:53 pm)
Re: ARM defconfig files, Tony Lindgren, (Thu Jun 3, 9:59 pm)
Re: ARM defconfig files, Felipe Balbi, (Thu Jun 3, 10:18 pm)
Re: ARM defconfig files, Tony Lindgren, (Thu Jun 3, 10:29 pm)
Re: ARM defconfig files, Geert Uytterhoeven, (Thu Jun 3, 11:30 pm)
Re: ARM defconfig files, Geert Uytterhoeven, (Thu Jun 3, 11:53 pm)
Re: ARM defconfig files, Benjamin Herrenschmidt, (Fri Jun 4, 1:52 am)
Re: ARM defconfig files, Catalin Marinas, (Fri Jun 4, 4:31 am)
Re: ARM defconfig files, Grant Likely, (Fri Jun 4, 5:39 am)
Re: ARM defconfig files, Felipe Contreras, (Sat Jun 5, 6:47 am)
Re: ARM defconfig files, Felipe Contreras, (Sat Jun 5, 7:12 am)
Re: ARM defconfig files, Linus Torvalds, (Sat Jun 5, 7:39 am)
Re: ARM defconfig files, Felipe Contreras, (Sat Jun 5, 9:39 am)
Re: ARM defconfig files, david, (Sat Jun 5, 8:28 pm)
Re: ARM defconfig files, david, (Sat Jun 5, 8:53 pm)
Re: ARM defconfig files, Catalin Marinas, (Tue Jun 8, 8:30 am)
Re: ARM defconfig files, Daniel Walker, (Tue Jun 8, 9:37 am)
Re: ARM defconfig files, Uwe Kleine-König, (Mon Jun 14, 1:32 am)
Re: ARM defconfig files, Uwe Kleine-König, (Wed Jun 30, 3:40 am)
Re: ARM defconfig files, Uwe Kleine-König, (Mon Jul 12, 8:55 am)
Re: ARM defconfig files, Linus Torvalds, (Mon Jul 12, 9:51 am)
Re: ARM defconfig files, Russell King - ARM Linux, (Mon Jul 12, 10:32 am)
Re: ARM defconfig files, Linus Torvalds, (Mon Jul 12, 10:40 am)
Re: ARM defconfig files, Uwe Kleine-König, (Mon Jul 12, 11:50 am)
Re: ARM defconfig files, Linus Torvalds, (Mon Jul 12, 12:04 pm)
Re: ARM defconfig files, Nicolas Pitre, (Mon Jul 12, 12:09 pm)
Re: ARM defconfig files, Nicolas Pitre, (Mon Jul 12, 12:17 pm)
Re: ARM defconfig files, Linus Torvalds, (Mon Jul 12, 12:34 pm)
Re: ARM defconfig files, Grant Likely, (Mon Jul 12, 12:50 pm)
Re: ARM defconfig files, Uwe Kleine-König, (Mon Jul 12, 12:59 pm)
Re: ARM defconfig files, Russell King - ARM Linux, (Mon Jul 12, 1:06 pm)
Re: ARM defconfig files, Nicolas Pitre, (Mon Jul 12, 1:14 pm)
Re: ARM defconfig files, Nicolas Pitre, (Mon Jul 12, 1:29 pm)
Re: ARM defconfig files, Arnd Bergmann, (Mon Jul 12, 1:31 pm)
Re: ARM defconfig files, Nicolas Pitre, (Mon Jul 12, 1:50 pm)
Re: ARM defconfig files, Linus Torvalds, (Mon Jul 12, 2:54 pm)
Re: ARM defconfig files, David Brown, (Mon Jul 12, 4:05 pm)
Re: ARM defconfig files, Linus Torvalds, (Mon Jul 12, 4:18 pm)
Re: ARM defconfig files, David Brown, (Mon Jul 12, 4:34 pm)
Re: ARM defconfig files, Nicolas Pitre, (Mon Jul 12, 5:55 pm)
Re: ARM defconfig files, Uwe Kleine-König, (Tue Jul 13, 12:07 am)
optimized script [Was: ARM defconfig files], Uwe Kleine-König, (Tue Jul 13, 1:07 am)
Re: optimized script [Was: ARM defconfig files], Olof Johansson, (Tue Jul 13, 11:04 am)
Re: ARM defconfig files, Rob Landley, (Tue Jul 13, 11:32 am)
Re: ARM defconfig files, Grant Likely, (Tue Jul 13, 11:32 am)
Re: optimized script [Was: ARM defconfig files], Nicolas Pitre, (Tue Jul 13, 4:39 pm)
Re: ARM defconfig files, Felipe Contreras, (Wed Jul 14, 2:13 am)
Re: ARM defconfig files, Felipe Contreras, (Wed Jul 14, 2:21 am)
Re: ARM defconfig files, Uwe Kleine-König, (Wed Jul 14, 6:20 am)
Re: ARM defconfig files, Tony Luck, (Wed Jul 14, 10:37 am)