[U-Boot] [PATCH 1/1] efi_loader: reenable selftest
Rob Clark
robdclark at gmail.com
Wed Sep 20 20:31:08 UTC 2017
On Wed, Sep 20, 2017 at 3:46 PM, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> ad503ffe9c6 efi_loader: refactor boot device and loaded_image handling
> leads to an error when building with CONFIG_CMD_BOOTEFI_SELFTEST=y
> This patch fixes the problem.
>
> Fixes: ad503ffe9c6 efi_loader: refactor boot device and loaded_image handling
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
> cmd/bootefi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/cmd/bootefi.c b/cmd/bootefi.c
> index 1e2dbcc4a4..9460747f96 100644
> --- a/cmd/bootefi.c
> +++ b/cmd/bootefi.c
> @@ -273,6 +273,8 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> #endif
> #ifdef CONFIG_CMD_BOOTEFI_SELFTEST
> if (!strcmp(argv[1], "selftest")) {
> + struct efi_loaded_image loaded_image_info = {};
> +
> /*
> * gd lives in a fixed register which may get clobbered while we
> * execute the payload. So save it here and restore it on every
> --
> 2.14.1
>
I'm not sure this is complete enough (or at least will run into
problems if you add more tests) since loaded_image_info won't be
populated completely. You want a efi_setup_loaded_image() call:
efi_setup_loaded_image(&loaded_image_info, &loaded_image_info_obj,
bootefi_device_path, bootefi_image_path);
BR,
-R
More information about the U-Boot
mailing list