Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #
  2. # arch/microblaze/boot/Makefile
  3. #
  4. obj-y += linked_dtb.o
  5. targets := linux.bin linux.bin.gz simpleImage.%
  6. OBJCOPYFLAGS_linux.bin := -O binary
  7. # Where the DTS files live
  8. dtstree := $(srctree)/$(src)/dts
  9. # Ensure system.dtb exists
  10. $(obj)/linked_dtb.o: $(obj)/system.dtb
  11. # Generate system.dtb from $(DTB).dtb
  12. ifneq ($(DTB),system)
  13. $(obj)/system.dtb: $(obj)/$(DTB).dtb
  14. $(call if_changed,cp)
  15. endif
  16. $(obj)/linux.bin: vmlinux FORCE
  17. [ -n $(CONFIG_INITRAMFS_SOURCE) ] && [ ! -e $(CONFIG_INITRAMFS_SOURCE) ] && \
  18. touch $(CONFIG_INITRAMFS_SOURCE) || echo "No CPIO image"
  19. $(call if_changed,objcopy)
  20. @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
  21. $(obj)/linux.bin.gz: $(obj)/linux.bin FORCE
  22. $(call if_changed,gzip)
  23. @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
  24. quiet_cmd_cp = CP $< $@$2
  25. cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
  26. quiet_cmd_strip = STRIP $@
  27. cmd_strip = $(STRIP) -K _start -K _end -K __log_buf -K _fdt_start vmlinux -o $@
  28. $(obj)/simpleImage.%: vmlinux FORCE
  29. $(call if_changed,cp,.unstrip)
  30. $(call if_changed,strip)
  31. @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
  32. # Rule to build device tree blobs
  33. DTC = $(objtree)/scripts/dtc/dtc
  34. # Rule to build device tree blobs
  35. quiet_cmd_dtc = DTC $@
  36. cmd_dtc = $(DTC) -O dtb -o $(obj)/$*.dtb -b 0 -p 1024 $(dtstree)/$*.dts
  37. $(obj)/%.dtb: $(dtstree)/%.dts FORCE
  38. $(call if_changed,dtc)
  39. clean-kernel += linux.bin linux.bin.gz simpleImage.*
  40. clean-files += *.dtb