Makefile 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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:=2018.05
  11. PKG_HASH:=4da13c2a6139a78cc08608f21fd4741db27eda336cfad7ab8264fda923b9c048
  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_pc
  131. BUILD_SUBTARGET:=cortexa7
  132. NAME:=Orange Pi PC (H3)
  133. BUILD_DEVICES:=sun8i-h3-orangepi-pc
  134. endef
  135. define U-Boot/orangepi_plus
  136. BUILD_SUBTARGET:=cortexa7
  137. NAME:=Orange Pi Plus (H3)
  138. BUILD_DEVICES:=sun8i-h3-orangepi-plus
  139. endef
  140. define U-Boot/orangepi_2
  141. BUILD_SUBTARGET:=cortexa7
  142. NAME:=Orange Pi 2 (H3)
  143. BUILD_DEVICES:=sun8i-h3-orangepi-2
  144. endef
  145. define U-Boot/pangolin
  146. BUILD_SUBTARGET:=cortexa7
  147. NAME:=Theobroma A31-yQ7 devboard
  148. UENV:=pangolin
  149. endef
  150. define U-Boot/nanopi_neo_plus2
  151. BUILD_SUBTARGET:=cortexa53
  152. NAME:=NanoPi NEO Plus2 (H5)
  153. BUILD_DEVICES:=sun50i-h5-nanopi-neo-plus2
  154. DEPENDS:=+PACKAGE_u-boot-nanopi_neo_plus2:arm-trusted-firmware-sunxi
  155. UENV:=a64
  156. endef
  157. define U-Boot/nanopi_neo2
  158. BUILD_SUBTARGET:=cortexa53
  159. NAME:=NanoPi NEO2 (H5)
  160. BUILD_DEVICES:=sun50i-h5-nanopi-neo2
  161. DEPENDS:=+PACKAGE_u-boot-nanopi_neo2:arm-trusted-firmware-sunxi
  162. UENV:=a64
  163. endef
  164. define U-Boot/pine64_plus
  165. BUILD_SUBTARGET:=cortexa53
  166. NAME:=Pine64 Plus A64
  167. BUILD_DEVICES:=sun50i-a64-pine64-plus
  168. DEPENDS:=+PACKAGE_u-boot-pine64_plus:arm-trusted-firmware-sunxi
  169. UENV:=a64
  170. endef
  171. define U-Boot/sopine_baseboard
  172. BUILD_SUBTARGET:=cortexa53
  173. NAME:=Sopine Baseboard
  174. BUILD_DEVICES:=sun50i-a64-sopine-baseboard
  175. DEPENDS:=+PACKAGE_u-boot-sopine_baseboard:arm-trusted-firmware-sunxi
  176. UENV:=a64
  177. endef
  178. define U-Boot/orangepi_zero_plus
  179. BUILD_SUBTARGET:=cortexa53
  180. NAME:=Xunlong Orange Pi Zero Plus
  181. BUILD_DEVICES:=sun50i-h5-orangepi-zero-plus
  182. DEPENDS:=+PACKAGE_u-boot-orangepi_zero_plus:arm-trusted-firmware-sunxi
  183. UENV:=a64
  184. endef
  185. define U-Boot/orangepi_pc2
  186. BUILD_SUBTARGET:=cortexa53
  187. NAME:=Xunlong Orange Pi PC2
  188. BUILD_DEVICES:=sun50i-h5-orangepi-pc2
  189. DEPENDS:=+PACKAGE_u-boot-orangepi_pc2:arm-trusted-firmware-sunxi
  190. UENV:=a64
  191. endef
  192. UBOOT_TARGETS := \
  193. A10-OLinuXino-Lime \
  194. A13-OLinuXino \
  195. A20-OLinuXino-Lime \
  196. A20-OLinuXino-Lime2 \
  197. A20-OLinuXino-Lime2-eMMC \
  198. A20-OLinuXino_MICRO \
  199. Bananapi \
  200. Bananapro \
  201. Cubieboard \
  202. Cubieboard2 \
  203. Cubietruck \
  204. Hummingbird_A31 \
  205. Marsboard_A10 \
  206. Mele_M9 \
  207. OLIMEX_A13_SOM \
  208. Linksprite_pcDuino \
  209. Linksprite_pcDuino3 \
  210. Lamobo_R1 \
  211. nanopi_m1_plus \
  212. nanopi_neo \
  213. nanopi_neo_plus2 \
  214. nanopi_neo2 \
  215. orangepi_zero \
  216. orangepi_r1 \
  217. orangepi_pc \
  218. orangepi_plus \
  219. orangepi_2 \
  220. orangepi_pc2 \
  221. pangolin \
  222. pine64_plus \
  223. sopine_baseboard \
  224. orangepi_zero_plus
  225. UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
  226. UBOOT_MAKE_FLAGS += \
  227. BL31=$(STAGING_DIR_IMAGE)/bl31.bin
  228. define Build/InstallDev
  229. $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
  230. $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot-with-spl.bin
  231. mkimage -C none -A arm -T script -d uEnv-$(UENV).txt \
  232. $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-boot.scr
  233. endef
  234. define Package/u-boot/install/default
  235. endef
  236. $(eval $(call BuildPackage/U-Boot))