From 9a64bf0a7cf43aaf518a3569e6e6b133d5bc5569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Pe=C4=8Dovnik?= Date: Fri, 17 Oct 2014 16:33:06 +0200 Subject: [PATCH] Update common.sh --- common.sh | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/common.sh b/common.sh index 4448e9e50..3bbc91f9f 100644 --- a/common.sh +++ b/common.sh @@ -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