Setup Tool Environment (Linux)

The flash programming process is performed over a USB connection between the target board and the host computer containing the image.

To do so, you need to install AIoT tools. It is a set of tools to configure or interact with MediaTek Genio boards.

AIoT tools also supports Windows. Please visit this page if you want to flash the board under Windows environment.

Host System Requirement

To install AIoT Tools on a Linux host, you need:

  • Ubuntu 18.04

  • Administrator privilege

  • Internet connection

  • Git 1.8 or later

  • Python 3.8 or later

  • pip3 20.3 or later

  • fastboot 31.0 or later

AIoT Tools contains following utilities:

  • aiot-config checks if Linux or Windows host has proper setup.

  • aiot-flash provides flash writing functions.

  • aiot-board allows you to reset the board programmatically.

Only aiot-flash and aiot-config are used throughout operations mentioned in this guide. For usage of other utilities, please refer to AIoT Tools.

Warning

aiot-board is not supported under Windows environment. You can flash the image with aiot-flash, but can not power-cycle Genio 350-EVK with aiot-board under Windows environment.

Note

If your board is powered through a USB-C connector, e.g. i500-pumpkin, we recommend using high quality “fast charging” USB-C cables.

Setup AIoT Tools on Linux

On Linux, follow these steps to setup required software, USB device rules and install AIoT Tools.

Git

add-apt-repository ppa:git-core/ppa
apt update
apt-get install git

Python3

If you don’t have Python and pip installed on your Ubuntu, run following commands to install them.

sudo apt update
sudo apt-get install python3
sudo apt-get install python3-pip

You can check Python and pip versions by running the following commands:

python3 --version
Python 3.9.2
pip3 --version
pip 21.2.4 from /usr/bin/pip3 (python 3.9)

If your version of pip3 is older than 20.3. Please upgrade it by running:

pip3 install --upgrade pip

Fastboot

AIoT tools use fastboot to flash image, so you also need to install the fastboot executable. Run following commands to install packages:

sudo apt update
sudo apt-get install android-tools-adb android-tools-fastboot

Refer to Android SDK Platform-Tools to install fastboot if you are using Linux distributions other than Ubuntu.

USB Device rules

Add new udev rule and add your user account to plugdev group:

echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", ATTR{idProduct}=="201c", MODE="0660", $ GROUP="plugdev"' | sudo tee -a /etc/udev/rules.d/96-rity.rules
sudo udevadm control --reload-rules
sudo udevadm trigger
sudo usermod -a -G plugdev $USER

udev is a device manager for the Linux kernel. It can be used to grant an user or a group the permission to access a device. In this case, we added an udev rule to assign plugdev group to the newly created SoC USB device. In order to access the SoC, your user account must be a member of the plugdev group.

AIoT Tools

After finishing installation of required packages and necessary configuration, we are now ready to install AIoT Tools:

pip3 install -U -e "git+https://gitlab.com/mediatek/aiot/bsp/aiot-tools.git#egg=aiot-tools"

Attention

Access Token as Password

Please use the generated access token instead of gitlab.com login password, if you’ve been prompt to input gitlab username and password when installing aiot-tools.

You can check your installation with aiot-config:

aiot-config
fastboot: OK
udev rules: OK

In case your environment is not setup correctly, the tool provides you some instructions on how to correctly configure it.

UART Setup

For Linux users, before you can connect to the device you must check if your user account is a member of the dialout group:

$ groups | grep dialout
dialout cdrom floppy sudo audio dip video plugdev netdev bluetooth

If not, you need to add your account to that group:

sudo usermod -a -G dialout $USER

This last command requires you to logout and login again with your account to make it effective. You only have to do this once.