1# 2# arch/microblaze/boot/Makefile 3# 4 5obj-y += linked_dtb.o 6 7targets := linux.bin linux.bin.gz simpleImage.% 8 9OBJCOPYFLAGS := -R .note -R .comment -R .note.gnu.build-id -O binary 10 11# Ensure system.dtb exists 12$(obj)/linked_dtb.o: $(obj)/system.dtb 13 14# Generate system.dtb from $(DTB).dtb 15ifneq ($(DTB),system) 16$(obj)/system.dtb: $(obj)/$(DTB).dtb 17 $(call if_changed,cp) 18endif 19 20$(obj)/linux.bin: vmlinux FORCE 21 $(call if_changed,objcopy) 22 $(call if_changed,uimage) 23 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' 24 25$(obj)/linux.bin.gz: $(obj)/linux.bin FORCE 26 $(call if_changed,gzip) 27 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' 28 29quiet_cmd_cp = CP $< $@$2 30 cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false) 31 32quiet_cmd_strip = STRIP $@ 33 cmd_strip = $(STRIP) -K microblaze_start -K _end -K __log_buf \ 34 -K _fdt_start vmlinux -o $@ 35 36UIMAGE_IN = $@ 37UIMAGE_OUT = $@.ub 38UIMAGE_LOADADDR = $(CONFIG_KERNEL_BASE_ADDR) 39 40$(obj)/simpleImage.%: vmlinux FORCE 41 $(call if_changed,cp,.unstrip) 42 $(call if_changed,objcopy) 43 $(call if_changed,uimage) 44 $(call if_changed,strip) 45 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' 46 47 48# Rule to build device tree blobs 49DTC_FLAGS := -p 1024 50 51$(obj)/%.dtb: $(src)/dts/%.dts FORCE 52 $(call if_changed_dep,dtc) 53 54clean-files += *.dtb simpleImage.*.unstrip linux.bin.ub 55