- RamdiskDevicePath = NULL;\r
- if (RamdiskSize != 0) {\r
- RamdiskDevicePath = (MEMORY_DEVICE_PATH*)DuplicateDevicePath ((EFI_DEVICE_PATH_PROTOCOL*) &MemoryDevicePathTemplate);\r
-\r
- RamdiskDevicePath->Node1.StartingAddress = (EFI_PHYSICAL_ADDRESS)(UINTN) Ramdisk;\r
- RamdiskDevicePath->Node1.EndingAddress = ((EFI_PHYSICAL_ADDRESS)(UINTN) Ramdisk) + RamdiskSize;\r
- }\r
-\r
- //\r
- // Boot Linux using the Legacy Linux Loader\r
- //\r
-\r
- Status = LocateEfiApplicationInFvByGuid (&mLinuxLoaderAppGuid, &LinuxLoaderDevicePath);\r
- if (EFI_ERROR (Status)) {\r
- Print (L"Couldn't Boot Linux: %d\n", Status);\r
- return EFI_DEVICE_ERROR;\r
- }\r
-\r
- KernelDevicePathTxt = ConvertDevicePathToText ((EFI_DEVICE_PATH_PROTOCOL *) &KernelDevicePath, FALSE, FALSE);\r
- if (KernelDevicePathTxt == NULL) {\r
- return EFI_OUT_OF_RESOURCES;\r
- }\r
-\r
- RamdiskDevicePathTxt = ConvertDevicePathToText ((EFI_DEVICE_PATH_PROTOCOL *) RamdiskDevicePath, FALSE, FALSE);\r
- if (RamdiskDevicePathTxt == NULL) {\r
+ // Initialize Linux command line\r
+ LoadOptions = CatSPrint (NULL, L"%a", KernelArgs);\r
+ if (LoadOptions == NULL) {\r