iMX8M-CM U-Boot: Difference between revisions

From Ronetix's Wiki
Jump to navigation Jump to search
(remove empty comments)
(remove variables ARCH and CROSS_COMPILE)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#vardefine:HARDWARE_NAME|i.MX8M-CM}}
{{#vardefine:HARDWARE_NAME|iMX8M-CM}}
{{#vardefine:UBOOT_BRANCH_ORIG|imx_v2020.04_5.4.24_2.1.0}}
{{#vardefine:UBOOT_BRANCH_ORIG|imx_v2020.04_5.4.24_2.1.0}}
{{#vardefine:UBOOT_BRANCH|imx_v2020.04_5.4.24_2.1.0_rnx}}
{{#vardefine:UBOOT_BRANCH|imx_v2020.04_5.4.24_2.1.0_rnx}}
{{#vardefine:DEFCONFIG_NAME|imx8mq_cm_defconfig}}
{{#vardefine:DEFCONFIG_NAME|imx8mq_cm_defconfig}}
{{#vardefine:SOC|imx8mq}}
{{#vardefine:SEEK|33}}


[[File:imx8m-cm-top.png|thumb]]
[[File:iMX8M-CM-top.png|thumb]]
= Overview =
The U-Boot boot-loader is used for low-level initialization and operating system loading.


= Building U-BOOT for {{#var:HARDWARE_NAME}} =
{{iMX8M-UBOOT}}
This U-BOOT is based on https://source.codeaurora.org/external/imx/uboot-imx.git, branch {{#var:UBOOT_BRANCH_ORIG}}
==== Setup the cross compiler and CPU architecture ====
$ export ARCH=arm64
$ export CROSS_COMPILE=/opt/cross/aarch64-ronetix-linux-10.2/bin/aarch64-ronetix-linux-gnu-
 
==== Clone the latest revision of the repo ====
$ git clone https://github.com/ronetix/u-boot.git u-boot-ronetix --depth=1 -b {{#var:UBOOT_BRANCH}}
$ cd u-boot-ronetix
 
==== Configure and build ====
$ make {{#var:DEFCONFIG_NAME}}
$ make
 
= Build Results =
 
{| class="wikitable"
|-
! scope="col" | File Name
! scope="col" | Description
|-
| style="padding: 5px;"| u-boot
| style="padding: 5px;"| U-BOOT ELF image used for JTAG debugging
|-
| style="padding: 5px;"| u-boot-dtb.imx
| style="padding: 5px;"| U-BOOT image with DTB
|-
|}
 
= Flashing U-BOOT image to a SD card =
Replace sdX with the right device name.
$ sudo dd if=u-boot-dtb.imx of=/dev/sdX bs=1k seek=1 conv=fsync
 
The U-BOOT image should be at address 0x400 on the SD card.
 
= See also =
* [[iMX8M-CM Yocto Linux | Yocto Linux]]
* [[iMX8M-CM Linux|Building Linux Kernel]]
* [[iMX8M-CM U-Boot|Building U-Boot]]

Latest revision as of 11:18, 11 October 2021




Overview

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

Building U-BOOT for iMX8M-CM

This U-BOOT is based on https://source.codeaurora.org/external/imx/uboot-imx.git, branch imx_v2020.04_5.4.24_2.1.0

Setup 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/u-boot.git u-boot-ronetix --depth=1 -b imx_v2020.04_5.4.24_2.1.0_rnx
$ cd u-boot-ronetix

Configure

$ make imx8mq_cm_defconfig

Download and build i.MX8M firmware

$ source tools/imx8m_build_firmware.sh imx8mq

Build

$ make flash.bin

Build Results

File Name Description
u-boot U-BOOT ELF image used for JTAG debugging
u-boot-dtb.imx U-BOOT image with DTB
flash.bin U-BOOT image with DTB and firmware

Flashing U-BOOT image to a SD card

Replace sdX with the right device name.

$ sudo dd if=flash.bin of=/dev/sdX bs=1k seek=33 conv=fsync


See also