forked from psndna88/AGNi_pureMIUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_kernel.sh
executable file
·122 lines (117 loc) · 3.84 KB
/
build_kernel.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
#!/bin/sh
export CROSS_COMPILE=/home/sleepy/android/toolchains/gcc-arm-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
export CROSS_COMPILE_ARM32=/home/sleepy/android/toolchains/gcc-arm-9.2-2019.12-x86_64-arm-none-eabi/bin/arm-none-eabi-
COUT="/mnt/kernels/AGNi_pureMIUI/COMPILED_OUT"
KERNELDIR=/mnt/kernels/AGNi_pureMIUI/
export COUT="/mnt/kernels/AGNi_pureMIUI/COMPILED_OUT"
export COMPILEDIR="/mnt/kernels/AGNi_pureMIUI/COMPILED_OUT"
if [ -f /mnt/kernels/AGNi_pureMIUI/AGNi_stamp.sh ]; then
. /mnt/kernels/AGNi_pureMIUI/AGNi_stamp.sh
fi
chmod +x $KERNELDIR/AGNi_version.sh
chmod +x $KERNELDIR/cleanconfig.sh
chmod +x $KERNELDIR/cleanbuild.sh
chmod +x $KERNELDIR/menuconfig.sh
chmod +x $KERNELDIR/scripts/agni/*
HORIZONTALLINE="-----------------------------------------------------------------------"
clear
echo "\n$HORIZONTALLINE"
echo " AGNi kernel by psndna88 !!!"
echo $HORIZONTALLINE
echo " 1: Build All Devices"
echo " 2: Build whyred - Redmi Note 5 Pro"
echo " 3: Build tulip - Redmi Note 6 Pro"
echo " 4: Build lavender - Redmi Note 7"
echo " 5: Build wayne - MI 6X"
echo " 6: Build jasmine - MI A2"
echo " "
echo " 0: X Exit Compilation X"
echo "\n$HORIZONTALLINE"
read -p " Select what to build : " choice
if [ $choice -eq 1 ]; then
#### ALL Devices
echo $HORIZONTALLINE
echo " BATCH MODE: Building AGNi whyred variant..."
./scripts/agni/build_kernel_whyred.sh || exit 1
echo " "
echo " BATCH MODE: Built AGNi whyred variant!!!"
echo $HORIZONTALLINE
echo " "
echo $HORIZONTALLINE
echo " BATCH MODE: Building AGNi tulip variant..."
./scripts/agni/build_kernel_tulip.sh || exit 1
echo " "
echo " BATCH MODE: Built AGNi tulip variant!!!"
echo $HORIZONTALLINE
echo " "
echo $HORIZONTALLINE
echo " BATCH MODE: Building AGNi lavender variant..."
./scripts/agni/build_kernel_lavender.sh || exit 1
echo " "
echo " BATCH MODE: Built AGNi lavender variant!!!"
echo $HORIZONTALLINE
echo " "
echo $HORIZONTALLINE
echo " BATCH MODE: Building AGNi wayne variant..."
./scripts/agni/build_kernel_wayne.sh || exit 1
echo " "
echo " BATCH MODE: Built AGNi wayne variant!!!"
echo $HORIZONTALLINE
echo " "
echo " BATCH MODE: Building AGNi jasmine variant..."
./scripts/agni/build_kernel_jasmine.sh || exit 1
echo " "
echo " BATCH MODE: Built AGNi jasmine variant!!!"
echo $HORIZONTALLINE
echo " "
elif [ $choice -eq 2 ]; then
#### WHYRED
echo $HORIZONTALLINE
echo " BATCH MODE: Building AGNi whyred variant..."
./scripts/agni/build_kernel_whyred.sh || exit 1
echo " "
echo " BATCH MODE: Built AGNi whyred variant!!!"
echo $HORIZONTALLINE
echo " "
elif [ $choice -eq 3 ]; then
#### TULIP
echo $HORIZONTALLINE
echo " BATCH MODE: Building AGNi tulip variant..."
./scripts/agni/build_kernel_tulip.sh || exit 1
echo " "
echo " BATCH MODE: Built AGNi tulip variant!!!"
echo $HORIZONTALLINE
echo " "
elif [ $choice -eq 4 ]; then
#### LAVENDER
echo $HORIZONTALLINE
echo " BATCH MODE: Building AGNi lavender variant..."
./scripts/agni/build_kernel_lavender.sh || exit 1
echo " "
echo " BATCH MODE: Built AGNi lavender variant!!!"
echo $HORIZONTALLINE
echo " "
elif [ $choice -eq 5 ]; then
#### WAYNE
echo $HORIZONTALLINE
echo " BATCH MODE: Building AGNi wayne variant..."
./scripts/agni/build_kernel_wayne.sh || exit 1
echo " "
echo " BATCH MODE: Built AGNi wayne variant!!!"
echo $HORIZONTALLINE
echo " "
elif [ $choice -eq 6 ]; then
#### JASMINE
echo $HORIZONTALLINE
echo " "
echo " BATCH MODE: Building AGNi jasmine variant..."
./scripts/agni/build_kernel_jasmine.sh || exit 1
echo " "
echo " BATCH MODE: Built AGNi jasmine variant!!!"
echo $HORIZONTALLINE
echo " "
elif [ $choice -eq 0 ]; then
exit
else
echo -e "\n====> Enter corrent input <===="
fi