Bug 15973

Summary: imx8m bootloader image generation broken since update to imx-mkimage 6.1.36_2.1.0
Product: buildroot Reporter: Martin Whitaker <buildroot>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: blocker CC: buildroot
Priority: P5    
Version: 2024.02   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: Patch to fix this bug

Description Martin Whitaker 2024-03-06 15:47:17 UTC
imx-mkimage 6.1.36_2.1.0 includes this commit

https://github.com/nxp-imx/imx-mkimage/commit/5a0faefc223e51e088433663b6e7d6fbce89bf59

which inserts an additional data structure in the generated image. The external data position passed to (the uboot) mkimage in board/freescale/common/imx/imx8-bootloader-prepare.sh needs to be adjusted accordingly, so '-p 0x5000' instead of '-p 0x3000'. You can see that same adjustment being made in the soc.mak file in the commit reference.

I have only tested this on an i.MX8M Nano DDR4 EVK board, but expect it applies to all i.MX8M boards that use imx-mkimage to generate their bootloader image.

This bug first appeared in the 2023.11 release.
Comment 1 Wojciech NiziƄski 2024-03-27 17:44:15 UTC
Bumped `imx-mkimage` from `lf-5.10.72_2.2.0` to `lf-6.1.36-2.1.0`
in commit: https://git.busybox.net/buildroot/commit/package/imx-mkimage?id=72de7890233026f020de4aba3e8e86c156e55773

introduces i.MX9 support. Now all i.MX8M? based targets are broken (boards using 'board/freescale/common/imx/imx8-bootloader-prepare.sh' to generate boot image).
Comment 2 Arnout Vandecappelle 2024-03-27 21:08:27 UTC
The initial report by Martin Whitaker proposes a fix, but I don't fully understand what the fix is (and I anyway don't have any imx8 board to test it on). So can someone provide a patch?
Comment 3 Martin Whitaker 2024-03-28 10:44:59 UTC
Created attachment 9733 [details]
Patch to fix this bug

Here is a patch that works for me, tested on an IMX8MN platform.
Comment 4 max 2024-04-23 17:07:54 UTC
(In reply to Martin Whitaker from comment #3)

Can confirm that the patch fixes the issue for IMX8MM too.