mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-22 13:14:26 +02:00
ArmPkg/BdsLib: Added support for using uInitrd
Detect if there is a u-boot header on the initrd (by checking the signature) and skip it. Signed-off-by: ryan.harkin@linaro.org Reviewed-by: oliviermartin git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13031 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1093e3074f
commit
c0a1f7776b
@ -166,6 +166,13 @@ BdsBootLinuxAtag (
|
|||||||
Print (L"ERROR: Did not find initrd image.\n");
|
Print (L"ERROR: Did not find initrd image.\n");
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if the initrd is a uInitrd
|
||||||
|
if (*(UINT32*)((UINTN)InitrdImage) == LINUX_UIMAGE_SIGNATURE) {
|
||||||
|
// Skip the 64-byte image header
|
||||||
|
InitrdImage = (EFI_PHYSICAL_ADDRESS)((UINTN)InitrdImage + 64);
|
||||||
|
InitrdImageSize -= 64;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -233,6 +240,13 @@ BdsBootLinuxFdt (
|
|||||||
Print (L"ERROR: Did not find initrd image.\n");
|
Print (L"ERROR: Did not find initrd image.\n");
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if the initrd is a uInitrd
|
||||||
|
if (*(UINT32*)((UINTN)InitrdImage) == LINUX_UIMAGE_SIGNATURE) {
|
||||||
|
// Skip the 64-byte image header
|
||||||
|
InitrdImage = (EFI_PHYSICAL_ADDRESS)((UINTN)InitrdImage + 64);
|
||||||
|
InitrdImageSize -= 64;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load the FDT binary from a device path
|
// Load the FDT binary from a device path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user