Merge tag 'v3.3.7' into 3.3/master
[zen-stable.git] / arch / avr32 / boot / images / Makefile
blob1848bf0d7f62642568356ded4833102e91724216
2 # Copyright (C) 2004-2006 Atmel Corporation
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.
9 MKIMAGE := $(srctree)/scripts/mkuboot.sh
11 extra-y := vmlinux.bin vmlinux.gz
13 OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note.gnu.build-id
14 $(obj)/vmlinux.bin: vmlinux FORCE
15 $(call if_changed,objcopy)
17 $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
18 $(call if_changed,gzip)
20 quiet_cmd_uimage = UIMAGE $@
21 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A avr32 -O linux -T kernel \
22 -C gzip -a $(CONFIG_LOAD_ADDRESS) -e $(CONFIG_ENTRY_ADDRESS) \
23 -n 'Linux-$(KERNELRELEASE)' -d $< $@
25 targets += uImage uImage.srec
26 $(obj)/uImage: $(obj)/vmlinux.gz
27 $(call if_changed,uimage)
28 @echo ' Image $@ is ready'
30 OBJCOPYFLAGS_uImage.srec := -I binary -O srec
31 $(obj)/uImage.srec: $(obj)/uImage
32 $(call if_changed,objcopy)
34 OBJCOPYFLAGS_vmlinux.elf := --change-section-lma .text-0x80000000 \
35 --change-section-lma __ex_table-0x80000000 \
36 --change-section-lma .rodata-0x80000000 \
37 --change-section-lma .data-0x80000000 \
38 --change-section-lma .init-0x80000000 \
39 --change-section-lma .bss-0x80000000 \
40 --change-section-lma __param-0x80000000 \
41 --change-section-lma __ksymtab-0x80000000 \
42 --change-section-lma __ksymtab_gpl-0x80000000 \
43 --change-section-lma __kcrctab-0x80000000 \
44 --change-section-lma __kcrctab_gpl-0x80000000 \
45 --change-section-lma __ksymtab_strings-0x80000000 \
46 --set-start 0xa0000000
47 $(obj)/vmlinux.elf: vmlinux FORCE
48 $(call if_changed,objcopy)
50 quiet_cmd_sfdwarf = SFDWARF $@
51 cmd_sfdwarf = sfdwarf $< TO $@ GNUAVR IW $(SFDWARF_FLAGS) > $(obj)/sfdwarf.log
53 $(obj)/vmlinux.cso: $(obj)/vmlinux.elf FORCE
54 $(call if_changed,sfdwarf)
56 install: $(BOOTIMAGE)
57 sh $(srctree)/install-kernel.sh $<
59 # Generated files to be removed upon make clean
60 clean-files := vmlinux.elf vmlinux.bin vmlinux.gz uImage uImage.srec