From e33936451484b06b61b259172fa3761a7d1cd4dc Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Fri, 16 Mar 2012 15:03:55 -0600 Subject: 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 Acked-by: Nicolas Pitre Tested-by: Mike Frysinger [Blackfin] Tested-by: Michal Simek [Microblaze] Tested-by: Guan Xuetao [unicore32] Signed-off-by: Michal Marek --- arch/blackfin/boot/Makefile | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'arch/blackfin') diff --git a/arch/blackfin/boot/Makefile b/arch/blackfin/boot/Makefile index 0a49279e342..f7d27d50d02 100644 --- a/arch/blackfin/boot/Makefile +++ b/arch/blackfin/boot/Makefile @@ -6,20 +6,17 @@ # for more details. # -MKIMAGE := $(srctree)/scripts/mkuboot.sh - targets := vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma vmImage.lzo vmImage.xip extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.xip -UIMAGE_OPTS-y := -UIMAGE_OPTS-$(CONFIG_RAMKERNEL) += -a $(CONFIG_BOOT_LOAD) -UIMAGE_OPTS-$(CONFIG_ROMKERNEL) += -a $(CONFIG_ROM_BASE) -x - -quiet_cmd_uimage = UIMAGE $@ - cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \ - -C $(2) -n '$(CPU_REV)-$(KERNELRELEASE)' \ - -e $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') \ - $(UIMAGE_OPTS-y) -d $< $@ +ifeq ($(CONFIG_RAMKERNEL),y) +UIMAGE_LOADADDR = $(CONFIG_BOOT_LOAD) +else # CONFIG_ROMKERNEL must be set +UIMAGE_LOADADDR = $(CONFIG_ROM_BASE) +endif +UIMAGE_ENTRYADDR = $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') +UIMAGE_NAME = '$(CPU_REV)-$(KERNELRELEASE)' +UIMAGE_OPTS-$(CONFIG_ROMKERNEL) += -x $(obj)/vmlinux.bin: vmlinux FORCE $(call if_changed,objcopy) -- cgit v1.2.3-70-g09d2