diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2025-01-20 11:28:37 +0100 |
---|---|---|
committer | Ard Biesheuvel <workofard@gmail.com> | 2025-01-21 13:45:46 +0100 |
commit | c45051450efbdae4a38f07998b3e7b77abe7173a (patch) | |
tree | 3576ca9ab99500a27bcee6b49ae37f2134695748 | |
parent | 46ae4e4b9574530e5081e98af0495d6f6d28379f (diff) | |
download | edk2-c45051450efbdae4a38f07998b3e7b77abe7173a.tar.gz |
OvmfPkg/QemuKernelLoaderFsDxe: don't quit when named blobs are present
Allows to use the qemu kernel loader pseudo file system for other
purposes than loading a linux kernel (or efi binary). Passing
startup.nsh for EFI shell is one example.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c index 5b90420dad..add914daa8 100644 --- a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c +++ b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c @@ -71,6 +71,7 @@ STATIC KERNEL_BLOB_ITEMS mKernelBlobItems[] = { STATIC KERNEL_BLOB *mKernelBlobs;
STATIC UINT64 mKernelBlobCount;
+STATIC UINT64 mKernelNamedBlobCount;
STATIC UINT64 mTotalBlobBytes;
//
@@ -1139,6 +1140,8 @@ QemuKernelFetchNamedBlobs ( FreePool (DirEntry);
return Status;
}
+
+ mKernelNamedBlobCount++;
}
FreePool (DirEntry);
@@ -1218,8 +1221,8 @@ QemuKernelLoaderFsDxeEntrypoint ( }
Blob = FindKernelBlob (L"kernel");
- if (Blob == NULL) {
- DEBUG ((DEBUG_INFO, "%a: no kernel present -> quit\n", __func__));
+ if ((Blob == NULL) && (mKernelNamedBlobCount == 0)) {
+ DEBUG ((DEBUG_INFO, "%a: no kernel and no named blobs present -> quit\n", __func__));
Status = EFI_NOT_FOUND;
goto FreeBlobs;
}
|