ARM System Ready Image Evaluation for IMX8MP

This document provides detailed instructions for evaluating ARM System Ready Image on IMX8MP

Prerequisites

  • A Linux-based host system is used for the entire processing of this document

  • ARM cross-platform compilation is only possible with Ubuntu 18.04 LTS

  • Install the following tool in your Linux host system

    sudo apt install u-boot-tools
  • Install related Ubuntu packages

    sudo apt-get install libncurses5-dev zlib1g-dev gawk flex patch git-core g++ subversion bison

ARM System Ready for IMX8MP can be evaluated by following the below steps:

  1. Setup Toolchain

  2. Compile U-boot

  3. Prepare emmc.img

  4. Flash emmc.img to eMMC

  5. Prepare bootable SD card (using Fedora installer image)

  6. Boot in to Fedora IoT Grub

Note: In this case, we used the Fedora installer. The same procedure can be followed with other images by simply changing the name of your installer file.

Step 1: Setup Toolchain

  • Make a directory called toolchain

    mkdir ~/toolchain
  • Go into the directory

    cd ~/toolchain
  • Download the following files into the directory and unzip them

    wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz
    tar -xJf gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz

Step 2: Compile U-boot

  • Clone our ADLINK u-boot binary into the ~/toolchain directory

    • Depending on your needs, you may need access to clone our repository, so please contact our administrator.
    git clone https://github.com/ADLINK/u-boot-adlink.git
  • Go into the directory

    cd u-boot-adlink
  • Change your repository to the latest branch

    git checkout lf_v2021.04-adlink-armsystemready
  • Download the following file and unzip them

    wget https://hq0epm0west0us0storage.blob.core.windows.net/development/LEC-iMX8MP/System-Ready/u-boot-helper.tar.xz
    tar -xJf u-boot-helper.tar.xz
  • To set up cross compilation on Linux, type the following command

    export ARCH=arm64 CROSS_COMPILE=~/toolchain/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
  • Start to compile the u-boot by following the below commands

    make adlink_lec8mp_defconfig
  • Modify the .config file according to the SKU memory size(CONFIG_LPDDR4_2GB=y (or) CONFIG_LPDDR4_4GB=y)

    • Add the above line end of the .config file
    vi .config
    make
    ./install_uboot_imx8.sh -b lec-imx8mp.dtb -d /dev/null
  • When it has completed, the flash.bin file will be created in the directory ~/toolchain/u-boot-adlink/imx-mkimage/iMX8M/

Step 3: Prepare emmc.img

  • Download the eMMC base image from azure and extract them into ~/toolchain/u-boot/. This is a simple image with FAT partition containing kernel image and dtb

    wget https://hq0epm0west0us0storage.blob.core.windows.net/development/LEC-iMX8MP/System-Ready/emmc.img.tar.xz
    tar -xJf emmc.img.tar.xz
  • Add u-boot binary created in “Step 2” to emmc.img

    dd if=imx-mkimage/iMX8M/flash.bin of=emmc.img bs=1k seek=32 conv=notrunc

Step 4: Flash emmc.img

  • Flash the emmc.img into the eMMC using the UUU tool

  • In “Linux Host” section, you will find the below command to flash emmc image:

    sudo ./uuu -b emmc_all (file_path_of_boot_loader) (file_path_of_image_file)
  • Replace “file_path_of_boot_loader” with boot loader downloaded from I-Pi wiki.

  • Replace “file_path_of_image_file” with “emmc.img” created in Step 3.

Step 5: Prepare Fedora bootable SD card

  • Download the official Fedora IoT installer image

    wget https://download.fedoraproject.org/pub/alt/iot/34/IoT/aarch64/iso/Fedora-IoT-IoT-ostree-aarch64-34-20210801.0.iso
  • Flash Fedora installer image to SD card

    dd if=Fedora-IoT-IoT-ostree-aarch64-34-20210801.0.iso of=/dev/sdX bs=1M status=progress
    sync

Step 6: Boot in to Fedora GRUB

  • Connect bootable SD card to the board
  • Set boot switch configuration for eMMC boot and power on the board
  • Now, u-boot should automatically boot in to Fedora IOT