/
configuration.sh
591 lines (533 loc) · 19.7 KB
/
configuration.sh
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
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
#!/bin/bash
#
# Copyright (c) 2015 Igor Pecovnik, igor.pecovnik@gma**.com
#
# This file is licensed under the terms of the GNU General Public
# License version 2. This program is licensed "as is" without any
# warranty of any kind, whether express or implied.
#
# This file is a part of tool chain https://github.com/igorpecovnik/lib
#
#
# Board configurations
#
#
# vaid options for automatic building and menu selection
#
# build 0 = don't build
# build 1 = old kernel
# build 2 = next kernel
# build 3 = both kernels
# build 4 = dev kernel
# build 5 = next and dev kernels
# build 6 = legacy and next and dev kernel
# common options
REVISION="5.04" # all boards have same revision
ROOTPWD="1234" # Must be changed @first login
MAINTAINER="Igor Pecovnik" # deb signature
MAINTAINERMAIL="igor.pecovnik@****l.com" # deb signature
SDSIZE="4000" # SD image size in MB
TZDATA=`cat /etc/timezone` # Timezone for target is taken from host or defined here.
USEALLCORES="yes" # Use all CPU cores for compiling
SYSTEMD="no" # Enable or disable systemd on Jessie in debootstrap process
OFFSET="1" # Bootloader space in MB (1 x 2048 = default)
BOOTSIZE="0" # Mb size of boot partition
EXIT_PATCHING_ERROR="" # exit patching if failed
SERIALCON="ttyS0"
MISC1="https://github.com/linux-sunxi/sunxi-tools.git" # Allwinner fex compiler / decompiler
MISC1_DIR="sunxi-tools" # local directory
MISC2="" # Reserved
MISC2_DIR="" # local directory
MISC3="https://github.com/dz0ny/rt8192cu" # Realtek drivers
MISC3_DIR="rt8192cu" # local directory
MISC4=""
MISC4_DIR=""
MISC5="https://github.com/hglm/a10disp/" # Display changer for Allwinner
MISC5_DIR="sunxi-display-changer" # local directory
MISC6="https://github.com/porjo/mt7601/" # Display changer for Allwinner
MISC6_DIR="mt7601" # local directory
# board configurations
case $BOARD in
cubieboard4)#disabled
LINUXFAMILY="sun9i"
BOOTCONFIG="Cubieboard4_defconfig"
CPUMIN="1200000"
CPUMAX="1800000"
GOVERNOR="ondemand"
;;
aw-som-a20)#enabled
#description A20 dual core SoM
#build 0
LINUXFAMILY="sun7i"
BOOTCONFIG="Awsom_defconfig"
MODULES="hci_uart gpio_sunxi rfcomm hidp bonding spi_sun7i"
MODULES_NEXT="bonding"
;;
olinux-som-a13)#enabled
#description A13 single core 512Mb SoM
#build 0
LINUXFAMILY="sun5i"
BOOTCONFIG="A13-OLinuXino_defconfig"
MODULES="gpio_sunxi spi_sunxi"
MODULES_NEXT="bonding"
;;
cubieboard)#enabled
#description A10 single core 1Gb SoC
#build 6
LINUXFAMILY="sun4i"
BOOTCONFIG="Cubieboard_config"
MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sunxi"
MODULES_NEXT="bonding"
DESKTOP_TARGET="trusty,default"
;;
cubieboard2)#enabled
#description A20 dual core 1Gb SoC
#build 6
LINUXFAMILY="sun7i"
BOOTCONFIG="Cubieboard2_config"
MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i"
MODULES_NEXT="bonding"
DESKTOP_TARGET="trusty,default"
;;
cubietruck)#enabled
#description A20 dual core 2Gb SoC Wifi
#build 6
LINUXFAMILY="sun7i"
BOOTCONFIG="Cubietruck_config"
MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i ap6210"
MODULES_NEXT="brcmfmac rfcomm hidp bonding"
DESKTOP_TARGET="trusty,%"
;;
lime-a10)#enabled
#description A10 single core 512Mb SoC
#build 6
LINUXFAMILY="sun4i"
BOOTCONFIG="A10-OLinuXino-Lime_defconfig"
MODULES="hci_uart gpio_sunxi rfcomm hidp bonding spi_sun7i 8021q a20_tp"
MODULES_NEXT="bonding"
DESKTOP_TARGET="trusty,next"
;;
lime)#enabled
#description A20 dual core 512Mb SoC
#build 6
LINUXFAMILY="sun7i"
BOOTCONFIG="A20-OLinuXino-Lime_defconfig"
MODULES="hci_uart gpio_sunxi rfcomm hidp bonding spi_sun7i 8021q a20_tp"
MODULES_NEXT="bonding"
DESKTOP_TARGET="trusty,default"
;;
lime2)#enabled
#description A20 dual core 1Gb SoC
#build 6
LINUXFAMILY="sun7i"
BOOTCONFIG="A20-OLinuXino-Lime2_defconfig"
MODULES="hci_uart gpio_sunxi rfcomm hidp bonding spi_sun7i 8021q a20_tp"
MODULES_NEXT="bonding"
DESKTOP_TARGET="trusty,default"
;;
micro)#enabled
#description A20 dual core 1Gb SoC
#build 6
LINUXFAMILY="sun7i"
BOOTCONFIG="A20-OLinuXino_MICRO_config"
MODULES="hci_uart gpio_sunxi rfcomm hidp bonding spi_sun7i 8021q a20_tp"
MODULES_NEXT="bonding"
DESKTOP_TARGET="trusty,default"
;;
pcduino3nano)#enabled
#description A20 dual core 1Gb SoC
#build 6
LINUXFAMILY="sun7i"
BOOTCONFIG="Linksprite_pcDuino3_Nano_defconfig"
MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i"
MODULES_NEXT="bonding"
DESKTOP_TARGET="trusty,default"
;;
bananapim2)#enabled
#description A31 quad core 1Gb SoC Wifi
#build 5
LINUXFAMILY="sun6i"
BOOTCONFIG="Sinovoip_BPI_M2_defconfig"
MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q a20_tp"
MODULES_NEXT="brcmfmac bonding"
DESKTOP_TARGET="trusty,next"
;;
bananapipro)#enabled
#description A20 dual core 1Gb SoC
#build 6
LINUXFAMILY="sun7i"
BOOTCONFIG="Bananapro_defconfig"
MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q a20_tp #ap6211"
MODULES_NEXT="brcmfmac bonding"
DESKTOP_TARGET="trusty,%"
;;
lamobo-r1)#enabled
#description A20 dual core 1Gb SoC Switch
#build 6
LINUXFAMILY="sun7i"
BOOTCONFIG="Lamobo_R1_defconfig"
MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q"
MODULES_NEXT="brcmfmac bonding"
;;
orangepi)#enabled
#description A20 dual core 1Gb SoC Wifi USB hub
#build 6
LINUXFAMILY="sun7i"
BOOTCONFIG="Orangepi_defconfig"
MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q a20_tp"
MODULES_NEXT="bonding"
DESKTOP_TARGET="trusty,%"
;;
orangepimini)#enabled
#description A20 dual core 1Gb SoC Wifi
#build 0
LINUXFAMILY="sun7i"
BOOTCONFIG="Orangepi_mini_defconfig"
MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q a20_tp"
MODULES_NEXT="bonding"
;;
orangepiplus)#enabled
#description H3 quad core (Orange Pi Plus or Plus 2)
#build 3wip
LINUXFAMILY="sun8i"
BOOTCONFIG="orangepi_plus_defconfig"
MODULES="8189es #gpio_sunxi #w1-sunxi #w1-gpio #w1-therm #gc2035"
MODULES_NEXT=""
CPUMIN="480000"
CPUMAX="1296000"
GOVERNOR="interactive"
;;
orangepih3)#enabled
#description H3 quad core (Orange Pi PC/One/2/Lite)
#build 3wip
LINUXFAMILY="sun8i"
BOOTCONFIG="orangepi_h3_defconfig"
MODULES="8189es #gpio_sunxi #w1-sunxi #w1-gpio #w1-therm #gc2035"
MODULES_NEXT=""
CPUMIN="480000"
CPUMAX="1296000"
GOVERNOR="interactive"
;;
bananapim2plus)#disabled
# description H3 quad core 1Gb SoC Wifi
LINUXFAMILY="sun8i"
BOOTCONFIG="bananapim2_plus_defconfig"
MODULES="ap6210 #gpio_sunxi #w1-sunxi #w1-gpio #w1-therm"
MODULES_NEXT="brcmfmac"
CPUMIN="0"
CPUMAX="0"
GOVERNOR="interactive"
;;
cubox-i)#enabled
#description Freescale iMx dual/quad core Wifi
#build 6
LINUXFAMILY="cubox"
BOOTCONFIG="mx6_cubox-i_config"
MODULES="bonding"
MODULES_NEXT="bonding"
SERIALCON="ttymxc0"
DESKTOP_TARGET="jessie,default"
;;
udoo)#enabled
#description Freescale iMx dual/quad core Wifi
#build 3
LINUXFAMILY="udoo"
BOOTCONFIG="udoo_qdl_config"
MODULES="bonding"
MODULES_NEXT=""
SERIALCON="ttymxc1"
DESKTOP_TARGET="jessie,%"
;;
udoo-neo)#enabled
#description Freescale iMx singe core Wifi
#build 1wip
#BOOTSIZE="32"
LINUXFAMILY="neo"
BOOTCONFIG="udoo_neo_config"
MODULES="bonding"
MODULES_NEXT=""
SERIALCON="ttymxc0"
;;
guitar)#enabled
#description S500 Lemaker Guitar Action quad core
#build 0
LINUXFAMILY="s500"
OFFSET="16"
BOOTSIZE="16"
BOOTCONFIG="s500_defconfig"
MODULES="ethernet wlan_8723bs"
MODULES_NEXT=""
SERIALCON="ttyS3"
;;
odroidxu4)#enabled
#description Exynos5422 XU3/XU4 octa core
#build 1
LINUXFAMILY="odroidxu4"
BOOTSIZE="16"
BOOTCONFIG="odroid_config"
MODULES="bonding"
MODULES_NEXT=""
SERIALCON="ttySAC2"
DESKTOP_TARGET="jessie,default"
;;
toradex)#disabled
LINUXFAMILY="toradex"
BOOTCONFIG="colibri_imx6_defconfig"
MODULES=""
MODULES_NEXT=""
SERIALCON="ttymxc0"
;;
armada)#enabled
#description Marvell Armada 38x
#build 3
LINUXFAMILY="marvell"
BOOTCONFIG="armada_38x_clearfog_config"
MODULES=""
MODULES_NEXT=""
SERIALCON="ttyS0"
;;
*) echo "Board configuration not found"
exit
;;
esac
# board family configurations
case $LINUXFAMILY in
sun4i|sun5i|sun7i|sun8i|sun6i|sun9i)
[[ -z $LINUXCONFIG && $BRANCH == "default" ]] && LINUXCONFIG="linux-"$LINUXFAMILY-"$BRANCH"
[[ -z $LINUXCONFIG && $BRANCH != "default" ]] && LINUXCONFIG="linux-sunxi-"$BRANCH
# Kernel
KERNEL_DEFAULT='https://github.com/linux-sunxi/linux-sunxi'
KERNEL_DEFAULT_BRANCH="sunxi-3.4"
KERNEL_DEFAULT_SOURCE="linux-sunxi"
# sun8i legacy
if [[ $LINUXFAMILY == sun8i ]]; then
# KERNEL_DEFAULT="https://github.com/ssvb/linux-sunxi"
# KERNEL_DEFAULT_BRANCH="20151207-embedded-lima-memtester-h3"
KERNEL_DEFAULT="https://github.com/O-Computers/linux-sunxi"
KERNEL_DEFAULT_BRANCH="h3-wip"
KERNEL_DEFAULT_SOURCE="linux-sun8i"
fi
KERNEL_NEXT='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
[ "$USE_MAINLINE_GOOGLE_MIRROR" = "yes" ] && KERNEL_NEXT='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
KERNEL_NEXT_BRANCH="v"`wget -qO- https://www.kernel.org/finger_banner | grep "The latest st" | awk '{print $NF}' | head -1`
KERNEL_NEXT_SOURCE="linux-vanilla"
KERNEL_DEV='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
[ "$USE_MAINLINE_GOOGLE_MIRROR" = "yes" ] && KERNEL_DEV='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
KERNEL_DEV_BRANCH=""
KERNEL_DEV_SOURCE="linux-vanilla"
# U-boot
UBOOT_DEFAULT="git://git.denx.de/u-boot.git"
if [[ $LINUXFAMILY == sun8i ]]; then
UBOOT_DEFAULT_BRANCH="v2016.03-rc2"
else
UBOOT_DEFAULT_BRANCH="v"$(git ls-remote git://git.denx.de/u-boot.git | grep -v rc | grep -v "\^" | tail -1 | cut -d "v" -f 2)
fi
UBOOT_DEFAULT_SOURCE="u-boot"
UBOOT_NEXT=$UBOOT_DEFAULT
UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
UBOOT_DEV=$UBOOT_DEFAULT
UBOOT_DEV_BRANCH=""
UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
;;
odroidxu4)
KERNEL_DEFAULT='https://github.com/hardkernel/linux'
KERNEL_DEFAULT_BRANCH="odroidxu3-3.10.y"
KERNEL_DEFAULT_SOURCE="linux-odroidxu"
KERNEL_NEXT='https://github.com/tobetter/linux'
KERNEL_NEXT_BRANCH="odroidxu4-v4.2"
KERNEL_NEXT_SOURCE="linux-odroidxu-next"
UBOOT_DEFAULT="https://github.com/hardkernel/u-boot.git"
UBOOT_DEFAULT_BRANCH="odroidxu3-v2012.07"
UBOOT_DEFAULT_SOURCE="u-boot-odroidxu"
UBOOT_NEXT=$UBOOT_DEFAULT
UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
UBOOT_DEV=$UBOOT_DEFAULT
UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
;;
udoo)
KERNEL_DEFAULT="https://github.com/UDOOboard/linux_kernel"
KERNEL_DEFAULT_BRANCH="3.14-1.0.x-udoo"
KERNEL_DEFAULT_SOURCE="linux-udoo"
KERNEL_NEXT="https://github.com/patrykk/linux-udoo"
KERNEL_NEXT_BRANCH="4.2.8-5.0.11.p7.3"
KERNEL_NEXT_SOURCE="linux-udoo-next"
UBOOT_DEFAULT="https://github.com/UDOOboard/uboot-imx"
UBOOT_DEFAULT_BRANCH="2015.10.fslc-qdl"
UBOOT_DEFAULT_SOURCE="u-boot-udoo"
UBOOT_NEXT=$UBOOT_DEFAULT
UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
UBOOT_DEV=$UBOOT_DEFAULT
UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
;;
neo)
KERNEL_DEFAULT='https://github.com/UDOOboard/linux_kernel'
KERNEL_DEFAULT_BRANCH="imx_3.14.28_1.0.0_ga_neo"
KERNEL_DEFAULT_SOURCE="linux-udoo-neo"
UBOOT_DEFAULT="https://github.com/UDOOboard/uboot-imx"
UBOOT_DEFAULT_BRANCH="2015.04.imx-neo"
UBOOT_DEFAULT_SOURCE="u-boot-neo"
UBOOT_NEXT=$UBOOT_DEFAULT
UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
UBOOT_DEV=$UBOOT_DEFAULT
UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
;;
cubox)
KERNEL_DEFAULT='https://github.com/linux4kix/linux-linaro-stable-mx6'
KERNEL_DEFAULT_BRANCH="linux-linaro-lsk-v3.14-mx6"
KERNEL_DEFAULT_SOURCE="linux-cubox"
KERNEL_NEXT='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
[ "$USE_MAINLINE_GOOGLE_MIRROR" = "yes" ] && KERNEL_NEXT='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
KERNEL_NEXT_BRANCH="v"`wget -qO- https://www.kernel.org/finger_banner | grep "The latest st" | awk '{print $NF}' | head -1`
KERNEL_NEXT_SOURCE="linux-vanilla"
KERNEL_DEV='https://github.com/SolidRun/linux-fslc'
KERNEL_DEV_BRANCH="3.14-1.0.x-mx6-sr"
KERNEL_DEV_SOURCE="linux-cubox"
UBOOT_DEFAULT="https://github.com/SolidRun/u-boot-imx6"
UBOOT_DEFAULT_BRANCH="imx6"
UBOOT_DEFAULT_SOURCE="u-boot-cubox"
UBOOT_NEXT=$UBOOT_DEFAULT
UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
UBOOT_DEV=$UBOOT_DEFAULT
UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
;;
s500)
KERNEL_DEFAULT='https://github.com/LeMaker/linux-actions'
KERNEL_DEFAULT_BRANCH="s500-master"
KERNEL_DEFAULT_SOURCE="linux-s500"
KERNEL_NEXT='https://github.com/LeMaker/linux-actions'
KERNEL_NEXT_BRANCH="linux-3.10.y"
KERNEL_NEXT_SOURCE="linux-s500"
UBOOT_DEFAULT="https://github.com/LeMaker/u-boot-actions"
UBOOT_DEFAULT_BRANCH="s500-master"
UBOOT_DEFAULT_SOURCE="u-boot-s500"
UBOOT_NEXT=$UBOOT_DEFAULT
UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
UBOOT_DEV=$UBOOT_DEFAULT
UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
;;
toradex)
KERNEL_DEFAULT="git://git.toradex.com/linux-toradex.git"
KERNEL_DEFAULT_BRANCH="toradex_imx_3.14.28_1.0.0_ga"
KERNEL_DEFAULT_SOURCE="linux-toradex"
UBOOT_DEFAULT="git://git.toradex.com/u-boot-toradex.git"
UBOOT_DEFAULT_BRANCH="2015.04-toradex"
UBOOT_DEFAULT_SOURCE="u-boot-toradex"
UBOOT_NEXT=$UBOOT_DEFAULT
UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
UBOOT_DEV=$UBOOT_DEFAULT
UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
;;
marvell)
KERNEL_DEFAULT="https://github.com/SolidRun/linux-armada38x"
KERNEL_DEFAULT_BRANCH="linux-3.10.70-15t1-clearfog"
KERNEL_DEFAULT_SOURCE="linux-armada"
KERNEL_NEXT='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
[ "$USE_MAINLINE_GOOGLE_MIRROR" = "yes" ] && KERNEL_NEXT='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
KERNEL_NEXT_BRANCH="v"`wget -qO- https://www.kernel.org/finger_banner | grep "The latest st" | awk '{print $NF}' | head -1`
KERNEL_NEXT_SOURCE="linux-vanilla"
KERNEL_DEV='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
[ "$USE_MAINLINE_GOOGLE_MIRROR" = "yes" ] && KERNEL_DEV='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
KERNEL_DEV_BRANCH=""
KERNEL_DEV_SOURCE="linux-vanilla"
UBOOT_DEFAULT="https://github.com/SolidRun/u-boot-armada38x"
UBOOT_DEFAULT_BRANCH="u-boot-2013.01-15t1-clearfog"
UBOOT_DEFAULT_SOURCE="u-boot-armada"
UBOOT_NEXT=$UBOOT_DEFAULT
UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
UBOOT_DEV=$UBOOT_DEFAULT
UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
;;
*) echo "Defaults not found"
exit
;;
esac
# Let's set defalt data if not defined in board configuration above
[[ -z $LINUXCONFIG ]] && LINUXCONFIG="linux-$LINUXFAMILY-$BRANCH"
[[ -z $LINUXKERNEL ]] && eval LINUXKERNEL=\$KERNEL_${BRANCH^^}
[[ -z $LINUXSOURCE ]] && eval LINUXSOURCE=\$KERNEL_${BRANCH^^}"_SOURCE"
[[ -z $KERNELBRANCH ]] && eval KERNELBRANCH=\$KERNEL_${BRANCH^^}"_BRANCH"
[[ -z $BOOTLOADER ]] && eval BOOTLOADER=\$UBOOT_${BRANCH^^}
[[ -z $BOOTSOURCE ]] && eval BOOTSOURCE=\$UBOOT_${BRANCH^^}"_SOURCE"
[[ -z $BOOTBRANCH ]] && eval BOOTBRANCH=\$UBOOT_${BRANCH^^}"_BRANCH"
[[ -z $CPUMIN && $LINUXFAMILY == sun*i ]] && CPUMIN="480000" && CPUMAX="1010000" && GOVERNOR="interactive"
[[ $BRANCH != "default" && $LINUXFAMILY == sun*i ]] && GOVERNOR="ondemand"
[[ -z $CPUMIN && $LINUXFAMILY == odroidxu4 ]] && CPUMIN="600000" && CPUMAX="2000000" && GOVERNOR="conservative"
[[ -z $CPUMIN && $LINUXFAMILY == cubox ]] && CPUMIN="396000" && CPUMAX="996000" && GOVERNOR="interactive"
[[ -z $CPUMIN && $LINUXFAMILY == s500 ]] && CPUMIN="408000" && CPUMAX="1104000" && GOVERNOR="interactive"
[[ -z $CPUMIN && $LINUXFAMILY == marvell ]] && CPUMIN="800000" && CPUMAX="1600000" && GOVERNOR="ondemand"
[[ -z $CPUMIN && ($LINUXFAMILY == udoo || $LINUXFAMILY == neo ) ]] && CPUMIN="392000" && CPUMAX="996000" && GOVERNOR="interactive"
[[ -z $GOVERNOR ]] && GOVERNOR="ondemand"
# Essential packages
PACKAGE_LIST="alsa-utils automake btrfs-tools bash-completion bc bridge-utils bluez build-essential cmake cpufrequtils curl psmisc \
device-tree-compiler dosfstools evtest figlet fbset fping git haveged hddtemp hdparm hostapd htop i2c-tools ifenslave-2.6 \
iperf ir-keytable iotop iozone3 iw less libbluetooth-dev libbluetooth3 libtool libwrap0-dev libfuse2 libssl-dev lirc lsof makedev \
module-init-tools mtp-tools nano ntfs-3g ntp parted pkg-config pciutils pv python-smbus rfkill rsync screen stress sudo subversion \
sysfsutils toilet u-boot-tools unattended-upgrades unzip usbutils vlan wireless-tools weather-util weather-util-data wget wpasupplicant \
iptables dvb-apps libdigest-sha-perl libproc-processtable-perl w-scan apt-transport-https sysbench libusb-dev dialog fake-hwclock \
console-setup console-data kbd console-common unicode-data openssh-server man-db"
# Non-essential packages
PACKAGE_LIST_ADDITIONAL=""
# Release specific packages
case $RELEASE in
wheezy)
PACKAGE_LIST_RELEASE="libnl-dev acpid acpi-support-base"
;;
jessie)
PACKAGE_LIST_RELEASE="thin-provisioning-tools libnl-3-dev libnl-genl-3-dev libpam-systemd \
software-properties-common python-software-properties libnss-myhostname f2fs-tools"
;;
trusty)
PACKAGE_LIST_RELEASE="libnl-3-dev libnl-genl-3-dev software-properties-common python-software-properties f2fs-tools acpid"
;;
esac
# additional desktop packages
if [[ $BUILD_DESKTOP == yes ]]; then
# common packages
PACKAGE_LIST_DESKTOP="xserver-xorg xserver-xorg-core xfonts-base xinit nodm x11-xserver-utils xfce4 lxtask xterm mirage radiotray wicd thunar-volman galculator \
gtk2-engines gtk2-engines-murrine gtk2-engines-pixbuf libgtk2.0-bin gcj-jre-headless xfce4-screenshooter libgnome2-perl"
# release specific desktop packages
case $RELEASE in
wheezy)
PACKAGE_LIST_DESKTOP="$PACKAGE_LIST_DESKTOP mozo pluma iceweasel icedove"
;;
jessie)
PACKAGE_LIST_DESKTOP="$PACKAGE_LIST_DESKTOP mozo pluma iceweasel libreoffice-writer libreoffice-java-common icedove"
;;
trusty)
PACKAGE_LIST_DESKTOP="$PACKAGE_LIST_DESKTOP libreoffice-writer libreoffice-java-common thunderbird firefox gnome-icon-theme-full tango-icon-theme gvfs-backends"
;;
esac
# hardware acceleration support packages
# cache is not LINUXCONFIG and BRANCH specific, so installing anyway
#if [[ $LINUXCONFIG == *sun* && $BRANCH != "next" ]] &&
PACKAGE_LIST_DESKTOP="$PACKAGE_LIST_DESKTOP xorg-dev xutils-dev x11proto-dri2-dev xutils-dev libdrm-dev libvdpau-dev"
else
PACKAGE_LIST_DESKTOP=""
fi
# For user override
if [[ -f "$SRC/userpatches/lib.config" ]]; then
display_alert "Using user configuration override" "userpatches/lib.config" "info"
source $SRC/userpatches/lib.config
fi
# Build final package list after possible override
PACKAGE_LIST="$PACKAGE_LIST $PACKAGE_LIST_RELEASE $PACKAGE_LIST_ADDITIONAL $PACKAGE_LIST_DESKTOP"
# debug
echo -e "Config: $LINUXCONFIG\nKernel source: $LINUXKERNEL\nBranch: $KERNELBRANCH" >> $DEST/debug/install.log
echo -e "linuxsource: $LINUXSOURCE\nOffset: $OFFSET\nbootsize: $BOOTSIZE" >> $DEST/debug/install.log
echo -e "bootloader: $BOOTLOADER\nbootsource: $BOOTSOURCE\nbootbranch: $BOOTBRANCH" >> $DEST/debug/install.log
echo -e "CPU $CPUMIN / $CPUMAX with $GOVERNOR" >> $DEST/debug/install.log