All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2 v2] Blackfin: tweak embedded env config option
Date: Thu, 1 Oct 2009 03:12:30 -0400	[thread overview]
Message-ID: <200910010312.31421.vapier@gentoo.org> (raw)
In-Reply-To: <20090915204942.DC0A1832E864@gemini.denx.de>

On Tuesday 15 September 2009 16:49:42 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > Use the common config option for extracting the environment for embedding
> > into LDR files.
> >  $(obj)u-boot.ldr:	$(obj)u-boot
> > -		$(obj)tools/envcrc --binary > $(obj)env-ldr.o
> > +		$(CREATE_LDR_ENV)
> >  		$(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS)
> 
> This is all BF specific stuff, right? Maybe we should move this into
> some BF Makefile, then, instead of adding more and more references to
> magic variables that have no meaning anywhere except for BF.

here's what i'm thinking (it wont apply to mainline, so it's just an idea).
from what i can see, there shouldnt be *anything* related to Blackfin left in
the top level files now (except for MAKEALL, but that's another day).
-mike

diff --git a/Makefile b/Makefile
index 40cca2e..61210e8 100644
--- a/Makefile
+++ b/Makefile
@@ -305,16 +305,6 @@ $(obj)u-boot.srec:	$(obj)u-boot
 $(obj)u-boot.bin:	$(obj)u-boot
 		$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
 
-$(obj)u-boot.ldr:	$(obj)u-boot
-		$(CREATE_LDR_ENV)
-		$(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS)
-
-$(obj)u-boot.ldr.hex:	$(obj)u-boot.ldr
-		$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary
-
-$(obj)u-boot.ldr.srec:	$(obj)u-boot.ldr
-		$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary
-
 $(obj)u-boot.img:	$(obj)u-boot.bin
 		./tools/mkimage -A $(ARCH) -T firmware -C none \
 		-a $(TEXT_BASE) -e 0 \
@@ -482,6 +472,9 @@ dep tags ctags etags cscope $(obj)System.map:
 	@ exit 1
 endif	# config.mk
 
+# Pull in architecture-specific top level targets
+sinclude $(TOPDIR)/lib_*/targets.mk
+
 .PHONY : CHANGELOG
 CHANGELOG:
 	git log --no-merges U-Boot-1_1_5.. | \
@@ -3487,30 +3480,6 @@ suzaku_config:	unconfig
 	@$(MKCONFIG) -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno
 
 #========================================================================
-# Blackfin
-#========================================================================
-
-# Analog Devices boards
-BFIN_BOARDS = bf518f-ezbrd bf526-ezbrd bf527-ezkit bf533-ezkit bf533-stamp \
-	bf537-pnav bf537-stamp bf538f-ezkit bf548-ezkit bf561-ezkit
-
-# Bluetechnix tinyboards
-BFIN_BOARDS += cm-bf527 cm-bf533 cm-bf537e cm-bf537u cm-bf548 cm-bf561 tcm-
bf537
-
-# Misc third party boards
-BFIN_BOARDS += bf537-minotaur bf537-srv1 blackstamp
-
-# I-SYST Micromodule
-BFIN_BOARDS += ibf-dsp561
-
-$(BFIN_BOARDS:%=%_config)	: unconfig
-	@$(MKCONFIG) $(@:_config=) blackfin blackfin $(@:_config=)
-
-$(BFIN_BOARDS):
-	$(MAKE) $@_config
-	$(MAKE)
-
-#========================================================================
 # AVR32
 #========================================================================
 
@@ -3681,9 +3650,8 @@ clean:
 	       $(obj)board/netstar/{eeprom,crcek,crcit,*.srec,*.bin}	  \
 	       $(obj)board/trab/trab_fkt   $(obj)board/voiceblue/eeprom   \
 	       $(obj)board/armltd/{integratorap,integratorcp}/u-boot.lds  \
-	       $(obj)lib_blackfin/u-boot.lds				  \
-	       $(obj)u-boot.lds						  \
-	       $(obj)cpu/blackfin/bootrom-asm-offsets.[chs]
+	       $(obj)u-boot.lds
+	@rm -f $(EXTRA_CLEAN_TARGETS)
 	@rm -f $(obj)include/bmp_logo.h
 	@rm -f $(obj)nand_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,System.map}
 	@rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl-2k.bin,ipl-4k.bin,ipl.map}
diff --git a/lib_blackfin/config.mk b/lib_blackfin/config.mk
index 323d28f..ff6f45b 100644
--- a/lib_blackfin/config.mk
+++ b/lib_blackfin/config.mk
@@ -43,11 +43,6 @@ endif
 ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
 ALL += $(obj)u-boot.ldr
 endif
-ifeq ($(CONFIG_ENV_IS_EMBEDDED_IN_LDR),y)
-CREATE_LDR_ENV = $(obj)tools/envcrc --binary > $(obj)env-ldr.o
-else
-CREATE_LDR_ENV =
-endif
 
 SYM_PREFIX = _
 
diff --git a/lib_blackfin/targets.mk b/lib_blackfin/targets.mk
new file mode 100644
index 0000000..629ace3
--- /dev/null
+++ b/lib_blackfin/targets.mk
@@ -0,0 +1,70 @@
+#
+# Blackfin specific top level targets
+#
+# Copyright (c) 2005-2009 Analog Devices Inc.
+#
+# Licensed under the GPL-2 or later.
+#
+
+
+EXTRA_CLEAN_TARGETS += \
+	$(obj)cpu/blackfin/bootrom-asm-offsets.[chs]
+
+
+#
+# Blackfin LDR targets
+#
+
+$(obj)u-boot.ldr:	$(obj)u-boot
+ifeq ($(CONFIG_ENV_IS_EMBEDDED_IN_LDR),y)
+		$(obj)tools/envcrc --binary > $(obj)env-ldr.o
+endif
+		$(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS)
+
+$(obj)u-boot.ldr.hex:	$(obj)u-boot.ldr
+		$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary
+
+$(obj)u-boot.ldr.srec:	$(obj)u-boot.ldr
+		$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary
+
+
+#
+# Blackfin boards
+#
+
+BFIN_BOARDS =
+
+# Analog Devices boards
+BFIN_BOARDS += \
+	bf518f-ezbrd \
+	bf526-ezbrd \
+	bf527-ezkit \
+	bf533-ezkit \
+	bf533-stamp \
+	bf537-pnav \
+	bf537-stamp \
+	bf538f-ezkit \
+	bf548-ezkit \
+	bf561-ezkit
+
+# Bluetechnix tinyboards
+BFIN_BOARDS += \
+	cm-bf527 \
+	cm-bf533 \
+	cm-bf537e \
+	cm-bf537u \
+	cm-bf548 \
+	cm-bf561 \
+	tcm-bf537
+
+# Misc third party boards
+BFIN_BOARDS += \
+	bf537-minotaur \
+	bf537-srv1 blackstamp
+
+# I-SYST Micromodule
+BFIN_BOARDS += \
+	ibf-dsp561
+
+$(BFIN_BOARDS:%=%_config)	: unconfig
+	@$(MKCONFIG) $(@:_config=) blackfin blackfin $(@:_config=)

  parent reply	other threads:[~2009-10-01  7:12 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-27  8:31 [U-Boot] [PATCH/RFC] env: always build env_embedded and envcrc Mike Frysinger
2009-07-27 20:52 ` Wolfgang Denk
2009-09-09 12:14 ` [U-Boot] [PATCH v2] env: only build env_embedded and envcrc when needed Mike Frysinger
2009-09-09 13:33   ` Wolfgang Denk
2009-09-09 14:02     ` Mike Frysinger
2009-09-09 14:26       ` Wolfgang Denk
2009-09-09 14:32         ` Mike Frysinger
2009-09-15 20:44           ` Wolfgang Denk
2009-09-15 21:39             ` Mike Frysinger
2009-09-22 20:43               ` Wolfgang Denk
2009-09-23 15:40                 ` Mike Frysinger
2009-09-09 15:50   ` [U-Boot] [PATCH 1/2 v3] " Mike Frysinger
2009-09-15 20:45     ` Wolfgang Denk
2009-09-09 15:50   ` [U-Boot] [PATCH 2/2] Blackfin: tweak embedded env config option Mike Frysinger
2009-09-11  9:39     ` [U-Boot] [PATCH 2/2 v2] " Mike Frysinger
2009-09-15 20:49       ` Wolfgang Denk
2009-09-15 21:36         ` Mike Frysinger
2009-09-22 20:41           ` Wolfgang Denk
2009-09-23 15:41             ` Mike Frysinger
2009-10-01  7:12         ` Mike Frysinger [this message]
2009-09-30 19:29   ` [U-Boot] [PATCH 1/2 v4] env: only build env_embedded and envcrc when needed Mike Frysinger
2009-10-18 20:53     ` Wolfgang Denk
2009-10-18 21:01       ` Mike Frysinger
2009-10-18 21:19         ` Wolfgang Denk
2009-10-18 21:32         ` Wolfgang Denk
2009-10-18 21:51           ` Mike Frysinger
2009-10-18 21:58             ` Wolfgang Denk
2009-10-19  0:55           ` Mike Frysinger
2009-10-19  9:31             ` Wolfgang Denk
2009-10-19 19:36               ` Mike Frysinger
2009-10-25 20:14             ` Wolfgang Denk
2009-10-25 21:55             ` Wolfgang Denk
2009-10-26  8:36               ` Mike Frysinger
2009-10-26 12:13                 ` Stefan Roese
2009-10-26 12:26                   ` Mike Frysinger
2009-10-26 12:34                     ` Stefan Roese
2009-10-26 20:45                       ` Mike Frysinger
2009-10-26 19:17                 ` Wolfgang Denk
2009-10-26 20:43                   ` Mike Frysinger
2009-10-26 23:24             ` Wolfgang Denk
2009-09-30 19:29   ` [U-Boot] [PATCH 2/2 v3] Blackfin: tweak embedded LDR env config option Mike Frysinger

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=200910010312.31421.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --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.