refactor(mkimg): use global variable to specify firmware version

Signed-off-by: Celeste Liu <CoelacanthusHex@gmail.com>
This commit is contained in:
Celeste Liu 2023-07-10 18:44:38 +08:00
parent e1e85f4250
commit e47bd270af
No known key found for this signature in database
GPG key ID: E35C89E45867AE35

11
mkimg
View file

@ -13,6 +13,9 @@ build_firmware=1
varbose_arg=
rootfs="archriscv-$(date --rfc-3339=date).tar.zst"
uboot_version=v2023.4
opensbi_version=v1.2
show_help() {
cat << EOF
Usage: ${0##*/} [-hvfd] [-p PASSWORD] [-r ROOTFS] [FILENAME]
@ -79,10 +82,10 @@ then
pushd u-boot
git checkout HEAD -- ':(top)'
git fetch origin
git checkout v2023.04
git checkout $uboot_version
popd
else
git clone --filter=blob:none -b v2023.04 https://github.com/u-boot/u-boot.git
git clone --filter=blob:none -b $uboot_version https://github.com/u-boot/u-boot.git
fi
pushd u-boot
@ -98,10 +101,10 @@ then
pushd opensbi
git checkout HEAD -- ':(top)'
git fetch origin
git checkout v2023.04
git checkout $opensbi_version
popd
else
git clone --filter=blob:none -b v1.2 https://github.com/riscv-software-src/opensbi
git clone --filter=blob:none -b $opensbi_version https://github.com/riscv-software-src/opensbi
fi
pushd opensbi