-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathb.sh
More file actions
executable file
·111 lines (78 loc) · 3.11 KB
/
b.sh
File metadata and controls
executable file
·111 lines (78 loc) · 3.11 KB
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
#!/bin/bash
#
# Init Script
KERNEL_DIR=$PWD
KERNEL="Image.gz"
DTB="trinket.dtb"
KERN_IMG=$KERNEL_DIR/out/arch/arm64/boot/Image.gz
KERN_DTB=$KERNEL_DIR/out/arch/arm64/boot/dts/qcom/trinket.dtb
BUILD_START=$(date +"%s")
BASE_VER="Inception"
KERNEL_VER=v4n3
ANYKERNEL_DIR=/home/dasnikish2109/anykernel
EXPORT_DIR=/home/dasnikish2109/zip
file=$PWD/b.sh
FINAL_ZIP=$BASE_VER-v$KERNEL_VER.zip
# Release
VER="$KERNEL_VER-$(date +"%Y-%m-%d"-%H%M)-"
# Color Code Script
black='\e[0;30m' # Black
red='\e[0;31m' # Red
green='\e[0;32m' # Green
yellow='\e[0;33m' # Yellow
blue='\e[0;34m' # Blue
purple='\e[0;35m' # Purple
cyan='\e[0;36m' # Cyan
white='\e[0;37m' # White
nocol='\033[0m' # Default
# Tweakable Stuff
export ARCH=arm64
export SUBARCH=arm64
export KBUILD_BUILD_USER="Nikish21"
export KBUILD_BUILD_HOST="ndpc"
export CC=/home/dasnikish2109/proton-clang/bin/clang
export CROSS_COMPILE=/home/dasnikish2109/proton-clang/bin/aarch64-linux-gnu-
#COMPILATION SCRIPTS
echo -e "${green}"
echo "--------------------------------------------------------"
echo " Initializing build to compile Ver: $VER "
echo "--------------------------------------------------------"
echo -e "$cyan***********************************************"
echo " Creating Output Directory: out "
echo -e "***********************************************$nocol"
mkdir -p out
echo -e "$cyan***********************************************"
echo " Initialising DEFCONFIG "
echo -e "***********************************************$nocol"
make O=out ARCH=arm64 vendor/ginkgo-perf_defconfig
echo -e "$cyan***********************************************"
echo " Providing The Inception "
echo -e "***********************************************$nocol"
make -j$(nproc --all) O=out ARCH=arm64 \
CC=$CC \
CROSS_COMPILE=$CROSS_COMPILE \
# If compilation was successful
echo -e "$green***********************************************"
echo " Copying Image.gz "
echo -e "***********************************************$nocol"
mv out/arch/arm64/boot/Image.gz $ANYKERNEL_DIR/kernel/
echo -e "$green***********************************************"
echo " Copying dtb "
echo -e "***********************************************$nocol"
mv out/arch/arm64/boot/dts/qcom/trinket.dtb $ANYKERNEL_DIR/dtbs/
echo -e "$green***********************************************"
echo " Copied Successfully "
echo -e "***********************************************$nocol"
echo -e "$green***********************************************"
echo " Making Flashable Zip "
echo -e "***********************************************$nocol"
cd
cd anykernel
echo -e "$green***********************************************"
echo " Copying Final ZIP to flashable files folder "
echo -e "***********************************************$nocol"
# BUILD TIME
BUILD_END=$(date +"%s")
DIFF=$(($BUILD_END - $BUILD_START))
echo -e "$cyan Build completed in $(($DIFF / 60)) minute(s) and $(($DIFF % 60)) seconds.$nocol"
# END