This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_quasar.sh
executable file
·768 lines (767 loc) · 30.2 KB
/
build_quasar.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
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
#!/bin/bash
#
# Quasar Kernel Build Script
# Coded by BlackMesa @2018
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
clear
# Init Fields
QS_V_MAJOR=2
QS_V_MINOR=0
QS_VERSION=v$QS_V_MAJOR.$QS_V_MINOR
QS_BUILD=BRA7
QS_DATE=$(date +%Y%m%d)
QS_TOOLCHAIN=/home/blackmesa/Scrivania/Android/Sorgenti/Toolchain/arm-eabi-4.9/bin/arm-eabi-
QS_JOBS=`grep processor /proc/cpuinfo|wc -l`
QS_DIR=$(pwd)
# Init Methods
CLEAN_SOURCE()
{
make clean
make mrproper
rm -r -f $QS_DIR/output
}
BUILD_ZIMAGE()
{
echo "----------------------------------------------"
echo "Building zImage for $QS_VARIANT..."
echo " "
export ARCH=arm
export CROSS_COMPILE=$QS_TOOLCHAIN
export LOCALVERSION=-Quasar_Kernel-$QS_VERSION-$QS_VARIANT-$QS_DATE
mkdir output
make -C $QS_DIR -j$QS_JOBS O=output quasar_msm8916_defconfig VARIANT_DEFCONFIG=$QS_DEFCON SELINUX_DEFCONFIG=quasar_selinux_defconfig
make -C $QS_DIR -j$QS_JOBS O=output
echo " "
}
BUILD_DTB()
{
echo "----------------------------------------------"
echo "Building dtb for $QS_VARIANT..."
echo " "
$QS_DIR/tools/dtbTool -o $QS_DIR/quasar/dtb.img $QS_DIR/output/arch/arm/boot/dts/
echo " "
}
PACK_COMMON_IMG()
{
echo "----------------------------------------------"
echo "Packing boot.img for $QS_VARIANT..."
echo " "
mkdir -p $QS_DIR/quasar/tools/aik/ramdisk
mkdir -p $QS_DIR/quasar/tools/aik/split_img
cp -rf $QS_DIR/quasar/ramdisk/common/ramdisk/* $QS_DIR/quasar/tools/aik/ramdisk
cp -rf $QS_DIR/quasar/ramdisk/common/split_img/* $QS_DIR/quasar/tools/aik/split_img
mv $QS_DIR/output/arch/arm/boot/zImage $QS_DIR/quasar/tools/aik/split_img/boot.img-zImage
mv $QS_DIR/quasar/dtb.img $QS_DIR/quasar/tools/aik/split_img/boot.img-dtb
$QS_DIR/quasar/tools/aik/repackimg.sh
mv $QS_DIR/quasar/tools/aik/image-new.img $QS_DIR/quasar/build/boot-$QS_VARIANT-$QS_DATE.img
$QS_DIR/quasar/tools/aik/cleanup.sh
}
PACK_VARIANT_IMG()
{
echo "----------------------------------------------"
echo "Packing boot.img for $QS_VARIANT..."
echo " "
mkdir -p $QS_DIR/quasar/tools/aik/ramdisk
mkdir -p $QS_DIR/quasar/tools/aik/split_img
cp -rf $QS_DIR/quasar/ramdisk/common/ramdisk/* $QS_DIR/quasar/tools/aik/ramdisk
cp -rf $QS_DIR/quasar/ramdisk/common/split_img/* $QS_DIR/quasar/tools/aik/split_img
cp -rf $QS_DIR/quasar/ramdisk/$QS_VARIANT/ramdisk/* $QS_DIR/quasar/tools/aik/ramdisk
mv $QS_DIR/output/arch/arm/boot/zImage $QS_DIR/quasar/tools/aik/split_img/boot.img-zImage
mv $QS_DIR/quasar/dtb.img $QS_DIR/quasar/tools/aik/split_img/boot.img-dtb
$QS_DIR/quasar/tools/aik/repackimg.sh
mv $QS_DIR/quasar/tools/aik/image-new.img $QS_DIR/quasar/build/boot-$QS_VARIANT-$QS_DATE.img
$QS_DIR/quasar/tools/aik/cleanup.sh
}
PACK_A35_ZIP()
{
echo "----------------------------------------------"
echo "Packing flashable zip for A3 2015 kernels..."
echo " "
mkdir -p $QS_DIR/quasar/work
mkdir -p $QS_DIR/quasar/work/META-INF/com/google/android
mkdir -p $QS_DIR/quasar/work/quasar/a3ulte
cp -f $QS_DIR/quasar/tools/flashable/binary $QS_DIR/quasar/work/META-INF/com/google/android/update-binary
cp -f $QS_DIR/quasar/tools/flashable/a35 $QS_DIR/quasar/work/META-INF/com/google/android/updater-script
sed -i s'/QSVER/v2.0/'g $QS_DIR/quasar/work/META-INF/com/google/android/updater-script
cp -f $QS_DIR/quasar/tools/flashable/pronto $QS_DIR/quasar/work/quasar/pronto
cp -f $QS_DIR/quasar/tools/flashable/wpsw $QS_DIR/quasar/work/quasar/wpsw
mv $QS_DIR/quasar/build/boot-a3ulte-$QS_DATE.img $QS_DIR/quasar/work/quasar/a3ulte/boot.img
cd $QS_DIR/quasar/work
$QS_DIR/quasar/tools/flashable/zip -r -9 - * > $QS_DIR/quasar/build/Quasar_Kernel-$QS_VERSION-$QS_BUILD-A35.zip
cd $QS_DIR
rm -r -f $QS_DIR/quasar/work
}
PACK_A55_ZIP()
{
echo "----------------------------------------------"
echo "Packing flashable zip for A5 2015 kernels..."
echo " "
mkdir -p $QS_DIR/quasar/work
mkdir -p $QS_DIR/quasar/work/META-INF/com/google/android
mkdir -p $QS_DIR/quasar/work/quasar/a53g
mkdir -p $QS_DIR/quasar/work/quasar/a5lte
mkdir -p $QS_DIR/quasar/work/quasar/a5ltechn
mkdir -p $QS_DIR/quasar/work/quasar/a5ulte
mkdir -p $QS_DIR/quasar/work/quasar/a5ulte_can
mkdir -p $QS_DIR/quasar/work/quasar/a5ulte_kor
cp -rf $QS_DIR/quasar/tools/aik $QS_DIR/quasar/work/quasar/a5ulte
cp -f $QS_DIR/quasar/tools/flashable/binary $QS_DIR/quasar/work/META-INF/com/google/android/update-binary
cp -f $QS_DIR/quasar/tools/flashable/a55 $QS_DIR/quasar/work/META-INF/com/google/android/updater-script
sed -i s'/QSVER/v2.0/'g $QS_DIR/quasar/work/META-INF/com/google/android/updater-script
cp -f $QS_DIR/quasar/tools/flashable/pronto $QS_DIR/quasar/work/quasar/pronto
cp -f $QS_DIR/quasar/tools/flashable/wpsw $QS_DIR/quasar/work/quasar/wpsw
mv $QS_DIR/quasar/build/boot-a53g-$QS_DATE.img $QS_DIR/quasar/work/quasar/a53g/boot.img
mv $QS_DIR/quasar/build/boot-a5lte-$QS_DATE.img $QS_DIR/quasar/work/quasar/a5lte/boot.img
mv $QS_DIR/quasar/build/boot-a5ltechn-$QS_DATE.img $QS_DIR/quasar/work/quasar/a5ltechn/boot.img
mv $QS_DIR/quasar/build/boot-a5ulte-$QS_DATE.img $QS_DIR/quasar/work/quasar/a5ulte/boot.img
cp -f $QS_DIR/quasar/tools/flashable/dtb $QS_DIR/quasar/work/quasar/a5ulte/magic.sh
mv $QS_DIR/quasar/dtb-can $QS_DIR/quasar/work/quasar/a5ulte_can/boot.img-dtb
mv $QS_DIR/quasar/dtb-kor $QS_DIR/quasar/work/quasar/a5ulte_kor/boot.img-dtb
cd $QS_DIR/quasar/work
$QS_DIR/quasar/tools/flashable/zip -r -9 - * > $QS_DIR/quasar/build/Quasar_Kernel-$QS_VERSION-$QS_BUILD-A55.zip
cd $QS_DIR
rm -r -f $QS_DIR/quasar/work
}
PACK_J55_ZIP()
{
echo "----------------------------------------------"
echo "Packing flashable zip for J5 2015 kernels..."
echo " "
mkdir -p $QS_DIR/quasar/work
mkdir -p $QS_DIR/quasar/work/META-INF/com/google/android
mkdir -p $QS_DIR/quasar/work/quasar/j53g
mkdir -p $QS_DIR/quasar/work/quasar/j5lte
mkdir -p $QS_DIR/quasar/work/quasar/j5nlte
mkdir -p $QS_DIR/quasar/work/quasar/j5ylte
cp -f $QS_DIR/quasar/tools/flashable/binary $QS_DIR/quasar/work/META-INF/com/google/android/update-binary
cp -f $QS_DIR/quasar/tools/flashable/j55 $QS_DIR/quasar/work/META-INF/com/google/android/updater-script
sed -i s'/QSVER/v2.0/'g $QS_DIR/quasar/work/META-INF/com/google/android/updater-script
cp -f $QS_DIR/quasar/tools/flashable/pronto $QS_DIR/quasar/work/quasar/pronto
cp -f $QS_DIR/quasar/tools/flashable/wpsw $QS_DIR/quasar/work/quasar/wpsw
mv $QS_DIR/quasar/build/boot-j53g-$QS_DATE.img $QS_DIR/quasar/work/quasar/j53g/boot.img
mv $QS_DIR/quasar/build/boot-j5lte-$QS_DATE.img $QS_DIR/quasar/work/quasar/j5lte/boot.img
mv $QS_DIR/quasar/build/boot-j5nlte-$QS_DATE.img $QS_DIR/quasar/work/quasar/j5nlte/boot.img
mv $QS_DIR/quasar/build/boot-j5ylte-$QS_DATE.img $QS_DIR/quasar/work/quasar/j5ylte/boot.img
cd $QS_DIR/quasar/work
$QS_DIR/quasar/tools/flashable/zip -r -9 - * > $QS_DIR/quasar/build/Quasar_Kernel-$QS_VERSION-$QS_BUILD-J55.zip
cd $QS_DIR
rm -r -f $QS_DIR/quasar/work
}
PACK_J56_ZIP()
{
echo "----------------------------------------------"
echo "Packing flashable zip for J5 2016 kernels..."
echo " "
mkdir -p $QS_DIR/quasar/work
mkdir -p $QS_DIR/quasar/work/META-INF/com/google/android
mkdir -p $QS_DIR/quasar/work/quasar/j5x3g
mkdir -p $QS_DIR/quasar/work/quasar/j5xlte
cp -f $QS_DIR/quasar/tools/flashable/binary $QS_DIR/quasar/work/META-INF/com/google/android/update-binary
cp -f $QS_DIR/quasar/tools/flashable/j56 $QS_DIR/quasar/work/META-INF/com/google/android/updater-script
sed -i s'/QSVER/v2.0/'g $QS_DIR/quasar/work/META-INF/com/google/android/updater-script
cp -f $QS_DIR/quasar/tools/flashable/pronto $QS_DIR/quasar/work/quasar/pronto
cp -f $QS_DIR/quasar/tools/flashable/wpsw $QS_DIR/quasar/work/quasar/wpsw
mv $QS_DIR/quasar/build/boot-j5x3g-$QS_DATE.img $QS_DIR/quasar/work/quasar/j5x3g/boot.img
mv $QS_DIR/quasar/build/boot-j5xlte-$QS_DATE.img $QS_DIR/quasar/work/quasar/j5xlte/boot.img
cd $QS_DIR/quasar/work
$QS_DIR/quasar/tools/flashable/zip -r -9 - * > $QS_DIR/quasar/build/Quasar_Kernel-$QS_VERSION-$QS_BUILD-J56.zip
cd $QS_DIR
rm -r -f $QS_DIR/quasar/work
}
# Main Menu
clear
echo "----------------------------------------------"
echo "QuasarKernel $QS_VERSION Build Script"
echo "Coded by BlackMesa"
echo "----------------------------------------------"
PS3='Please select your option (1-18): '
menuvar=("A3 2015 (build all)" "a3ulte" "A5 2015 (build all)" "a53g" "a5lte" "a5ltechn" "a5ulte" "a5ulte_can" "a5ulte_kor" "J5 2015 (build all)" "j53g" "j5lte" "j5nlte" "j5ylte" "J5 2016 (build all)" "j5x3g" "j5xlte" "Exit")
select menuvar in "${menuvar[@]}"
do
case $menuvar in
"A3 2015 (build all)")
clear
echo "----------------------------------------------"
echo "Starting build for all the A3 2015 variants."
echo "Please be patient..."
# a3ulte
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a3ulte kernel build..."
QS_VARIANT=a3ulte
QS_DEFCON=quasar_msm8916_a3ulte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "a3ulte kernel build finished."
PACK_A35_ZIP
echo " "
echo "----------------------------------------------"
echo "A3 2015 kernels build finished."
echo "Flashable zip is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"a3ulte")
clear
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a3ulte kernel build..."
QS_VARIANT=a3ulte
QS_DEFCON=quasar_msm8916_a3ulte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "a3ulte kernel build finished."
echo "boot.img is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"A5 2015 (build all)")
clear
echo "----------------------------------------------"
echo "Starting build for all the A5 2015 variants."
echo "Please be patient..."
# a53g
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a53g kernel build..."
QS_VARIANT=a53g
QS_DEFCON=quasar_msm8916_a53g_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "a53g kernel build finished."
# a5lte
echo "----------------------------------------------"
echo "Preparing for next build..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a5lte kernel build..."
QS_VARIANT=a5lte
QS_DEFCON=quasar_msm8916_a5lte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "a5lte kernel build finished."
# a5ltechn
echo "----------------------------------------------"
echo "Preparing for next build..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a5ltechn kernel build..."
QS_VARIANT=a5ltechn
QS_DEFCON=quasar_msm8916_a5ltechn_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "a5ltechn kernel build finished."
# a5ulte
echo "----------------------------------------------"
echo "Preparing for next build..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a5ulte kernel build..."
QS_VARIANT=a5ulte
QS_DEFCON=quasar_msm8916_a5ulte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "a5ulte kernel build finished."
# Since here we need just dtb.
# a5ulte_can
echo "----------------------------------------------"
echo "Preparing for next build..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a5ulte_can kernel build..."
QS_VARIANT=a5ulte_can
QS_DEFCON=quasar_msm8916_a5ulte_can_defconfig
BUILD_ZIMAGE
BUILD_DTB
mv $QS_DIR/quasar/dtb.img $QS_DIR/quasar/dtb-can
echo " "
echo "----------------------------------------------"
echo "a5ulte_can kernel build finished."
# a5ulte_kor
echo "----------------------------------------------"
echo "Preparing for next build..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a5ulte_kor kernel build..."
QS_VARIANT=a5ulte_kor
QS_DEFCON=quasar_msm8916_a5ulte_kor_defconfig
BUILD_ZIMAGE
BUILD_DTB
mv $QS_DIR/quasar/dtb.img $QS_DIR/quasar/dtb-kor
echo " "
echo "----------------------------------------------"
echo "a5ulte_kor kernel build finished."
PACK_A55_ZIP
echo " "
echo "----------------------------------------------"
echo "A5 2015 kernels build finished."
echo "Flashable zip is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"a53g")
clear
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a53g kernel build..."
QS_VARIANT=a53g
QS_DEFCON=quasar_msm8916_a53g_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "a53g kernel build finished."
echo "boot.img is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"a5lte")
clear
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a5lte kernel build..."
QS_VARIANT=a5lte
QS_DEFCON=quasar_msm8916_a5lte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "a5lte kernel build finished."
echo "boot.img is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"a5ltechn")
clear
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a5ltechn kernel build..."
QS_VARIANT=a5ltechn
QS_DEFCON=quasar_msm8916_a5ltechn_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "a5ltechn kernel build finished."
echo "boot.img is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"a5ulte")
clear
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a5ulte kernel build..."
QS_VARIANT=a5ulte
QS_DEFCON=quasar_msm8916_a5ulte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "a5ulte kernel build finished."
echo "boot.img is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"a5ulte_can")
clear
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a5ulte_can kernel build..."
QS_VARIANT=a5ulte_can
QS_DEFCON=quasar_msm8916_a5ulte_can_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "a5ulte_can kernel build finished."
echo "boot.img is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"a5ulte_kor")
clear
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting a5ulte_kor kernel build..."
QS_VARIANT=a5ulte_kor
QS_DEFCON=quasar_msm8916_a5ulte_kor_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "a5ulte_kor kernel build finished."
echo "boot.img is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"J5 2015 (build all)")
clear
echo "----------------------------------------------"
echo "Starting build for all the J5 2015 variants."
echo "Please be patient..."
# j53g
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting j53g kernel build..."
QS_VARIANT=j53g
QS_DEFCON=quasar_msm8916_j53g_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "j53g kernel build finished."
# j5lte
echo "----------------------------------------------"
echo "Preparing for next build..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting j5lte kernel build..."
QS_VARIANT=j5lte
QS_DEFCON=quasar_msm8916_j5lte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "j5lte kernel build finished."
# j5nlte
echo "----------------------------------------------"
echo "Preparing for next build..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting j5nlte kernel build..."
QS_VARIANT=j5nlte
QS_DEFCON=quasar_msm8916_j5nlte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "j5nlte kernel build finished."
# j5ylte
echo "----------------------------------------------"
echo "Preparing for next build..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting j5ylte kernel build..."
QS_VARIANT=j5ylte
QS_DEFCON=quasar_msm8916_j5ylte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "j5ylte kernel build finished."
PACK_J55_ZIP
echo " "
echo "----------------------------------------------"
echo "J5 2015 kernels build finished."
echo "Flashable zip is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"j53g")
clear
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting j53g kernel build..."
QS_VARIANT=j53g
QS_DEFCON=quasar_msm8916_j53g_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "j53g kernel build finished."
echo "boot.img is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"j5lte")
clear
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting j5lte kernel build..."
QS_VARIANT=j5lte
QS_DEFCON=quasar_msm8916_j5lte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_COMMON_IMG
echo " "
echo "----------------------------------------------"
echo "j5lte kernel build finished."
echo "boot.img is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"j5nlte")
clear
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting j5nlte kernel build..."
QS_VARIANT=j5nlte
QS_DEFCON=quasar_msm8916_j5nlte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "j5nlte kernel build finished."
echo "boot.img is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"j5ylte")
clear
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting j5ylte kernel build..."
QS_VARIANT=j5ylte
QS_DEFCON=quasar_msm8916_j5ylte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "j5ylte kernel build finished."
echo "boot.img is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"J5 2016 (build all)")
clear
echo "----------------------------------------------"
echo "Starting build for all the J5 2016 variants."
echo "Please be patient..."
# j5x3g
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting j5x3g kernel build..."
QS_VARIANT=j5x3g
QS_DEFCON=quasar_msm8916_j5x3g_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "j5x3g kernel build finished."
# j5xlte
echo "----------------------------------------------"
echo "Preparing for next build..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting j5xlte kernel build..."
QS_VARIANT=j5xlte
QS_DEFCON=quasar_msm8916_j5xlte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "j5xlte kernel build finished."
PACK_J56_ZIP
echo " "
echo "----------------------------------------------"
echo "J5 2016 kernels build finished."
echo "Flashable zip is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"j5x3g")
clear
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting j5x3g kernel build..."
QS_VARIANT=j5x3g
QS_DEFCON=quasar_msm8916_j5x3g_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "j5x3g kernel build finished."
echo "boot.img is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"j5xlte")
clear
echo "----------------------------------------------"
echo "Cleaning up source..."
echo " "
CLEAN_SOURCE
echo " "
echo "----------------------------------------------"
echo "Starting j5xlte kernel build..."
QS_VARIANT=j5xlte
QS_DEFCON=quasar_msm8916_j5xlte_defconfig
BUILD_ZIMAGE
BUILD_DTB
PACK_VARIANT_IMG
echo " "
echo "----------------------------------------------"
echo "j5xlte kernel build finished."
echo "boot.img is located into quasar/build."
echo "Press any key for end the script."
echo "----------------------------------------------"
read -n1 -r key
break
;;
"Exit")
break
;;
*) echo Invalid option.;;
esac
done