The ConnectCore 8X module includes one Cortex-M4F co-processor that can run custom user firmware. To load the custom firmware in the device, bundle it with the U-Boot image. During boot, U-Boot takes the embedded CM4 firmware and programs it in the microcontroller.

To specify the CM4 firmware to bundle within the U-Boot image, Android provides the build variable TARGET_BOOTLOADER_PREBUILT_CM4. This variable is defined in the BoardConfig.mk platform file:

device/digi/imx8q/ccimx8xsbcpro/BoardConfig.mk
# Location of the prebuilt Cortex M4 firmware to program on chip at boot.
# This firmware will be bundled with U-Boot final image using the 'flash_all' target.
TARGET_BOOTLOADER_PREBUILT_CM4 := vendor/nxp/fsl-proprietary/mcu-sdk/imx8q/imx8qx_m4_default.bin

By default the variable points to a precompiled NXP binary, but you can modify the variable to point to your custom firmware file.

Follow the instructions at Build development firmware to build an Android image from source.

The Android build generates two U-Boot artifacts per platform variant or SOC revision:

  • u-boot-<platform_variant>-<soc_revision>-flash.imx: Standard U-Boot without embedded CM4 firmware

  • u-boot-<platform_variant>-<soc_revision>-flash_all.imx: Standard U-Boot with embedded CM4 firmware

You must use u-boot-<platform_variant>-flash_all.imx U-Boot if you want to load the custom CM4 firmware in your device. See Program the bootloader.