All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Singer <elf@buici.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Preparing a KEV7a400 patch
Date: Wed, 6 Aug 2003 17:47:16 -0700	[thread overview]
Message-ID: <20030807004716.GA20846@buici.com> (raw)
In-Reply-To: <20030806233049.AE09CC59E4@atlas.denx.de>

On Thu, Aug 07, 2003 at 01:30:44AM +0200, Wolfgang Denk wrote:
> In message <20030806223427.GA7826@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. 

My target won't compile without it.  I can separate it, but MAKEALL
will fail.

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

How about the other way around.  I'll send you the configuration
script portion.  It's very small.  

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

Don't any more.

> 
> > # Copyright (c) 2003
> > # Marc Singer <elf@buici.com>
> 
> Please include a GPL header.

Sure.  

Note that mkconfig doesn't.

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

Found another way.  It's removed.

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

Hand't thought of it.  Changed.

I'm attaching a patch with just the configuration patches.  I found
another method of invoking cpp that ought to meet your expectations.

Cheers.
-------------- next part --------------
diff -ruN --exclude '*.o' --exclude='*.map' --exclude '*~' --exclude '*-orig' --exclude=.depend --exclude=configx.mk --exclude='*.srec' --exclude='*.a' u-boot-0.4.0/Makefile u-boot/Makefile
--- u-boot-0.4.0/Makefile	2003-06-26 15:04:09.000000000 -0700
+++ u-boot/Makefile	2003-07-11 22:40:37.000000000 -0700
@@ -118,7 +118,7 @@
 
 #########################################################################
 
-all:		u-boot.srec u-boot.bin System.map
+all:		configx.mk u-boot.srec u-boot.bin System.map
 
 install:	all
 		-cp u-boot.bin /tftpboot/u-boot.bin
@@ -157,6 +157,10 @@
 		grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
 		sort > System.map
 
+.PHONY: configx.mk
+configx.mk:
+	@./mkconfigx
+
 #########################################################################
 else
 all install u-boot u-boot.srec depend dep:
@@ -167,7 +171,7 @@
 #########################################################################
 
 unconfig:
-	rm -f include/config.h include/config.mk
+	rm -f include/config.h include/config.mk configx.mk
 
 #========================================================================
 # PowerPC
diff -ruN --exclude '*.o' --exclude='*.map' --exclude '*~' --exclude '*-orig' --exclude=.depend --exclude=configx.mk --exclude='*.srec' --exclude='*.a' u-boot-0.4.0/mkconfigx u-boot/mkconfigx
--- u-boot-0.4.0/mkconfigx	1969-12-31 16:00:00.000000000 -0800
+++ u-boot/mkconfigx	2003-08-06 17:30:43.000000000 -0700
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# mkconfigx
+#
+# Copyright (c) 2003
+# Marc Singer <elf@buici.com>
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+# 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.
+#
+#
+
+CONFIG=configx.mk
+
+echo > $CONFIG
+echo "# Automatically generated - do not edit" >> $CONFIG
+echo >> $CONFIG
+
+echo '#include "include/config.h"' | ${CPP:=cpp -E} -Iinclude -dM -\
+  | ${GREP:=grep} -E "define[ \t]+CONFIG_[^ \t]*[ \t]+1$"\
+  | ${SED:=sed} -e "s/.*\(CONFIG_[^ \t]*\).*/\1=y/"\
+  | ${SORT:=sort}\
+  >> $CONFIG

  reply	other threads:[~2003-08-07  0:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-06 19:16 [U-Boot-Users] Preparing a KEV7a400 patch Marc Singer
2003-08-06 22:22 ` Wolfgang Denk
2003-08-06 22:34   ` Marc Singer
2003-08-06 23:30     ` Wolfgang Denk
2003-08-07  0:47       ` Marc Singer [this message]
2003-08-07 12:51         ` Wolfgang Denk
2003-08-07 17:54           ` Marc Singer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030807004716.GA20846@buici.com \
    --to=elf@buici.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.