Makefile 586 B

12345678910111213141516171819202122232425262728293031
  1. #
  2. # Makefile for bootable kernel images
  3. #
  4. OBJCOPYFLAGS_vmlinux.bin := -O binary
  5. $(obj)/vmlinux.bin: vmlinux FORCE
  6. $(call if_changed,objcopy)
  7. DTC_FLAGS ?= -p 1024
  8. ifneq ($(DTB),)
  9. obj-y += linked_dtb.o
  10. endif
  11. $(obj)/%.dtb: $(src)/dts/%.dts FORCE
  12. $(call if_changed_dep,dtc)
  13. quiet_cmd_cp = CP $< $@$2
  14. cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
  15. # Generate builtin.dtb from $(DTB).dtb
  16. $(obj)/builtin.dtb: $(obj)/$(DTB).dtb
  17. $(call if_changed,cp)
  18. $(obj)/linked_dtb.o: $(obj)/builtin.dtb
  19. $(obj)/dtbImage.%: vmlinux
  20. $(call if_changed,objcopy)
  21. clean-files := $(obj)/*.dtb