diff --git a/README.md b/README.md index 5b2b67a..9754961 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,12 @@ https://github.com/hyphop/khadas-linux-kernel ./make_kernel_mainline_vimsX ./make_kernel_mainline_vimsX_modules +## Deps + ++ flex bc + + apt-get install flex bc + ## Configs [configs](configs) diff --git a/scripts/auto_krescue_amlrock b/scripts/auto_krescue_amlrock index d6b3fe1..1642776 100755 --- a/scripts/auto_krescue_amlrock +++ b/scripts/auto_krescue_amlrock @@ -12,9 +12,14 @@ export LINUX_VER=linux-5.7 ./$kernel_prepare +CHK=1 ./patch_ || { + ./patch_ ../patches/$LINUX_VER/*.patch || exit 1 ./patch_ ../patches/linux-krescue/*.patch || exit 1 +LAST=1 ./patch_ +} + ./make_kernel_mainline_vimsX -n ./kernel_config ../files/configs/mmc_m ./kernel_config ../files/configs/eth2_y diff --git a/scripts/patch_ b/scripts/patch_ index cad4cd3..211659a 100755 --- a/scripts/patch_ +++ b/scripts/patch_ @@ -27,7 +27,15 @@ done echo "[i] patch dir $DIR">&2 +[ "$CHK" ] && [ -s $DIR/.patched ] && { + echo "[i] patched already $(cat "$DIR/.patched")">&2 + exit 0 +} + for p in $@; do echo "[i] patch $p">&2 patch -d $DIR -p1 < $p done + + +[ "$LAST" ] && echo $(date) > $DIR/.patched