summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-10-11 09:47:14 -0600
committerSimon Glass <sjg@chromium.org>2022-10-17 21:17:13 -0600
commit0718c3154c428b694bff94fab178bc2c43ce3ff9 (patch)
treeb3b2da38a4f2ac44f9fcb31fcbba6e393f847d2e /arch/sandbox
parentbfdfc5d85398fba50e5e2b1e571df53f189f565a (diff)
downloadu-boot-0718c3154c428b694bff94fab178bc2c43ce3ff9.tar.gz
sandbox: Support FDT fixups
Add support for doing device tree fixups in sandbox. This allows us to test that functionality in CI. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/lib/bootm.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c
index c1742f94de..28f4a746fb 100644
--- a/arch/sandbox/lib/bootm.c
+++ b/arch/sandbox/lib/bootm.c
@@ -50,8 +50,25 @@ int bootz_setup(ulong image, ulong *start, ulong *end)
return ret;
}
+/* Subcommand: PREP */
+static int boot_prep_linux(struct bootm_headers *images)
+{
+ int ret;
+
+ if (CONFIG_IS_ENABLED(LMB)) {
+ ret = image_setup_linux(images);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
+}
+
int do_bootm_linux(int flag, int argc, char *argv[], struct bootm_headers *images)
{
+ if (flag & BOOTM_STATE_OS_PREP)
+ return boot_prep_linux(images);
+
if (flag & (BOOTM_STATE_OS_GO | BOOTM_STATE_OS_FAKE_GO)) {
bootstage_mark(BOOTSTAGE_ID_RUN_OS);
printf("## Transferring control to Linux (at address %08lx)...\n",