PKGBUILD 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. # Contributor: André Silva <emulatorman@hyperbola.info>
  2. # Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
  3. buildarch=4
  4. pkgbase=uboot-sunxi
  5. pkgname=(#'uboot-a10-olinuxino-lime'
  6. 'uboot-a10s-olinuxino-m'
  7. #'uboot-a13-olinuxino'
  8. 'uboot-a13-olinuxinom'
  9. #'uboot-a20-olinuxino-lime'
  10. #'uboot-a20-olinuxino-lime2'
  11. 'uboot-a20-olinuxino_micro'
  12. 'uboot-bananapi'
  13. 'uboot-bananapro'
  14. 'uboot-chip'
  15. #'uboot-cubieboard'
  16. #'uboot-cubieboard2'
  17. #'uboot-cubietruck'
  18. 'uboot-linksprite_pcduino'
  19. 'uboot-linksprite_pcduino3'
  20. 'uboot-linksprite_pcduino3_nano'
  21. 'uboot-orangepi_2'
  22. 'uboot-orangepi_one'
  23. 'uboot-orangepi_pc'
  24. 'uboot-orangepi_plus')
  25. pkgver=2017.01
  26. pkgrel=1.parabola1
  27. arch=('armv7h')
  28. url="http://git.denx.de/u-boot.git/"
  29. license=('GPL')
  30. makedepends=('bc' 'dtc')
  31. depends=('linux-libre')
  32. backup=(boot/boot.txt boot/boot.scr)
  33. source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
  34. '0001-parabola-arm-modifications.patch'
  35. 'boot.txt'
  36. 'mkscr')
  37. md5sums=('ad2d82d5b4fa548b2b95bbc26c9bad79'
  38. '4c21a725e8aae2af7ae85a0196e0022d'
  39. 'a149665c52dc30817f98040b77999aeb'
  40. '021623a04afd29ac3f368977140cfbfd')
  41. boards=('A10-OLinuXino-Lime'
  42. 'A10s-OLinuXino-M'
  43. 'A13-OLinuXino'
  44. 'A13-OLinuXinoM'
  45. 'A20-OLinuXino-Lime'
  46. 'A20-OLinuXino-Lime2'
  47. 'A20-OLinuXino_MICRO'
  48. 'Bananapi'
  49. 'Bananapro'
  50. 'CHIP'
  51. 'Cubieboard'
  52. 'Cubieboard2'
  53. 'Cubietruck'
  54. 'Linksprite_pcDuino'
  55. 'Linksprite_pcDuino3'
  56. 'Linksprite_pcDuino3_Nano'
  57. 'orangepi_2'
  58. 'orangepi_one'
  59. 'orangepi_pc'
  60. 'orangepi_plus')
  61. prepare() {
  62. cd u-boot-${pkgver}
  63. patch -Np1 -i ../0001-parabola-arm-modifications.patch
  64. }
  65. build() {
  66. cd u-boot-${pkgver}
  67. unset CFLAGS
  68. unset CXXFLAGS
  69. unset LDFLAGS
  70. for i in ${boards[@]}; do
  71. mkdir ../bin_${i}
  72. make distclean
  73. make ${i}_config
  74. make EXTRAVERSION=-${pkgrel}
  75. mv u-boot-sunxi-with-spl.bin ../bin_${i}
  76. done
  77. tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ../boot.txt ../boot.scr
  78. }
  79. package_uboot-a10-olinuxino-lime() {
  80. pkgdesc="U-Boot for A10 OLinuXino Lime"
  81. install=${pkgbase}.install
  82. provides=('uboot-sunxi')
  83. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  84. replaces=('uboot-a10-olinuxino-lime-linux-libre')
  85. install -d "${pkgdir}"/boot
  86. install -Dm644 bin_A10-OLinuXino-Lime/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  87. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  88. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  89. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  90. }
  91. package_uboot-a10s-olinuxino-m() {
  92. pkgdesc="U-Boot for A10s OLinuXino Micro"
  93. install=${pkgbase}.install
  94. provides=('uboot-sunxi')
  95. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  96. replaces=('uboot-a10s-olinuxino-micro' 'uboot-a10s-olinuxino-micro-linux-libre')
  97. install -d "${pkgdir}"/boot
  98. install -Dm644 bin_A10s-OLinuXino-M/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  99. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  100. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  101. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  102. }
  103. package_uboot-a13-olinuxino() {
  104. pkgdesc="U-Boot for A13 OLinuXino"
  105. install=${pkgbase}.install
  106. provides=('uboot-sunxi')
  107. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  108. replaces=('uboot-a13-olinuxino-linux-libre')
  109. install -d "${pkgdir}"/boot
  110. install -Dm644 bin_A13-OLinuXino/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  111. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  112. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  113. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  114. }
  115. package_uboot-a13-olinuxinom() {
  116. pkgdesc="U-Boot for A13 OLinuXino Micro"
  117. install=${pkgbase}.install
  118. provides=('uboot-sunxi')
  119. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  120. replaces=('uboot-a13-olinuxino-micro' 'uboot-a13-olinuxino-micro-linux-libre')
  121. install -d "${pkgdir}"/boot
  122. install -Dm644 bin_A13-OLinuXinoM/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  123. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  124. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  125. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  126. }
  127. package_uboot-a20-olinuxino-lime() {
  128. pkgdesc="U-Boot for A20 OLinuXino Lime"
  129. install=${pkgbase}.install
  130. provides=('uboot-sunxi')
  131. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  132. replaces=('uboot-a20-olinuxino-lime-linux-libre')
  133. install -d "${pkgdir}"/boot
  134. install -Dm644 bin_A20-OLinuXino-Lime/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  135. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  136. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  137. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  138. }
  139. package_uboot-a20-olinuxino-lime2() {
  140. pkgdesc="U-Boot for A20 OLinuXino Lime2"
  141. install=${pkgbase}.install
  142. provides=('uboot-sunxi')
  143. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  144. replaces=('uboot-a20-olinuxino-lime2-linux-libre')
  145. install -d "${pkgdir}"/boot
  146. install -Dm644 bin_A20-OLinuXino-Lime2/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  147. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  148. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  149. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  150. }
  151. package_uboot-a20-olinuxino_micro() {
  152. pkgdesc="U-Boot for A20 OLinuXino Micro"
  153. install=${pkgbase}.install
  154. provides=('uboot-sunxi')
  155. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  156. replaces=('uboot-a20-olinuxino-micro' 'uboot-a20-olinuxino-micro-linux-libre')
  157. install -d "${pkgdir}"/boot
  158. install -Dm644 bin_A20-OLinuXino_MICRO/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  159. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  160. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  161. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  162. }
  163. package_uboot-bananapi() {
  164. pkgdesc="U-Boot for Banana Pi"
  165. install=${pkgbase}.install
  166. provides=('uboot-sunxi')
  167. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  168. install -d "${pkgdir}"/boot
  169. install -Dm644 bin_Bananapi/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  170. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  171. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  172. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  173. }
  174. package_uboot-bananapro() {
  175. pkgdesc="U-Boot for Banana Pro"
  176. install=${pkgbase}.install
  177. provides=('uboot-sunxi')
  178. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  179. install -d "${pkgdir}"/boot
  180. install -Dm644 bin_Bananapro/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  181. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  182. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  183. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  184. }
  185. package_uboot-chip() {
  186. pkgdesc="U-Boot for C.H.I.P"
  187. install=${pkgbase}.install
  188. provides=('uboot-sunxi')
  189. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  190. install -d "${pkgdir}"/boot
  191. install -Dm644 bin_CHIP/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  192. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  193. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  194. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  195. }
  196. package_uboot-cubieboard() {
  197. pkgdesc="U-Boot for Cubieboard"
  198. install=${pkgbase}.install
  199. provides=('uboot-sunxi')
  200. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  201. replaces=('uboot-cubieboard-linux-libre')
  202. install -d "${pkgdir}"/boot
  203. install -Dm644 bin_Cubieboard/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  204. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  205. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  206. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  207. }
  208. package_uboot-cubieboard2() {
  209. pkgdesc="U-Boot for Cubieboard 2"
  210. install=${pkgbase}.install
  211. provides=('uboot-sunxi')
  212. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  213. replaces=('uboot-cubieboard2-linux-libre')
  214. install -d "${pkgdir}"/boot
  215. install -Dm644 bin_Cubieboard2/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  216. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  217. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  218. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  219. }
  220. package_uboot-cubietruck() {
  221. pkgdesc="U-Boot for Cubietruck"
  222. install=${pkgbase}.install
  223. provides=('uboot-sunxi')
  224. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  225. replaces=('uboot-cubietruck-linux-libre')
  226. install -d "${pkgdir}"/boot
  227. install -Dm644 bin_Cubietruck/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  228. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  229. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  230. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  231. }
  232. package_uboot-linksprite_pcduino() {
  233. pkgdesc="U-Boot for pcDuino"
  234. install=${pkgbase}.install
  235. provides=('uboot-sunxi')
  236. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  237. replaces=('uboot-pcduino' 'uboot-pcduino-linux-libre')
  238. install -d "${pkgdir}"/boot
  239. install -Dm644 bin_Linksprite_pcDuino/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  240. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  241. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  242. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  243. }
  244. package_uboot-linksprite_pcduino3() {
  245. pkgdesc="U-Boot for pcDuino3"
  246. install=${pkgbase}.install
  247. provides=('uboot-sunxi')
  248. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  249. replaces=('uboot-pcduino3' 'uboot-pcduino3-linux-libre')
  250. install -d "${pkgdir}"/boot
  251. install -Dm644 bin_Linksprite_pcDuino3/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  252. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  253. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  254. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  255. }
  256. package_uboot-linksprite_pcduino3_nano() {
  257. pkgdesc="U-Boot for pcDuino3 Nano"
  258. install=${pkgbase}.install
  259. provides=('uboot-sunxi')
  260. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  261. replaces=('uboot-pcduino3-nano' 'uboot-pcduino3-nano-linux-libre')
  262. install -d "${pkgdir}"/boot
  263. install -Dm644 bin_Linksprite_pcDuino3_Nano/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  264. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  265. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  266. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  267. }
  268. package_uboot-orangepi_2() {
  269. pkgdesc="U-Boot for Orange Pi 2"
  270. install=${pkgbase}.install
  271. provides=('uboot-sunxi')
  272. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  273. install -d "${pkgdir}"/boot
  274. install -Dm644 bin_orangepi_2/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  275. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  276. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  277. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  278. }
  279. package_uboot-orangepi_one() {
  280. pkgdesc="U-Boot for Orange Pi One"
  281. install=${pkgbase}.install
  282. provides=('uboot-sunxi')
  283. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  284. install -d "${pkgdir}"/boot
  285. install -Dm644 bin_orangepi_one/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  286. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  287. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  288. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  289. }
  290. package_uboot-orangepi_pc() {
  291. pkgdesc="U-Boot for Orange Pi PC"
  292. install=${pkgbase}.install
  293. provides=('uboot-sunxi')
  294. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  295. install -d "${pkgdir}"/boot
  296. install -Dm644 bin_orangepi_pc/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  297. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  298. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  299. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  300. }
  301. package_uboot-orangepi_plus() {
  302. pkgdesc="U-Boot for Orange Pi Plus"
  303. install=${pkgbase}.install
  304. provides=('uboot-sunxi')
  305. conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  306. install -d "${pkgdir}"/boot
  307. install -Dm644 bin_orangepi_plus/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
  308. install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  309. install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  310. install -Dm755 mkscr "${pkgdir}"/boot/mkscr
  311. }