Makefile 1.57 KB
Newer Older
Bryan Wu's avatar
Bryan Wu committed
1 2 3 4 5 6 7 8 9 10
#
# arch/blackfin/boot/Makefile
#
# This file is subject to the terms and conditions of the GNU General Public
# License.  See the file "COPYING" in the main directory of this archive
# for more details.
#

MKIMAGE := $(srctree)/scripts/mkuboot.sh

11
targets := vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma
12
extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma
Bryan Wu's avatar
Bryan Wu committed
13 14 15

quiet_cmd_uimage = UIMAGE  $@
      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \
16
                   -C $(2) -n '$(MACHINE)-$(KERNELRELEASE)' -a $(CONFIG_BOOT_LOAD) \
17
                   -e $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') \
Bryan Wu's avatar
Bryan Wu committed
18 19 20 21 22
                   -d $< $@

$(obj)/vmlinux.bin: vmlinux FORCE
	$(call if_changed,objcopy)

23
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
Bryan Wu's avatar
Bryan Wu committed
24 25
	$(call if_changed,gzip)

26 27 28 29 30 31
$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
	$(call if_changed,bzip2)

$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
	$(call if_changed,lzma)

32 33 34
$(obj)/vmImage.bin: $(obj)/vmlinux.bin
	$(call if_changed,uimage,none)

35 36 37 38 39 40 41 42 43
$(obj)/vmImage.bz2: $(obj)/vmlinux.bin.bz2
	$(call if_changed,uimage,bzip2)

$(obj)/vmImage.gz: $(obj)/vmlinux.bin.gz
	$(call if_changed,uimage,gzip)

$(obj)/vmImage.lzma: $(obj)/vmlinux.bin.lzma
	$(call if_changed,uimage,lzma)

44
suffix-y                      := bin
45 46 47 48 49
suffix-$(CONFIG_KERNEL_GZIP)  := gz
suffix-$(CONFIG_KERNEL_BZIP2) := bz2
suffix-$(CONFIG_KERNEL_LZMA)  := lzma
$(obj)/vmImage: $(obj)/vmImage.$(suffix-y)
	@ln -sf $(notdir $<) $@
50 51 52

install:
	sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"