summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2017-11-13 15:03:32 +0000
committerLeif Lindholm <leif.lindholm@linaro.org>2017-11-13 15:03:32 +0000
commit20328aaff31ba47f4b7df1b762e3f36ad6fa4f1e (patch)
tree52967d61c1e5d25cee9a339821d24c9b833856e6
parente9589ed56ce861fb284be2be9acce38ab7579b34 (diff)
build.sh: add support for overlaying patches
Look for patches in patches/<repo> and apply them before building. Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
-rwxr-xr-xbuild.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index 9accaff..be38313 100755
--- a/build.sh
+++ b/build.sh
@@ -90,6 +90,23 @@ get_repo()
fi
}
+patch_repo()
+{
+ PATCH_DIR="$PWD/patches"
+ TARGET_DIR="$PWD/$1"
+ if [ ! -d "patches/$1" ]; then
+ return
+ fi
+
+ echo "Patching '$1'"
+ cd $TARGET_DIR
+ for file in "$PATCH_DIR"/"$1"/*.patch; do
+ echo git am --keep-cr $file
+ git am --keep-cr $file
+ done
+ cd -
+}
+
build_all()
{
echo ./uefi-tools/edk2-build.sh $BUILD_OPTIONS all
@@ -140,6 +157,7 @@ for repo in arm-trusted-firmware edk2 edk2-platforms edk2-non-osi uefi-tools
do
echo "$repo"
get_repo $repo
+ patch_repo $repo
done
rm -rf Build