2013-01-18 09:42:20 +00:00
|
|
|
targets := vmlinux.bin vmlinux.bin.gz uImage
|
|
|
|
|
|
|
|
# uImage build relies on mkimage being availble on your host for ARC target
|
|
|
|
# You will need to build u-boot for ARC, rename mkimage to arc-elf32-mkimage
|
|
|
|
# and make sure it's reacable from your PATH
|
|
|
|
|
|
|
|
OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
|
|
|
|
|
|
|
|
LINUX_START_TEXT = $$(readelf -h vmlinux | \
|
|
|
|
grep "Entry point address" | grep -o 0x.*)
|
|
|
|
|
|
|
|
UIMAGE_LOADADDR = $(CONFIG_LINUX_LINK_BASE)
|
|
|
|
UIMAGE_ENTRYADDR = $(LINUX_START_TEXT)
|
2013-03-22 16:34:27 +00:00
|
|
|
|
|
|
|
suffix-y := bin
|
|
|
|
suffix-$(CONFIG_KERNEL_GZIP) := gz
|
|
|
|
|
|
|
|
targets += uImage uImage.bin uImage.gz
|
|
|
|
extra-y += vmlinux.bin vmlinux.bin.gz
|
2013-01-18 09:42:20 +00:00
|
|
|
|
|
|
|
$(obj)/vmlinux.bin: vmlinux FORCE
|
|
|
|
$(call if_changed,objcopy)
|
|
|
|
|
|
|
|
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
|
|
|
|
$(call if_changed,gzip)
|
|
|
|
|
2013-03-22 16:34:27 +00:00
|
|
|
$(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
|
|
|
|
$(call if_changed,uimage,none)
|
|
|
|
|
|
|
|
$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
|
|
|
|
$(call if_changed,uimage,gzip)
|
2013-01-18 09:42:20 +00:00
|
|
|
|
2013-03-22 16:34:27 +00:00
|
|
|
$(obj)/uImage: $(obj)/uImage.$(suffix-y)
|
|
|
|
@ln -sf $(notdir $<) $@
|
|
|
|
@echo ' Image $@ is ready'
|