]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: move sandbox specifics to booti_setup()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 11 Jan 2024 08:03:43 +0000 (09:03 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 12 Apr 2024 14:53:31 +0000 (08:53 -0600)
Instead of checking a configuration setting in booti_start() adjust the
sandbox implementation of booti_setup().

Write a console message when trying to run the booti command on the sandbox
indicating that it is not supported.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
arch/sandbox/lib/bootm.c
cmd/booti.c

index 8dbcd9ff7dd3aadd65d3c0735d87fe8dc288a831..44ba8b52e13973be34534c14e72261da24de62ea 100644 (file)
@@ -85,5 +85,7 @@ int do_bootm_linux(int flag, struct bootm_info *bmi)
 int booti_setup(ulong image, ulong *relocated_addr, ulong *size,
                bool force_reloc)
 {
-       return 0;
+       log_err("Booting is not supported on the sandbox.\n");
+
+       return 1;
 }
index 898df0f8896bfb728422b372436eb7361a2c89bf..b9637b3ec3d8de93f51bdd09ce295383fbaa4617 100644 (file)
@@ -74,7 +74,7 @@ static int booti_start(struct bootm_info *bmi)
        unmap_sysmem((void *)ld);
 
        ret = booti_setup(ld, &relocated_addr, &image_size, false);
-       if (ret || IS_ENABLED(CONFIG_SANDBOX))
+       if (ret)
                return 1;
 
        /* Handle BOOTM_STATE_LOADOS */