refactor(mkimg): use global variable to specify firmware version
Signed-off-by: Celeste Liu <CoelacanthusHex@gmail.com>
This commit is contained in:
parent
e1e85f4250
commit
e47bd270af
1 changed files with 7 additions and 4 deletions
11
mkimg
11
mkimg
|
@ -13,6 +13,9 @@ build_firmware=1
|
||||||
varbose_arg=
|
varbose_arg=
|
||||||
rootfs="archriscv-$(date --rfc-3339=date).tar.zst"
|
rootfs="archriscv-$(date --rfc-3339=date).tar.zst"
|
||||||
|
|
||||||
|
uboot_version=v2023.4
|
||||||
|
opensbi_version=v1.2
|
||||||
|
|
||||||
show_help() {
|
show_help() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
Usage: ${0##*/} [-hvfd] [-p PASSWORD] [-r ROOTFS] [FILENAME]
|
Usage: ${0##*/} [-hvfd] [-p PASSWORD] [-r ROOTFS] [FILENAME]
|
||||||
|
@ -79,10 +82,10 @@ then
|
||||||
pushd u-boot
|
pushd u-boot
|
||||||
git checkout HEAD -- ':(top)'
|
git checkout HEAD -- ':(top)'
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git checkout v2023.04
|
git checkout $uboot_version
|
||||||
popd
|
popd
|
||||||
else
|
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
|
fi
|
||||||
pushd u-boot
|
pushd u-boot
|
||||||
|
|
||||||
|
@ -98,10 +101,10 @@ then
|
||||||
pushd opensbi
|
pushd opensbi
|
||||||
git checkout HEAD -- ':(top)'
|
git checkout HEAD -- ':(top)'
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git checkout v2023.04
|
git checkout $opensbi_version
|
||||||
popd
|
popd
|
||||||
else
|
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
|
fi
|
||||||
pushd opensbi
|
pushd opensbi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue