Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 _start -K _end -K __log_buf -K _fdt_start vmlinux -o $@
  28. quiet_cmd_uimage = UIMAGE $@.ub
  29. cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A microblaze -O linux -T kernel \
  30. -C none -n 'Linux-$(KERNELRELEASE)' \
  31. -a $(CONFIG_KERNEL_BASE_ADDR) -e $(CONFIG_KERNEL_BASE_ADDR) \
  32. -d $@ $@.ub
  33. $(obj)/simpleImage.%: vmlinux FORCE
  34. $(call if_changed,cp,.unstrip)
  35. $(call if_changed,objcopy)
  36. $(call if_changed,uimage)
  37. $(call if_changed,strip)
  38. @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
  39. # Rule to build device tree blobs
  40. DTC = $(objtree)/scripts/dtc/dtc
  41. # Rule to build device tree blobs
  42. quiet_cmd_dtc = DTC $@
  43. cmd_dtc = $(DTC) -O dtb -o $(obj)/$*.dtb -b 0 -p 1024 $(dtstree)/$*.dts
  44. $(obj)/%.dtb: $(dtstree)/%.dts FORCE
  45. $(call if_changed,dtc)
  46. clean-files += *.dtb simpleImage.*.unstrip linux.bin.ub