Created
September 22, 2012 05:32
-
-
Save playfulgod/3765239 to your computer and use it in GitHub Desktop.
kernel build script
This file contains hidden or 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 | |
# Our settings | |
#Let's make sure the environment is clean and ready to compile the kernel | |
echo | |
echo "Cleaning house!!" | |
echo | |
make mrproper | |
rm -rf ../package/system/lib/modules/*.ko | |
rm -f ../package/zImage | |
rm -f ../package/ramdisk.gz | |
echo | |
echo "House cleaned, lets build a kernel!!!" | |
echo | |
# | |
# Lets set the kernel defconfig | |
echo "defconfig = plague_defconfig" | |
echo | |
make ARCH=arm darkxshadows_defconfig | |
# | |
# Let's build a kernel | |
echo | |
echo "Now compiling kernel, go get a soda! ;)" | |
echo | |
ARCH=arm CROSS_COMPILE=~/Android/CM10/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- make -j16 | |
# | |
if [ -f arch/arm/boot/zImage ]; then | |
echo | |
echo "Plague has been compiled!!! You can find it in arch/arm/boot/zImage" | |
echo | |
else | |
echo | |
echo "Kernel did not compile, please check for errors!!" | |
echo | |
fi | |
# These move files to easier locations | |
find -name '*.ko' -exec cp -av {} ../package/system/lib/modules/ \; | |
cp arch/arm/boot/zImage ../package/ | |
# This part packs the img up :) | |
#../package/mkbootfs ../package/ramdisk_tmp | gzip > ../package/ramdisk.gz | |
#../package/mkbootimg --kernel ../package/zImage --ramdisk ../package/ramdisk.gz --cmdline "vmalloc=450M, console=ttyDCC0,115200,n8 androidboot.hardware=qcom" -o ../package/boot.img --base 0x40200000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment