Created
October 19, 2011 14:10
-
-
Save cmhtcleo/1298396 to your computer and use it in GitHub Desktop.
tytung kernel patch script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VERSIONS="r11 r12 r12.4" | |
RELEASE= | |
for VERSION in `echo $VERSIONS` ; do | |
if [[ "$VERSION" == "r12.4" ]] ; then | |
RELEASE=_v3 | |
fi | |
TYTDIR=kernel_tytung_${VERSION}_update${RELEASE} | |
KERNEL=$PWD/$TYTDIR/boot/zImage | |
INITRD=/data/android/leo/CM/source/out/target/product/leo/ramdisk.img | |
DATE=`date +%Y%m%d` | |
rm -rf $TYTDIR | |
mkdir $TYTDIR | |
cd $TYTDIR | |
unzip ../$TYTDIR.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 $TYTDIR/system/lib/modules/* cLK/system/lib/modules/. | |
rm -rf tytung_${VERSION}_charan_clk_${DATE}.zip | |
cd cLK | |
zip -9Dr ../tytung_${VERSION}${RELEASE}_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 $TYTDIR/system/lib/modules/* magldr/system/lib/modules/. | |
cp $TYTDIR/boot/zImage magldr/boot/. | |
rm -rf tytung_${VERSION}_charan_magldr_${DATE}.zip | |
cd magldr | |
zip -9Dr ../tytung_${VERSION}${RELEASE}_charan_magldr_${DATE}.zip * > /dev/null 2>&1 | |
cd - > /dev/null 2>&1 | |
scp tytung_${VERSION}${RELEASE}_charan_magldr_${DATE}.zip tytung_${VERSION}${RELEASE}_charan_clk_${DATE}.zip arif-ali.co.uk:cmleonightly/kernels/. | |
ssh arif-ali.co.uk "cd cmleonightly/kernels ; ln -sf tytung_${VERSION}${RELEASE}_charan_magldr_${DATE}.zip tytung_${VERSION}${RELEASE}_charan_magldr_latest.zip" | |
ssh arif-ali.co.uk "cd cmleonightly/kernels ; ln -sf tytung_${VERSION}${RELEASE}_charan_clk_${DATE}.zip tytung_${VERSION}${RELEASE}_charan_clk_latest.zip" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment