PrawnOS-nonfree/scripts/BuildScripts/KernelScripts/patchKernel.sh

30 lines
466 B
Bash
Raw Normal View History

#!/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
if [ -z "$2" ]
then
echo "No patches directory"
exit 1
fi
if [ -z "$3" ]
then
echo "No build directory supplied"
exit 1
fi
2019-02-27 20:20:11 +01:00
KVER=$1
PATCHES=$2
BUILD_DIR=$3
2019-02-27 20:20:11 +01:00
cd $BUILD_DIR
2019-02-27 20:20:11 +01:00
make mrproper
#Apply the usb and mmc patches
for i in "$PATCHES"/DTS/*.patch; do echo $i; patch -p1 < $i; done
for i in "$PATCHES"/kernel/*.patch; do echo $i; patch -p1 < $i; done