Skip to contentSkip to conversation

package/freescale-imx: Allow firmware installation on i.MX93

PATCH In review Fabio Estevam 3 participants 5 messages Feb 26, 2025 – Feb 27, 2025 Arm i.MX and Layerscape

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/2 package/freescale-imx: Allow firmware installation on i.MX93

Currently, the LPDDR firmware binaries do not get installed into the U-Boot mainline directory, causing U-Boot build to fail for i.MX93.

Fix this problem by expanding the BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW checks to also take BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW_IMX9 into account.

---
 boot/uboot/Config.in                         | 1 +
 package/freescale-imx/firmware-imx/Config.in | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
boot/uboot/Config.in +1 -0
index f17f932c9e95..10098ed227b6 100644
@@ -314,6 +314,7 @@ config BR2_TARGET_UBOOT_NEEDS_IMX_FIRMWARE
 	bool "U-Boot needs firmware-imx"
 	depends on BR2_PACKAGE_FIRMWARE_IMX
 	depends on BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW || \
+		BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW_IMX9 || \
 		BR2_PACKAGE_FIRMWARE_IMX_NEEDS_HDMI_FW
 	help
 	  Some i.MX8 platforms (such as i.MX8 M, i.MX 8M Mini, i.MX 8M
package/freescale-imx/firmware-imx/Config.in +1 -1
index 4a9986448f8b..17c10039b2ce 100644
@@ -62,7 +62,7 @@ config BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW_IMX9
 	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
 	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
 
-if BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW
+if BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW || BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW_IMX9
 
 choice
 	bool "DDR training binaries"
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
author reviewer
#1 lore raw

PATCH 2/2 configs/imx93-evk_defconfig: new defconfig

Add a new defconfig for the imx93-evk board that uses upstream components, such as:

- Linux Kernel: Upstream version 6.12.16
- U-boot: Upstream version 2025.01
- ATF: Upstream version 2.12

---
 board/freescale/imx93-evk/extlinux.conf.in    |  4 ++
 board/freescale/imx93-evk/genimage.cfg.in     | 17 +++++++
 .../arm-trusted-firmware.hash                 |  2 +
 .../patches/linux-headers/linux-headers.hash  |  1 +
 .../imx93-evk/patches/linux/linux.hash        |  2 +
 .../imx93-evk/patches/uboot/uboot.hash        |  2 +
 board/freescale/imx93-evk/post-build.sh       |  7 +++
 board/freescale/imx93-evk/readme.txt          | 31 ++++++++++++
 configs/imx93-evk_defconfig                   | 50 +++++++++++++++++++
 9 files changed, 116 insertions(+)
 create mode 100644 board/freescale/imx93-evk/extlinux.conf.in
 create mode 100644 board/freescale/imx93-evk/genimage.cfg.in
 create mode 100644 board/freescale/imx93-evk/patches/arm-trusted-firmware/arm-trusted-firmware.hash
 create mode 120000 board/freescale/imx93-evk/patches/linux-headers/linux-headers.hash
 create mode 100644 board/freescale/imx93-evk/patches/linux/linux.hash
 create mode 100644 board/freescale/imx93-evk/patches/uboot/uboot.hash
 create mode 100755 board/freescale/imx93-evk/post-build.sh
 create mode 100644 board/freescale/imx93-evk/readme.txt
 create mode 100644 configs/imx93-evk_defconfig
board/freescale/imx93-evk/extlinux.conf.in new file +4 -0
new file mode 100644
index 000000000000..143e28a823c3
@@ -0,0 +1,4 @@
+label buildroot
+  kernel /boot/Image
+  devicetree /boot/freescale/imx93-11x11-evk.dtb
+  append root=PARTUUID=%PARTUUID% rootwait rw
board/freescale/imx93-evk/genimage.cfg.in new file +17 -0
new file mode 100644
index 000000000000..10c52548cdfa
@@ -0,0 +1,17 @@
+image sdcard.img {
+	hdimage {
+		partition-table-type = "gpt"
+	}
+
+	partition imx-boot {
+		in-partition-table = "no"
+		image = "flash.bin"
+		offset = 32K
+	}
+
+	partition rootfs {
+		offset = 8M
+		image = "rootfs.ext4"
+		partition-uuid = %PARTUUID%
+	}
+}
board/freescale/imx93-evk/patches/arm-trusted-firmware/arm-trusted-firmware.hash new file +2 -0
new file mode 100644
index 000000000000..b5898cba3f96
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  06b35a3596b8417bf66f7bfdd7acd181bcb53fc36dc13216227b5cae154e0219  arm-trusted-firmware-v2.12-git4.tar.gz
board/freescale/imx93-evk/patches/linux-headers/linux-headers.hash new file +1 -0
new file mode 120000
index 000000000000..5808d92afe89
@@ -0,0 +1 @@
+../linux/linux.hash
\ No newline at end of file
board/freescale/imx93-evk/patches/linux/linux.hash new file +2 -0
new file mode 100644
index 000000000000..5e0df51126d5
@@ -0,0 +1,2 @@
+# From https://www.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
+sha256  5f81362a694f51520bff9faecb73f1cc9bc7bece6fdd10d5c27e348df39d7dc4  linux-6.12.16.tar.xz
board/freescale/imx93-evk/patches/uboot/uboot.hash new file +2 -0
new file mode 100644
index 000000000000..50674352d71d
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  cdef7d507c93f1bbd9f015ea9bc21fa074268481405501945abc6f854d5b686f  u-boot-2025.01.tar.bz2
board/freescale/imx93-evk/post-build.sh new file +7 -0
new file mode 100755
index 000000000000..604f387768d8
@@ -0,0 +1,7 @@
+#!/bin/sh
+BOARD_DIR="$(dirname "$0")"
+PARTUUID="$("$HOST_DIR"/bin/uuidgen)"
+
+install -d "$TARGET_DIR/boot/extlinux/"
+sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/extlinux.conf.in" > "$TARGET_DIR/boot/extlinux/extlinux.conf"
+sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/genimage.cfg.in" > "$BINARIES_DIR/genimage.cfg"
board/freescale/imx93-evk/readme.txt new file +31 -0
new file mode 100644
index 000000000000..9d3302a0ca10
@@ -0,0 +1,31 @@
+NXP i.MX93 EVK
+==============
+
+This is a Buildroot target for building an image for the imx93-evk
+board using upstream components: TF-A, U-Boot and kernel.
+
+How to build it
+===============
+
+Configure Buildroot and build it:
+
+  $ make imx93-evk_defconfig
+  $ make
+
+Flashing the SD card image
+==========================
+
+Copy the sdcard.img file into the SD card:
+
+  $ sudo dd if=output/images/sdcard.img of=<your-sd-device>; sync
+
+
+Booting the board
+=================
+
+To boot your newly created system:
+
+- Insert the SD card in the MicroSD slot of the board.
+- Connect a serial to USB cable to the DBG port.
+- Open a terminal on the ttyUSB2 port. For example: sudo picocom -b 115200 /dev/ttyUSB2
+- Power on the board.
configs/imx93-evk_defconfig new file +50 -0

50 lines not on this page · raw message

Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Fabio Estevam
Quoted 7 lines · Fabio Estevam

Currently, the LPDDR firmware binaries do not get installed into the U-Boot mainline directory, causing U-Boot build to fail for i.MX93.

Fix this problem by expanding the BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW checks to also take BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW_IMX9 into account.

Series applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
In reply to Fabio Estevam

Hi Fabio, all,

package/freescale-imx/firmware-imx/Config.in config BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW_IMX9 · line 65

Quoted 3 lines · Fabio Estevam
package/freescale-imx/firmware-imx/Config.in +1 -1
-if BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW
+if BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW || BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW_IMX9

With that changes, the user can choose DDR on i.MX9{1,3} systems whereas only LPDDR is supported. The DDR3 and DDR4 options should be hidden on i.MX93.

Regards,

Quoted 3 lines

choice
bool "DDR training binaries"

Signature · 6 lines
Sébastien Szymanski, Armadeus Systems
Software engineer
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
author reviewer
#4 lore raw

Hi Sébastien,

Quoted 3 lines · Sébastien Szymanski

With that changes, the user can choose DDR on i.MX9{1,3} systems whereas only LPDDR is supported. The DDR3 and DDR4 options should be hidden on i.MX93.

Good catch. I will work on a patch to hide DDR3 and DDR4 options for i.MX93.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot