1# 2# This file is subject to the terms and conditions of the GNU General Public 3# License. See the file "COPYING" in the main directory of this archive 4# for more details. 5# 6# Copyright (C) 2007,2012 Imagination Technologies Ltd. 7# 8 9suffix-y := bin 10suffix-$(CONFIG_KERNEL_GZIP) := gz 11suffix-$(CONFIG_KERNEL_BZIP2) := bz2 12suffix-$(CONFIG_KERNEL_XZ) := xz 13suffix-$(CONFIG_KERNEL_LZO) := lzo 14 15targets += vmlinux.bin 16targets += uImage 17targets += uImage.gz 18targets += uImage.bz2 19targets += uImage.xz 20targets += uImage.lzo 21targets += uImage.bin 22 23extra-y += vmlinux.bin 24extra-y += vmlinux.bin.gz 25extra-y += vmlinux.bin.bz2 26extra-y += vmlinux.bin.xz 27extra-y += vmlinux.bin.lzo 28 29UIMAGE_LOADADDR = $(CONFIG_PAGE_OFFSET) 30 31ifeq ($(CONFIG_FUNCTION_TRACER),y) 32orig_cflags := $(KBUILD_CFLAGS) 33KBUILD_CFLAGS = $(subst -pg, , $(orig_cflags)) 34endif 35 36$(obj)/vmlinux.bin: vmlinux FORCE 37 $(call if_changed,objcopy) 38 39$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE 40 $(call if_changed,gzip) 41 42$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE 43 $(call if_changed,bzip2) 44 45$(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORCE 46 $(call if_changed,xzkern) 47 48$(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE 49 $(call if_changed,lzo) 50 51$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE 52 $(call if_changed,uimage,gzip) 53 54$(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 FORCE 55 $(call if_changed,uimage,bzip2) 56 57$(obj)/uImage.xz: $(obj)/vmlinux.bin.xz FORCE 58 $(call if_changed,uimage,xz) 59 60$(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo FORCE 61 $(call if_changed,uimage,lzo) 62 63$(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE 64 $(call if_changed,uimage,none) 65 66$(obj)/uImage: $(obj)/uImage.$(suffix-y) 67 @ln -sf $(notdir $<) $@ 68 @echo ' Image $@ is ready' 69