Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #
  2. # arch/microblaze/boot/Makefile
  3. #
  4. MKIMAGE := $(srctree)/scripts/mkuboot.sh
  5. obj-y += linked_dtb.o
  6. targets := linux.bin linux.bin.gz simpleImage.%
  7. OBJCOPYFLAGS := -O binary
  8. # Where the DTS files live
  9. dtstree := $(srctree)/$(src)/dts
  10. # Ensure system.dtb exists
  11. $(obj)/linked_dtb.o: $(obj)/system.dtb
  12. # Generate system.dtb from $(DTB).dtb
  13. ifneq ($(DTB),system)
  14. $(obj)/system.dtb: $(obj)/$(DTB).dtb
  15. $(call if_changed,cp)
  16. endif
  17. $(obj)/linux.bin: vmlinux FORCE
  18. $(call if_changed,objcopy)
  19. $(call if_changed,uimage)
  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 microblaze_start -K _end -K __log_buf \
  28. -K _fdt_start vmlinux -o $@
  29. quiet_cmd_uimage = UIMAGE $@.ub
  30. cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A microblaze -O linux -T kernel \
  31. -C none -n 'Linux-$(KERNELRELEASE)' \
  32. -a $(CONFIG_KERNEL_BASE_ADDR) -e $(CONFIG_KERNEL_BASE_ADDR) \
  33. -d $@ $@.ub
  34. $(obj)/simpleImage.%: vmlinux FORCE
  35. $(call if_changed,cp,.unstrip)
  36. $(call if_changed,objcopy)
  37. $(call if_changed,uimage)
  38. $(call if_changed,strip)
  39. @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
  40. # Rule to build device tree blobs
  41. DTC = $(objtree)/scripts/dtc/dtc
  42. # Rule to build device tree blobs
  43. quiet_cmd_dtc = DTC $@
  44. cmd_dtc = $(DTC) -O dtb -o $(obj)/$*.dtb -b 0 -p 1024 $(dtstree)/$*.dts
  45. $(obj)/%.dtb: $(dtstree)/%.dts FORCE
  46. $(call if_changed,dtc)
  47. clean-files += *.dtb simpleImage.*.unstrip linux.bin.ub