Makefile 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. #
  2. # Copyright (C) 2016 Microchip Technology Inc.
  3. # <[email protected]>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=at91bootstrap
  10. PKG_VERSION:=v4.0.1
  11. PKG_MIRROR_HASH:=3d45a4bcb52162097d4cdf042b8fe1ccf53e88b512e7541f42a23f2a73692a69
  12. PKG_SOURCE_VERSION:=4d41296e9ae12379555fb46a941897e7264600a2
  13. BINARIES_DIR:=build/binaries
  14. AT91BOOTSTRAP_V4=y
  15. ifdef CONFIG_PACKAGE_at91bootstrap-sama5d4_xplaineddf_uboot_secure
  16. AT91BOOTSTRAP_V4=n
  17. else ifdef CONFIG_TARGET_at91_sam9x
  18. ifndef CONFIG_TARGET_at91_sam9x_DEVICE_microchip_sam9x60ek
  19. AT91BOOTSTRAP_V4=n
  20. endif
  21. endif
  22. ifeq ($(AT91BOOTSTRAP_V4),n)
  23. PKG_VERSION=v3.10.4
  24. PKG_MIRROR_HASH=6fe61fe90838e785917383bb9e887fa05e1bd061a6725954242f504e38b5c426
  25. PKG_SOURCE_VERSION=404846dd283894367a015ca59189bcf927d92e11
  26. BINARIES_DIR=binaries
  27. endif
  28. PKG_RELEASE:=2
  29. PKG_SOURCE_PROTO:=git
  30. PKG_SOURCE_URL:=https://github.com/linux4sam/at91bootstrap.git
  31. PKG_BUILD_DIR = \
  32. $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  33. include at91bootstrap.mk
  34. include $(INCLUDE_DIR)/package.mk
  35. define AT91Bootstrap/Default
  36. BUILD_TARGET:=at91
  37. HIDDEN:=1
  38. AT91BOOTSTRAP_IMAGE:=at91bootstrap.bin
  39. endef
  40. define AT91Bootstrap/at91sam9x5eknf_uboot
  41. NAME:=AT91Bootstrap for AT91SAM9X5-EK board (NandFlash)
  42. BUILD_SUBTARGET:=sam9x
  43. BUILD_DEVICES:=atmel_at91sam9x25ek atmel_at91sam9x35ek
  44. endef
  45. define AT91Bootstrap/at91sam9x5eksd_uboot
  46. NAME:=AT91Bootstrap for AT91SAM9X5-EK board (SDcard)
  47. BUILD_SUBTARGET:=sam9x
  48. BUILD_DEVICES:=atmel_at91sam9x25ek atmel_at91sam9x35ek
  49. endef
  50. define AT91Bootstrap/sam9x60eknf_uboot
  51. NAME:=AT91Bootstrap for SAM9X60-EK board (NandFlash)
  52. BUILD_SUBTARGET:=sam9x
  53. BUILD_DEVICES:=microchip_sam9x60ek
  54. endef
  55. define AT91Bootstrap/sam9x60eksd_uboot
  56. NAME:=AT91Bootstrap for SAM9X60-EK board (SDcard)
  57. BUILD_SUBTARGET:=sam9x
  58. BUILD_DEVICES:=microchip_sam9x60ek
  59. endef
  60. define AT91Bootstrap/sama5d2_icpdf_qspi_uboot
  61. TITLE:=AT91Bootstrap for SAMA5D2 ICP board (QSPI Flash)
  62. BUILD_SUBTARGET:=sama5
  63. BUILD_DEVICES:=microchip_sama5d2-icp
  64. endef
  65. define AT91Bootstrap/sama5d2_icpsd_uboot
  66. TITLE:=AT91Bootstrap for SAMA5D2 ICP board (SDcard)
  67. BUILD_SUBTARGET:=sama5
  68. BUILD_DEVICES:=microchip_sama5d2-icp
  69. endef
  70. define AT91Bootstrap/sama5d2_xplaineddf_uboot
  71. TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (SPI Flash)
  72. BUILD_SUBTARGET:=sama5
  73. BUILD_DEVICES:=microchip_sama5d2-xplained
  74. endef
  75. define AT91Bootstrap/sama5d2_xplaineddf_qspi_uboot
  76. TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (QSPI Flash)
  77. BUILD_SUBTARGET:=sama5
  78. BUILD_DEVICES:=microchip_sama5d2-xplained
  79. endef
  80. define AT91Bootstrap/sama5d2_xplainedsd_uboot
  81. TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (SDcard/EMMC)
  82. BUILD_SUBTARGET:=sama5
  83. BUILD_DEVICES:=microchip_sama5d2-xplained
  84. endef
  85. define AT91Bootstrap/sama5d3_xplainednf_uboot
  86. TITLE:=AT91Bootstrap for SAMA5D3 Xplained board (Nand Flash)
  87. BUILD_SUBTARGET:=sama5
  88. BUILD_DEVICES:=microchip_sama5d3-xplained
  89. endef
  90. define AT91Bootstrap/sama5d3_xplainedsd_uboot
  91. TITLE:=AT91Bootstrap for SAMA5D3 Xplained board (SDcard)
  92. BUILD_SUBTARGET:=sama5
  93. BUILD_DEVICES:=microchip_sama5d3-xplained
  94. endef
  95. define AT91Bootstrap/sama5d4_xplainednf_uboot_secure
  96. TITLE:=AT91Bootstrap for SAMA5D4 Xplained board (Nand Flash)
  97. BUILD_SUBTARGET:=sama5
  98. BUILD_DEVICES:=microchip_sama5d4-xplained
  99. endef
  100. define AT91Bootstrap/sama5d4_xplaineddf_uboot_secure
  101. TITLE:=AT91Bootstrap for SAMA5D4 Xplained board (SPI Flash)
  102. BUILD_SUBTARGET:=sama5
  103. BUILD_DEVICES:=microchip_sama5d4-xplained
  104. endef
  105. define AT91Bootstrap/sama5d4_xplainedsd_uboot_secure
  106. TITLE:=AT91Bootstrap for SAMA5D4 Xplained board (SDcard)
  107. BUILD_SUBTARGET:=sama5
  108. BUILD_DEVICES:=microchip_sama5d4-xplained
  109. endef
  110. define AT91Bootstrap/sama5d27_som1_eksd_uboot
  111. TITLE:=AT91Bootstrap for SAMA5D27 SOM1 Ek (SDcard0)
  112. BUILD_SUBTARGET:=sama5
  113. BUILD_DEVICES:=microchip_sama5d27-som1-ek
  114. endef
  115. define AT91Bootstrap/sama5d27_som1_eksd1_uboot
  116. TITLE:=AT91Bootstrap for SAMA5D27 SOM1 Ek (SDcard1)
  117. BUILD_SUBTARGET:=sama5
  118. BUILD_DEVICES:=microchip_sama5d27-som1-ek
  119. endef
  120. define AT91Bootstrap/sama5d27_som1_ekqspi_uboot
  121. TITLE:=AT91Bootstrap for SAMA5D27 SOM1 Ek (QSPI Flash)
  122. BUILD_SUBTARGET:=sama5
  123. BUILD_DEVICES:=microchip_sama5d27-som1-ek
  124. endef
  125. define AT91Bootstrap/sama5d27_wlsom1_eksd_uboot
  126. TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (SDcard0)
  127. BUILD_SUBTARGET:=sama5
  128. BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
  129. endef
  130. define AT91Bootstrap/sama5d27_wlsom1_ekdf_qspi_uboot
  131. TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (QSPI Flash)
  132. BUILD_SUBTARGET:=sama5
  133. BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
  134. endef
  135. define AT91Bootstrap/sama5d2_ptc_eknf_uboot
  136. TITLE:=AT91Bootstrap for SAMA5D2 PTC EK (Nand Flash)
  137. BUILD_SUBTARGET:=sama5
  138. BUILD_DEVICES:=microchip_sama5d2-ptc-ek
  139. endef
  140. define AT91Bootstrap/sama5d2_ptc_eksd_uboot
  141. TITLE:=AT91Bootstrap for SAMA5D2 PTC EK (SDCard)
  142. BUILD_SUBTARGET:=sama5
  143. BUILD_DEVICES:=microchip_sama5d2-ptc-ek
  144. endef
  145. define AT91Bootstrap/sama7g5eksd_uboot
  146. TITLE:=AT91Bootstrap for SAMA7G5-EK (SDCard)
  147. BUILD_SUBTARGET:=sama7
  148. BUILD_DEVICES:=microchip_sama7g5-ek
  149. endef
  150. AT91BOOTSTRAP_TARGETS := \
  151. at91sam9x5eknf_uboot \
  152. at91sam9x5eksd_uboot \
  153. sam9x60eknf_uboot \
  154. sam9x60eksd_uboot \
  155. sama5d2_icpdf_qspi_uboot \
  156. sama5d2_icpsd_uboot \
  157. sama5d2_xplaineddf_uboot \
  158. sama5d2_xplaineddf_qspi_uboot \
  159. sama5d2_xplainedsd_uboot \
  160. sama5d3_xplainednf_uboot \
  161. sama5d3_xplainedsd_uboot \
  162. sama5d4_xplainednf_uboot_secure \
  163. sama5d4_xplaineddf_uboot_secure \
  164. sama5d4_xplainedsd_uboot_secure \
  165. sama5d27_som1_eksd1_uboot \
  166. sama5d27_som1_ekqspi_uboot \
  167. sama5d27_wlsom1_eksd_uboot \
  168. sama5d27_wlsom1_ekdf_qspi_uboot \
  169. sama5d2_ptc_eknf_uboot \
  170. sama5d2_ptc_eksd_uboot \
  171. sama7g5eksd_uboot
  172. define Build/Compile
  173. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  174. CROSS_COMPILE=$(TARGET_CROSS)
  175. endef
  176. $(eval $(call BuildPackage/AT91Bootstrap))