diff options
author | Ryan Harkin <ryan.harkin@linaro.org> | 2015-03-18 16:41:34 +0000 |
---|---|---|
committer | Ryan Harkin <ryan.harkin@linaro.org> | 2015-03-18 16:41:38 +0000 |
commit | 3f4378ae40c9fab342501d9b1f740e5cd4d2b270 (patch) | |
tree | cd7a07c117ffaa867ac3bbff04110111ae11952a | |
parent | 41f983439759a47ab493682c9f22b4c19d8079e1 (diff) |
Update UEFI binary to enable TFTP
The upstream UEFI code is broken when TFTP booting an EFI stubbed kernel
because UEFI assumes that it can boot the kernel using the EFI stub,
however, the EFI stub is unable to TFTP down the DTB or initrd files.
So, to get it to work, we have to allow the user to be able to tell UEFI
that they don't want to boot the kernel as an EFI application, and
therefore allow the DTB and initrd to be passed in explicitly from UEFI
config.
I build this from update with an upstream UEFI pls one patch:
ac8deed 2015-01-27 RMH: remove detection of EFI stub [Ryan Harkin]
c026931 2015-01-12 MdeModulePkg/PartitionDxe: Fixed El Torito support
For reference, the patch looks like this:
commit ac8deed8c95093b478bddd6a2cc377f94963a736
Author: Ryan Harkin <ryan.harkin@linaro.org>
Date: Tue Jan 27 18:53:28 2015 +0000
RMH: remove detection of EFI stub
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
---
ArmPlatformPkg/Bds/BootOptionSupport.c | 34
----------------------------------
1 file changed, 34 deletions(-)
diff --git a/ArmPlatformPkg/Bds/BootOptionSupport.c
b/ArmPlatformPkg/Bds/BootOptionSupport.c
index 974f220..a51d908 100644
--- a/ArmPlatformPkg/Bds/BootOptionSupport.c
+++ b/ArmPlatformPkg/Bds/BootOptionSupport.c
@@ -227,11 +227,6 @@ BootDeviceGetType (
CHAR16* FileName;
EFI_DEVICE_PATH* PrevDevicePathNode;
EFI_DEVICE_PATH* DevicePathNode;
- EFI_PHYSICAL_ADDRESS Image;
- UINTN FileSize;
- EFI_IMAGE_DOS_HEADER* DosHeader;
- UINTN PeCoffHeaderOffset;
- EFI_IMAGE_NT_HEADERS32* NtHeader;
//
// Check if the last node of the device path is a FilePath node
@@ -261,41 +256,12 @@ BootDeviceGetType (
} else if (HasFilePathEfiExtension(FileName)) {
IsEfiApp = TRUE;
} else {
- // Check if the file exist
- Status = BdsLoadImage (DevicePath, AllocateAnyPages, &Image,
&FileSize);
- if (!EFI_ERROR (Status)) {
-
- DosHeader = (EFI_IMAGE_DOS_HEADER *)(UINTN) Image;
- if (DosHeader->e_magic == EFI_IMAGE_DOS_SIGNATURE) {
- //
- // DOS image header is present,
- // so read the PE header after the DOS image header.
- //
- PeCoffHeaderOffset = DosHeader->e_lfanew;
- } else {
- PeCoffHeaderOffset = 0;
- }
-
- //
- // Check PE/COFF image.
- //
- NtHeader = (EFI_IMAGE_NT_HEADERS32 *)(UINTN) (Image +
PeCoffHeaderOffset);
- if (NtHeader->Signature != EFI_IMAGE_NT_SIGNATURE) {
- IsEfiApp = FALSE;
- } else {
- IsEfiApp = TRUE;
- }
-
- // Free memory
- gBS->FreePages (Image, EFI_SIZE_TO_PAGES(FileSize));
- } else {
// If we did not manage to open it then ask for the type
Print(L"Is an EFI Application? ");
Status = GetHIInputBoolean (&IsEfiApp);
if (EFI_ERROR(Status)) {
return EFI_ABORTED;
}
- }
}
if (IsEfiApp) {
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rwxr-xr-x | SOFTWARE/fip.bin | bin | 1072004 -> 1072004 bytes |
1 files changed, 0 insertions, 0 deletions
diff --git a/SOFTWARE/fip.bin b/SOFTWARE/fip.bin Binary files differindex 3511e01..50bb3d9 100755 --- a/SOFTWARE/fip.bin +++ b/SOFTWARE/fip.bin |