[U-Boot-Users] Preparing a KEV7a400 patch

Marc Singer elf at buici.com
Thu Aug 7 00:34:27 CEST 2003


On Thu, Aug 07, 2003 at 12:22:19AM +0200, Wolfgang Denk wrote:
> Dear Marc,
> 
> in message <20030806191635.GA2601 at buici.com> you wrote:
> > I've successfully ported u-boot to the Sharp KEV7A400 board.  It can
> > program flash, boot from the network, and it runs from flash.
> >
> > Before I submit a patch, I believe there are a couple of outstanding
> > issues that you,  Wolfgang, want resolved.
> >
> >  1) Dependency on Perl
> >
> >     Are you OK with an initial patch that checks for the presence of a
> >     Perl interpreter?  Since this is the only board using the
> >     mkocnfigx script, such a method will be backward compatible.  I
> >     agree that a shell script of the Perl script must be written.
> 
> Can you please split your patch in two separate parts: one  with  the
> support for the new Sharp KEV7A400 board, and another one to use your
> Perl script?

That's an interesting request.  There isn't really a way to separate
them this way since the configuration control script is used to divide
the LHA7A400 implementation of the ARM920 from the Samsung
implementation.

> Did you address the issues I raised with this script  last  time  you
> showed it to me?

I've rewritten the generation script using text tools.  It is
attached.  It uses the preprocessor to generate the list of #defines,
so I think that it better matches your expectations.

Cheers.
-------------- next part --------------
#!/bin/sh
#
# mkconfigx
#
# Copyright (c) 2003
# Marc Singer <elf at buici.com>
#
# Generate a configuration file to control building
# (compiling/linking).  The output may be included in Makefiles to
# select which source files to compile and link.
#
# Here, we select configuration entries of the form:
#  
#  #define CONFIG_XXX 1
#
# where XXX is an enabled configuration option.
# 
#
# About CPP
# ---------
#
# The macro CPP may refer to 'gcc -E'.  This definition is not
# compatible with this use of the preprocessor because the input file
# is a header and not a source file.  Should there be a dependency on
# a target-specific macro, another method must be found.
#

CONFIG=configx.mk

CPP=cpp
[ -z "$GREP" ] && GREP=grep
[ -z "$SED" ]  && SED=sed
[ -z "$SORT" ] && SORT=sort

echo > $CONFIG
echo "# Automatically generated - do not edit" >> $CONFIG
echo >> $CONFIG

$CPP -Iinclude -dM include/config.h\
  | $GREP -E "define[ \t]+CONFIG_[^ \t]*[ \t]+1$"\
  | $SED -e "s/.*\(CONFIG_[^ \t]*\).*/\1=y/"\
  | $SORT\
  >> $CONFIG


More information about the U-Boot mailing list