diff options
author | Stephen Warren <swarren@wwwdotorg.org> | 2012-03-16 15:03:55 -0600 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2012-03-26 15:49:20 +0200 |
commit | e33936451484b06b61b259172fa3761a7d1cd4dc (patch) | |
tree | acdbb021fc7f3ba4c13adbd70059f7a7c70c9803 /arch/arm/boot/Makefile | |
parent | f75a8df3bd6466e29a4e40b86b2cfc96fe06d328 (diff) | |
download | linux-e33936451484b06b61b259172fa3761a7d1cd4dc.tar.bz2 |
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/Makefile | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index fc871e719aae..c877087d2000 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile @@ -11,8 +11,6 @@ # Copyright (C) 1995-2002 Russell King # -MKIMAGE := $(srctree)/scripts/mkuboot.sh - ifneq ($(MACHINE),) include $(srctree)/$(MACHINE)/Makefile.boot endif @@ -69,22 +67,19 @@ $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y)) clean-files := *.dtb -quiet_cmd_uimage = UIMAGE $@ - cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \ - -C none -a $(LOADADDR) -e $(STARTADDR) \ - -n 'Linux-$(KERNELRELEASE)' -d $< $@ - -ifeq ($(CONFIG_ZBOOT_ROM),y) -$(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT) +ifneq ($(LOADADDR),) + UIMAGE_LOADADDR=$(LOADADDR) else -$(obj)/uImage: LOADADDR=$(ZRELADDR) + ifeq ($(CONFIG_ZBOOT_ROM),y) + UIMAGE_LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT) + else + UIMAGE_LOADADDR=$(ZRELADDR) + endif endif -$(obj)/uImage: STARTADDR=$(LOADADDR) - check_for_multiple_loadaddr = \ -if [ $(words $(LOADADDR)) -gt 1 ]; then \ - echo 'multiple load addresses: $(LOADADDR)'; \ +if [ $(words $(UIMAGE_LOADADDR)) -gt 1 ]; then \ + echo 'multiple load addresses: $(UIMAGE_LOADADDR)'; \ echo 'This is incompatible with uImages'; \ echo 'Specify LOADADDR on the commandline to build an uImage'; \ false; \ |