PageRenderTime 23ms CodeModel.GetById 19ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/blackfin/boot/Makefile

https://bitbucket.org/thekraven/iscream_thunderc-2.6.35
Makefile | 67 lines | 42 code | 17 blank | 8 comment | 1 complexity | 65332a69d0b45e56dbdcd3ae624bd38b MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
 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
 9MKIMAGE := $(srctree)/scripts/mkuboot.sh
10
11targets := vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma vmImage.xip
12extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.xip
13
14UIMAGE_OPTS-y :=
15UIMAGE_OPTS-$(CONFIG_RAMKERNEL) += -a $(CONFIG_BOOT_LOAD)
16UIMAGE_OPTS-$(CONFIG_ROMKERNEL) += -a $(CONFIG_ROM_BASE) -x
17
18quiet_cmd_uimage = UIMAGE  $@
19      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \
20                   -C $(2) -n '$(MACHINE)-$(KERNELRELEASE)' \
21                   -e $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') \
22                   $(UIMAGE_OPTS-y) -d $< $@
23
24$(obj)/vmlinux.bin: vmlinux FORCE
25	$(call if_changed,objcopy)
26
27$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
28	$(call if_changed,gzip)
29
30$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
31	$(call if_changed,bzip2)
32
33$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
34	$(call if_changed,lzma)
35
36# The mkimage tool wants 64bytes prepended to the image
37quiet_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
42$(obj)/vmImage.bin: $(obj)/vmlinux.bin
43	$(call if_changed,uimage,none)
44
45$(obj)/vmImage.bz2: $(obj)/vmlinux.bin.bz2
46	$(call if_changed,uimage,bzip2)
47
48$(obj)/vmImage.gz: $(obj)/vmlinux.bin.gz
49	$(call if_changed,uimage,gzip)
50
51$(obj)/vmImage.lzma: $(obj)/vmlinux.bin.lzma
52	$(call if_changed,uimage,lzma)
53
54$(obj)/vmImage.xip: $(obj)/vmlinux.bin.xip
55	$(call if_changed,uimage,none)
56
57suffix-y                      := bin
58suffix-$(CONFIG_KERNEL_GZIP)  := gz
59suffix-$(CONFIG_KERNEL_BZIP2) := bz2
60suffix-$(CONFIG_KERNEL_LZMA)  := lzma
61suffix-$(CONFIG_ROMKERNEL)    := xip
62
63$(obj)/vmImage: $(obj)/vmImage.$(suffix-y)
64	@ln -sf $(notdir $<) $@
65
66install:
67	sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"