diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2025-01-16 18:03:01 +0300 |
---|---|---|
committer | Ard Biesheuvel <workofard@gmail.com> | 2025-01-21 15:45:46 +0300 |
commit | 46ae4e4b9574530e5081e98af0495d6f6d28379f (patch) | |
tree | 27cefd58cc81a3f1dc147a53633ab30dfd66d8ba | |
parent | 1111e9fe7078eed9e5c50e1808776ee40a629e16 (diff) | |
download | edk2-46ae4e4b9574530e5081e98af0495d6f6d28379f.tar.xz |
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 <kraxel@redhat.com>
-rw-r--r-- | OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) {
|