1
0

Makefile 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. #
  2. # Copyright (C) 2013-2016 OpenWrt.org
  3. # Copyright (C) 2017 Yousong Zhou
  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. include $(INCLUDE_DIR)/kernel.mk
  10. PKG_VERSION:=2019.01
  11. PKG_HASH:=50bd7e5a466ab828914d080d5f6a432345b500e8fba1ad3b7b61e95e60d51c22
  12. PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
  13. include $(INCLUDE_DIR)/u-boot.mk
  14. include $(INCLUDE_DIR)/package.mk
  15. define U-Boot/Default
  16. BUILD_TARGET:=sunxi
  17. UBOOT_IMAGE:=u-boot-sunxi-with-spl.bin
  18. UENV:=default
  19. HIDDEN:=1
  20. endef
  21. define U-Boot/A10-OLinuXino-Lime
  22. BUILD_SUBTARGET:=cortexa8
  23. NAME:=A10 OLinuXino LIME
  24. BUILD_DEVICES:=sun4i-a10-olinuxino-lime
  25. endef
  26. define U-Boot/A13-OLinuXino
  27. BUILD_SUBTARGET:=cortexa8
  28. NAME:=A13 OlinuXino
  29. BUILD_DEVICES:=sun5i-a13-olinuxino
  30. endef
  31. define U-Boot/A20-OLinuXino-Lime
  32. BUILD_SUBTARGET:=cortexa7
  33. NAME:=A20 OLinuXino LIME
  34. BUILD_DEVICES:=sun7i-a20-olinuxino-lime
  35. endef
  36. define U-Boot/A20-OLinuXino-Lime2
  37. BUILD_SUBTARGET:=cortexa7
  38. NAME:=A20 OLinuXino LIME2
  39. BUILD_DEVICES:=sun7i-a20-olinuxino-lime2
  40. endef
  41. define U-Boot/A20-OLinuXino-Lime2-eMMC
  42. BUILD_SUBTARGET:=cortexa7
  43. NAME:=A20 OLinuXino LIME2 eMMC
  44. BUILD_DEVICES:=sun7i-a20-olinuxino-lime2-emmc
  45. endef
  46. define U-Boot/A20-OLinuXino_MICRO
  47. BUILD_SUBTARGET:=cortexa7
  48. NAME:=A20 OLinuXino MICRO
  49. BUILD_DEVICES:=sun7i-a20-olinuxino-micro
  50. endef
  51. define U-Boot/Bananapi
  52. BUILD_SUBTARGET:=cortexa7
  53. NAME:=Bananapi
  54. BUILD_DEVICES:=sun7i-a20-bananapi
  55. endef
  56. define U-Boot/Bananapro
  57. BUILD_SUBTARGET:=cortexa7
  58. NAME:=Bananapro
  59. BUILD_DEVICES:=sun7i-a20-bananapro
  60. endef
  61. define U-Boot/Cubieboard
  62. BUILD_SUBTARGET:=cortexa8
  63. NAME:=Cubieboard
  64. BUILD_DEVICES:=sun4i-a10-cubieboard
  65. endef
  66. define U-Boot/Cubieboard2
  67. BUILD_SUBTARGET:=cortexa7
  68. NAME:=Cubieboard2
  69. BUILD_DEVICES:=sun7i-a20-cubieboard2
  70. endef
  71. define U-Boot/Cubietruck
  72. BUILD_SUBTARGET:=cortexa7
  73. NAME:=Cubietruck
  74. BUILD_DEVICES:=sun7i-a20-cubietruck
  75. endef
  76. define U-Boot/Hummingbird_A31
  77. BUILD_SUBTARGET:=cortexa7
  78. NAME:=Hummingbird A31 board
  79. endef
  80. define U-Boot/Marsboard_A10
  81. BUILD_SUBTARGET:=cortexa8
  82. NAME:=Marsboard
  83. BUILD_DEVICES:=sun4i-a10-marsboard
  84. endef
  85. define U-Boot/Mele_M9
  86. BUILD_SUBTARGET:=cortexa7
  87. NAME:=Mele M9 (A31)
  88. BUILD_DEVICES:=sun6i-a31-m9
  89. endef
  90. define U-Boot/OLIMEX_A13_SOM
  91. BUILD_SUBTARGET:=cortexa8
  92. NAME:=Olimex A13 SOM
  93. BUILD_DEVICES:=sun5i-a13-olimex-som
  94. endef
  95. define U-Boot/Linksprite_pcDuino
  96. BUILD_SUBTARGET:=cortexa8
  97. NAME:=Linksprite pcDuino
  98. BUILD_DEVICES:=sun4i-a10-pcduino
  99. endef
  100. define U-Boot/Linksprite_pcDuino3
  101. BUILD_SUBTARGET:=cortexa7
  102. NAME:=Linksprite pcDuino3
  103. BUILD_DEVICES:=sun7i-a20-pcduino3
  104. endef
  105. define U-Boot/Lamobo_R1
  106. BUILD_SUBTARGET:=cortexa7
  107. NAME:=Lamobo R1
  108. BUILD_DEVICES:=sun7i-a20-lamobo-r1
  109. endef
  110. define U-Boot/nanopi_m1_plus
  111. BUILD_SUBTARGET:=cortexa7
  112. NAME:=NanoPi M1 Plus (H3)
  113. BUILD_DEVICES:=sun8i-h3-nanopi-m1-plus
  114. endef
  115. define U-Boot/nanopi_neo
  116. BUILD_SUBTARGET:=cortexa7
  117. NAME:=U-Boot for NanoPi NEO (H3)
  118. BUILD_DEVICES:=sun8i-h3-nanopi-neo
  119. endef
  120. define U-Boot/orangepi_r1
  121. BUILD_SUBTARGET:=cortexa7
  122. NAME:=Orange Pi R1 (H2+)
  123. BUILD_DEVICES:=sun8i-h2-plus-orangepi-r1
  124. endef
  125. define U-Boot/orangepi_zero
  126. BUILD_SUBTARGET:=cortexa7
  127. NAME:=Orange Pi Zero (H2+)
  128. BUILD_DEVICES:=sun8i-h2-plus-orangepi-zero
  129. endef
  130. define U-Boot/orangepi_one
  131. BUILD_SUBTARGET:=cortexa7
  132. NAME:=Orange Pi One (H3)
  133. BUILD_DEVICES:=sun8i-h3-orangepi-one
  134. endef
  135. define U-Boot/orangepi_pc
  136. BUILD_SUBTARGET:=cortexa7
  137. NAME:=Orange Pi PC (H3)
  138. BUILD_DEVICES:=sun8i-h3-orangepi-pc
  139. endef
  140. define U-Boot/orangepi_pc_plus
  141. BUILD_SUBTARGET:=cortexa7
  142. NAME:=Orange Pi PC Plus (H3)
  143. BUILD_DEVICES:=sun8i-h3-orangepi-pc-plus
  144. endef
  145. define U-Boot/orangepi_plus
  146. BUILD_SUBTARGET:=cortexa7
  147. NAME:=Orange Pi Plus (H3)
  148. BUILD_DEVICES:=sun8i-h3-orangepi-plus
  149. endef
  150. define U-Boot/orangepi_2
  151. BUILD_SUBTARGET:=cortexa7
  152. NAME:=Orange Pi 2 (H3)
  153. BUILD_DEVICES:=sun8i-h3-orangepi-2
  154. endef
  155. define U-Boot/pangolin
  156. BUILD_SUBTARGET:=cortexa7
  157. NAME:=Theobroma A31-yQ7 devboard
  158. UENV:=pangolin
  159. endef
  160. define U-Boot/nanopi_neo_plus2
  161. BUILD_SUBTARGET:=cortexa53
  162. NAME:=NanoPi NEO Plus2 (H5)
  163. BUILD_DEVICES:=sun50i-h5-nanopi-neo-plus2
  164. DEPENDS:=+PACKAGE_u-boot-nanopi_neo_plus2:arm-trusted-firmware-sunxi
  165. UENV:=a64
  166. endef
  167. define U-Boot/nanopi_neo2
  168. BUILD_SUBTARGET:=cortexa53
  169. NAME:=NanoPi NEO2 (H5)
  170. BUILD_DEVICES:=sun50i-h5-nanopi-neo2
  171. DEPENDS:=+PACKAGE_u-boot-nanopi_neo2:arm-trusted-firmware-sunxi
  172. UENV:=a64
  173. endef
  174. define U-Boot/pine64_plus
  175. BUILD_SUBTARGET:=cortexa53
  176. NAME:=Pine64 Plus A64
  177. BUILD_DEVICES:=sun50i-a64-pine64-plus
  178. DEPENDS:=+PACKAGE_u-boot-pine64_plus:arm-trusted-firmware-sunxi
  179. UENV:=a64
  180. endef
  181. define U-Boot/Sinovoip_BPI_M2_Plus
  182. BUILD_SUBTARGET:=cortexa7
  183. NAME:=Bananapi M2 Plus
  184. BUILD_DEVICES:=sun8i-h3-bananapi-m2-plus
  185. endef
  186. define U-Boot/sopine_baseboard
  187. BUILD_SUBTARGET:=cortexa53
  188. NAME:=Sopine Baseboard
  189. BUILD_DEVICES:=sun50i-a64-sopine-baseboard
  190. DEPENDS:=+PACKAGE_u-boot-sopine_baseboard:arm-trusted-firmware-sunxi
  191. UENV:=a64
  192. endef
  193. define U-Boot/orangepi_zero_plus
  194. BUILD_SUBTARGET:=cortexa53
  195. NAME:=Xunlong Orange Pi Zero Plus
  196. BUILD_DEVICES:=sun50i-h5-orangepi-zero-plus
  197. DEPENDS:=+PACKAGE_u-boot-orangepi_zero_plus:arm-trusted-firmware-sunxi
  198. UENV:=a64
  199. endef
  200. define U-Boot/orangepi_pc2
  201. BUILD_SUBTARGET:=cortexa53
  202. NAME:=Xunlong Orange Pi PC2
  203. BUILD_DEVICES:=sun50i-h5-orangepi-pc2
  204. DEPENDS:=+PACKAGE_u-boot-orangepi_pc2:arm-trusted-firmware-sunxi
  205. UENV:=a64
  206. endef
  207. UBOOT_TARGETS := \
  208. A10-OLinuXino-Lime \
  209. A13-OLinuXino \
  210. A20-OLinuXino-Lime \
  211. A20-OLinuXino-Lime2 \
  212. A20-OLinuXino-Lime2-eMMC \
  213. A20-OLinuXino_MICRO \
  214. Bananapi \
  215. Bananapro \
  216. Cubieboard \
  217. Cubieboard2 \
  218. Cubietruck \
  219. Hummingbird_A31 \
  220. Marsboard_A10 \
  221. Mele_M9 \
  222. OLIMEX_A13_SOM \
  223. Linksprite_pcDuino \
  224. Linksprite_pcDuino3 \
  225. Lamobo_R1 \
  226. nanopi_m1_plus \
  227. nanopi_neo \
  228. nanopi_neo_plus2 \
  229. nanopi_neo2 \
  230. orangepi_zero \
  231. orangepi_r1 \
  232. orangepi_one \
  233. orangepi_pc \
  234. orangepi_pc_plus \
  235. orangepi_plus \
  236. orangepi_2 \
  237. orangepi_pc2 \
  238. pangolin \
  239. pine64_plus \
  240. Sinovoip_BPI_M2_Plus \
  241. sopine_baseboard \
  242. orangepi_zero_plus
  243. UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
  244. UBOOT_MAKE_FLAGS += \
  245. BL31=$(STAGING_DIR_IMAGE)/bl31.bin
  246. define Build/InstallDev
  247. $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
  248. $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot-with-spl.bin
  249. mkimage -C none -A arm -T script -d uEnv-$(UENV).txt \
  250. $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-boot.scr
  251. endef
  252. define Package/u-boot/install/default
  253. endef
  254. $(eval $(call BuildPackage/U-Boot))