[general] new option MAINLINE_MIRROR to select mainline kernel mirror

- set to `google` to use mirror provided by Google, the same as
     `USE_MAINLINE_GOOGLE_MIRROR=yes`.
 - set to `tuna` to use mirror provided by tsinghua university.
 - leave it unset to use offical `git.kernel.org`.
This commit is contained in:
may 2019-05-10 05:11:52 +08:00
parent 2b584bb5e0
commit 04d484b6b6

View file

@ -43,11 +43,12 @@ fi
[[ $ROOTFS_TYPE == nfs ]] && FIXED_IMAGE_SIZE=64
# used by multiple sources - reduce code duplication
if [[ $USE_MAINLINE_GOOGLE_MIRROR == yes ]]; then
MAINLINE_KERNEL_SOURCE='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
else
MAINLINE_KERNEL_SOURCE='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
fi
[[ $USE_MAINLINE_GOOGLE_MIRROR == yes ]] && MAINLINE_MIRROR=google
case $MAINLINE_MIRROR in
google) MAINLINE_KERNEL_SOURCE='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable' ;;
tuna) MAINLINE_KERNEL_SOURCE='https://mirrors.tuna.tsinghua.edu.cn/git/linux-stable.git' ;;
*) MAINLINE_KERNEL_SOURCE='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git' ;;
esac
MAINLINE_KERNEL_DIR='linux-mainline'
if [[ $USE_GITHUB_UBOOT_MIRROR == yes ]]; then