summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-10-03 21:10:57 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-03 21:10:57 +0200
commit4517b5980f0772ba909e152ea289200bf1cf421f (patch)
tree0b5545ead92c40b76df47609fdb9549c846e9576 /Makefile
parent3a9a4a4d705c17c46dfeba2010ba285c2b5a9320 (diff)
parent46bf132f15ec073c0a6d9abc30a516302888ed13 (diff)
downloadbarebox-4517b5980f0772ba909e152ea289200bf1cf421f.tar.gz
barebox-4517b5980f0772ba909e152ea289200bf1cf421f.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 18 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 001e6a1498..5c4bab8e94 100644
--- a/Makefile
+++ b/Makefile
@@ -686,6 +686,22 @@ ifndef CONFIG_PBL_IMAGE
$(call cmd,check_file_size,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE))
endif
+# By default the uImage load address is 2MB below CONFIG_TEXT_BASE,
+# leaving space for the compressed PBL image at 1MB below CONFIG_TEXT_BASE.
+UIMAGE_BASE ?= $(shell printf "0x%08x" $$(($(CONFIG_TEXT_BASE) - 0x200000)))
+
+# For development provide a target which makes barebox loadable by an
+# unmodified u-boot
+quiet_cmd_barebox_mkimage = MKIMAGE $@
+ cmd_barebox_mkimage = $(srctree)/scripts/mkimage -A $(ARCH) -T firmware -C none \
+ -O barebox -a $(UIMAGE_BASE) -e $(UIMAGE_BASE) \
+ -n "barebox $(KERNELRELEASE)" -d $< $@
+
+# barebox.uimage is build from the raw barebox binary, without any other
+# headers.
+barebox.uimage: $(KBUILD_BINARY) FORCE
+ $(call if_changed,barebox_mkimage)
+
ifdef CONFIG_X86
barebox.S: barebox
ifdef CONFIG_X86_HDBOOT
@@ -1015,7 +1031,8 @@ CLEAN_FILES += barebox System.map include/generated/barebox_default_env.h \
.tmp_version .tmp_barebox* barebox.bin barebox.map barebox.S \
.tmp_kallsyms* barebox_default_env* barebox.ldr \
scripts/bareboxenv-target barebox-flash-image \
- Doxyfile.version barebox.srec barebox.s5p
+ Doxyfile.version barebox.srec barebox.s5p barebox.ubl \
+ barebox.uimage
# Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config include2 usr/include