Genio Tools
Overview
Genio tools is a set of tools to configure or interact with MediaTek Genio boards. The Genio tools are written in Python. You need to have Python 3 installed on your system. The Genio tools have been tested with Python 3.6 and 3.9, they may work with older versions of Python, but are untested against these older Python releases.
Note
There are known issues for Python 3.10 on Windows platform. If you use Windows, we recommend you to install Python 3.9 instead.
Genio tools is composed of 3 tools:
genio-config
: a tool to setup your host system in order to be able to communicate with MediaTek Genio boards
genio-flash
: a tool to flash a board with a RITY image
genio-board
: a tool to control the board (reset / power / download signals)
Genio Tools v1.3.3 still supports legacy commands such as aiot-flash
, but we plan to deprecate
these aiot-
commands in the future. We strongly encourage all users to migrate to the new genio-flash
command.
Setup Tool Environment (Linux)
Please refer to Setup Tool Environment (Linux).
Setup Tool Environment (Windows)
Please refer to Setup Tool Environment (Windows).
Genio tools Usage
This section will describe the usage of every Genio tool.
genio-config
Note
The genio-config tool is supported on both of Linux and Windows. The udev rules information is only supported on Linux environment.
This tool is used to check the configuration of the host environment.
You run the following command to check that your environment is correctly configured:
genio-config
fastboot: OK
udev rules: OK
In case your environment is not setup correctly, the tool will give you some instructions on how to correctly configure it.
Run the following commands or reboot the Linux system for the udev rules to take effect:
sudo udevadm control --reload-rules
sudo udevadm trigger
genio-flash
Note
The genio-flash tool is supported on both of Linux and Windows.
This tool allows you to flash your board. genio-flash supports flashing Yocto images (RITY).
You can flash an image by running the following command:
genio-flash
The tool will try to find an image to flash in your current working directory. If you want to flash an image in a different path your can use the –path parameter:
genio-flash --path /path/to/image
It is possible to flash individual partitions by using:
genio-flash <partition1> <partition2> <partitionX>
or
genio-flash <partition1>:/path/to/file1 <partition2>:/path/to/file2
Select an image
A few options are specific to flashing Yocto images. If your build folder contains more than one image you can specify which image to flash by using the –image parameter.
genio-flash --image rity-demo-image
or
genio-flash -i rity-demo-image
Load a DTBO
When flashing you can also choose the Device-Tree Blob Overlays you wish to be automatically loaded at boot:
genio-flash --load-dtbo <dtbo_name> --load-dtbo <another_dtbo_name>
List available DTBO
To know which DTBO is available with your image you can run the following command:
genio-flash --list-dtbo
Interactively choose DTBO
Instead of specifying the DTBO to load you can also run genio-flash in interactive mode:
genio-flash --interactive
or
genio-flash -I
Bootstrap configuration
In case your bootstrap has a configuration different from the default values, you can use the following parameter:
genio-flash --bootstrap lk.bin --bootstrap-addr 0x201000 \
--bootstrap-mode aarch64
Board control
Warning
Board control is currently only supported on Linux.
If your board supports genio-board
, genio-flash
will also be able to
control the reset and download GPIOs. You can flash and control your
board using the following command:
genio-flash --gpio-power <power_gpio> \
--gpio-reset <reset_gpio> \
--gpio-download <download_gpio>
genio-board
Warning
The genio-board tool is currently only supported on Linux.
This tool is used to control MediaTek boards. It uses the FTDI chip that provides the serial console to also control the reset / power / download GPIO lines.
Note
Not all the boards can be controlled with this tool. Please check your board documentation to know whether this tools can control your board.
Configuration of the FTDI chip
In order to be able to control the GPIO lines, the FTDI chip must be properly configured. Run the following command to configure the FTDI chip:
genio-board program-ftdi --ftdi-product-name <board_name> \
--gpio-power <power_gpio> \
--gpio-reset <reset_gpio> \
--gpio-download <download_gpio>
Please replace <board_name>, <power_gpio>, <reset_gpio>, and <download_gpio> with the values corresponding to your board. You can check your Development Boards to know the values to use.
Note
Only one board should be connected to the host when trying to program a FTDI chip. If more than one FTDI chip is detected, the tool will quit.
For example for the Genio 350-EVK board, the command would be:
genio-board program-ftdi --ftdi-product-name i350-evk \
--gpio-power 0 \
--gpio-reset 1 \
--gpio-download 2
Warning
Be careful, configuring bad values into your FTDI chip could potentially brick your board.
Configuring the FTDI chip should only be done once per board.
Reset the board
In order to reset the board you can run the following command:
genio-board reset --gpio-power <power_gpio> \
--gpio-reset <reset_gpio> \
--gpio-download <download_gpio>
Reset in download mode
In order to reset the board and boot it in download mode you can run the following command:
genio-board download --gpio-power <power_gpio> \
--gpio-reset <reset_gpio> \
--gpio-download <download_gpio>
Power the board
To simulate pressing the power button (for 1 second), you can run the following command:
genio-board power --gpio-power <power_gpio> \
--gpio-reset <reset_gpio> \
--gpio-download <download_gpio>
Default values for the GPIOs
It is not necessary to set the –gpio-power, –gpio-reset, and –gpio-download parameters if they match the default values. Please check the default values used by the tool below:
Parameter |
Parameter alias |
Default value |
---|---|---|
|
-p |
0 |
|
-r |
1 |
|
-d |
2 |