2020-05-09 11:00:02 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -x
|
|
|
|
set -e
|
2019-02-27 20:20:11 +01:00
|
|
|
|
|
|
|
if [ -z "$1" ]
|
|
|
|
then
|
|
|
|
echo "No kernel version supplied"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
KVER=$1
|
|
|
|
|
2020-05-20 20:00:00 +02:00
|
|
|
ROOT_DIR="$(pwd)"
|
2019-02-27 20:20:11 +01:00
|
|
|
RESOURCES=$ROOT_DIR/resources/BuildResources
|
|
|
|
|
|
|
|
|
|
|
|
[ ! -d build ] && mkdir build
|
|
|
|
cd build
|
|
|
|
# build Linux-libre, with ath9k_htc
|
|
|
|
cd linux-$KVER
|
|
|
|
make clean
|
|
|
|
make mrproper
|
2020-05-20 22:32:43 +02:00
|
|
|
#Apply the usb and mmc patches if unapplied
|
|
|
|
for i in "$RESOURCES"/patches-tested/DTS/*.patch; do patch -p1 < $i; done
|
|
|
|
for i in "$RESOURCES"/patches-tested/kernel/*.patch; do patch -p1 < $i; done
|
2019-02-27 20:20:11 +01:00
|
|
|
|
|
|
|
cd $ROOT_DIR
|