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.

  • Private configurations are a functional superset of the public configurations, and require access to private repositories. The additional features are:

    • Access to source code for components related to custom board bring-up

    • 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 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. If you want to build the private configuration, e.g., customize your own board design, please continue to read the following sections.

  • Since v25.0, the access protocol of NDA repositories is changed to HTTPS instead of SSH. If you have not yet set up the access token for HTTPS protocol, please read below.

Private Configuration Overview

While you could modify and build a public image for Genio EVK boards without NDA access permission, you need NDA access permission to bring up your own board design.

To access these permission controlled packages and tools, you need to:

  1. Sign up for a GitLab account using your email.

  2. Sign up for a Genio Developer account and sign an electronic NDA for the Genio platform.

  3. Request access permission from your MediaTek contact through email.

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

1. Set Up 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 in the following information:

    • Email Please use your company email for registration, e.g. firstname.lastname@your.company.domain if possible.

    • Username Please choose a username that is similar to your email address, e.g. firstname.lastname or firstname.lastname.company if possible.

  2. Install a 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. Log in to http://www.gitlab.com/mediatek/aiot with your username and password.

  5. Set up a 2FA authenticator according to the instructions on the website.

Warning

Unlike logging in to the website with a browser, you cannot use the login password to fetch source code. Instead, you need to create an access token and use the token as your git password. Please continue to the following sections for permission and access token setup.

GitLab and JiHu

If you are based in China, Macau, and Hong Kong, you may find that https://gitlab.com/mediatek/aiot/nda/ is being redirected to JiHu (https://gitlab.cn).

As described in the official GitLab announcement, JiHu’s SaaS service (GitLab.cn) and GitLab Inc.’s SaaS service (GitLab.com) share no common infrastructure, networking connectivity, systems, services, data, or resources.

In this case, you need to set up and re-configure your network, e.g. VPN, proxy, or DNS settings, so that you can log in to https://gitlab.com instead of https://gitlab.cn.

2. Sign Electronic NDA for Genio Platform

You can now sign an electronic NDA (non-disclosure agreement) on the Genio Developer Account Center.

Steps

  1. Register an account on the Genio Developer Account Center. The email address should be the same company email used in the previous step.

  2. Log in and navigate to the Advanced Resource Access section in your Profile Page.

  3. Find NDA for Genio and click the Online NDA Application button. Fill out and submit the NDA application form.

The MediaTek Genio team will review your application. Once approved, you will receive an email to sign the electronic NDA. Upon completion, the NDA status in your Profile Page will be updated to Valid.

For a detailed step-by-step guide, refer to this Genio Community forum post.

3. Request NDA Access Permission

Please email your GitLab Username and Email to genio_nda@mediatek.com using the following template:

Subject: [Genio] Request for GitLab NDA Access

Hello MediaTek,

Please grant me access to https://gitlab.com/mediatek/aiot/nda

My GitLab & Genio Developer Account credentials:
email: <YOUR EMAIL ADDRESS HERE>
gitlab username: <YOUR GITLAB USERNAME>

Once the permission has been granted, you should receive a notification email from GitLab.com.

After receiving the notification, 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 404 error page or permission error page instead, please email genio_nda@mediatek.com for assistance.

4. 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 token and use it as your git password. To create an access token, follow these steps:

  1. Visit https://gitlab.com/-/user_settings/personal_access_tokens, or choose Preferences and then select Access Tokens on your GitLab personal page.

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

    • read_api

    • read_repository

  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. Update the .netrc configuration file under the home directory to add your GitLab username and token:

    echo 'machine gitlab.com login <USERNAME> password <TOKEN>' >> $HOME/.netrc
    chmod 600 $HOME/.netrc
    

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.

  • Please make sure there are not multiple machine gitlab.com ... entries in your .netrc settings. Otherwise it may cause authentication failure.

Confirm Your Account Setup

You might want to try the following steps before proceeding to fetch and build IoT 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. If successful, delete the libdram directory that’s created:

    rm -Rf libdram
    

Please check your access token settings if any of the steps above fail.