Hi guys,

and thanks for your fast response.

Sorry for the formatting issue, I am bound to our company Outlook, which 
hard-codes our signatures, so this one will not be possible to take out. I am 
not quite sure git send-email would work, for the same reason + corporate 
stuff....

Anyhow, an update/clarification on the things going on here (I could/should 
have sent initially, sorry for that):

1) Lynx Toolchain compiles a FIT Image with the following structure:
        {
                Images{
                        Kernel-1 {
                                Data=Image;
                        }
                        Fdt-1 {
                                Data=system.dtb;
                        }
                }
                Configurations {
                        Here kernel-1 and fdt-1 used as default conf-1
                }
        }
2) Data=Image does not have the Magic Code 0x644d5241
3) It is booting with U-Boot SPL 2020.04+g1ccc9d93576+p1 according to Lynx. I 
haven´t tested myself since we started with 2024.04, and we need it for some 
other features.
4) Then I investigated differences v2020.04 vs v2024.04, and found this part of 
code came in.
5) The finding is consistent with last error reported by U-Boot prior to reset 
"Bad Linux ARM64 Image magic!"

6) I 1st tried patching the Data=Image in Lynx FIT with the magic code, but it 
didn’t work.
7) once I patched bootm in U-Boot to skip this part and behaves as in v2020.04 
(excluded all restructuring etc.) it booted the Lynx kernel

Basically, v2024.04 correctly detects "Bad Linux ARM64 Image magic!", as none 
is there at the moment, but in order to boot Lynx Hypervisor as-is this 
backward compatibility to v2020.04 is needed.

Does this shine more light on it?

Greetings
Dorde


Dorde Stojicevic

Networks and Cybersecurity

Rohde & Schwarz SIT GmbH
Hemminger Strasse 41 | 70499 Stuttgart-Weilimdorf | Germany
Phone: +4971169945195

Internet: www.rohde-schwarz.com



Geschäftsführer / Managing Director: Ralf Koenzen
Aufsichtsratsvorsitzender / Chair of the Supervisory Board: Mario Paoli
Sitz / Registered Office: Stuttgart
Handelsregister / Commercial Register: AG Stuttgart HRB 759 934
Umsatzsteuer-Identifikationsnummer (USt-IdNr.) / VAT Identification No.: DE 121 
963 283
Elektro-Altgeräte Register (EAR) / WEEE Register No.: DE 877 727 67



-----Original Message-----
From: Tom Rini <[email protected]> 
Sent: Tuesday, February 3, 2026 6:00 PM
To: Stojicevic Dorde (11SIEPT1) <[email protected]>
Cc: [email protected]
Subject: *EXT* Re: [PATCH] arm: Backward compatibility to U-Boot v2020.04 
***CAUTION_Invalid_Signature***

On Tue, Feb 03, 2026 at 03:41:05PM +0000, Dorde Stojicevic wrote:

> From ae3f90922f5c31bd6198deb149edb9476ecfe4ef Mon Sep 17 00:00:00 2001
> From: Dorde Stojicevic 
> [email protected]<mailto:dorde.stojicevic@rohde-schwa
> rz.com>
> Date: Tue, 3 Feb 2026 14:48:36 +0100
> Subject: [PATCH] arm: Backward compatibility to U-Boot v2020.04 
> Series-to: [email protected]<mailto:[email protected]> 
> Series-version: 1
> Signed-off-by: Dorde Stojicevic 
> [email protected]<mailto:dorde.stojicevic@rohde-schwa
> rz.com>
> 
> Cover-letter:
> Backward compatibility with U-Boot v2020.04 Needed in order to boot 
> LynxSecure Hypervisor, otherwise U-Boot will fail at this position and 
> reset the controller END
> Commit-notes:
> Backward compatibility with U-Boot v2020.04 Needed in order to boot 
> LynxSecure Hypervisor, otherwise U-Boot will fail at this position and 
> reset the controller END
> ---
> boot/bootm.c | 27 ++++++++++++---------------
> 1 file changed, 12 insertions(+), 15 deletions(-)

This is an interesting find. And everything Quentin said applies. Also, the 
patch as-sent doesn't apply cleanly due to spacing issues, possibly from 
copy/paste to your email client?

Now, taking this patch and re-formatting things a bit, if do a "git diff
--ignore-all-space":

diff --git a/boot/bootm.c b/boot/bootm.c index 4bdca22ea8cf..9743051160ed 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -684,11 +684,7 @@ static int bootm_load_os(struct bootm_headers *images, int 
boot_progress)
                int ret;
 
                ret = booti_setup(load, &relocated_addr, &image_size, false);
-               if (ret) {
-                       printf("Failed to prep arm64 kernel (err=%d)\n", ret);
-                       return BOOTM_ERR_RESET;
-               }
-
+               if (ret == 0) {
                        /* Handle BOOTM_STATE_LOADOS */
                        if (relocated_addr != load) {
                                printf("Moving Image from 0x%lx to 0x%lx, 
end=0x%lx\n",

Is the interesting part. And you say this is on ARM, so we look at booti_setup 
in arch/arm/lib/image.c. The failure cases of the function is only "Bad Linux 
ARM64 Image magic!". So what are you trying to boot here, and is it really 
acting like a Linux Kernel "Image" file, which has a specific magic value? Or 
are we falling down to this case when we should not be?

Since it sounds like you can reproduce this rather easily, it might be good to 
use "git bisect" to narrow down which exact commit broke your use case, and we 
can work from there.

--
Tom

Reply via email to