Makefile 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  1. #
  2. # Copyright (C) 2012-2013 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=u-boot
  9. PKG_VERSION:=2013.10
  10. PKG_RELEASE:=1
  11. PKG_HASH:=0d71e62beb952b41ebafb20a7ee4df2f960db64c31b054721ceb79ff14014c55
  12. FIRMWARE_LANTIQ_SOURCE:=$(TOPDIR)/target/linux/lantiq/files/firmware/lantiq
  13. include $(INCLUDE_DIR)/u-boot.mk
  14. include $(INCLUDE_DIR)/package.mk
  15. define U-Boot/Default
  16. BUILD_TARGET:=lantiq
  17. DDR_SETTINGS:=
  18. endef
  19. define U-Boot/arv4519pw_ram
  20. NAME:=Arcadyan arv4519pw (RAM)
  21. BUILD_SUBTARGET:=xway
  22. BUILD_DEVICES:=arcadyan_arv4519pw
  23. DDR_SETTINGS:=board/arcadyan/arv4519pw/ddr_settings.h
  24. endef
  25. define U-Boot/arv4519pw_nor
  26. NAME:=Arcadyan arv4519pw (NOR)
  27. BUILD_SUBTARGET:=xway
  28. BUILD_DEVICES:=arcadyan_arv4519pw
  29. endef
  30. define U-Boot/arv4519pw_brn
  31. NAME:=Arcadyan arv4519pw (BRN)
  32. BUILD_SUBTARGET:=xway
  33. BUILD_DEVICES:=arcadyan_arv4519pw
  34. endef
  35. define U-Boot/arv7506pw11_ram
  36. NAME:=Arcadyan ARV7506PW11 (RAM)
  37. BUILD_SUBTARGET:=xway
  38. BUILD_DEVICES:=arcadyan_arv7506pw11
  39. DDR_SETTINGS:=board/arcadyan/arv7506pw11/ddr_settings.h
  40. endef
  41. define U-Boot/arv7506pw11_nor
  42. NAME:=Arcadyan ARV7506PW11 (NOR)
  43. BUILD_SUBTARGET:=xway
  44. BUILD_DEVICES:=arcadyan_arv7506pw11
  45. endef
  46. define U-Boot/arv7506pw11_brn
  47. NAME:=Arcadyan ARV7506PW11 (BRN)
  48. BUILD_SUBTARGET:=xway
  49. BUILD_DEVICES:=arcadyan_arv7506pw11
  50. endef
  51. define U-Boot/arv7510pw_ram
  52. NAME:=Arcadyan arv7510pw (RAM)
  53. BUILD_SUBTARGET:=xway
  54. BUILD_DEVICES:=arcadyan_arv4510pw
  55. DDR_SETTINGS:=board/arcadyan/arv7510pw/ddr_settings.h
  56. endef
  57. define U-Boot/arv7510pw_nor
  58. NAME:=Arcadyan arv7510pw (NOR)
  59. BUILD_SUBTARGET:=xway
  60. BUILD_DEVICES:=arcadyan_arv4510pw
  61. endef
  62. define U-Boot/arv7510pw_brn
  63. NAME:=Arcadyan arv7510pw (BRN)
  64. BUILD_SUBTARGET:=xway
  65. BUILD_DEVICES:=arcadyan_arv4510pw
  66. endef
  67. define U-Boot/arv7510pw22_ram
  68. NAME:=Arcadyan arv7510pw22 (RAM)
  69. BUILD_SUBTARGET:=xway
  70. BUILD_DEVICES:=arcadyan_arv7510pw22
  71. DDR_SETTINGS:=board/arcadyan/arv7510pw22/ddr_settings.h
  72. endef
  73. define U-Boot/arv7510pw22_nor
  74. NAME:=Arcadyan arv7510pw22 (NOR)
  75. BUILD_SUBTARGET:=xway
  76. BUILD_DEVICES:=arcadyan_arv7510pw22
  77. endef
  78. define U-Boot/arv7510pw22_brn
  79. NAME:=Arcadyan arv7510pw22 (BRN)
  80. BUILD_SUBTARGET:=xway
  81. BUILD_DEVICES:=arcadyan_arv7510pw22
  82. endef
  83. define U-Boot/arv7518pw_ram
  84. NAME:=Arcadyan arv7518pw (RAM)
  85. BUILD_SUBTARGET:=xway
  86. BUILD_DEVICES:=arcadyan_arv7518pw
  87. DDR_SETTINGS:=board/arcadyan/arv7518pw/ddr_settings.h
  88. endef
  89. define U-Boot/arv7518pw_nor
  90. NAME:=Arcadyan arv7518pw (NOR)
  91. BUILD_SUBTARGET:=xway
  92. BUILD_DEVICES:=arcadyan_arv7518pw
  93. endef
  94. define U-Boot/arv7518pw_brn
  95. NAME:=Arcadyan arv7518pw (BRN)
  96. BUILD_SUBTARGET:=xway
  97. BUILD_DEVICES:=arcadyan_arv7518pw
  98. endef
  99. define U-Boot/arv752dpw_ram
  100. NAME:=Arcadyan arv752dpw (RAM)
  101. BUILD_SUBTARGET:=xway
  102. DDR_SETTINGS:=board/arcadyan/arv752dpw/ddr_settings.h
  103. BUILD_DEVICES:=arcadyan_arv752dpw
  104. endef
  105. define U-Boot/arv752dpw_nor
  106. NAME:=Arcadyan arv752dpw (NOR)
  107. BUILD_SUBTARGET:=xway
  108. BUILD_DEVICES:=arcadyan_arv752dpw
  109. endef
  110. define U-Boot/arv752dpw_brn
  111. NAME:=Arcadyan arv752dpw (BRN)
  112. BUILD_SUBTARGET:=xway
  113. BUILD_DEVICES:=arcadyan_arv752dpw
  114. endef
  115. define U-Boot/arv752dpw22_ram
  116. NAME:=Arcadyan arv752dpw22 (RAM)
  117. BUILD_SUBTARGET:=xway
  118. BUILD_DEVICES:=arcadyan_arv752dpw22
  119. DDR_SETTINGS:=board/arcadyan/arv752dpw22/ddr_settings.h
  120. endef
  121. define U-Boot/arv752dpw22_nor
  122. NAME:=Arcadyan arv752dpw22 (NOR)
  123. BUILD_SUBTARGET:=xway
  124. BUILD_DEVICES:=arcadyan_arv752dpw22
  125. endef
  126. define U-Boot/arv752dpw22_brn
  127. NAME:=Arcadyan arv752dpw22 (BRN)
  128. BUILD_SUBTARGET:=xway
  129. BUILD_DEVICES:=arcadyan_arv752dpw22
  130. endef
  131. define U-Boot/arv8539pw22_ram
  132. NAME:=Speedport W 504V Typ A (RAM)
  133. BUILD_SUBTARGET:=xway
  134. BUILD_DEVICES:=arcadyan_arv8539pw22
  135. DDR_SETTINGS:=board/arcadyan/arv8539pw22/ddr_settings.h
  136. endef
  137. define U-Boot/arv8539pw22_nor
  138. NAME:=Speedport W 504V Typ A (NOR)
  139. BUILD_SUBTARGET:=xway
  140. BUILD_DEVICES:=arcadyan_arv8539pw22
  141. endef
  142. define U-Boot/arv8539pw22_brn
  143. NAME:=Speedport W 504V Typ A (BRN)
  144. BUILD_SUBTARGET:=xway
  145. BUILD_DEVICES:=arcadyan_arv8539pw22
  146. endef
  147. define U-Boot/gigasx76x_ram
  148. NAME:=Siemens Gigaset sx76x (RAM)
  149. BUILD_SUBTARGET:=xway
  150. BUILD_DEVICES:=siemens_gigaset-sx76x
  151. DDR_SETTINGS:=board/gigaset/sx76x/ddr_settings.h
  152. endef
  153. define U-Boot/gigasx76x_nor
  154. NAME:=Siemens Gigaset sx76x (NOR)
  155. BUILD_SUBTARGET:=xway
  156. BUILD_DEVICES:=siemens_gigaset-sx76x
  157. endef
  158. define U-Boot/acmp252_ram
  159. NAME:=AudioCodes MP-252 (RAM)
  160. BUILD_SUBTARGET:=xway
  161. BUILD_DEVICES:=audiocodes_mp-252
  162. DDR_SETTINGS:=board/audiocodes/acmp252/ddr_settings.h
  163. endef
  164. define U-Boot/acmp252_nor
  165. NAME:=AudioCodes MP-252 (NOR)
  166. BUILD_SUBTARGET:=xway
  167. BUILD_DEVICES:=audiocodes_mp-252
  168. endef
  169. define U-Boot/bthomehubv5a_ram
  170. NAME:=BT Home Hub 5A (RAM)
  171. BUILD_SUBTARGET:=xrx200
  172. BUILD_DEVICES:=bt_homehub-v5a
  173. DDR_SETTINGS:=board/bt/bthomehubv5a/ddr_settings.h
  174. endef
  175. define U-Boot/easy50712_ram
  176. NAME:=Lantiq EASY50712 (RAM)
  177. BUILD_SUBTARGET:=xway
  178. BUILD_DEVICES:=lantiq_easy50712
  179. DDR_SETTINGS:=board/lantiq/easy50712/ddr_settings.h
  180. endef
  181. define U-Boot/easy50712_nor
  182. NAME:=Lantiq EASY50712 (NOR)
  183. BUILD_SUBTARGET:=xway
  184. BUILD_DEVICES:=lantiq_easy50712
  185. endef
  186. define U-Boot/easy50712_norspl
  187. NAME:=Lantiq EASY50712 (NOR SPL)
  188. BUILD_SUBTARGET:=xway
  189. BUILD_DEVICES:=lantiq_easy50712
  190. UBOOT_IMAGE:=u-boot.ltq.lzo.norspl
  191. DEPENDS+=@BROKEN
  192. endef
  193. define U-Boot/easy80920_ram
  194. NAME:=Lantiq EASY80920 (RAM)
  195. BUILD_SUBTARGET:=xrx200
  196. BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand
  197. DDR_SETTINGS:=board/lantiq/easy80920/ddr_settings.h
  198. endef
  199. define U-Boot/easy80920_nor
  200. NAME:=Lantiq EASY80920 (NOR)
  201. BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand
  202. BUILD_SUBTARGET:=xrx200
  203. endef
  204. define U-Boot/easy80920_norspl
  205. NAME:=Lantiq EASY80920 (NOR SPL)
  206. BUILD_SUBTARGET:=xrx200
  207. BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand
  208. UBOOT_IMAGE:=u-boot.ltq.lzo.norspl
  209. DEPENDS+=@BROKEN
  210. endef
  211. define U-Boot/easy80920_sfspl
  212. NAME:=Lantiq EASY80920 (SPI SPL)
  213. BUILD_SUBTARGET:=xrx200
  214. BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand
  215. UBOOT_IMAGE:=u-boot.ltq.lzo.sfspl
  216. DEPENDS+=@BROKEN
  217. endef
  218. define U-Boot/fb3370_eva
  219. NAME:=AVM FRITZ3370 (EVA)
  220. BUILD_SUBTARGET:=xrx200
  221. BUILD_DEVICES:=avm_fritz3370
  222. endef
  223. define U-Boot/fb3370_ram
  224. NAME:=AVM FRITZ3370 (RAM)
  225. BUILD_SUBTARGET:=xrx200
  226. BUILD_DEVICES:=avm_fritz3370
  227. DDR_SETTINGS:=board/avm/fb3370/ddr_settings.h
  228. endef
  229. define U-Boot/fb3370_sfspl
  230. NAME:=AVM FRITZ3370 (SPI SPL)
  231. BUILD_SUBTARGET:=xrx200
  232. BUILD_DEVICES:=avm_fritz3370
  233. UBOOT_IMAGE:=u-boot.ltq.lzo.sfspl
  234. DEPENDS+=@BROKEN
  235. endef
  236. define U-Boot/p2812hnufx_ram
  237. NAME:=ZyXEL P-2812HNU-Fx (RAM)
  238. BUILD_SUBTARGET:=xrx200
  239. BUILD_DEVICES:=zyxel_p-2812hnu-f1
  240. DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h
  241. endef
  242. define U-Boot/p2812hnufx_nandspl
  243. NAME:=ZyXEL P-2812HNU-Fx (NAND SPL)
  244. BUILD_SUBTARGET:=xrx200
  245. BUILD_DEVICES:=zyxel_p-2812hnu-f1
  246. UBOOT_IMAGE:=u-boot.ltq.lzo.nandspl
  247. DEPENDS+=@BROKEN
  248. endef
  249. define U-Boot/vgv7510kw22_brn
  250. NAME:=Arcadyan VGV7510KW22 (BRN)
  251. BUILD_SUBTARGET:=xrx200
  252. BUILD_DEVICES:=arcadyan_vgv7510kw22-nor
  253. endef
  254. define U-Boot/vgv7510kw22_nor
  255. NAME:=Arcadyan VGV7510KW22 (NOR)
  256. BUILD_SUBTARGET:=xrx200
  257. BUILD_DEVICES:=arcadyan_vgv7510kw22-nor
  258. endef
  259. define U-Boot/vgv7510kw22_ram
  260. NAME:=Arcadyan VGV7510KW22 (RAM)
  261. BUILD_SUBTARGET:=xrx200
  262. BUILD_DEVICES:=arcadyan_vgv7510kw22-nor
  263. DDR_SETTINGS:=board/arcadyan/vgv7510kw22/ddr_settings.h
  264. endef
  265. define U-Boot/vgv7519_brn
  266. NAME:=Arcadyan VGV7519 (BRN)
  267. BUILD_SUBTARGET:=xrx200
  268. BUILD_DEVICES:=arcadyan_vgv7519-nor arcadyan_vgv7519-brn
  269. endef
  270. define U-Boot/vgv7519_nor
  271. NAME:=Arcadyan VGV7519 (NOR)
  272. BUILD_SUBTARGET:=xrx200
  273. BUILD_DEVICES:=arcadyan_vgv7519-nor arcadyan_vgv7519-brn
  274. endef
  275. define U-Boot/vgv7519_ram
  276. NAME:=Arcadyan VGV7519 (RAM)
  277. BUILD_SUBTARGET:=xrx200
  278. BUILD_DEVICES:=arcadyan_vgv7519-nor arcadyan_vgv7519-brn
  279. DDR_SETTINGS:=board/arcadyan/vgv7519/ddr_settings.h
  280. endef
  281. UBOOT_TARGETS:= \
  282. arv4519pw_ram arv4519pw_nor arv4519pw_brn \
  283. arv7506pw11_ram arv7506pw11_nor arv7506pw11_brn \
  284. arv7510pw_ram arv7510pw_nor arv7510pw_brn \
  285. arv7510pw22_ram arv7510pw22_nor arv7510pw22_brn \
  286. arv7518pw_ram arv7518pw_nor arv7518pw_brn \
  287. arv752dpw_ram arv752dpw_nor arv752dpw_brn \
  288. arv752dpw22_ram arv752dpw22_nor arv752dpw22_brn \
  289. arv8539pw22_brn arv8539pw22_nor arv8539pw22_ram \
  290. bthomehubv5a_ram \
  291. gigasx76x_ram gigasx76x_nor \
  292. acmp252_ram acmp252_nor \
  293. easy50712_ram easy50712_nor easy50712_norspl \
  294. easy80920_ram easy80920_nor easy80920_norspl easy80920_sfspl \
  295. fb3370_eva fb3370_ram fb3370_sfspl \
  296. p2812hnufx_ram p2812hnufx_nandspl \
  297. vgv7510kw22_brn vgv7510kw22_nor vgv7510kw22_ram \
  298. vgv7519_brn vgv7519_nor vgv7519_ram
  299. define CompressVR9Firmware
  300. $(STAGING_DIR_HOST)/bin/lzma e \
  301. $(FIRMWARE_LANTIQ_SOURCE)/xrx200_phy$(1)_a$(2)$(3).bin \
  302. $(PKG_BUILD_DIR)/arch/mips/cpu/mips32/vrx200/fw_phy$(1)_a$(2)x.blob
  303. endef
  304. define Build/Prepare
  305. $(call Build/Prepare/Default)
  306. mkdir -p $(PKG_BUILD_DIR)/arch/mips/cpu/mips32/vrx200/
  307. $(call CompressVR9Firmware,11g,1,4)
  308. $(call CompressVR9Firmware,11g,2,2)
  309. $(call CompressVR9Firmware,22f,1,4)
  310. $(call CompressVR9Firmware,22f,2,2)
  311. endef
  312. UBOOT_MAKE_FLAGS :=
  313. ifeq ($(SUBTARGET),xway)
  314. SOC:=danube
  315. else
  316. SOC:=vr9
  317. endif
  318. define Package/u-boot/install/uart
  319. awk -f $(PKG_BUILD_DIR)/tools/lantiq_ram_init_uart.awk \
  320. -v soc=$(SOC) $(PKG_BUILD_DIR)/$(DDR_SETTINGS) \
  321. > $(PKG_BUILD_DIR)/ddr_settings
  322. perl $(PKG_BUILD_DIR)/tools/gct.pl \
  323. $(PKG_BUILD_DIR)/ddr_settings $(PKG_BUILD_DIR)/u-boot.srec \
  324. $(1)/u-boot.asc
  325. endef
  326. define Package/u-boot/install
  327. $(Package/u-boot/install/$(if $(DDR_SETTINGS),uart,default))
  328. endef
  329. $(eval $(call BuildPackage/U-Boot))