[U-Boot] [PATCH 01/11] mkconfig: export ARCH, CPU, SOC, BOARD, VENDOR to config.h

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Wed Feb 25 09:23:33 CET 2009


On 08:38 Wed 25 Feb     , Wolfgang Denk wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
> 
> In message <1235542278-21451-1-git-send-email-plagnioj at jcrosoft.com> you wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> > ---
> >  mkconfig |   32 +++++++++++++++++++++-----------
> >  1 files changed, 21 insertions(+), 11 deletions(-)
> > 
> > diff --git a/mkconfig b/mkconfig
> > index b0bbbd1..5ab9c2d 100755
> > --- a/mkconfig
> > +++ b/mkconfig
> > @@ -62,25 +62,35 @@ if [ "$2" = "arm" ] ; then
> >  fi
> >  
> >  #
> > +# Create board specific header file
> > +#
> > +if [ "$APPEND" != "yes" ]	# Append to existing config file
> > +then
> > +	> config.h		# Create new config file
> > +fi
> > +
> > +#
> 
> This is never necessary. Remove that.
> 
> >  # Create include file for Make
> >  #
> >  echo "ARCH   = $2" >  config.mk
> > +echo "#define CONFIG_ARCH   $2" >>  config.h
> >  echo "CPU    = $3" >> config.mk
> > +echo "#define CONFIG_CPU    $3" >> config.h
> >  echo "BOARD  = $4" >> config.mk
> > +echo "#define CONFIG_BOARD  $4" >> config.h
> > -[ "$5" ] && [ "$5" != "NULL" ] && echo "VENDOR = $5" >> config.mk
> > +[ "$5" ] && [ "$5" != "NULL" ] && {
> > +	echo "VENDOR = $5" >> config.mk
> > +	echo "#define CONFIG_VENDOR $5" >> config.h
> > +}
> 
> Please do NOT do this.
> 
> The setting up CONFIG_ options is done in the board config file, and
> NOT in the Makefile.
> 
> This patch will cause conflicts with MANY boards.
> 
> 
> Maybe you would like to explain WHY you are trying to do that?
whe need to known which CPU, BOARD and co is currently use to the generate the
lds 
as example to specify the start.o to use

Best Regards,
J.


More information about the U-Boot mailing list