mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Update common.sh
This commit is contained in:
39
common.sh
39
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
|
||||
|
||||
Reference in New Issue
Block a user