From ff21f1331a2e264e4acb79b119c396c860518d18 Mon Sep 17 00:00:00 2001 From: Matt Madison Date: Thu, 15 Jan 2026 08:52:31 -0800 Subject: [PATCH] fix(L4TLauncher): allow for empty/missing APPEND line in extlinux.conf Signed-off-by: Matt Madison --- .../Application/L4TLauncher/L4TLauncher.c | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/Silicon/NVIDIA/Application/L4TLauncher/L4TLauncher.c b/Silicon/NVIDIA/Application/L4TLauncher/L4TLauncher.c index c905f852db..8b042b044b 100644 --- a/Silicon/NVIDIA/Application/L4TLauncher/L4TLauncher.c +++ b/Silicon/NVIDIA/Application/L4TLauncher/L4TLauncher.c @@ -1453,21 +1453,23 @@ ExtLinuxBoot ( CHAR8 SWModule[] = "kernel"; INTN FdtStatus; - // Process Args - ArgSize = StrSize (BootOption->BootArgs) + MAX_CBOOTARG_SIZE; - NewArgs = AllocateCopyPool (ArgSize, BootOption->BootArgs); - if (NewArgs == NULL) { - Status = EFI_OUT_OF_RESOURCES; - goto Exit; - } + // Process Args if present + if (BootOption->BootArgs != NULL) { + ArgSize = StrSize (BootOption->BootArgs) + MAX_CBOOTARG_SIZE; + NewArgs = AllocateCopyPool (ArgSize, BootOption->BootArgs); + if (NewArgs == NULL) { + Status = EFI_OUT_OF_RESOURCES; + goto Exit; + } - Status = gBS->LocateProtocol (&gAndroidBootImgProtocolGuid, NULL, (VOID **)&AndroidBootProtocol); - if (!EFI_ERROR (Status)) { - if (AndroidBootProtocol->AppendArgs != NULL) { - Status = AndroidBootProtocol->AppendArgs (NewArgs, ArgSize); - if (EFI_ERROR (Status)) { - ErrorPrint (L"%a: Failed to get platform addition arguments\r\n", __FUNCTION__); - goto Exit; + Status = gBS->LocateProtocol (&gAndroidBootImgProtocolGuid, NULL, (VOID **)&AndroidBootProtocol); + if (!EFI_ERROR (Status)) { + if (AndroidBootProtocol->AppendArgs != NULL) { + Status = AndroidBootProtocol->AppendArgs (NewArgs, ArgSize); + if (EFI_ERROR (Status)) { + ErrorPrint (L"%a: Failed to get platform addition arguments\r\n", __FUNCTION__); + goto Exit; + } } } }