[U-Boot-Users] Preparing a KEV7a400 patch

Marc Singer elf at buici.com
Thu Aug 7 19:54:34 CEST 2003

On Thu, Aug 07, 2003 at 02:51:42PM +0200, Wolfgang Denk wrote:
> I don't see what good it  does.  For  all  boards  I  tried  it  just
> generates  an  empty  "configx.mk" file (well,tnot exactly empty, but
> two blank lines and a comment).

The ppc preprocessor behaves a bit differently from the other's I've
used.  Change the line

   grep -E 'define[ \t]+CONFIG_[^ \t]*[ \t]+1$' |


   grep -E 'define[ \t]+CONFIG_[^ \t]*[ \t]+1[ \t]*$' |

I wrote a Perl script to test this.  It configures every target and
then builds the configx.mk file.  I'm attaching the script in case you
want to use it.

I noticed that a couple of targets fail because of missing headers in
the board specific directories.

> I remember you wanted to avoid using $(CC) -E ?

I found no other reliable way to access the target-specific
preprocessor.  You made it clear that you want to use the
cross-compiler's preprocessor, so this a method to do that.

As for submitting patches against more recent source, I'd be happy to
do so.  The sourceforge CVS server doesn't want to let me login as
anonymous.  I'll use a more recent snapshot if you have one.


-------------- next part --------------

$dir_uboot = "u-boot";
$dir_out = "configxs";

open (MAKEFILE, "<$dir_uboot/Makefile") 
    || die "$dir_uboot/Makefile must be the top level Makefile"; 

-d $dir_out || qx(mkdir -p $dir_out);
qx(rm $dir_out/* 2>&1);

my %configs = ();

while (<MAKEFILE>) {
    next if ! m/^(.*_config):/;
    $configs{$1} = 1;

for $c (sort (keys (%configs))) {
    print "$c  \n";
    -f "$dir_uboot/configx.mk" && unlink ("$dir_uboot/configx.mk");
    print qx(cd $dir_uboot; make $c; make configx.mk);
#    print qq(mv "$dir_uboot/configx.mk" "$dir_out/${c}_configx.mk");
    qx!mv "$dir_uboot/configx.mk" "$dir_out/${c}_configx.mk"!;



More information about the U-Boot mailing list