Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1 | # |
| 2 | # arch/blackfin/boot/Makefile |
| 3 | # |
| 4 | # This file is subject to the terms and conditions of the GNU General Public |
| 5 | # License. See the file "COPYING" in the main directory of this archive |
| 6 | # for more details. |
| 7 | # |
| 8 | |
Sonic Zhang | 3e730e6 | 2013-03-20 14:50:37 +0800 | [diff] [blame] | 9 | targets := uImage uImage.bin uImage.bz2 uImage.gz uImage.lzma uImage.lzo uImage.xip |
Mike Frysinger | 67df6cc | 2010-07-19 05:37:54 +0000 | [diff] [blame] | 10 | extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.xip |
Barry Song | d86bfb1 | 2010-01-07 04:11:17 +0000 | [diff] [blame] | 11 | |
Stephen Warren | e339364 | 2012-03-16 15:03:55 -0600 | [diff] [blame] | 12 | ifeq ($(CONFIG_RAMKERNEL),y) |
| 13 | UIMAGE_LOADADDR = $(CONFIG_BOOT_LOAD) |
| 14 | else # CONFIG_ROMKERNEL must be set |
| 15 | UIMAGE_LOADADDR = $(CONFIG_ROM_BASE) |
| 16 | endif |
| 17 | UIMAGE_ENTRYADDR = $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') |
| 18 | UIMAGE_NAME = '$(CPU_REV)-$(KERNELRELEASE)' |
| 19 | UIMAGE_OPTS-$(CONFIG_ROMKERNEL) += -x |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 20 | |
| 21 | $(obj)/vmlinux.bin: vmlinux FORCE |
| 22 | $(call if_changed,objcopy) |
| 23 | |
Mike Frysinger | 538067c | 2009-06-07 03:47:01 -0400 | [diff] [blame] | 24 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 25 | $(call if_changed,gzip) |
| 26 | |
Mike Frysinger | 538067c | 2009-06-07 03:47:01 -0400 | [diff] [blame] | 27 | $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE |
| 28 | $(call if_changed,bzip2) |
| 29 | |
| 30 | $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE |
| 31 | $(call if_changed,lzma) |
| 32 | |
Mike Frysinger | 67df6cc | 2010-07-19 05:37:54 +0000 | [diff] [blame] | 33 | $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE |
| 34 | $(call if_changed,lzo) |
| 35 | |
Barry Song | d86bfb1 | 2010-01-07 04:11:17 +0000 | [diff] [blame] | 36 | # The mkimage tool wants 64bytes prepended to the image |
| 37 | quiet_cmd_mk_bin_xip = BIN $@ |
| 38 | cmd_mk_bin_xip = ( printf '%64s' | tr ' ' '\377' ; cat $< ) > $@ |
| 39 | $(obj)/vmlinux.bin.xip: $(obj)/vmlinux.bin FORCE |
| 40 | $(call if_changed,mk_bin_xip) |
| 41 | |
Sonic Zhang | 3e730e6 | 2013-03-20 14:50:37 +0800 | [diff] [blame] | 42 | $(obj)/uImage.bin: $(obj)/vmlinux.bin |
Mike Frysinger | b2e8dbd | 2009-10-26 21:16:04 +0000 | [diff] [blame] | 43 | $(call if_changed,uimage,none) |
| 44 | |
Sonic Zhang | 3e730e6 | 2013-03-20 14:50:37 +0800 | [diff] [blame] | 45 | $(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 |
Mike Frysinger | 538067c | 2009-06-07 03:47:01 -0400 | [diff] [blame] | 46 | $(call if_changed,uimage,bzip2) |
| 47 | |
Sonic Zhang | 3e730e6 | 2013-03-20 14:50:37 +0800 | [diff] [blame] | 48 | $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz |
Mike Frysinger | 538067c | 2009-06-07 03:47:01 -0400 | [diff] [blame] | 49 | $(call if_changed,uimage,gzip) |
| 50 | |
Sonic Zhang | 3e730e6 | 2013-03-20 14:50:37 +0800 | [diff] [blame] | 51 | $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma |
Mike Frysinger | 538067c | 2009-06-07 03:47:01 -0400 | [diff] [blame] | 52 | $(call if_changed,uimage,lzma) |
| 53 | |
Sonic Zhang | 3e730e6 | 2013-03-20 14:50:37 +0800 | [diff] [blame] | 54 | $(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo |
Mike Frysinger | 67df6cc | 2010-07-19 05:37:54 +0000 | [diff] [blame] | 55 | $(call if_changed,uimage,lzo) |
| 56 | |
Sonic Zhang | 3e730e6 | 2013-03-20 14:50:37 +0800 | [diff] [blame] | 57 | $(obj)/uImage.xip: $(obj)/vmlinux.bin.xip |
Barry Song | d86bfb1 | 2010-01-07 04:11:17 +0000 | [diff] [blame] | 58 | $(call if_changed,uimage,none) |
| 59 | |
Mike Frysinger | b2e8dbd | 2009-10-26 21:16:04 +0000 | [diff] [blame] | 60 | suffix-y := bin |
Mike Frysinger | 538067c | 2009-06-07 03:47:01 -0400 | [diff] [blame] | 61 | suffix-$(CONFIG_KERNEL_GZIP) := gz |
| 62 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 |
| 63 | suffix-$(CONFIG_KERNEL_LZMA) := lzma |
Mike Frysinger | 67df6cc | 2010-07-19 05:37:54 +0000 | [diff] [blame] | 64 | suffix-$(CONFIG_KERNEL_LZO) := lzo |
Barry Song | d86bfb1 | 2010-01-07 04:11:17 +0000 | [diff] [blame] | 65 | suffix-$(CONFIG_ROMKERNEL) := xip |
| 66 | |
Sonic Zhang | 3e730e6 | 2013-03-20 14:50:37 +0800 | [diff] [blame] | 67 | $(obj)/uImage: $(obj)/uImage.$(suffix-y) |
Mike Frysinger | 538067c | 2009-06-07 03:47:01 -0400 | [diff] [blame] | 68 | @ln -sf $(notdir $<) $@ |
Mike Frysinger | 29cae11 | 2007-10-22 00:45:55 +0800 | [diff] [blame] | 69 | |
| 70 | install: |
| 71 | sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)" |