-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to NXP's iMX93 SoC A1 revision #1700
Closed
jmarcoscosta
wants to merge
3
commits into
Freescale:master
from
jmarcoscosta:master-add-support-to-IMX_SOC_REV-A1
Closed
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
recipes-bsp/imx-mkimage/files/0001-iMX9-soc.mak-dynamically-set-AHAB_IMG.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @thochstein, could you please ensure that you apply those changes for the upcoming release? Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes to
imx-boot
andimx-mkimage
are not necessary. The root cause is there is some other meta-data that did not get upstreamed, namely the setting ofIMX_SOC_REV
:I'm testing now, but unfortunately my build is delayed by
rust
rebuild.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
I'm going to test this tomorrow morning, but I was getting the very same error (which I'll try to reproduce and send the logs here) even though I was setting IMX_SOC_REV to "A1" by hand in my local.conf, so I don't really see how setting this elsewhere would give a different result.
Kind regards,
João
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, I did run into the error as well. It seems that imx-mkimage is not up to date either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully this is fixed now by #1701.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmarcoscosta please test #1701
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@otavio @thochstein I just tested it, and it works fine. Thanks!
Still, I must admit I'm feeling a bit bothered with keeping this hardcoded firmware name in the makefile I fixed.
Besides, shouldn't we keep at least the commit messages, for documentation's sake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jmarcoscosta,
Glad to hear it works!
The firmware name is not hard-coded anymore [1] and is driven by
IMX_SOC_REV
, which setsSECO_FIRMWARE_NAME
and gets passed toimx-mkimage
[2].[1] 0688f79
[2] https://github.com/nxp-imx/imx-mkimage/blob/lf-6.1.36_2.1.0/iMX9/soc.mak#L20-L21
In the end this error should never have happened had we done the upstreaming of NXP release 6.1.36-2.1.0 properly. I can try to flesh out the new commit messages with some of this information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thanks!
Could you please give me a heads-up once this is all merged into meta-freescale's master?