James Hogan | 5633004 | 2012-10-09 10:54:32 +0100 | [diff] [blame] | 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 | |
| 9 | suffix-y := bin |
| 10 | suffix-$(CONFIG_KERNEL_GZIP) := gz |
| 11 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 |
| 12 | suffix-$(CONFIG_KERNEL_XZ) := xz |
| 13 | suffix-$(CONFIG_KERNEL_LZO) := lzo |
| 14 | |
| 15 | targets += vmlinux.bin |
| 16 | targets += uImage |
| 17 | targets += uImage.gz |
| 18 | targets += uImage.bz2 |
| 19 | targets += uImage.xz |
| 20 | targets += uImage.lzo |
| 21 | targets += uImage.bin |
| 22 | |
| 23 | extra-y += vmlinux.bin |
| 24 | extra-y += vmlinux.bin.gz |
| 25 | extra-y += vmlinux.bin.bz2 |
| 26 | extra-y += vmlinux.bin.xz |
| 27 | extra-y += vmlinux.bin.lzo |
| 28 | |
| 29 | UIMAGE_LOADADDR = $(CONFIG_PAGE_OFFSET) |
| 30 | |
| 31 | ifeq ($(CONFIG_FUNCTION_TRACER),y) |
| 32 | orig_cflags := $(KBUILD_CFLAGS) |
| 33 | KBUILD_CFLAGS = $(subst -pg, , $(orig_cflags)) |
| 34 | endif |
| 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' |