Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new options to handle mirror selection better #3325

Merged
merged 3 commits into from
Dec 8, 2021
Merged

Add new options to handle mirror selection better #3325

merged 3 commits into from
Dec 8, 2021

Conversation

RadxaYuntian
Copy link
Collaborator

@RadxaYuntian RadxaYuntian commented Dec 7, 2021

Description

Add new option UBOOT_MIRROR to select different mirror for U-Boot, similar to MAINLINE_MIRROR option. Added mainly to support a new Chinese mirror to speed up download.

  • 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.

Additionally GITHUB_MIRROR option allows users to choose from fastgit, gitclone, and cnpmjs as their GitHub speed-up option.

Finally REGIONAL_MIRROR for Chinese user to set 4 mirror options at once. If user explicitly specifies a mirror then that one will be used instead.

How Has This Been Tested?

./compile.sh docker BOARD=radxa-zero BRANCH=current RELEASE=bullseye BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no DOWNLOAD_MIRROR=china MAINLINE_MIRROR=tuna UBOOT_MIRROR=gitee GITHUB_MIRROR=fastgit followed by:

./compile.sh docker BOARD=radxa-zero BRANCH=current RELEASE=bullseye BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no REGIONAL_MIRROR=china

Both completes without error.

 - 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`.
@igorpecovnik
Copy link
Member

Thanks!

@RadxaYuntian
Copy link
Collaborator Author

Yeah I checked those build options before coming up my own. Currently with my GitHub mirror option my build command is ./compile.sh docker BOARD=radxa-zero BRANCH=current RELEASE=bullseye BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no DOWNLOAD_MIRROR=china MAINLINE_MIRROR=tuna UBOOT_MIRROR=gitee GITHUB_MIRROR=fastgit which is ungodly long.

By "solved globally", do you mean to have another option like REGIONAL_MIRROR with global and china to automatically apply all those mirror related options?

As for #2268 it should be fixed by #2703:

MAINLINE_FIRMWARE_SOURCE='https://mirrors.tuna.tsinghua.edu.cn/git/linux-firmware.git'

@igorpecovnik
Copy link
Member

igorpecovnik commented Dec 8, 2021

By "solved globally", do you mean to have another option like REGIONAL_MIRROR with global and china to automatically apply all those mirror related options?

We have kernel, u-boot, firmware, rootfs cache mirrors that are (will be) tied to region (or China in particular). There are many way, even full automatic selection but IMO we don't need to go that far. Perhaps if choosing "china" it sets all above to their correct mirrors. Not each one separate. That.

@RadxaYuntian
Copy link
Collaborator Author

Alright. I'll still keep the individual options in case some mirror fails though (had one GitHub mirror out of quota this morning).

@igorpecovnik
Copy link
Member

OK, fair point.

Then just add this option to the docs and we are ready to merge.

@RadxaYuntian
Copy link
Collaborator Author

You want to merge now or wait for me to get the GitHub mirror and that global option implemented to merge together?

@igorpecovnik
Copy link
Member

You want to merge now or wait for me to get the GitHub mirror and that global option implemented to merge together?

I'll wait.

Usage similar to UBOOT_MIRROR.
Chinese users (the main user of mirror options) can have use this one instead of configure many different options.
@RadxaYuntian RadxaYuntian changed the title Add new option UBOOT_MIRROR to select mainline U-Boot mirror Add new options to handle mirror selection better Dec 8, 2021
@RadxaYuntian
Copy link
Collaborator Author

@igorpecovnik ready for review

Copy link
Member

@igorpecovnik igorpecovnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

igorpecovnik pushed a commit to armbian/documentation that referenced this pull request Dec 8, 2021
@igorpecovnik igorpecovnik merged commit fe9c032 into armbian:master Dec 8, 2021
useful64 pushed a commit to useful64/build that referenced this pull request Feb 4, 2022
* 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.
useful64 pushed a commit to useful64/build that referenced this pull request Feb 4, 2022
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants