Update common.sh

This commit is contained in:
Igor Pečovnik
2014-10-17 16:33:06 +02:00
parent f6f6d46e6c
commit 9a64bf0a7c

View File

@@ -47,31 +47,36 @@ cd $DEST/$LINUXSOURCE
# sunxi
if [[ $LINUXSOURCE == "linux-sunxi" ]] ; then
# if the source is already patched for banana, do reverse GMAC patch
if [ -z "$(cat arch/arm/kernel/setup.c | grep BANANAPI)" ]; then
patch --batch -t -p1 < $SRC/lib/patch/bananagmac.patch
fi
if [ -z "$(patch --dry-run -t -p1 < $SRC/lib/patch/gpio.patch | grep previ)" ]; then
patch --batch -f -p1 < $SRC/lib/patch/gpio.patch
fi
if [ -z "$(patch --dry-run -t -p1 < $SRC/lib/patch/spi.patch | grep previ)" ]; then
patch --batch -f -p1 < $SRC/lib/patch/spi.patch
fi
if [[ $BOARD == "bananapi" ]] ; then
if [ -z "$(patch --dry-run -t -p1 < $SRC/lib/patch/bananagmac.patch | grep previ)" ]; then
patch --batch -N -p1 < $SRC/lib/patch/bananagmac.patch
fi
fi
# compile sunxi tools
compile_sunxi_tools
if [ -n "$(cat arch/arm/kernel/setup.c | grep BANANAPI)" ]; then
echo "Reversing Banana patch"
patch --batch -t -p1 < $SRC/lib/patch/bananagmac.patch
fi
#
if [ -n "$(patch --dry-run -t -p1 < $SRC/lib/patch/gpio.patch | grep previ)" ]; then
patch --batch -f -p1 < $SRC/lib/patch/gpio.patch
fi
#
if [ -n "$(patch --dry-run -t -p1 < $SRC/lib/patch/spi.patch | grep previ)" ]; then
patch --batch -f -p1 < $SRC/lib/patch/spi.patch
fi
#
if [[ $BOARD == "bananapi" ]] ; then
if [ -n "$(patch --dry-run -t -p1 < $SRC/lib/patch/bananagmac.patch | grep previ)" ]; then
patch --batch -N -p1 < $SRC/lib/patch/bananagmac.patch
fi
fi
# compile sunxi tools
compile_sunxi_tools
fi
# cubox / hummingboard
if [[ $LINUXSOURCE == "linux-cubox-next" ]] ; then
if [ -z "$(patch --dry-run -t -p1 < $SRC/lib/patch/hb-i2c-spi.patch | grep previ)" ]; then
if [ -n "$(patch --dry-run -t -p1 < $SRC/lib/patch/hb-i2c-spi.patch | grep previ)" ]; then
patch -p1 < $SRC/lib/patch/hb-i2c-spi.patch
fi
fi
}
compile_uboot (){
#--------------------------------------------------------------------------------------------------------------------------------
# Compile uboot