Metadata-Version: 2.4
Name: genio-bootrom
Version: 1.2.3
Summary: Tool to bootstrap the flashing on MediaTek Genio SoCs
Home-page: https://gitlab.com/mediatek/aiot/bsp/genio-bootrom
Author: Fabien Parent
Maintainer: Pablo Sun
Maintainer-email: pablo.sun@mediatek.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Topic :: Software Development :: Embedded Systems
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: classifier
Dynamic: home-page
Dynamic: license-file
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: summary

# Genio Bootrom

`genio-bootrom` is a Python wrapper around a proprietary binary executable.
It allows developers to transfer a given binary payload to a Genio SoC
via a USB virtual serial port. The binary payload is usually a
*download agent* that bootstraps the board and then enables flash storage
programming.

The download agent binaries can be different for each SoC or board, and
are not included in this module.

## Installation

You can install the package from PyPI:

```shell
pip install genio-bootrom
```

In most workflows, `genio-bootrom` is used as part of the
[`genio-tools`](https://pypi.org/project/genio-tools/) package:

```shell
pip install genio-tools
```

## Usage

This module can be launched directly as a command-line tool, or imported as a
Python module. For example, the following command sends the payload `bl2.bin`
to the connected Genio SoC:

```shell
genio-bootrom -a 0x201000 -m aarch64 -b bl2.bin
```

The following arguments are available:

* `-b <path-to-binary>`: Assign the path to the binary payload to transfer to
  the Genio SoC. Default value: `./lk.bin`.
* `-a <bootstrap-addr-hex>`: Set the hexadecimal bootstrapping address
  of the payload. Default is `0x0`, which automatically detects the SoC
  bootstrapping address.
* `-m <arch>`: `<arch>` should be `aarch64` or `aarch32`. This assigns the
  instruction set used in the binary payload. Defaults to `aarch64`.
* `-l`: List all detected USB download port device IDs from Genio SoCs.
  Windows only.
* `-d <device-id>`: Assign the USB download port device ID if there are
  multiple download port devices. Windows only.

This module is designed to be part of the
[Genio Tools](https://pypi.org/project/genio-tools/)
package. Please refer to the
[IoT Yocto Develop Guide](https://mediatek.gitlab.io/aiot/doc/aiot-dev-guide/master/tools/genio-tools.html)
for more detailed usage and workflow examples.

## Release Notes

### Version 1.2

Released on 2025/12/29, version 1.2 provides the following updates:

1. Support for Genio 520 and Genio 720 SoCs.
2. (Windows only) Added two arguments to enable multiple device enumeration
   and selection:

   * `-l` to list all matching Boot ROM USB serial devices with device IDs.
   * `-d` to select which USB download port to connect to using the device ID.

3. Fixed a `genio-flash` error when using the `-P` argument to assign an
   image directory.
4. Print logs to STDOUT unbuffered to address out-of-order logs when
   launching from another process.

### Version 1.1.12

Version 1.1.12 adds support for Python 3.12.

### Version 1.1

Initial release.
