Makefile 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. # SPDX-License-Identifier: GPL-2.0+
  2. ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_ARCH_TEGRA),yy)
  3. CONFIG_CPU_V7A=
  4. CONFIG_CPU_ARM720T=y
  5. endif
  6. # This selects which instruction set is used.
  7. arch-$(CONFIG_CPU_ARM720T) =-march=armv4
  8. arch-$(CONFIG_CPU_ARM920T) =-march=armv4t
  9. arch-$(CONFIG_CPU_ARM926EJS) =-march=armv5te
  10. arch-$(CONFIG_CPU_ARM946ES) =-march=armv5te
  11. arch-$(CONFIG_CPU_SA1100) =-march=armv4
  12. arch-$(CONFIG_CPU_PXA) =
  13. arch-$(CONFIG_CPU_ARM1136) =-march=armv5t
  14. arch-$(CONFIG_CPU_ARM1176) =-march=armv5t
  15. arch-$(CONFIG_CPU_V7A) =$(call cc-option, -march=armv7-a, \
  16. $(call cc-option, -march=armv7))
  17. arch-$(CONFIG_CPU_V7M) =-march=armv7-m
  18. arch-$(CONFIG_CPU_V7R) =-march=armv7-r
  19. arch-$(CONFIG_ARM64) =-march=armv8-a
  20. # On Tegra systems we must build SPL for the armv4 core on the device
  21. # but otherwise we can use the value in CONFIG_SYS_ARM_ARCH
  22. ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_ARCH_TEGRA),yy)
  23. arch-y += -D__LINUX_ARM_ARCH__=4
  24. else
  25. arch-y += -D__LINUX_ARM_ARCH__=$(CONFIG_SYS_ARM_ARCH)
  26. endif
  27. # Evaluate arch cc-option calls now
  28. arch-y := $(arch-y)
  29. # This selects how we optimise for the processor.
  30. tune-$(CONFIG_CPU_ARM720T) =-mtune=arm7tdmi
  31. tune-$(CONFIG_CPU_ARM920T) =
  32. tune-$(CONFIG_CPU_ARM926EJS) =
  33. tune-$(CONFIG_CPU_ARM946ES) =
  34. tune-$(CONFIG_CPU_SA1100) =-mtune=strongarm1100
  35. tune-$(CONFIG_CPU_PXA) =-mcpu=xscale
  36. tune-$(CONFIG_CPU_ARM1136) =
  37. tune-$(CONFIG_CPU_ARM1176) =
  38. tune-$(CONFIG_CPU_V7A) =-mtune=generic-armv7-a
  39. tune-$(CONFIG_CPU_V7R) =
  40. tune-$(CONFIG_ARM64) =
  41. # Evaluate tune cc-option calls now
  42. tune-y := $(tune-y)
  43. PLATFORM_CPPFLAGS += $(arch-y) $(tune-y)
  44. # Machine directory name. This list is sorted alphanumerically
  45. # by CONFIG_* macro name.
  46. machine-$(CONFIG_ARCH_ASPEED) += aspeed
  47. machine-$(CONFIG_ARCH_AT91) += at91
  48. machine-$(CONFIG_ARCH_BCM283X) += bcm283x
  49. machine-$(CONFIG_ARCH_BCMSTB) += bcmstb
  50. machine-$(CONFIG_ARCH_DAVINCI) += davinci
  51. machine-$(CONFIG_ARCH_EXYNOS) += exynos
  52. machine-$(CONFIG_ARCH_HIGHBANK) += highbank
  53. machine-$(CONFIG_ARCH_K3) += k3
  54. machine-$(CONFIG_ARCH_KEYSTONE) += keystone
  55. machine-$(CONFIG_ARCH_KIRKWOOD) += kirkwood
  56. machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx
  57. machine-$(CONFIG_ARCH_MEDIATEK) += mediatek
  58. machine-$(CONFIG_ARCH_MESON) += meson
  59. machine-$(CONFIG_ARCH_MVEBU) += mvebu
  60. machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
  61. machine-$(CONFIG_ARCH_ORION5X) += orion5x
  62. machine-$(CONFIG_ARCH_OWL) += owl
  63. machine-$(CONFIG_ARCH_RMOBILE) += rmobile
  64. machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
  65. machine-$(CONFIG_ARCH_S5PC1XX) += s5pc1xx
  66. machine-$(CONFIG_ARCH_SNAPDRAGON) += snapdragon
  67. machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
  68. machine-$(CONFIG_STM32) += stm32
  69. machine-$(CONFIG_ARCH_STM32MP) += stm32mp
  70. machine-$(CONFIG_ARCH_SUNXI) += sunxi
  71. machine-$(CONFIG_ARCH_TEGRA) += tegra
  72. machine-$(CONFIG_ARCH_U8500) += u8500
  73. machine-$(CONFIG_ARCH_UNIPHIER) += uniphier
  74. machine-$(CONFIG_ARCH_VERSAL) += versal
  75. machine-$(CONFIG_ARCH_ZYNQ) += zynq
  76. machine-$(CONFIG_ARCH_ZYNQMP) += zynqmp
  77. machine-$(CONFIG_ARCH_ZYNQMP_R5) += zynqmp-r5
  78. machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
  79. PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
  80. libs-y += $(machdirs)
  81. head-y := arch/arm/cpu/$(CPU)/start.o
  82. ifeq ($(CONFIG_SPL_BUILD),y)
  83. ifneq ($(CONFIG_SPL_START_S_PATH),)
  84. head-y := $(CONFIG_SPL_START_S_PATH:"%"=%)/start.o
  85. endif
  86. endif
  87. libs-y += arch/arm/cpu/$(CPU)/
  88. libs-y += arch/arm/cpu/
  89. libs-y += arch/arm/lib/
  90. ifeq ($(CONFIG_SPL_BUILD),y)
  91. ifneq (,$(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_MX35)$(filter $(SOC), mx25 mx5 mx6 mx7 mx35 imx8m imx8 imxrt))
  92. libs-y += arch/arm/mach-imx/
  93. endif
  94. else
  95. ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx7 mx7ulp mx31 mx35 mxs imx8m imx8 imxrt vf610))
  96. libs-y += arch/arm/mach-imx/
  97. endif
  98. endif
  99. ifneq (,$(filter $(SOC), kirkwood))
  100. libs-y += arch/arm/mach-mvebu/
  101. endif
  102. # deprecated
  103. -include $(machdirs)/config.mk