From 0aeb69b5ad276f4ca466e8a9aff203f004e32bf7 Mon Sep 17 00:00:00 2001 From: Alper Nebi Yasak Date: Thu, 25 Aug 2022 20:26:44 +0300 Subject: download/u-boot: Use GitHub mirror as fallback The coreboot download script uses GitHub as a fallback if the upstream coreboot is unavailable, use a similar fallback for U-Boot as well. Signed-off-by: Alper Nebi Yasak --- resources/scripts/download/u-boot | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/scripts/download/u-boot b/resources/scripts/download/u-boot index ecd35adc..4e5a77c0 100755 --- a/resources/scripts/download/u-boot +++ b/resources/scripts/download/u-boot @@ -124,6 +124,12 @@ downloadfor() { git clone https://source.denx.de/u-boot/u-boot.git \ "${uboot_dir}" || \ rm -Rf "${uboot_dir}" + if [ ! -d "${uboot_dir}" ]; then + printf "WARNING: Upstream failed. Trying backup github repository:\n" + git clone https://github.com/u-boot/u-boot.git \ + "${uboot_dir}" || \ + rm -Rf coreboot + fi if [ ! -d "${uboot_dir}" ]; then printf \ "ERROR: %s: Problem with git-clone. Network issue?\n" \ -- cgit v1.2.1