-
Notifications
You must be signed in to change notification settings - Fork 0
/
rafCompile.sh
executable file
·48 lines (36 loc) · 1.47 KB
/
rafCompile.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
#!/bin/bash
VERSIONS="1r9 2r0"
for VERSION in `echo $VERSIONS`
do
RAFDIR=kernel_rafpigna_${VERSION}_GB
KERNEL=$PWD/$RAFDIR/boot/zImage
INITRD=/data/android/leo/CM/source/out/target/product/leo/ramdisk.img
DATE=`date +%Y%m%d`
rm -rf $RAFDIR
mkdir $RAFDIR
cd $RAFDIR
unzip ../$RAFDIR.zip >/dev/null 2>&1
cd - >/dev/null 2>&1
# cLK
mkbootimg --kernel $KERNEL --ramdisk $INITRD --cmdline "console=null" --base 0x11800000 -o cLK/boot.img
mkdir -p cLK/system/lib/modules
rm -rf cLK/system/lib/modules/*
cp $RAFDIR/system/lib/modules/* cLK/system/lib/modules/.
rm -rf rafpigna_${VERSION}_charan_clk_${DATE}.zip
cd cLK
zip -9Dr ../rafpigna_${VERSION}_charan_clk_${DATE}.zip * >/dev/null 2>&1
cd - >/dev/null 2>&1
# magldr
mkdir -p magldr/system/lib/modules
mkdir -p magldr/boot
rm -rf magldr/system/lib/modules/*
cp $RAFDIR/system/lib/modules/* magldr/system/lib/modules/.
cp $RAFDIR/boot/zImage magldr/boot/.
rm -rf rafpigna_${VERSION}_charan_magldr_${DATE}.zip
cd magldr
zip -9Dr ../rafpigna_${VERSION}${RELEASE}_charan_magldr_${DATE}.zip * >/dev/null 2>&1
cd - >/dev/null 2>&1
scp rafpigna_${VERSION}_charan_magldr_${DATE}.zip rafpigna_${VERSION}_charan_clk_${DATE}.zip arif-ali.co.uk:cmleonightly/kernels/.
ssh arif-ali.co.uk "cd cmleonightly/kernels ; ln -sf rafpigna_${VERSION}_charan_magldr_${DATE}.zip rafpigna_${VERSION}_charan_magldr_latest.zip"
ssh arif-ali.co.uk "cd cmleonightly/kernels ; ln -sf rafpigna_${VERSION}_charan_clk_${DATE}.zip rafpigna_${VERSION}_charan_clk_latest.zip"
done