From 46ae4e4b9574530e5081e98af0495d6f6d28379f Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 16 Jan 2025 16:03:01 +0100 Subject: OvmfPkg/QemuKernelLoaderFsDxe: accept absolute paths EFI shell looks for "\startup.nsh". Try "-fw_cfg name=etc/boot/startup.nsh,string='echo hello'" ;) Signed-off-by: Gerd Hoffmann --- OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c index 3e1a876bf0..5b90420dad 100644 --- a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c +++ b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c @@ -806,6 +806,11 @@ QemuKernelStubFileOpen ( // // Locate the file. // + if (FileName[0] == '\\') { + // also accept absolute paths, i.e. '\kernel' for 'kernel' + FileName++; + } + Blob = FindKernelBlob (FileName); if (Blob == NULL) { -- cgit v1.2.3