Patchwork [U-Boot,v1,25/25] Makefile: Add CONFIG_BUILD_TARGET to automatically build an special image

login
register
mail settings
Submitter Stefan Roese
Date June 27, 2014, 9:55 a.m.
Message ID <1403862911-6138-26-git-send-email-sr@denx.de>
Download mbox | patch
Permalink /patch/364853/
State New
Delegated to: Prafulla Wadaskar
Headers show

Comments

Stefan Roese - June 27, 2014, 9:55 a.m.
Add target to build it automatically upon "make" / MAKEALL. This can/should
be set by board / cpu specific headers if a special U-Boot image is
required for this SoC / board.

E.g. used by Marvell Armada XP to automatically build the u-boot.kwb
target.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>

---

 Makefile | 5 +++++
 README   | 8 ++++++++
 2 files changed, 13 insertions(+)

Patch

diff --git a/Makefile b/Makefile
index e45a25c..44572c0 100644
--- a/Makefile
+++ b/Makefile
@@ -742,6 +742,11 @@  endif
 endif
 endif
 
+# Add optional build target if defined in board/cpu/soc headers
+ifneq ($(CONFIG_BUILD_TARGET),)
+ALL-y += $(CONFIG_BUILD_TARGET:"%"=%)
+endif
+
 LDFLAGS_u-boot += $(LDFLAGS_FINAL)
 ifneq ($(CONFIG_SYS_TEXT_BASE),)
 LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
diff --git a/README b/README
index fe5cacb..4b4633c 100644
--- a/README
+++ b/README
@@ -2657,6 +2657,14 @@  CBFS (Coreboot Filesystem) support
 		200 ms.
 
 - Configuration Management:
+		CONFIG_BUILD_TARGET
+
+		Some SoCs need special image types (e.g. U-Boot binary
+		with a special header) as build targets. By defining
+		CONFIG_BUILD_TARGET in the SoC / board header, this
+		special image will be automatically built upon calling
+		make / MAKEALL.
+
 		CONFIG_IDENT_STRING
 
 		If defined, this string will be added to the U-Boot