Flash OS
This guide covers flashing a built Android Automotive OS image onto the NXP i.MX8 QuadMax MEK board.
This workflow is intentionally focused on the following setup:
- C-series i.MX8 QuadMax MEK board
- the multi-display image set with HDMI infotainment output
Before you start
Section titled “Before you start”Make sure you have:
- a completed build published on the build server
- physical access to the MEK board
uuuandfastbootavailable on your laptopPATH- If you use nix, you can use
nix developto access the packages
- If you use nix, you can use
- a USB cable connected to the board’s USB 3.0 Type-C / OTG port
- optional but strongly recommended: a second USB cable connected to the board’s micro-USB debug UART port so you can watch boot logs
The MEK uses two different USB connections in this workflow:
- use the USB 3.0 Type-C / OTG port for
uuu,fastboot, and normal device enumeration - use the micro-USB debug UART port for serial console access during boot
Pull the published artifacts from the build server by running the following on your laptop:
just pull-build-artifacts user@hostAfter that, the images should be under:
/tmp/imx-automotive-16.0.0_1.1.0/mek_8qVerify the local artifact set with:
just verify-deploy-artifactsFull flash from serial download mode
Section titled “Full flash from serial download mode”This is the most reliable path when you want to replace the full OS image on the board.
Put the board into serial download mode
Section titled “Put the board into serial download mode”- set
SW2to001000 - connect the board for flashing
Flash from the laptop
Section titled “Flash from the laptop”If the OTG port does not re-enumerate after setting SW2, press SW3 to force USB re-enumeration, then, from the repo root on your laptop, run:
just flash-android-automotiveThat command verifies the local published artifacts, starts the flash process, and wipes userdata.
Switch the board back to eMMC boot
Section titled “Switch the board back to eMMC boot”- set
SW2to000100 - press
SW3to reboot the board into normal eMMC boot
The first boot takes about 2.5 minutes. Later boots usually take less than a minute.
Verify the new boot
Section titled “Verify the new boot”After switching back to eMMC boot and powering the board on:
- confirm the board reaches Android on the attached display or in the UART boot log
- watch the boot on the attached display or over the debug UART if you have it connected
- wait through the first boot, which can take several minutes after a full flash
Once Android finishes booting, verify the device is reachable from your laptop:
adb devicesadb shell getprop ro.build.fingerprintYou should see the board listed by adb devices, and getprop should return a non-empty build fingerprint from the newly flashed image.
If you have a specific change to validate, this is the right point to confirm it on the device before moving on.
Common failure points
Section titled “Common failure points”- Wrong
SW2boot-mode setting for the current step- Use
001000for serial download flashing and000100for normal eMMC boot.
- Use
- USB cable connected to the wrong port
- Use the board’s USB 3.0 Type-C / OTG port for flashing.
- Missing required published artifacts under
/tmp/imx-automotive-16.0.0_1.1.0/mek_8q- Rerun
just pull-build-artifacts user@hostandjust verify-deploy-artifacts.
- Rerun