summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-02-04 17:24:21 +0900
committerTom Rini <trini@ti.com>2014-02-19 11:07:50 -0500
commitced0715d4a4628c2262f0a03e8e299debc41ca16 (patch)
treef3da3ff0140cf8b2e551e918f4f29de631e40717 /Makefile
parentfea1ca8e3418bac4b55f4cc8b66a6ae0d41e91e4 (diff)
downloadtalos-obmc-uboot-ced0715d4a4628c2262f0a03e8e299debc41ca16.tar.gz
talos-obmc-uboot-ced0715d4a4628c2262f0a03e8e299debc41ca16.zip
Makefile: move more stuff to top Makefile
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 17 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 9c3902274b..b24b425cb9 100644
--- a/Makefile
+++ b/Makefile
@@ -281,13 +281,27 @@ endif
# load other configuration
include $(TOPDIR)/config.mk
+ifneq ($(CONFIG_SYS_TEXT_BASE),)
+KBUILD_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
+endif
+
+export CONFIG_SYS_TEXT_BASE
+
+LDFLAGS_u-boot += -T $(obj)u-boot.lds $(LDFLAGS_FINAL)
+ifneq ($(CONFIG_SYS_TEXT_BASE),)
+LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
+endif
+
# Targets which don't build the source code
-NON_BUILD_TARGETS = backup clean clobber distclean mrproper tidy unconfig
+NON_BUILD_TARGETS = backup clean clobber distclean mrproper tidy unconfig %_config
# Only do the generic board check when actually building, not configuring
ifeq ($(filter $(NON_BUILD_TARGETS),$(MAKECMDGOALS)),)
-ifeq ($(findstring _config,$(MAKECMDGOALS)),)
-$(CHECK_GENERIC_BOARD)
+ifeq ($(__HAVE_ARCH_GENERIC_BOARD),)
+ifneq ($(CONFIG_SYS_GENERIC_BOARD),)
+CHECK_GENERIC_BOARD = $(error Your architecture does not support generic board. \
+Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file)
+endif
endif
endif
OpenPOWER on IntegriCloud