[PATCH v3 3/4] EmbeddedPkg: Install FDT if UpdateDtb is not present


Jeff Brasen
 

Currently if mAndroidBootImg->UpdateDtb is not supported on the platform
the device tree updates of the initrd are not made.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
---
.../Library/AndroidBootImgLib/AndroidBootImgLib.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
index 324933013d91..4f8ff5b261ca 100644
--- a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
+++ b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
@@ -349,12 +349,13 @@ AndroidBootImgUpdateFdt (
if (EFI_ERROR (Status)) {
goto Fdt_Exit;
}
-
- Status = gBS->InstallConfigurationTable (
- &gFdtTableGuid,
- (VOID *)(UINTN)NewFdtBase
- );
+ } else {
+ NewFdtBase = UpdatedFdtBase;
}
+ Status = gBS->InstallConfigurationTable (
+ &gFdtTableGuid,
+ (VOID *)(UINTN)NewFdtBase
+ );

if (!EFI_ERROR (Status)) {
return EFI_SUCCESS;
--
2.17.1