Makefile 961 字节
Newer Older
1 2 3 4
#
# arch/microblaze/boot/Makefile
#

5
targets := linux.bin linux.bin.gz simpleImage.%
6

7
OBJCOPYFLAGS := -R .note -R .comment -R .note.gnu.build-id -O binary
8 9 10

$(obj)/linux.bin: vmlinux FORCE
	$(call if_changed,objcopy)
11
	$(call if_changed,uimage)
12 13 14 15 16 17
	@echo 'Kernel: $@ is ready' ' (#'`cat .version`')'

$(obj)/linux.bin.gz: $(obj)/linux.bin FORCE
	$(call if_changed,gzip)
	@echo 'Kernel: $@ is ready' ' (#'`cat .version`')'

18 19 20 21
quiet_cmd_cp = CP      $< $@$2
	cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)

quiet_cmd_strip = STRIP   $@
22
	cmd_strip = $(STRIP) -K microblaze_start -K _end -K __log_buf \
M
Michal Simek 已提交
23
				-K _fdt_start vmlinux -o $@
24

25 26 27
UIMAGE_IN = $@
UIMAGE_OUT = $@.ub
UIMAGE_LOADADDR = $(CONFIG_KERNEL_BASE_ADDR)
28

29 30
$(obj)/simpleImage.%: vmlinux FORCE
	$(call if_changed,cp,.unstrip)
31 32
	$(call if_changed,objcopy)
	$(call if_changed,uimage)
33 34 35 36
	$(call if_changed,strip)
	@echo 'Kernel: $@ is ready' ' (#'`cat .version`')'


37
clean-files += simpleImage.*.unstrip linux.bin.ub