diff options
Diffstat (limited to 'arch/blackfin/boot/Makefile')
-rw-r--r-- | arch/blackfin/boot/Makefile | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/arch/blackfin/boot/Makefile b/arch/blackfin/boot/Makefile index e9c48c6f8c1f..d1b3d6051fdf 100644 --- a/arch/blackfin/boot/Makefile +++ b/arch/blackfin/boot/Makefile | |||
@@ -8,14 +8,18 @@ | |||
8 | 8 | ||
9 | MKIMAGE := $(srctree)/scripts/mkuboot.sh | 9 | MKIMAGE := $(srctree)/scripts/mkuboot.sh |
10 | 10 | ||
11 | targets := vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma | 11 | targets := vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma vmImage.xip |
12 | extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma | 12 | extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.xip |
13 | |||
14 | UIMAGE_OPTS-y := | ||
15 | UIMAGE_OPTS-$(CONFIG_RAMKERNEL) += -a $(CONFIG_BOOT_LOAD) | ||
16 | UIMAGE_OPTS-$(CONFIG_ROMKERNEL) += -a $(CONFIG_ROM_BASE) -x | ||
13 | 17 | ||
14 | quiet_cmd_uimage = UIMAGE $@ | 18 | quiet_cmd_uimage = UIMAGE $@ |
15 | cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \ | 19 | cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \ |
16 | -C $(2) -n '$(MACHINE)-$(KERNELRELEASE)' -a $(CONFIG_BOOT_LOAD) \ | 20 | -C $(2) -n '$(MACHINE)-$(KERNELRELEASE)' \ |
17 | -e $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') \ | 21 | -e $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') \ |
18 | -d $< $@ | 22 | $(UIMAGE_OPTS-y) -d $< $@ |
19 | 23 | ||
20 | $(obj)/vmlinux.bin: vmlinux FORCE | 24 | $(obj)/vmlinux.bin: vmlinux FORCE |
21 | $(call if_changed,objcopy) | 25 | $(call if_changed,objcopy) |
@@ -29,6 +33,12 @@ $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE | |||
29 | $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE | 33 | $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE |
30 | $(call if_changed,lzma) | 34 | $(call if_changed,lzma) |
31 | 35 | ||
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 | |||
32 | $(obj)/vmImage.bin: $(obj)/vmlinux.bin | 42 | $(obj)/vmImage.bin: $(obj)/vmlinux.bin |
33 | $(call if_changed,uimage,none) | 43 | $(call if_changed,uimage,none) |
34 | 44 | ||
@@ -41,10 +51,15 @@ $(obj)/vmImage.gz: $(obj)/vmlinux.bin.gz | |||
41 | $(obj)/vmImage.lzma: $(obj)/vmlinux.bin.lzma | 51 | $(obj)/vmImage.lzma: $(obj)/vmlinux.bin.lzma |
42 | $(call if_changed,uimage,lzma) | 52 | $(call if_changed,uimage,lzma) |
43 | 53 | ||
54 | $(obj)/vmImage.xip: $(obj)/vmlinux.bin.xip | ||
55 | $(call if_changed,uimage,none) | ||
56 | |||
44 | suffix-y := bin | 57 | suffix-y := bin |
45 | suffix-$(CONFIG_KERNEL_GZIP) := gz | 58 | suffix-$(CONFIG_KERNEL_GZIP) := gz |
46 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 | 59 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 |
47 | suffix-$(CONFIG_KERNEL_LZMA) := lzma | 60 | suffix-$(CONFIG_KERNEL_LZMA) := lzma |
61 | suffix-$(CONFIG_ROMKERNEL) := xip | ||
62 | |||
48 | $(obj)/vmImage: $(obj)/vmImage.$(suffix-y) | 63 | $(obj)/vmImage: $(obj)/vmImage.$(suffix-y) |
49 | @ln -sf $(notdir $<) $@ | 64 | @ln -sf $(notdir $<) $@ |
50 | 65 | ||