efi_loader: Pass file path to payload

The payload gets information on where it got loaded from. This includes
the device as well as file path.

So far we've treated both as the same thing and always gave it the device
name. However, in some situations grub2 actually wants to find its loading
path to find its configuration file.

So let's split the two semantically separte bits into separate structs and
pass the loaded file name into our payload when we load it using "load".

Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Alexander Graf
2016-04-11 16:16:19 +02:00
committed by Tom Rini
parent 8c3df0bf2e
commit c07ad7c035
3 changed files with 30 additions and 10 deletions

View File

@ -27,7 +27,8 @@ U_BOOT_CMD(
static int do_load_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{
efi_set_bootdev(argv[1], (argc > 2) ? argv[2] : "");
efi_set_bootdev(argv[1], (argc > 2) ? argv[2] : "",
(argc > 4) ? argv[4] : "");
return do_load(cmdtp, flag, argc, argv, FS_TYPE_ANY);
}