[U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets

Wolfgang Denk wd at denx.de
Mon Sep 7 12:59:15 CEST 2009


Dear "Hu Mingkai-B21284",

In message <73839B4A0818E747864426270AC332C30447ECB9 at zmy16exm20.fsl.freescale.net> you wrote:
> 
> > > > It should be enough to pass the make target name to the mkconfig 
> > > > script resp. the board config file, i. e. in this case either 
> > > > "CONFIG_MPC8536DS_NAND" or "CONFIG_MPC8536DS_NAND_36BIT". 
> > The rest 
> > > > of the scripting/decision making can then be done in the board 
> > > > config file.
> > > > 
> > >
> > > Thanks for your replay, but I'm not totally catch on you.
> > > "the board config file" in your words refer to 
> > board/*/config.mk, right?
> > 
> > No, with "board config file" I mean include/configs/*.h
>
> How can I parse the board name in a header file?

I'm not sure I understand the question (or rather the problem you are
seeing).

You already know the board name, because the board config file is
clearly related ot one (or eventually more) boards. The rest can be
done with some trivial #ifdef'fery.

> If config booting from NAND, we also need to override the TEXT_BASE
> in the board/*/config.mk file, how could we do that?

You can for example set CONFIG_SYS_MONITOR_BASE (or some other CONFIG_
variable - but CONFIG_SYS_MONITOR_BASE is used anyway) as needed in your
include/configs/*.h, which then gets exported through
include/autoconf.mk, so you can use some
"TEXT_BASE = $(CONFIG_SYS_MONITOR_BASE)" in your config.mk

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If you're not part of the solution, then you're part of the  precipi-
tate.


More information about the U-Boot mailing list