diff options
author | Jonas Karlman <jonas@kwiboo.se> | 2023-06-09 14:59:01 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-06-14 12:56:10 -0400 |
commit | a7e4dffcd8c582bf4344548270d2fc7ac6c0f9ec (patch) | |
tree | dc6f0d8b1bd5db8d9928e61ae1574f34fefc483c /boot/bootmeth_extlinux.c | |
parent | bcb1d269a4b9870033baced22b8225c089aa005a (diff) |
bootstd: Fix relative path use in extlinux bootmeth
Using relative path in a /boot/extlinux/extlinux.conf file fails to load
linux kernel.
Using a /boot/extlinux/extlinux.conf file:
LABEL test
LINUX ../linux/Image
Result in following error:
Retrieving file: ../linux/Image
Skipping test for failure retrieving kernel
Boot failed (err=-14)
However, using sysboot cmd successfully load kernel using same file:
sysboot mmc 1:1 any ${scriptaddr} /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/../linux/Image
Fix relative path using bootmeth extlinux by supplying bootfile path
instead of subdir path in the call to pxe_setup_ctx, same as done in the
sysboot command.
Fixes: 31aefaf89a5b ("bootstd: Add an implementation of distro boot")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/bootmeth_extlinux.c')
-rw-r--r-- | boot/bootmeth_extlinux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/boot/bootmeth_extlinux.c b/boot/bootmeth_extlinux.c index 24be076022..6b2b840038 100644 --- a/boot/bootmeth_extlinux.c +++ b/boot/bootmeth_extlinux.c @@ -150,7 +150,7 @@ static int extlinux_boot(struct udevice *dev, struct bootflow *bflow) info.dev = dev; info.bflow = bflow; ret = pxe_setup_ctx(&ctx, &cmdtp, extlinux_getfile, &info, true, - bflow->subdir, false); + bflow->fname, false); if (ret) return log_msg_ret("ctx", -EINVAL); |