]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/Bds: Fix the Boot Manager option to set the FDT device path
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 1 Nov 2011 23:44:05 +0000 (23:44 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 1 Nov 2011 23:44:05 +0000 (23:44 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12642 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/Bds/BootMenu.c
ArmPlatformPkg/Bds/BootOption.c

index 315fc953f5a27a8672904032e962675714529ffc..8202f9991c2f8cf27e8a9d458c28cd3d3be15bbc 100644 (file)
@@ -485,11 +485,11 @@ UpdateFdtPath (
   IN LIST_ENTRY *BootOptionsList\r
   )\r
 {\r
-  EFI_STATUS Status;\r
-\r
-  BDS_SUPPORTED_DEVICE *SupportedBootDevice;\r
-  EFI_DEVICE_PATH_PROTOCOL *FdtDevicePathNode;\r
-  EFI_DEVICE_PATH_PROTOCOL *FdtDevicePath;\r
+  EFI_STATUS                Status;\r
+  UINTN                     FdtDevicePathSize;\r
+  BDS_SUPPORTED_DEVICE      *SupportedBootDevice;\r
+  EFI_DEVICE_PATH_PROTOCOL  *FdtDevicePathNode;\r
+  EFI_DEVICE_PATH_PROTOCOL  *FdtDevicePath;\r
 \r
   Status = SelectBootDevice (&SupportedBootDevice);\r
   if (EFI_ERROR(Status)) {\r
@@ -498,8 +498,7 @@ UpdateFdtPath (
   }\r
 \r
   // Create the specific device path node\r
-  Print(L"File path of the FDT blob: ");\r
-  Status = SupportedBootDevice->Support->CreateDevicePathNode (SupportedBootDevice, &FdtDevicePathNode, NULL, NULL);\r
+  Status = SupportedBootDevice->Support->CreateDevicePathNode (L"FDT blob", &FdtDevicePathNode, NULL, NULL);\r
   if (EFI_ERROR(Status)) {\r
     Status = EFI_ABORTED;\r
     goto EXIT;\r
@@ -508,10 +507,11 @@ UpdateFdtPath (
   if (FdtDevicePathNode != NULL) {\r
     // Append the Device Path node to the select device path\r
     FdtDevicePath = AppendDevicePathNode (SupportedBootDevice->DevicePathProtocol, FdtDevicePathNode);\r
-    Status = gRT->SetVariable ((CHAR16*)L"FDT", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), 4, &FdtDevicePath);\r
+    FdtDevicePathSize = GetDevicePathSize (FdtDevicePath);\r
+    Status = gRT->SetVariable ((CHAR16*)L"Fdt", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), FdtDevicePathSize, FdtDevicePath);\r
     ASSERT_EFI_ERROR(Status);\r
   } else {\r
-    gRT->SetVariable ((CHAR16*)L"FDT", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), 0, NULL);\r
+    gRT->SetVariable ((CHAR16*)L"Fdt", &gEfiGlobalVariableGuid, (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS ), 0, NULL);\r
     ASSERT_EFI_ERROR(Status);\r
   }\r
 \r
index 305892a8d68435fcc2afd7ed6f3095a33ea799b9..d811c03ccc2030b7224a78601aedf278d9d2d725 100644 (file)
@@ -75,7 +75,7 @@ BootOptionStart (
 \r
       // Get the FDT device path\r
       FdtDevicePathSize = GetDevicePathSize (DefaultFdtDevicePath);\r
-      Status = GetEnvironmentVariable ((CHAR16 *)L"FDT", DefaultFdtDevicePath, &FdtDevicePathSize, (VOID **)&FdtDevicePath);\r
+      Status = GetEnvironmentVariable ((CHAR16 *)L"Fdt", DefaultFdtDevicePath, &FdtDevicePathSize, (VOID **)&FdtDevicePath);\r
       ASSERT_EFI_ERROR(Status);\r
 \r
       Status = BdsBootLinuxFdt (BootOption->FilePathList,\r