RNX-iMX93-OSM U-Boot

From Ronetix's Wiki
Revision as of 15:35, 11 March 2024 by Ilko (talk | contribs) (Fix defconfig name)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Overview

The U-Boot bootloader is used for low-level initialization and operating system loading.

Setting Boot mode

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

Terminal Setup

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

Building U-BOOT for RNX-iMX93-OSM

This U-BOOT is based on https://github.com/nxp-imx/uboot-imx, branch lf_v2023.04

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-

A 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/u-boot.git uboot-imx --depth=1 -b lf_v2023.04
$ cd uboot-imx

Configure

$ make imx93-rnx_osm_defconfig

Build

$ make

Create IMX image

Create a new Firmware package flash.bin that contains SPL, U-Boot, Arm Trusted Firmware, Sentinel Firmware, DDR PHY Firmware.

$ source ./tools/imx_build_firmware.sh imx93

Build Results

File Name Description
u-boot U-BOOT ELF image used for JTAG debugging
u-boot-dtb.bin U-BOOT image with DTB
./imx-mkimage/iMX9/flash.bin IMX bootloader

Programming the IMX image

This section describes how to write the bootloader into the eMMC using UUU.

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 J9, port USB-A (Micro-AB) port on the carrier board for download link.
  • Connect a USB cable from J3, port UART-DBG (Micro-AB) port to the computer for console output.
  • Open a Terminal emulator program
  • Set the boot mode to "Cortex-A55 Serial Downloader", see #Setting Boot mode

Write flash.bin into eMMC

 $ cd ./imx-mkimage/iMX9
 $ wget http://download.ronetix.at/boards/doc/RNX-iMX93-OSM/tools/u-boot.uuu
 $ uuu u-boot.uuu

See also