-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.sh
executable file
·57 lines (57 loc) · 1.32 KB
/
make.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
#!/bin/bash
bash submodules.sh
# Avoid treating warnings as errors
export CFLAGS="-Wno-error"
export CXXFLAGS="-Wno-error"
export ARCH=arm
main_menu() {
PS3='Please enter your choice: '
options=("Moto E5 Plus XT1924-7" "Moto E5 Plus XT1924-5" "Moto E5 Play XT1924-4" "Moto G6 Play (jeter)" "Moto G6 Play (aljeter)" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Moto E5 Plus XT1924-7")
make hannah_defconfig
break
;;
"Moto E5 Plus XT1924-5")
make nora_defconfig
break
;;
"Moto E5 Play XT1924-4")
make james_defconfig
complile
break
;;
"Moto G6 Play (jeter)")
make jeter_defconfig
compile
break
;;
"Moto G6 Play (aljeter)")
make aljeter_defconfig
compile
break
;;
"Quit")
break
;;
*) echo "invalid option $REPLY";;
esac
done
}
compile() {
make \
ARCH=arm \
CROSS_COMPILE=../gcc-linaro-7.1.1/bin/arm-linux-gnueabihf-
}
make_zip() {
cp arch/arm/boot/zImage AnyKernel2/
# cp arch/arm/boot/dt.img AnyKernel2/dtb
# scripts/dtbTool -s 2048 -o arch/arm/boot/dt.img -p scripts/dtc/ arch/arm/boot/dts/qcom/
cd AnyKernel2/ && zip ../lsm-anykernel.zip $(ls) -r &>/dev/null
echo "Installer zip created @ 'lsm-anykernel.zip'!"
}
main_menu
compile
make_zip