feat(mkimg): check before git and update git every time

Signed-off-by: Coelacanthus <coelacanthus@outlook.com>
This commit is contained in:
Coelacanthus 2022-07-28 21:30:04 +08:00
parent e0ff416204
commit 5a7a0c6c96
No known key found for this signature in database
GPG key ID: E35C89E45867AE35

View file

@ -29,8 +29,10 @@ use-fixed-password() {
msg "Building u-boot..." 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 pushd u-boot
git checkout master --
git pull --rebase
git checkout v2022.07 git checkout v2022.07
msg2 "Apply binutils 2.38 compitible patch" msg2 "Apply binutils 2.38 compitible patch"
git apply ../0001-riscv-fix-compitible-with-binutils-2.38.patch git apply ../0001-riscv-fix-compitible-with-binutils-2.38.patch
@ -42,8 +44,10 @@ popd
msg "Building OpenSBI..." 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 pushd opensbi
git pull --rebase
git checkout master --
git checkout v1.0 git checkout v1.0
msg2 "Apply binutils 2.38 compitible patch" msg2 "Apply binutils 2.38 compitible patch"
git cherry-pick -n 5d53b55aa77ffeefd4012445dfa6ad3535e1ff2c git cherry-pick -n 5d53b55aa77ffeefd4012445dfa6ad3535e1ff2c