iMX8MP-COMPACT-CM Linux

From Ronetix's Wiki
Jump to navigation Jump to search



Setting Boot mode

Boot mode setting on carrier board
BOOT J4:1-2 J4:3-4 J4:5-6 J4:7-8
Cortex-A53 Serial Downloader close open open open
Cortex-A53, eMMC open close open open

Terminal Setup

The carrier board connects the host PC using the micro-B USB connector (J6).
Common serial communication programs such as Minicom, HyperTerminal, Tera Term, or PuTTY can be used.
The iMX8MP-COMPACT-CM board uses the second port for the Arm Cortex-A cores console.

Overview

The Linux kernel provides support for on-board peripherals and interfaces of the iMX8MP-COMPACT-CM System-on-Module

Building kernel for iMX8MP-COMPACT-CM

This Linux kernel is based on https://github.com/nxp-imx/linux-imx, branch lf-6.1.y

Set up the cross-compiler and CPU architecture

$ export ARCH=arm64
$ export CROSS_COMPILE=/opt/cross/aarch64-ronetix-linux-11.1/bin/aarch64-ronetix-linux-gnu-

Cross-compiler can be downloaded from here: http://download.ronetix.at/toolchains/crosstool-ng

Clone the latest revision of the repo

$ git clone https://github.com/ronetix/linux.git
$ cd linux
$ git checkout remotes/origin/lf-6.1.y -b lf-6.1.y

Configure and build

$ make imx8mp_cm_defconfig
$ make  # or make -j$(nproc)

Build Results

The resulted images are located in arch/arm64/boot

File Name Description
Image Linux kernel image
zImage Linux kernel image, compressed
imx8mp-cm.dtb Device tree blob for iMX8MP-COMPACT-CM

Booting Linux Kernel

This section describes how to load and boot Linux kernel using UUU.
The Linux Kernel booting requires a bootloader.
The bootloader includes SPL, U-Boot, Arm Trusted Firmware, OP-TEE, Sentinel Firmware and DDR PHY Firmware.
It can be built:

  • by Yocto, the result is: tmp/deploy/images/imx8mp-cm/imx-boot-tagged

or

  • by the script u-boot-imx/tools/imx_build_firmware.sh, the result is: uboot-imx/imx-mkimage/iMX8M/flash.bin

See Building U-Boot for more info how to build flash.bin


Universal update utility

The Universal Update Utility (UUU) runs on a Windows or Linux OS host and is used to download images to devices on an i.MX board.

Downloading UUU

Download UUU version 1.5.21 or later from https://github.com/nxp-imx/mfgtools/releases

Connect USB ports

Follow the instructions below:

  • Connect a USB cable from a computer to the J7, port USB-3 (Type C) port on the carrier board for download link.
  • Connect a USB cable from J6, port UART-DBG (Micro-AB) port to the computer for console output.
  • Open a Terminal emulator program
  • Set the boot mode to "Cortex-A53 Serial Downloader", see #Setting Boot mode


Upload and boot

U-BOOT must be already built in folder: uboot-imx

 $ cd arch/arm64/boot
 $ cp ../../../../uboot-imx/imx-mkimage/iMX8M/flash.bin .
 $ wget http://download.ronetix.at/boards/doc/i.MX8MP-COMPACT-CM/tools/kernel.uuu
 $ uuu kernel.uuu

Boot log

http://download.ronetix.at/boards/doc/i.MX8MP-COMPACT-CM/imx8mp-compact-cm_bootlog.txt

See also