[BusyBox] CONFIG_ name clashing with kernel

Robert Schwebel robert at schwebel.de
Mon Aug 1 04:31:31 MDT 2005


On Sun, Jul 31, 2005 at 06:59:42PM -0400, Mike Frysinger wrote:
> all the CONFIG_ defines we're using in busybox have lead to name space 
> clashing with the kernel ...
> 
> http://bugs.busybox.net/view.php?id=316
> 
> we can rename these three defines (SYSCTL/TR/WATCHDOG) or we could take care 
> of this now (and forever) by replacing all of the macros with a different 
> namespace:
> BB_CONFIG_*

I'd also heavily prefer such a change. I currently import the Busybox
Kconfig into the PTXdist Kconfig files when configuring BB under
PTXdist; the regexp magic needed to get a unique name space is really,
really uggly; it is done by

	https://iocaste.penguin.de/viewsvn/ptxdist/trunks/ptxdist-0.7-trunk/config/busybox-1.0.0/Extract?rev=1923&view=auto

in combination with 

	https://iocaste.penguin.de/viewsvn/ptxdist/trunks/ptxdist-0.7-trunk/scripts/mkprefix?rev=1931&view=auto

(user: guest; pass: guest)

Unfortunately, Kconfig itself does not know about configurable
namespaces. I've patched the version used in PTXdist to prefix our
config variables with PTXCONF_ instead of CONFIG_, the patch to do this
is here, it is not very generic because of some hard coded string length
calculations: 

	https://iocaste.penguin.de/viewsvn/ptxdist/trunks/ptxdist-0.7-trunk/scripts/ptx-modifications/

Kconfig is now being used by quite some other projects than only the
Linux kernel (Busybox, buildroot, uCLinux Distro, PTXdist, ...), so it
would be a cool feature to have kconfig command which lets you configure
a default prefix, maybe menu dependend, so it would be possible to do
something like 

----------8<----------8<----------8<----------8<----------8<----------
prefix PTXCONF_				<- somewhere outside the menus,
					   defaults to CONFIG_
menu "Bla"

	config FOO
	prompt "The Foo Feture"		<- results in PTXCONF_FOO	

endmenu

...

menu "Busybox"

	prefix PTXCONF_BB_		<- in Busybox menu

	config FOO			<- results in PTXCONF_BB_FOO
	prompt "The Foo feature of BB"

endmenu

menu "Blub"

	config BAR			<- results in PTXCONF_BAR
	prompt "The Bar Feature"

endmenu
----------8<----------8<----------8<----------8<----------8<----------

This would make it possible to simply include the whole Busybox
configuration into PTXdist without a single change. 

Robert
-- 
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9



More information about the busybox mailing list