While playing with the firmware, I also noticed that there’s support for the fastboot protocol:
-
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.
-
Open your
build_and_package.sh:-
add
local FASTBOOT_LOAD=nvme -
append
-D TOKEN_SETUP_SUPPORT=TRUEto the EDK2buildcommand
-
-
Build and flash the generated firmware as usual.
-
There will appear a new setup menu:
CIX System Manager. Open it, then go toSoc Configuration->USB Configurationand switchUSBC DRD Controller RoletoDevice. Save the changes. -
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 -
Once you see the initialization message, connect the board to another computer via the port labelled “USBC0”.
-
Download and extract the Android SDK Platform Tools.
-
From now on, you can update the firmware by simply running
fastboot flash bootloader PATH_TO_FW.binin a terminal / command prompt. -
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.