public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] Build: Implement sentinel to pass board options
Date: Sun,  3 Oct 2010 18:34:32 +0200	[thread overview]
Message-ID: <1286123674-13461-1-git-send-email-marek.vasut@gmail.com> (raw)

With this implementation, the sentinel character in TARGET name is interpreted
as an option and expanded to CONFIG_MK_xxx.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 boards.cfg |    1 +
 mkconfig   |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/boards.cfg b/boards.cfg
index 62bcca8..96c8890 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -12,6 +12,7 @@
 #
 #	Lines starting with '#' are comments.
 #	Blank lines are ignored.
+#	Sentinel is used to specify board options.
 #
 # To keep the list sorted, use something like
 #
diff --git a/mkconfig b/mkconfig
index b661071..62d6bd6 100755
--- a/mkconfig
+++ b/mkconfig
@@ -43,7 +43,10 @@ done
 [ $# -lt 4 ] && exit 1
 [ $# -gt 6 ] && exit 1
 
-CONFIG_NAME="${1%_config}"
+# The sentinel is used to define board options
+TARGETS="`echo $1 | sed "s/^[^@]*@//" | sed 's:@: :g'` ${TARGETS}"
+
+CONFIG_NAME="`echo ${1%_config} | sed 's/@.*$//g'`"
 
 [ "${BOARD_NAME}" ] || BOARD_NAME="${CONFIG_NAME}"
 
@@ -52,7 +55,7 @@ cpu="$3"
 if [ "$4" = "-" ] ; then
 	board=${BOARD_NAME}
 else
-	board="$4"
+	board="`echo $1 | sed 's/@.*$//g'`"
 fi
 [ $# -gt 4 ] && [ "$5" != "-" ] && vendor="$5"
 [ $# -gt 5 ] && [ "$6" != "-" ] && soc="$6"
-- 
1.7.1

             reply	other threads:[~2010-10-03 16:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-03 16:34 Marek Vasut [this message]
2010-10-03 16:34 ` [U-Boot] [PATCH 2/3] Build: PXA: Fix Vpac270 build variants Marek Vasut
2010-10-03 20:27   ` Wolfgang Denk
2010-10-03 16:34 ` [U-Boot] [PATCH 3/3] Build: PXA: Fix TrizepsIV " Marek Vasut
2010-10-03 16:38   ` Marek Vasut
2010-10-03 20:28   ` Wolfgang Denk
2010-10-03 20:26 ` [U-Boot] [PATCH 1/3] Build: Implement sentinel to pass board options Wolfgang Denk

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=1286123674-13461-1-git-send-email-marek.vasut@gmail.com \
    --to=marek.vasut@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox