GitLab Account Setup

AIoT Yocto is currently hosted on http://www.gitlab.com/mediatek/aiot.

Most packages and Yocto recipes in AIoT Yocto are available for access without registration. For example, the Linux kernel fork for AIoT Yocto is hosted in https://gitlab.com/mediatek/aiot/bsp/linux. 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 https://gitlab.com/mediatek/aiot/nda namespace. You can enable these proprietary pacakges during the build process using a configuration flag NDA_BUILD.

Before v22.0.1 release, the proprietary packages are enabled by default. In the current v22.1 release, the proprietary packages are disabled by default.

Public and Private Configurations

AIoT Yocto v22.1 is available in two different configurations:

  • Public configurations are built with packages that are available to anyone without a GitLab account. This configuration lacks some proprietary features. Furthermore, certain proprietary components, such as libdram, are provided in binary-only format.

  • Private configurations are functional superset of the public configurations, and requires access to private repositories in AIoT GitLab group. In this release, the private image provides these additional features on top of the public configuration:

    • Xtensa-ANN support on Genio 350-EVK

    • Neuron SDK support on Genio 1200-demo

    • MT7663 proprietary Wi-Fi driver on Genio 350-EVK

    • eFuse writer

You don’t need a GitLab account to build the public configurations. You may skip to Environment Setup if you don’t intend to build the private configuration. However, we recommend you to check the Redirect SSH to HTTPS Download section to redirect GitLab SSH connections to HTTPS if you are behind a corporate firewall.

If you want to build the private configuration, please continue to read the following sections.

Private Configuration Overview

The Yocto recipes of AIoT Yocto are accessible without GitLab account. These recipes are shared between public and private configurations. A Yocto configuration flag NDA_BUILD is used to control which packages to include into the resulting image.

The repositories of the packages used in the private configurations are currently located under https://gitlab.com/mediatek/aiot/nda namespace. Therefore, to access these permission controlled packages and tools, you need to:

  1. Sign up a GitLab account.

  2. Request access permission from your MediaTek contact window through email.

  3. Generate access tokens for tools such as git to access source code repositories.

Please refer to following sections for detail:

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

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

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

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

  4. Login to http://www.gitlab.com/mediatek/aiot with your username and password.

  5. Setup 2FA authenticator according to instructions on the website.

Note

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 can access the online copy of this guide in:

https://mediatek.gitlab.io/aiot/doc/aiot-dev-guide/

You should also be able to visit the following URL to confirm that you’ve been granted permissions to access AIoT Yocto repositories.

https://gitlab.com/mediatek/aiot/bsp/manifest/-/tree/rity/dunfell

And you should be able to see the repository content like this:

../../../_images/sw_yocto_get-started_account-setup_repo-content.png

If you get an 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:

  1. Visit https://gitlab.com/-/profile/personal_access_tokens

  2. In the Personal Access Token section, fill the Token name, and make sure the following check boxes are ticked:

    • read_repository

    • read_api

  3. Click the Create personal access token button.

    ../../../_images/sw_yocto_get-started_account-setup_access-token.png
  4. A string representing the access token will be generated. Please store this token in a secure storage, preferably a password manager.

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

If you lost 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 AIoT Yocto are provided by git over SSH protocol by default. If your would like to use SSH to fetch AIoT Yocto, please setup SSH key.

If your network environment does not support SSH, e.g. behind a corporate firewall, you might want 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/-/profile/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 coporate 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 AIoT Yocto:

  1. Confirm account permission: Do you see the web page when visiting https://gitlab.com/mediatek/aiot/nda?

  2. 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
    
  3. Confirm git SSH configuration: Can you fetch the repository to your Linux host machine using the following command?

    # Delete the `libdram` directory created in step 2 first
    git clone git@gitlab.com:mediatek/aiot/nda/libdram.git
    

Please check your access token, SSH public key, or ~/.gitconfig settings if any steps above failed.