Bug 15973 - imx8m bootloader image generation broken since update to imx-mkimage 6.1.36_2.1.0
Summary: imx8m bootloader image generation broken since update to imx-mkimage 6.1.36_2...
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2024.02
Hardware: All Linux
: P5 blocker
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-06 15:47 UTC by Martin Whitaker
Modified: 2024-06-04 13:55 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
Patch to fix this bug (3.71 KB, patch)
2024-03-28 10:44 UTC, Martin Whitaker
Details

Note You need to log in before you can comment on or make changes to 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.