]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARC: [build] Allow uncompressed uImage
authorVineet Gupta <vgupta@synopsys.com>
Fri, 22 Mar 2013 16:34:27 +0000 (22:04 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Tue, 9 Apr 2013 06:51:15 +0000 (12:21 +0530)
The existing uImage target always generates gzip compressed image which
drags bootup for some very slow FPGA customer boards.

So introduce seperate make targets:uImage.{bin,gz} with uncompressed
being default. Also tie gz generation to CONFIG_KERNEL_GZIP, which a
platform can select in it's Kconfig if it wishes gz to be default.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/Makefile
arch/arc/boot/Makefile

index ac14601577a65086790586e7d95e1e282649a9d1..f30e0a168343eaacf6b7d9c0fc8580e980cbb844 100644 (file)
@@ -102,10 +102,11 @@ boot              := arch/arc/boot
 KBUILD_IMAGE   := bootpImage
 
 all:   $(KBUILD_IMAGE)
-
 bootpImage: vmlinux
 
-uImage: vmlinux
+boot_targets += uImage uImage.bin uImage.gz
+
+$(boot_targets): vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
 %.dtb %.dtb.S %.dtb.o: scripts
index 70416a9b452ffd11ea2db3add40338b7c8a00181..e597cb34c16a832e4d219fd95a688126427b34b3 100644 (file)
@@ -11,7 +11,12 @@ LINUX_START_TEXT = $$(readelf -h vmlinux | \
 
 UIMAGE_LOADADDR    = $(CONFIG_LINUX_LINK_BASE)
 UIMAGE_ENTRYADDR   = $(LINUX_START_TEXT)
-UIMAGE_COMPRESSION = gzip
+
+suffix-y := bin
+suffix-$(CONFIG_KERNEL_GZIP)   := gz
+
+targets += uImage uImage.bin uImage.gz
+extra-y += vmlinux.bin vmlinux.bin.gz
 
 $(obj)/vmlinux.bin: vmlinux FORCE
        $(call if_changed,objcopy)
@@ -19,6 +24,12 @@ $(obj)/vmlinux.bin: vmlinux FORCE
 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
        $(call if_changed,gzip)
 
-$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
-       $(call if_changed,uimage)
+$(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
+       $(call if_changed,uimage,none)
+
+$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
+       $(call if_changed,uimage,gzip)
 
+$(obj)/uImage: $(obj)/uImage.$(suffix-y)
+       @ln -sf $(notdir $<) $@
+       @echo '  Image $@ is ready'