Created
April 6, 2012 16:49
-
-
Save theterg/2321261 to your computer and use it in GitHub Desktop.
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 | |
export ARCH=arm | |
#export CROSS_COMPILE=arm-angstrom-linux-gnueabi- | |
export CROSS_COMPILE=arm-linux-gnueabi- | |
unset CPATH | |
echo "Nuking output directory" | |
rm -rf install/lib | |
rm install/boot/* | |
set -e | |
echo "Kernel build ho" | |
make -j 9 uImage modules | |
make INSTALL_MOD_PATH=install modules_install > out.txt | |
VERS=`grep DEPMOD out.txt | cut -d " " -f 5` | |
cp arch/arm/boot/uImage install/boot/uImage-$VERS | |
cd install | |
tar cvf ../kernel.tar.gz lib/ boot/ | |
if [[ "$1" != "" ]] ; then | |
cd ../ | |
echo "Deploying Kernel" | |
cp kernel.tar.gz "$1kernel.tar.gz" | |
cd "$1" | |
sudo tar xvf kernel.tar.gz | |
cd boot | |
rm uImage | |
ln -s uImage-$VERS uImage | |
cd / | |
umount "$1" | |
fi | |
echo "Success!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment