acu6-flasher

The acu6-flasher tool is used for writing firmware to an ACU6 device. The tool is split in a library portion and a CLI, both written in Python.

The library can be used to create a custom device firmware provisioning setup.

Installation

Pre-build Python wheels are included in the SDK under ‘utils/docker/files’

$ pip install acu6_flasher*.whl

Using the CLI

The tool exposes the following commands

Command

Description

uuid

Read device UUID

reboot

Reboot the device

flash

Flash firmware to the device

write_orgid

Write organization ID to the device

All commands except write_orgid work both in bootloader mode and normal operational mode. The tool will reboot the board into bootloader mode when the flash command is issued.

Most commands require additional arguments for device ip address, Seer device information and password. If the default’s are used it’s possible to pass ‘–use-defaults’ arguments, which will populate default values for everything except the device password.

Flashing the system

Flashing the base system and a user bundle on an ACU6-Pro device:

$ acu6-flasher flash --use-defaults pro --password <device password> acu6-generic-image-imx8qxp-acu6.bundle.tar user-bundle.tar

Expected output:

Starting firmware flashing
Shutting down the system and entering the bootloader. This may take up to 120 seconds...
Failed to shutdown system, doing a hard reboot
Error: No device IP specified
System UUID: bd77fb8b-8b29-3a28-9111-79e592f05d19
Flashing: ACU6 OH Pro Base Software - 10.4.0
Stage: Bootloader
Stage: Base bundle - System A
Stage: Base bundle - System B
Flashing: ACU6 OH Pro Base Software Sample Application - 6.0.0-dev+g92976f31
Stage: User bundle - Actia DEMO - System A
Stage: User bundle - Actia DEMO - System B
Flashing done
Rebooting into new system

Optional arguments:

Argument

Description

–single-stage <stage>

Only run a specific flashing stage, for example ‘bootloader’

–device-ip <ip>

IP address of target device, normally ‘198.18.1.1’

–seer-device <path>

Device path for Seer device, normally ‘/dev/seer’

–verbose

Provide verbose output for debugging

–verify <True/False>

Verify each component after flashing, normally True

Available flashing stages for a ACU6-Pro device:

Flashing stage

Description

Bootloader

Flash bootloader

Base bundle - System A

Flash base firmware to A partitions

Base bundle - System B

Flash base firmware to B partitions

Warning

Using –single-stage might put the device in a non working state. Use with caution.

Writing organization ID

Before a new unit can be used it needs to be bound to a specific organization by fusing the organization ID in the unit. Normally this is done via the Device Manager, however when implementing custom production flows there can be times when it is appropriate to do this fusing ahead of time.

To write an organization ID to the device, ensure it is first flashed with the base software and booted into the system, then use the following command. The organization ID will be supplied by Actia and should be in the format of 8 hex characters.

$ acu6-flasher write_orgid --use-defaults pro --password <device password> <organization_id>

Warning

Writing the organization ID is a one-time, non-reversible process. Both the tool and the system will verify that the organization ID is of the correct format, however the user of the tool must ensure it is the correct ID. Writing the wrong ID will result in the unit not accepting the customer software and effectively brick the device.

Python library examples

All functionality available in the CLI is also exposed through the Python library. The following example will reboot into bootloader mode, write firmware and then reboot into the newly flashed firmware.

import pathlib
from acu6_flasher import Acu6Flasher

flasher = Acu6Flasher(device_ip="198.18.1.1",
                      device_password="<password>"
                      seer_port="/dev/seer")

flasher.flash_device(firmware_paths = [pathlib.Path("firmware-bundle.tar")])

Reading device uuid:

from acu6_flasher import Acu6Flasher

flasher = Acu6Flasher(device_ip="198.18.1.1",
                      device_password="<password>")

print(flasher.get_uuid())