Orion O6 Debug Party Invitation

While playing with the firmware, I also noticed that there’s support for the fastboot protocol:

  1. You will need to have an NVME drive plugged in (we won’t be writing anything to it), otherwise the fastboot app will refuse to load.

  2. Open your build_and_package.sh:

    • add local FASTBOOT_LOAD=nvme

    • append -D TOKEN_SETUP_SUPPORT=TRUE to the EDK2 build command

  3. Build and flash the generated firmware as usual.

  4. There will appear a new setup menu: CIX System Manager. Open it, then go to Soc Configuration->USB Configuration and switch USBC DRD Controller Role to Device. Save the changes.

  5. While rebooting/powering the board, short the “BOOT” pins near the UART debug headers. This will cause the firmware to enter fastboot mode after the boot countdown:

    Fastboot: Initializing...
    Fastboot: Initializing done
    
  6. Once you see the initialization message, connect the board to another computer via the port labelled “USBC0”.

  7. Download and extract the Android SDK Platform Tools.

  8. From now on, you can update the firmware by simply running fastboot flash bootloader PATH_TO_FW.bin in a terminal / command prompt.

  9. Reboot the board (fastboot reboot).


To further speed up testing, it’s possible to flash individual parts of the firmware image.

In the case above where we modified the OPP tables, it was only necessary to update csu_pm_config.bin.

edk2-non-osi/Platform/CIX/Sky1/PackageTool/spi_flash_config_ota.json contains a single entry for the EDK2 BL33 image (bootloader3.img). Replace it with the definition for csu_pm_config.bin taken from spi_flash_config_all.json.

Build the firmware, then flash cix_flash_ota.bin instead of cix_flash_all.bin.

5 Likes