Skip to content

Commit

Permalink
imx-boot: patch makefile in imx-mkimage/iMX9
Browse files Browse the repository at this point in the history
This is a follow-up to the previous commit, which handles
firmware naming in Yocto side.

Add patch to handle it in imx-boot/imx-mkimage side.

Signed-off-by: Joao Marcos Costa <[email protected]>
  • Loading branch information
jmarcoscosta committed Dec 7, 2023
1 parent 02aad29 commit 3f8ddb1
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From e3803a81326cece3b4cdd086ab009e9858fec21e Mon Sep 17 00:00:00 2001
From: Joao Marcos Costa <[email protected]>
Date: Thu, 7 Dec 2023 15:45:12 +0100
Subject: [PATCH] iMX9/soc.mak: dynamically set AHAB_IMG

Instead of assigning a constant value to AHAB_IMG (i.e.,
mx93a0-ahab-container.img), set it to SECO_FIRMWARE_NAME.

This variable is defined in
use-imx-security-controller-firmware.bbclass, then it is passed as a
make parameter in imx-boot's do_compile() task.

As of now, there are revisions beyond A0 (namely A1), so the firmware
must be compiled accordingly. The firmware name is already handled in
Yocto side, but not in imx-boot/imx-mkimage side. This patch implements
such feature.

Signed-off-by: Joao Marcos Costa <[email protected]>
---
iMX9/soc.mak | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iMX9/soc.mak b/iMX9/soc.mak
index 7c4086c..fa13391 100644
--- a/iMX9/soc.mak
+++ b/iMX9/soc.mak
@@ -16,7 +16,7 @@ else
RENAME = rename
endif

-AHAB_IMG = mx93a0-ahab-container.img
+AHAB_IMG = ${SECO_FIRMWARE_NAME}
MCU_IMG = m33_image.bin

SPL_LOAD_ADDR ?= 0x2049A000
--
2.43.0

1 change: 1 addition & 0 deletions recipes-bsp/imx-mkimage/imx-mkimage_git.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ DEPENDS = "zlib-native openssl-native"

SRC_URI = "git://github.com/nxp-imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH} \
file://0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch \
file://0001-iMX9-soc.mak-dynamically-set-AHAB_IMG.patch \
"
SRCBRANCH = "lf-6.1.22_2.0.0"
SRCREV = "5cfd218012e080fb907d9cc301fbb4ece9bc17a9"
Expand Down

0 comments on commit 3f8ddb1

Please sign in to comment.