GitLab Account Setup
IoT Yocto is currently hosted on http://www.gitlab.com/mediatek/aiot and is available in two different configurations:
Public configurations are built with packages and recipes that are openly available. This configuration lacks some proprietary features. Furthermore, certain proprietary components, such as
libdram
, are provided in binary-only format. Neuron SDK support is available in the public flavor.Private configurations are functional superset of the public configurations, and requires access to private repositories. In this release, the private image provides these additional features on top of the public configuration:
Xtensa-ANN support on Genio 350
MT7663 proprietary Wi-Fi driver on Genio 350
eFuse writer on all Genio platform
ISP support on Genio 1200
For example, the Linux kernel fork for IoT Yocto is hosted in https://gitlab.com/mediatek/aiot/bsp/linux and you can access it without a GitLab account. However, certain proprietary packages are permission controlled, and require different license agreements. These packages are currently located under the https://gitlab.com/mediatek/aiot/nda namespace. Building these proprietary packages is disabled by default and can be enabled during the build process.
The prebuilt images for both public and private configurations are available in the Download page.
Important
You may skip to Environment Setup if you don’t intend to build the private configuration. However, if you are behind a corporate firewall, we recommend you to check the Redirect SSH to HTTPS Download section to redirect GitLab SSH connections to HTTPS.
If you want to build the private configuration, please continue to read the following sections.
Private Configuration Overview
To access these permission controlled packages and tools, you need to:
Sign up for a GitLab account.
Request access permission from your MediaTek contact window through email.
Generate access tokens for tools such as git to access source code repositories.
Setup GitLab Account
Please visit https://gitlab.com/users/sign_up to create an account if you don’t have one. The GitLab Username and Email are required for permission setup.
Steps
Visit https://gitlab.com/users/sign_up and fill the following information:
Email Please use your company email for registration, e.g. firstname.lastname@your.company.domain if possible.
Username Please choose an username that is similar to your email address, e.g. firstname.lastname or firstname.lastname.company if possible.
Install an 2FA authenticator on your mobile device. The following applications are known to work with gitlab.com:
Android: Google Authenticator
iOS: Google Authenticator, LastPass Authenticator
Check your email inbox and click the validation link in the confirmation email sent from gitlab.com. You might want to check your junk mailbox if you didn’t see it in your inbox.
Login to http://www.gitlab.com/mediatek/aiot with your username and password.
Setup 2FA authenticator according to instructions on the website.
Warning
Unlike login to the website with a browser, you cannot use the login password to fetch source code. Instead, you need to create access tokens and use the token as your git passwords. Please continue to following sections for permission and access token setup.
Apply for Access Permission
Please email your GitLab Username and Email to your MediaTek contact window for account permission setup.
Once the permission has been granted, you should receive a notification email from GitLab.com.
After receiving the notification from GitLab.com or from your MediaTek contact window, you should also be able to visit the following URL to confirm that you’ve been granted permissions to access IoT Yocto repositories:
https://gitlab.com/mediatek/aiot/nda
If you get a login page, a 404 error page or permission error page instead, please notify your MediaTek contact window.
Generate Access Tokens
In order to fetch source code from git repositories via HTTPS protocol, instead of using the login password, you have to create an access tokens and use it as your git password. To create an access token, follow these steps:
Visit https://gitlab.com/-/user_settings/personal_access_tokens, or choose Preference and then select Access Tokens on your GitLab personal page.
In the Personal Access Token section, fill the Token name, and make sure the following check boxes are ticked:
read_api
read_repository
Click the Create personal access token button.
A string representing the access token will be generated. Please store this token in a secure storage, preferably a password manager.
Use your GitLab username and this token as the git HTTPS username and password if prompted in the rest of the steps in this guide.
Note
If you lose your access token, you can always revoke it in the web UI and create a new one. For additional details, please refer to GitLab documentation.
SSH Setup
Some components in IoT Yocto are provided by git over SSH protocol by default. If your would like to use SSH to fetch IoT Yocto, please setup SSH key.
Hint
If your network environment does not support SSH, e.g. behind a corporate firewall, refer to redirect git connection from SSH to HTTPS instead.
Setup SSH Key
To fetch git repositories via SSH in gitlab.com, you need to visit https://gitlab.com/-/user_settings/ssh_keys and register your SSH public key first. For details, please refer to https://docs.gitlab.com/ee/user/ssh.html.
Redirect SSH to HTTPS Download
You can also configure your git tool to redirect SSH connections to HTTPS instead. This might be required if you’re behind corporate firewalls that
forbids access to SSH ports. To do so, add the following lines to your ~/.gitconfig
file:
############################################ GitLab
[url "https://gitlab.com"]
insteadOf = ssh://git@gitlab.com
Confirm Your Account Setup
You might want to try the following steps before proceeding to fetch and build IoT Yocto:
Confirm account permission: Do you see the web page when visiting https://gitlab.com/mediatek/aiot/nda?
Confirm git HTTPS configuration: Can you fetch the repository to your Linux host machine using the following command?
# Use generated access token as password, not your GitLab password. git clone https://gitlab.com/mediatek/aiot/nda/libdram.git
If successful, delete the
libdram
directory that’s created:rm -Rf libdram
Confirm git SSH configuration: Can you fetch the repository to your Linux host machine using the following command?
git clone git@gitlab.com:mediatek/aiot/nda/libdram.git
Once again, if successful, delete the
libdram
directory that’s created:rm -Rf libdram
Please check your access token, SSH public key, or ~/.gitconfig
settings if any steps above failed.