summaryrefslogtreecommitdiff
path: root/libre/uboot-sunxi/PKGBUILD
blob: d42140e0b177e5aa06d42ea244fc0bf97dabd38e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
# Maintainers: Parabola hackers <dev@lists.parabola.nu>

buildarch=4

pkgbase=uboot-sunxi
pkgname=(#'uboot-a10-olinuxino-lime'
         'uboot-a10s-olinuxino-m'
         #'uboot-a13-olinuxino'
         'uboot-a13-olinuxinom'
         #'uboot-a20-olinuxino-lime'
         #'uboot-a20-olinuxino-lime2'
         'uboot-a20-olinuxino_micro'
         'uboot-bananapi'
         'uboot-bananapro'
         'uboot-chip'
         #'uboot-cubieboard'
         #'uboot-cubieboard2'
         #'uboot-cubietruck'
         'uboot-linksprite_pcduino'
         'uboot-linksprite_pcduino3'
         'uboot-linksprite_pcduino3_nano'
         'uboot-orangepi_2'
         'uboot-orangepi_one'
         'uboot-orangepi_pc'
         'uboot-orangepi_plus')
pkgver=2017.01
pkgrel=1.parabola1
arch=('armv7h')
url="http://git.denx.de/u-boot.git/"
license=('GPL')
makedepends=('bc' 'dtc')
depends=('linux-libre')
backup=(boot/boot.txt boot/boot.scr)
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
        '0001-parabola-arm-modifications.patch'
        'boot.txt'
        'mkscr')
md5sums=('ad2d82d5b4fa548b2b95bbc26c9bad79'
         '4c21a725e8aae2af7ae85a0196e0022d'
         'a149665c52dc30817f98040b77999aeb'
         '021623a04afd29ac3f368977140cfbfd')

boards=('A10-OLinuXino-Lime'
        'A10s-OLinuXino-M'
        'A13-OLinuXino'
        'A13-OLinuXinoM'
        'A20-OLinuXino-Lime'
        'A20-OLinuXino-Lime2'
        'A20-OLinuXino_MICRO'
        'Bananapi'
        'Bananapro'
        'CHIP'
        'Cubieboard'
        'Cubieboard2'
        'Cubietruck'
        'Linksprite_pcDuino'
        'Linksprite_pcDuino3'
        'Linksprite_pcDuino3_Nano'
        'orangepi_2'
        'orangepi_one'
        'orangepi_pc'
        'orangepi_plus')

prepare() {
  cd u-boot-${pkgver}

  patch -Np1 -i ../0001-parabola-arm-modifications.patch
}

build() {
  cd u-boot-${pkgver}

  unset CFLAGS
  unset CXXFLAGS
  unset LDFLAGS

  for i in ${boards[@]}; do
    mkdir ../bin_${i}
    make distclean
    make ${i}_config
    make EXTRAVERSION=-${pkgrel}
    mv u-boot-sunxi-with-spl.bin ../bin_${i}
  done

  tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ../boot.txt ../boot.scr
}

package_uboot-a10-olinuxino-lime() {
  pkgdesc="U-Boot for A10 OLinuXino Lime"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  replaces=('uboot-a10-olinuxino-lime-linux-libre')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_A10-OLinuXino-Lime/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-a10s-olinuxino-m() {
  pkgdesc="U-Boot for A10s OLinuXino Micro"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  replaces=('uboot-a10s-olinuxino-micro' 'uboot-a10s-olinuxino-micro-linux-libre')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_A10s-OLinuXino-M/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-a13-olinuxino() {
  pkgdesc="U-Boot for A13 OLinuXino"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  replaces=('uboot-a13-olinuxino-linux-libre')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_A13-OLinuXino/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-a13-olinuxinom() {
  pkgdesc="U-Boot for A13 OLinuXino Micro"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  replaces=('uboot-a13-olinuxino-micro' 'uboot-a13-olinuxino-micro-linux-libre')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_A13-OLinuXinoM/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-a20-olinuxino-lime() {
  pkgdesc="U-Boot for A20 OLinuXino Lime"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  replaces=('uboot-a20-olinuxino-lime-linux-libre')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_A20-OLinuXino-Lime/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-a20-olinuxino-lime2() {
  pkgdesc="U-Boot for A20 OLinuXino Lime2"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  replaces=('uboot-a20-olinuxino-lime2-linux-libre')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_A20-OLinuXino-Lime2/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-a20-olinuxino_micro() {
  pkgdesc="U-Boot for A20 OLinuXino Micro"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  replaces=('uboot-a20-olinuxino-micro' 'uboot-a20-olinuxino-micro-linux-libre')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_A20-OLinuXino_MICRO/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-bananapi() {
  pkgdesc="U-Boot for Banana Pi"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_Bananapi/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-bananapro() {
  pkgdesc="U-Boot for Banana Pro"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_Bananapro/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-chip() {
  pkgdesc="U-Boot for C.H.I.P"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_CHIP/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-cubieboard() {
  pkgdesc="U-Boot for Cubieboard"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  replaces=('uboot-cubieboard-linux-libre')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_Cubieboard/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-cubieboard2() {
  pkgdesc="U-Boot for Cubieboard 2"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  replaces=('uboot-cubieboard2-linux-libre')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_Cubieboard2/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-cubietruck() {
  pkgdesc="U-Boot for Cubietruck"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  replaces=('uboot-cubietruck-linux-libre')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_Cubietruck/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-linksprite_pcduino() {
  pkgdesc="U-Boot for pcDuino"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  replaces=('uboot-pcduino' 'uboot-pcduino-linux-libre')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_Linksprite_pcDuino/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-linksprite_pcduino3() {
  pkgdesc="U-Boot for pcDuino3"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  replaces=('uboot-pcduino3' 'uboot-pcduino3-linux-libre')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_Linksprite_pcDuino3/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-linksprite_pcduino3_nano() {
  pkgdesc="U-Boot for pcDuino3 Nano"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
  replaces=('uboot-pcduino3-nano' 'uboot-pcduino3-nano-linux-libre')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_Linksprite_pcDuino3_Nano/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-orangepi_2() {
  pkgdesc="U-Boot for Orange Pi 2"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_orangepi_2/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-orangepi_one() {
  pkgdesc="U-Boot for Orange Pi One"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_orangepi_one/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-orangepi_pc() {
  pkgdesc="U-Boot for Orange Pi PC"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_orangepi_pc/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}

package_uboot-orangepi_plus() {
  pkgdesc="U-Boot for Orange Pi Plus"
  install=${pkgbase}.install
  provides=('uboot-sunxi')
  conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')

  install -d "${pkgdir}"/boot
  install -Dm644 bin_orangepi_plus/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot

  install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
  install -Dm644 boot.scr "${pkgdir}"/boot/boot.scr
  install -Dm755 mkscr "${pkgdir}"/boot/mkscr
}