diff options
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r-- | ArmPlatformPkg/Bds/Bds.inf | 3 | ||||
-rw-r--r-- | ArmPlatformPkg/Bds/BootMenu.c | 24 |
2 files changed, 20 insertions, 7 deletions
diff --git a/ArmPlatformPkg/Bds/Bds.inf b/ArmPlatformPkg/Bds/Bds.inf index f4c0f1c55d..76a45e03e5 100644 --- a/ArmPlatformPkg/Bds/Bds.inf +++ b/ArmPlatformPkg/Bds/Bds.inf @@ -37,6 +37,7 @@ ArmPkg/ArmPkg.dec
ArmPlatformPkg/ArmPlatformPkg.dec
EmbeddedPkg/EmbeddedPkg.dec
+ IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
[LibraryClasses]
BdsLib
@@ -79,5 +80,7 @@ gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths
+ gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile
+
[Depex]
TRUE
diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c index d2dccbc9f2..a304cc4ce9 100644 --- a/ArmPlatformPkg/Bds/BootMenu.c +++ b/ArmPlatformPkg/Bds/BootMenu.c @@ -1069,17 +1069,27 @@ BootShell ( IN LIST_ENTRY *BootOptionsList
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
+ EFI_DEVICE_PATH* EfiShellDevicePath;
- // Start EFI Shell
- Status = BdsLoadApplication (gImageHandle, L"Shell", 0, NULL);
+ // Find the EFI Shell
+ Status = LocateEfiApplicationInFvByName (L"Shell", &EfiShellDevicePath);
if (Status == EFI_NOT_FOUND) {
Print (L"Error: EFI Application not found.\n");
- } else if (EFI_ERROR(Status)) {
- Print (L"Error: Status Code: 0x%X\n",(UINT32)Status);
- }
+ return Status;
+ } else if (EFI_ERROR (Status)) {
+ Print (L"Error: Status Code: 0x%X\n", (UINT32)Status);
+ return Status;
+ } else {
+ // Need to connect every drivers to ensure no dependencies are missing for the application
+ Status = BdsConnectAllDrivers ();
+ if (EFI_ERROR (Status)) {
+ DEBUG ((EFI_D_ERROR, "FAIL to connect all drivers\n"));
+ return Status;
+ }
- return Status;
+ return BdsStartEfiApplication (gImageHandle, EfiShellDevicePath, 0, NULL);
+ }
}
struct BOOT_MAIN_ENTRY {
|