From 126f47c3b81b4c429f8ddccaf3e2c70b665598f9 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 5 Sep 2020 14:50:48 -0600 Subject: 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 Reviewed-by: Wolfgang Wallner Reviewed-by: Bin Meng --- arch/x86/lib/zimage.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch') diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index 92c9cac143b..03e33a3ee02 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; } -- cgit v1.2.3