From ae3f90922f5c31bd6198deb149edb9476ecfe4ef Mon Sep 17 00:00:00 2001
From: Dorde Stojicevic 
[email protected]<mailto:[email protected]>
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:[email protected]>

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(-)

diff --git a/boot/bootm.c b/boot/bootm.c
index 4bdca22ea8c..c90c36a6988 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -684,22 +684,19 @@ 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",
+                                      load, relocated_addr,
+                                      relocated_addr + image_size);
+                               memmove((void *)relocated_addr, load_buf, 
image_size);
+                       }
+
+                       images->ep = relocated_addr;
+                       images->os.start = relocated_addr;
+                       images->os.end = relocated_addr + image_size;
                }
-
-               /* Handle BOOTM_STATE_LOADOS */
-               if (relocated_addr != load) {
-                       printf("Moving Image from 0x%lx to 0x%lx, end=0x%lx\n",
-                              load, relocated_addr,
-                              relocated_addr + image_size);
-                       memmove((void *)relocated_addr, load_buf, image_size);
-               }
-
-               images->ep = relocated_addr;
-               images->os.start = relocated_addr;
-               images->os.end = relocated_addr + image_size;
        }

        if (CONFIG_IS_ENABLED(LMB)) {
--
2.53.0


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

Reply via email to