[U-Boot-Users] Preparing a KEV7a400 patch

Wolfgang Denk wd at denx.de
Thu Aug 7 01:30:44 CEST 2003


In message <20030806223427.GA7826 at buici.com> you wrote:
> 
> > 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.

Please try it. 

I definitely want to keep these two issues separated.

Most probably I will merge the KEV7A400 board  support  quickly,  but
spend  some time playing with the configuration control script before
I add it.

> > 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.

Ummm...  and what do you need perl for?

> # Copyright (c) 2003
> # Marc Singer <elf at buici.com>

Please include a GPL header.

> # 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.

Please explain this comment, I don't understand it.

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

Any specific reason for not using something like this:

	: ${GREP:=grep} ${SED:=sed} ${SORT:=sort}

?

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

I don't think this command does what you think it does.

You are running the _native_ CPP, which on a x86 host will set things
like __i386__ and i386, which may enable or disable ramdom  stuff  in
the U-Boot config files.


A patch based on this code as is will be rejected.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Nothing in progression can rest on its original plan. We may as  well
think  of  rocking  a grown man in the cradle of an infant.
- Edmund Burke




More information about the U-Boot mailing list