• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
9extra-y		:= vmlinux.bin vmlinux.gz
10
11OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note.gnu.build-id
12$(obj)/vmlinux.bin: vmlinux FORCE
13	$(call if_changed,objcopy)
14
15$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
16	$(call if_changed,gzip)
17
18UIMAGE_LOADADDR = $(CONFIG_LOAD_ADDRESS)
19UIMAGE_ENTRYADDR = $(CONFIG_ENTRY_ADDRESS)
20UIMAGE_COMPRESSION = gzip
21
22targets += uImage uImage.srec
23$(obj)/uImage: $(obj)/vmlinux.gz
24	$(call if_changed,uimage)
25	@echo '  Image $@ is ready'
26
27OBJCOPYFLAGS_uImage.srec := -I binary -O srec
28$(obj)/uImage.srec: $(obj)/uImage
29	$(call if_changed,objcopy)
30
31OBJCOPYFLAGS_vmlinux.elf := --change-section-lma .text-0x80000000 \
32			    --change-section-lma __ex_table-0x80000000 \
33			    --change-section-lma .rodata-0x80000000 \
34			    --change-section-lma .data-0x80000000 \
35			    --change-section-lma .init-0x80000000 \
36			    --change-section-lma .bss-0x80000000 \
37			    --change-section-lma __param-0x80000000 \
38			    --change-section-lma __ksymtab-0x80000000 \
39			    --change-section-lma __ksymtab_gpl-0x80000000 \
40			    --change-section-lma __kcrctab-0x80000000 \
41			    --change-section-lma __kcrctab_gpl-0x80000000 \
42			    --change-section-lma __ksymtab_strings-0x80000000 \
43			    --set-start 0xa0000000
44$(obj)/vmlinux.elf: vmlinux FORCE
45	$(call if_changed,objcopy)
46
47quiet_cmd_sfdwarf = SFDWARF $@
48      cmd_sfdwarf = sfdwarf $< TO $@ GNUAVR IW $(SFDWARF_FLAGS) > $(obj)/sfdwarf.log
49
50$(obj)/vmlinux.cso: $(obj)/vmlinux.elf FORCE
51	$(call if_changed,sfdwarf)
52
53install: $(BOOTIMAGE)
54	sh $(srctree)/install-kernel.sh $<
55
56# Generated files to be removed upon make clean
57clean-files	:= vmlinux.elf vmlinux.bin vmlinux.gz uImage uImage.srec
58