forked from LineageOS/android_kernel_samsung_jf
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sh
executable file
·75 lines (62 loc) · 1.17 KB
/
build.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
VERSION_NUMBER=3.0
build()
{
echo "Copying toolchain..."
cp -r ../tc/* android-toolchain
#Build pure zImage
export CROSS_COMPILE=android-toolchain/bin/arm-eabi-
export ARCH=arm
make side_jf_defconfig
make -j4
PRODUCTIMAGE="arch/arm/boot/zImage"
if [ ! -f "$PRODUCTIMAGE" ]; then
echo "build failed"
exit 0;
fi
cp -r arch/arm/boot/zImage REPACKING/zImage
cd REPACKING
./repack.sh
cd ..
cp -r REPACKING/boot.img OUT/boot.img
#Repacking
cd OUT
FILENAME=SideCore-SGS4-NOUGAT-${VERSION_NUMBER}-`date +"[%H-%M][%d-%m-%y]"`.zip
zip -r $FILENAME .;
cd ..
}
deep_clean()
{
rm -rf OUT/boot.img
rm -rf OUT/*.zip
rm -rf REPACKING/boot.img
rm -rf REPACKING/zImage
rm -rf REPACKING/ramdisk.gz
rm -rf android-toolchain/*
echo "Distro cleaning"
make ARCH=arm mrproper;
make clean;
ccache -c
ccache -C
}
rerun()
{
bash build.sh;
}
echo ""
echo ""
echo "SideCore kernel for jflte LineageOS ROMs"
echo "1) Clean Workspace"
echo "2) Build kernel"
echo "3) Exit"
echo ""
read -p "Please select an option " prompt
echo ""
if [ $prompt == "1" ]; then
deep_clean;
rerun;
elif [ $prompt == "2" ]; then
build;
rerun;
elif [ $prompt == "3" ]; then
exit;
fi