From e47bd270af08e72d70010c84bb728cfb29851aaf Mon Sep 17 00:00:00 2001 From: Celeste Liu Date: Mon, 10 Jul 2023 18:44:38 +0800 Subject: [PATCH] refactor(mkimg): use global variable to specify firmware version Signed-off-by: Celeste Liu --- mkimg | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mkimg b/mkimg index 53c838d..1463507 100755 --- a/mkimg +++ b/mkimg @@ -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