Back to home page

LXR

 
 

    


0001 #
0002 # Copyright (C) 2004-2006 Atmel Corporation
0003 #
0004 # This file is subject to the terms and conditions of the GNU General Public
0005 # License.  See the file "COPYING" in the main directory of this archive
0006 # for more details.
0007 #
0008 
0009 extra-y         := vmlinux.bin vmlinux.gz
0010 
0011 OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note.gnu.build-id
0012 $(obj)/vmlinux.bin: vmlinux FORCE
0013         $(call if_changed,objcopy)
0014 
0015 $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
0016         $(call if_changed,gzip)
0017 
0018 UIMAGE_LOADADDR = $(CONFIG_LOAD_ADDRESS)
0019 UIMAGE_ENTRYADDR = $(CONFIG_ENTRY_ADDRESS)
0020 UIMAGE_COMPRESSION = gzip
0021 
0022 targets += uImage uImage.srec
0023 $(obj)/uImage: $(obj)/vmlinux.gz
0024         $(call if_changed,uimage)
0025         @echo '  Image $@ is ready'
0026 
0027 OBJCOPYFLAGS_uImage.srec := -I binary -O srec
0028 $(obj)/uImage.srec: $(obj)/uImage
0029         $(call if_changed,objcopy)
0030 
0031 OBJCOPYFLAGS_vmlinux.elf := --change-section-lma .text-0x80000000 \
0032                             --change-section-lma __ex_table-0x80000000 \
0033                             --change-section-lma .rodata-0x80000000 \
0034                             --change-section-lma .data-0x80000000 \
0035                             --change-section-lma .init-0x80000000 \
0036                             --change-section-lma .bss-0x80000000 \
0037                             --change-section-lma __param-0x80000000 \
0038                             --change-section-lma __ksymtab-0x80000000 \
0039                             --change-section-lma __ksymtab_gpl-0x80000000 \
0040                             --change-section-lma __kcrctab-0x80000000 \
0041                             --change-section-lma __kcrctab_gpl-0x80000000 \
0042                             --change-section-lma __ksymtab_strings-0x80000000 \
0043                             --set-start 0xa0000000
0044 $(obj)/vmlinux.elf: vmlinux FORCE
0045         $(call if_changed,objcopy)
0046 
0047 quiet_cmd_sfdwarf = SFDWARF $@
0048       cmd_sfdwarf = sfdwarf $< TO $@ GNUAVR IW $(SFDWARF_FLAGS) > $(obj)/sfdwarf.log
0049 
0050 $(obj)/vmlinux.cso: $(obj)/vmlinux.elf FORCE
0051         $(call if_changed,sfdwarf)
0052 
0053 install: $(BOOTIMAGE)
0054         sh $(srctree)/install-kernel.sh $<
0055 
0056 # Generated files to be removed upon make clean
0057 clean-files     := vmlinux.elf vmlinux.bin vmlinux.gz uImage uImage.srec