-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-pyramid
executable file
·49 lines (38 loc) · 1.17 KB
/
build-pyramid
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
#!/bin/bash
# Script to build for the htc pyramid and zip the package.
# Written by vorbeth
# Installer script by showp1984
CCOMPILER=~/android/OpenSensation/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
TYPE=stock
CONFIG=aosp_pyramid_defconfig
cleanup()
{
if [ -e ./releasetools/system/lib/modules ]; then
rm -f ./releasetools/system/lib/modules/*
fi
if [ -e ./releasetools/kernel/zImage ]; then
rm -f ./releasetools/kernel/zImage
fi
}
if [ -e ~/Desktop/kernel-osp-$TYPE-$(date +%d-%m-%Y).zip ]; then
rm -f ~/Desktop/kernel-osp-$TYPE-$(date +%d-%m-%Y).zip
fi
cleanup
make ARCH=arm CROSS_COMPILE=$CCOMPILER mrproper
make ARCH=arm CROSS_COMPILE=$CCOMPILER $CONFIG
make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
if [ -e ./arch/arm/boot/zImage ]; then
mkdir -p ./releasetools/system/lib/modules
for i in `find ./ -name "*.ko"`; do
cp $i ./releasetools/system/lib/modules/
done
cp ./arch/arm/boot/zImage ./releasetools/kernel/
cd ./releasetools
zip -r ~/Desktop/kernel-osp-$TYPE-$(date +%d-%m-%Y) *
cd ..
cleanup
echo "Finished"
else
cleanup
echo "Failed"
fi