2
0

Makefile 5.7 KB

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