mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
46ae4e4b95
commit
c45051450e
|
@ -71,6 +71,7 @@ STATIC KERNEL_BLOB_ITEMS mKernelBlobItems[] = {
|
||||||
|
|
||||||
STATIC KERNEL_BLOB *mKernelBlobs;
|
STATIC KERNEL_BLOB *mKernelBlobs;
|
||||||
STATIC UINT64 mKernelBlobCount;
|
STATIC UINT64 mKernelBlobCount;
|
||||||
|
STATIC UINT64 mKernelNamedBlobCount;
|
||||||
STATIC UINT64 mTotalBlobBytes;
|
STATIC UINT64 mTotalBlobBytes;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1139,6 +1140,8 @@ QemuKernelFetchNamedBlobs (
|
||||||
FreePool (DirEntry);
|
FreePool (DirEntry);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mKernelNamedBlobCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (DirEntry);
|
FreePool (DirEntry);
|
||||||
|
@ -1218,8 +1221,8 @@ QemuKernelLoaderFsDxeEntrypoint (
|
||||||
}
|
}
|
||||||
|
|
||||||
Blob = FindKernelBlob (L"kernel");
|
Blob = FindKernelBlob (L"kernel");
|
||||||
if (Blob == NULL) {
|
if ((Blob == NULL) && (mKernelNamedBlobCount == 0)) {
|
||||||
DEBUG ((DEBUG_INFO, "%a: no kernel present -> quit\n", __func__));
|
DEBUG ((DEBUG_INFO, "%a: no kernel and no named blobs present -> quit\n", __func__));
|
||||||
Status = EFI_NOT_FOUND;
|
Status = EFI_NOT_FOUND;
|
||||||
goto FreeBlobs;
|
goto FreeBlobs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue