Add new options to handle mirror selection better (#3325)

* Add new option UBOOT_MIRROR to select mainline U-Boot mirror

 - set to `github` to use mirror provided by GitHub, the same as `USE_GITHUB_UBOOT_MIRROR=yes`.
 - set to `gitee` to use mirror provided by Gitee, a Chinese git service.
 - leave it unset to use offical `source.denx.de`.

* Add GITHUB_MIRROR option

Usage similar to UBOOT_MIRROR.

* Add REGIONAL_MIRROR option

Chinese users (the main user of mirror options) can have use this one instead of configure many different options.
This commit is contained in:
RadxaYuntian
2021-12-08 23:15:26 +08:00
committed by GitHub
parent e3674b0a83
commit fe9c032aac
2 changed files with 46 additions and 5 deletions

View File

@@ -425,6 +425,9 @@ fetch_from_repo()
local ref=$3
local ref_subdir=$4
# Set GitHub mirror before anything else touches $url
url=${url//'https://github.com/'/$GITHUB_SOURCE}
if [ "$dir" == "linux-mainline" ] && [[ "$LINUXFAMILY" == sunxi* ]]; then
unset LINUXSOURCEDIR
LINUXSOURCEDIR="linux-mainline/$KERNEL_VERSION_LEVEL"