DEV Community

Cover image for Board Bring-Up: A Developer's Guide to Flashing Android 15 on the NXP i.MX 8M Plus EVKB
Darshan Rathod
Darshan Rathod

Posted on

Board Bring-Up: A Developer's Guide to Flashing Android 15 on the NXP i.MX 8M Plus EVKB

The NXP i.MX 8M Plus system-on-chip (SoC) stands as a powerhouse for the embedded world, integrating a dual or quad-core Arm® Cortex®-A53 processor with a Neural Processing Unit (NPU) operating at up to 2.3 TOPS. This makes its evaluation kit (EVKB) an ideal platform for developing cutting-edge applications in machine learning, industrial automation, and advanced multimedia.

This guide provides a comprehensive, step-by-step walkthrough for bringing up the i.MX 8M Plus EVKB by flashing the latest Android 15 image using the SD card method on a Linux host system.

Prerequisites: What You'll Need

Before diving in, ensure your workspace is equipped with the necessary hardware and software.

Hardware_requirement

Software:

The official NXP Android 15 Board Support Package (BSP). For this guide, we are using

imx-android-15.0.0_1.2.0.tar.gz

Step 1: Preparing the Host Environment and SD Card

Proper preparation is key to a smooth flashing process. This involves extracting the necessary tools from the BSP and correctly identifying your storage medium.

Extract the BSP Archive: On your Linux host PC, decompress the downloaded NXP Android image archive. This will create a directory containing the bootloader, system images, and essential flashing scripts.

tar -xvf imx-android-15.0.0_1.2.0.tar.gz 
Enter fullscreen mode Exit fullscreen mode

Identify the SD Card: Insert the microSD card into your host machine. To prevent catastrophic data loss, you must correctly identify its device name. Use the lsblk command to list block devices before and after insertion. Your SD card will appear as a new device, such as /dev/sdX.

Critical Warning: Double-check the device name. Writing to the wrong device, like /dev/sda, could erase your host operating system.

Unmount the SD Card: Linux systems often auto-mount removable media. Before you can write to the raw device, you must unmount any of its partitions.

# Replace /dev/sdX1 with your card's partition(s) sudo umount /dev/sdX1
Enter fullscreen mode Exit fullscreen mode

Step 2: Flashing Android Using the NXP Provisioning Script

While manual flashing with tools like dd is possible, Android's multi-partition layout (boot, system, vendor, userdata, etc.) makes it complex. The most reliable method is to use the dedicated script provided within the NXP BSP, which handles partitioning and image placement automatically.

Navigate to the Script Location: The provisioning script, imx-sdcard-partition.sh, is typically located within the extracted BSP directory.

Execute the Script: Run the script with sudo privileges, specifying the SoC family (imx8mp) and the SD card device name. For a 32 GB card, using the -c 28 flag ensures the partition table is correctly sized.

sudo ./imx_android_setup.sh -f imx8mp /dev/sdX -c 28 
Enter fullscreen mode Exit fullscreen mode

The script will now perform the following actions:

  • Create a GUID Partition Table (GPT) on the SD card.
  • Format the necessary partitions with appropriate filesystems.
  • Copy all the required image files from your working directory to their corresponding partitions on the card.
  • This process will take several minutes to complete.

Step 3: Configuring the EVKB and Booting Up

With a freshly flashed SD card, the final step is to configure the EVKB hardware to boot from it.

Set the Boot Mode Switches: Locate the boot mode DIP switch on your EVKB (often labeled SW7 or SW4). You must configure these switches to select the "SD boot" or "EXT" boot source. The exact configuration can be found in the official user manual or Quick Start Guide for your specific board revision.
For i.MX 8 PLUS EVKB set switches to (0011)

Insert the SD Card and Power On: Safely eject the microSD card from your host PC and insert it into the SD card slot on the EVKB. Connect the power supply.

Verify the Boot Process: The board will power on and begin the boot sequence. You can monitor the process in two ways:

HDMI Display: Connect a monitor to see the Android boot animation followed by the lock screen.

Serial Console: Connect the USB-C debug port to your host PC and use a terminal emulator (like minicom or screen) to view the detailed boot logs from the kernel.

Future Scope:

From here, you can begin your application development, explore the capabilities of the NPU, or delve deeper into customizing the Android BSP to fit your project's specific needs. This foundational skill unlocks the full potential of this powerful embedded platform.

Top comments (0)