forked from CyanogenMod/android_kernel_samsung_crespo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·47 lines (34 loc) · 1.04 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
#!/bin/bash
VERSION="v4"
KERNEL_SRC="/home/iceandfire/apocalypse/samsung-kernel-crespo"
export ARCH=arm
export LOCALVERSION="-Apoc-Talon-v4-NS"
export CROSS_COMPILE="/home/iceandfire/android-toolchain-eabi/bin/arm-eabi-"
cd $KERNEL_SRC
START=$(date +%s)
if [ -e ./releasetools/system/modules ]; then
rm -rf ./releasetools/system/modules
fi
mkdir -p ./releasetools/system/modules
export INSTALL_MOD_PATH=./mod_inst
make modules -j`grep 'processor' /proc/cpuinfo | wc -l`
make modules_install
for i in `find mod_inst -name "*.ko"`; do
cp $i ./releasetools/system/modules/
done
rm -rf ./mod_inst
make -j`grep 'processor' /proc/cpuinfo | wc -l`
cp $KERNEL_SRC/arch/arm/boot/zImage $KERNEL_SRC/releasetools/kernel/
cd $KERNEL_SRC/releasetools
rm -f *.zip
zip -r Apocalypse-TalonNS-$VERSION.zip *
rm $KERNEL_SRC/releasetools/kernel/zImage
cd $KERNEL_SRC
END=$(date +%s)
ELAPSED=$((END - START))
E_MIN=$((ELAPSED / 60))
E_SEC=$((ELAPSED - E_MIN * 60))
printf "Elapsed: "
[ $E_MIN != 0 ] && printf "%d min(s) " $E_MIN
printf "%d sec(s)\n" $E_SEC
echo "Finished."