patchKernel.sh 490 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. set -x
  3. set -e
  4. if [ -z "$1" ]
  5. then
  6. echo "No kernel version supplied"
  7. exit 1
  8. fi
  9. KVER=$1
  10. ROOT_DIR=`pwd`
  11. RESOURCES=$ROOT_DIR/resources/BuildResources
  12. [ ! -d build ] && mkdir build
  13. cd build
  14. # build Linux-libre, with ath9k_htc
  15. cd linux-$KVER
  16. make clean
  17. make mrproper
  18. #Apply the usb and mmc patches if unapplie
  19. for i in $RESOURCES/patches-tested/DTS/*.patch; do patch -p1 < $i; done
  20. for i in $RESOURCES/patches-tested/kernel/*.patch; do patch -p1 < $i; done
  21. cd $ROOT_DIR