Deploying Seco C61 in LAVA lab

Here’s what you need and how to connect the Seco C61 board into the LAVA lab system. This article assumes that the lab is using rpi4 as LAVA worker but same can be applied to any hardware.

Connect the board to LAVA worker

Serial Connection

Seco C61 board uses the RS232 serial connection which means you need a device like this one or similar.

The board uses CN6 onboard connector for connecting the serial as can be seen in the following image:

It is a bit specific MOLEX connector so make sure it comes with the board (CABKITA62-DEBUG).

So if you want to connect serial to COM1, the Tx wire from the RS232 module goes into pin 2, the Rx goes into pin 3 and GND to pin 4; those are physically next to each other, for reference. The USB part goes directly into the RPI4 LAVA worker.

Power

The board power consumption specs (along with all other info) can be found here but we used a 19V, 3.15A adapter that comes with the board.

UUU connection

UUU connection is esablished via an OTG port using mini USB to USB cable. We use flasher method in LAVA which in turn invokes the uuu tool to flash the board.

Relay switch

The Seco C61 board has a manual control over the boot options via a jumper on CN52 connector. We need to automate this so we’re using a RPi relay board but any other alternative can be used. We deploy the relay control script on the LAVA RPi worker which controls the C61 board.

After all of these steps are done, we’re ready to add the device to LAVA.After all of these steps are done, we’re ready to add the device to LAVA.

LAVA device configuration

We will use flasher deployment method to deploy the .wic image to the onboard eMMC via uuu tool, then power cycle and boot the board.

The device config should look like this:

{% extends 'seco-c61.jinja2' %}
{% set uboot_mac_addr = '00:C0:08:A3:60:EC' %}
{% set connection_command = 'telnet localhost 7001' %}
{% set hard_reset_command = '/root/tools/intelinet_pdu.sh -i "pdu-02.localnet" -p outlet4 -o reset' %}
{% set power_off_command = '/root/tools/intelinet_pdu.sh -i "pdu-02.localnet" -p outlet4 -o off' %}
{% set power_on_command = '/root/tools/intelinet_pdu.sh -i "pdu-02.localnet" -p outlet4 -o off' %}
{% set flasher_deploy_commands = ['ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null wrc-pi4-1 ./relay_control.sh -p 1 -s 0',
                                 '/root/tools/intelinet_pdu.sh -i "pdu-02.localnet" -p outlet4 -o reset',
                                 '/root/tools/./uuu -v -b emmc_all {BOOT} {SYSTEM}',
                                 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null wrc-pi4-1 ./relay_control.sh -p 1 -s 1'
                                 ] %}
{% set sync_to_lava = {'device_type': 'seco-c61', 'worker': 'lava-dispatcher-1.warsaw', 'tags': [], 'aliases': []} %}

Example job

device_type: seco-c61
job_name: example seco-c61 job

timeouts:
  job:
    minutes: 30
  action:
    minutes: 15
  connection:
    minutes: 15
priority: medium
visibility: public

actions:
- deploy:
    to: flasher
    images:
      boot:
        url: http://archive.validation.linaro.org/artifacts/private/stevan.radakovic/2022/03/08/12/36/imx-boot-seco-imx8mm-c61-emmc.bin-flash_evk
      system:
        url: http://archive.validation.linaro.org/artifacts/private/stevan.radakovic/2022/03/08/13/08/allscenarios-image-base-seco-imx8mm-c61.wic.xz
        compression: xz

- boot:
    method: minimal
    timeout:
      minutes: 5
    auto_login:
      login_prompt: 'seco-imx8mm-c61 login:'
      username: root
    prompts:
    - 'root@seco-imx8mm-c61:~#'