aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/Makefile
diff options
context:
space:
mode:
authorStephen Warren <swarren@wwwdotorg.org>2012-03-16 17:03:55 -0400
committerMichal Marek <mmarek@suse.cz>2012-03-26 09:49:20 -0400
commite33936451484b06b61b259172fa3761a7d1cd4dc (patch)
treeacdbb021fc7f3ba4c13adbd70059f7a7c70c9803 /arch/arm/boot/Makefile
parentf75a8df3bd6466e29a4e40b86b2cfc96fe06d328 (diff)
Kbuild: centralize MKIMAGE and cmd_uimage definitions
All ARCHs have the same definition of MKIMAGE. Move it to Makefile.lib to avoid duplication. All ARCHs have similar definitions of cmd_uimage. Place a sufficiently parameterized version in Makefile.lib to avoid duplication. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Nicolas Pitre <nico@linaro.org> Tested-by: Mike Frysinger <vapier@gentoo.org> [Blackfin] Tested-by: Michal Simek <monstr@monstr.eu> [Microblaze] Tested-by: Guan Xuetao <gxt@mprc.pku.edu.cn> [unicore32] Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'arch/arm/boot/Makefile')
-rw-r--r--arch/arm/boot/Makefile23
1 files changed, 9 insertions, 14 deletions
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
index fc871e719aa..c877087d200 100644
--- a/arch/arm/boot/Makefile
+++ b/arch/arm/boot/Makefile
@@ -11,8 +11,6 @@
11# Copyright (C) 1995-2002 Russell King 11# Copyright (C) 1995-2002 Russell King
12# 12#
13 13
14MKIMAGE := $(srctree)/scripts/mkuboot.sh
15
16ifneq ($(MACHINE),) 14ifneq ($(MACHINE),)
17include $(srctree)/$(MACHINE)/Makefile.boot 15include $(srctree)/$(MACHINE)/Makefile.boot
18endif 16endif
@@ -69,22 +67,19 @@ $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
69 67
70clean-files := *.dtb 68clean-files := *.dtb
71 69
72quiet_cmd_uimage = UIMAGE $@ 70ifneq ($(LOADADDR),)
73 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \ 71 UIMAGE_LOADADDR=$(LOADADDR)
74 -C none -a $(LOADADDR) -e $(STARTADDR) \
75 -n 'Linux-$(KERNELRELEASE)' -d $< $@
76
77ifeq ($(CONFIG_ZBOOT_ROM),y)
78$(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT)
79else 72else
80$(obj)/uImage: LOADADDR=$(ZRELADDR) 73 ifeq ($(CONFIG_ZBOOT_ROM),y)
74 UIMAGE_LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT)
75 else
76 UIMAGE_LOADADDR=$(ZRELADDR)
77 endif
81endif 78endif
82 79
83$(obj)/uImage: STARTADDR=$(LOADADDR)
84
85check_for_multiple_loadaddr = \ 80check_for_multiple_loadaddr = \
86if [ $(words $(LOADADDR)) -gt 1 ]; then \ 81if [ $(words $(UIMAGE_LOADADDR)) -gt 1 ]; then \
87 echo 'multiple load addresses: $(LOADADDR)'; \ 82 echo 'multiple load addresses: $(UIMAGE_LOADADDR)'; \
88 echo 'This is incompatible with uImages'; \ 83 echo 'This is incompatible with uImages'; \
89 echo 'Specify LOADADDR on the commandline to build an uImage'; \ 84 echo 'Specify LOADADDR on the commandline to build an uImage'; \
90 false; \ 85 false; \