From 5a7a0c6c968f34beb3453a0d1d7fa3f4094ada9b Mon Sep 17 00:00:00 2001 From: Coelacanthus Date: Thu, 28 Jul 2022 21:30:04 +0800 Subject: [PATCH] feat(mkimg): check before git and update git every time Signed-off-by: Coelacanthus --- mkimg.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mkimg.sh b/mkimg.sh index e0271f6..842fd38 100755 --- a/mkimg.sh +++ b/mkimg.sh @@ -29,8 +29,10 @@ use-fixed-password() { msg "Building u-boot..." -git clone https://github.com/u-boot/u-boot.git +[[ -d u-boot ]] || git clone https://github.com/u-boot/u-boot.git pushd u-boot +git checkout master -- +git pull --rebase git checkout v2022.07 msg2 "Apply binutils 2.38 compitible patch" git apply ../0001-riscv-fix-compitible-with-binutils-2.38.patch @@ -42,8 +44,10 @@ popd msg "Building OpenSBI..." -git clone https://github.com/riscv-software-src/opensbi +[[ -d opensbi ]] || git clone https://github.com/riscv-software-src/opensbi pushd opensbi +git pull --rebase +git checkout master -- git checkout v1.0 msg2 "Apply binutils 2.38 compitible patch" git cherry-pick -n 5d53b55aa77ffeefd4012445dfa6ad3535e1ff2c