summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-09-05 14:50:48 -0600
committerBin Meng <bmeng.cn@gmail.com>2020-09-25 11:27:09 +0800
commit126f47c3b81b4c429f8ddccaf3e2c70b665598f9 (patch)
tree7ced6b4882948e4123ca40e8b8a7393ece246bfa /arch/x86
parent3e5975932476b3775dad369bf70ba2fc542d847c (diff)
downloadu-boot-126f47c3b81b4c429f8ddccaf3e2c70b665598f9.tar.gz
x86: zboot: Set environment variables for image locations
At present it is not possible to tell from a script where the setup block is, or where the image was loaded to. Add environment variables for this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/lib/zimage.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 92c9cac143..03e33a3ee0 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -382,6 +382,9 @@ static int do_zboot_load(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
state.base_ptr = base_ptr;
+ if (env_set_hex("zbootbase", (ulong)base_ptr) ||
+ env_set_hex("zbootaddr", state.load_address))
+ return CMD_RET_FAILURE;
return 0;
}