Merge branch 'intelfb-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[pandora-kernel.git] / arch / avr32 / boot / images / Makefile
1 #
2 # Copyright (C) 2004-2006 Atmel Corporation
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
9 MKIMAGE         := $(srctree)/scripts/mkuboot.sh
10
11 extra-y         := vmlinux.bin vmlinux.gz
12
13 OBJCOPYFLAGS_vmlinux.bin := -O binary
14 $(obj)/vmlinux.bin: vmlinux FORCE
15         $(call if_changed,objcopy)
16
17 $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
18         $(call if_changed,gzip)
19
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 $< $@
24
25 targets += uImage uImage.srec
26 $(obj)/uImage: $(obj)/vmlinux.gz
27         $(call if_changed,uimage)
28         @echo '  Image $@ is ready'
29
30 OBJCOPYFLAGS_uImage.srec := -I binary -O srec
31 $(obj)/uImage.srec: $(obj)/uImage
32         $(call if_changed,objcopy)
33
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 .initrd-0x80000000 \
41                             --change-section-lma __param-0x80000000 \
42                             --change-section-lma __ksymtab-0x80000000 \
43                             --change-section-lma __ksymtab_gpl-0x80000000 \
44                             --change-section-lma __kcrctab-0x80000000 \
45                             --change-section-lma __kcrctab_gpl-0x80000000 \
46                             --change-section-lma __ksymtab_strings-0x80000000 \
47                             --change-section-lma .got-0x80000000 \
48                             --set-start 0xa0000000
49 $(obj)/vmlinux.elf: vmlinux FORCE
50         $(call if_changed,objcopy)
51
52 quiet_cmd_sfdwarf = SFDWARF $@
53       cmd_sfdwarf = sfdwarf $< TO $@ GNUAVR IW $(SFDWARF_FLAGS) > $(obj)/sfdwarf.log
54
55 $(obj)/vmlinux.cso: $(obj)/vmlinux.elf FORCE
56         $(call if_changed,sfdwarf)
57
58 install: $(BOOTIMAGE)
59         sh $(srctree)/install-kernel.sh $<
60
61 # Generated files to be removed upon make clean
62 clean-files     := vmlinux* uImage uImage.srec