Makefile 1.3 KB

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