Makefile 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # SPDX-License-Identifier: GPL-2.0+
  2. #
  3. # (C) Copyright 2000-2006
  4. # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  5. obj-y = cpu_info.o
  6. obj-y += emac.o
  7. obj-$(CONFIG_DISPLAY_BOARDINFO) += board.o
  8. obj-$(CONFIG_GLOBAL_TIMER) += timer.o
  9. obj-$(CONFIG_TMU_TIMER) += ../../sh/lib/time.o
  10. obj-$(CONFIG_SH73A0) += lowlevel_init.o cpu_info-sh73a0.o pfc-sh73a0.o
  11. obj-$(CONFIG_R8A7740) += lowlevel_init.o cpu_info-r8a7740.o pfc-r8a7740.o
  12. obj-$(CONFIG_RCAR_GEN2) += lowlevel_init_ca15.o cpu_info-rcar.o
  13. obj-$(CONFIG_RCAR_GEN3) += lowlevel_init_gen3.o cpu_info-rcar.o memmap-gen3.o
  14. obj-$(CONFIG_RZ_G2) += cpu_info-rzg.o
  15. OBJCOPYFLAGS_u-boot-spl.srec := -O srec
  16. quiet_cmd_objcopy = OBJCOPY $@
  17. cmd_objcopy = $(OBJCOPY) --gap-fill=0x00 $(OBJCOPYFLAGS) \
  18. $(OBJCOPYFLAGS_$(@F)) $< $@
  19. spl/u-boot-spl.srec: spl/u-boot-spl FORCE
  20. $(call if_changed,objcopy)
  21. ifneq ($(CONFIG_R8A774C0)$(CONFIG_R8A77990)$(CONFIG_R8A77995),)
  22. #
  23. # The first 6 generate statements generate the R-Car Gen3 SCIF loader header.
  24. # The subsequent generate statements represent the following chunk of assembler
  25. # code, which copies the loaded data from 0xe6304030 to 0xe6318000. This is to
  26. # work around a limitation of the D3/E3 BootROM, which does not permit loading
  27. # to 0xe6318000 directly.
  28. #
  29. # mov x0, #0xe6000000
  30. # orr x0, x0, #0x00300000
  31. # orr x1, x0, #0x00004000
  32. # orr x1, x1, #0x00000030
  33. #
  34. # orr x2, x0, #0x00018000
  35. # mov x0, x2
  36. # mov x3, #0x7000
  37. #1: ldp x4, x5, [x1], #16
  38. #
  39. # stp x4, x5, [x2], #16
  40. # subs x3, x3, #16
  41. # b.ge 1b
  42. # br x0
  43. #
  44. quiet_cmd_srec_cat = SRECCAT $@
  45. cmd_srec_cat = srec_cat -output $@ -M 8 $< -M 8 \
  46. -offset -0x13fd0 \
  47. -Output_Block_Size 16 \
  48. -generate 0xe6300400 0xe6300404 -l-e-constant 0x0 4 \
  49. -generate 0xe630048c 0xe6300490 -l-e-constant 0x0 4 \
  50. -generate 0xe63005d4 0xe63005d8 -l-e-constant 0xe6304000 4 \
  51. -generate 0xe63006e4 0xe63006e8 -l-e-constant $2 4 \
  52. -generate 0xe6301154 0xe6301158 -l-e-constant 0xe6304000 4 \
  53. -generate 0xe6301264 0xe6301268 -l-e-constant $2 4 \
  54. -generate 0xe6304000 0xe6304004 -l-e-constant 0xd2bcc000 4 \
  55. -generate 0xe6304004 0xe6304008 -l-e-constant 0xb26c0400 4 \
  56. -generate 0xe6304008 0xe630400c -l-e-constant 0xb2720001 4 \
  57. -generate 0xe630400c 0xe6304010 -l-e-constant 0xb27c0421 4 \
  58. -generate 0xe6304010 0xe6304014 -l-e-constant 0xb2710402 4 \
  59. -generate 0xe6304014 0xe6304018 -l-e-constant 0xaa0203e0 4 \
  60. -generate 0xe6304018 0xe630401c -l-e-constant 0xd28e0003 4 \
  61. -generate 0xe630401c 0xe6304020 -l-e-constant 0xa8c11424 4 \
  62. -generate 0xe6304020 0xe6304024 -l-e-constant 0xa8811444 4 \
  63. -generate 0xe6304024 0xe6304028 -l-e-constant 0xf1004063 4 \
  64. -generate 0xe6304028 0xe630402c -l-e-constant 0x54ffffaa 4 \
  65. -generate 0xe630402c 0xe6304030 -l-e-constant 0xd61f0000 4
  66. else
  67. quiet_cmd_srec_cat = SRECCAT $@
  68. cmd_srec_cat = srec_cat -output $@ -M 8 $< -M 8 \
  69. -Output_Block_Size 16 \
  70. -generate 0xe6300400 0xe6300404 -l-e-constant 0x0 4 \
  71. -generate 0xe630048c 0xe6300490 -l-e-constant 0x0 4 \
  72. -generate 0xe63005d4 0xe63005d8 -l-e-constant $(CONFIG_SPL_TEXT_BASE) 4 \
  73. -generate 0xe63006e4 0xe63006e8 -l-e-constant $2 4 \
  74. -generate 0xe6301154 0xe6301158 -l-e-constant $(CONFIG_SPL_TEXT_BASE) 4 \
  75. -generate 0xe6301264 0xe6301268 -l-e-constant $2 4
  76. endif
  77. spl/u-boot-spl.scif: spl/u-boot-spl.srec spl/u-boot-spl.bin
  78. $(call cmd,srec_cat,$(shell wc -c spl/u-boot-spl.bin | awk '{printf("0x%08x\n",$$1)}'))
  79. # if srec_cat is present build u-boot-spl.scif by default
  80. has_srec_cat = $(call try-run,srec_cat -VERSion,y,n)
  81. INPUTS-$(has_srec_cat) += u-boot-spl.scif
  82. CLEAN_FILES += u-boot-spl.scif