MdeModulePkg/BM: Make it look like current BootMngr
This commit is contained in:
@ -493,6 +493,7 @@ UpdateBootManager (
|
||||
BOOLEAN IsLegacyOption;
|
||||
BOOLEAN NeedEndOp;
|
||||
UINTN MaxLen;
|
||||
UINTN OptionCount = 0;
|
||||
|
||||
DeviceType = (UINT16)-1;
|
||||
|
||||
@ -550,6 +551,8 @@ UpdateBootManager (
|
||||
continue;
|
||||
}
|
||||
|
||||
OptionCount++;
|
||||
|
||||
//
|
||||
// Group the legacy boot option in the sub title created dynamically
|
||||
//
|
||||
@ -605,6 +608,10 @@ UpdateBootManager (
|
||||
);
|
||||
}
|
||||
|
||||
if (OptionCount == 0) {
|
||||
HiiCreateSubTitleOpCode (StartOpCodeHandle, STRING_TOKEN (STR_NO_BOOTABLE_MEDIA), 0, 0, 0);
|
||||
}
|
||||
|
||||
if (NeedEndOp) {
|
||||
HiiCreateEndOpCode (StartOpCodeHandle);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ typedef struct {
|
||||
0x847bc3fe, 0xb974, 0x446d, {0x94, 0x49, 0x5a, 0xd5, 0x41, 0x2e, 0x99, 0x3b} \
|
||||
}
|
||||
|
||||
#define BOOT_MANAGER_FORM_ID 0x1000
|
||||
#define BOOT_MANAGER_FORM_ID 0x1030
|
||||
|
||||
#define LABEL_BOOT_OPTION 0x00
|
||||
#define LABEL_BOOT_OPTION_END 0x01
|
||||
|
@ -17,20 +17,9 @@
|
||||
|
||||
/=#
|
||||
#langdef en-US "English"
|
||||
#langdef fr-FR "Français"
|
||||
|
||||
#string STR_BM_BANNER #language en-US "Boot Manager"
|
||||
#language fr-FR "Boot Manager"
|
||||
#string STR_BOOT_MANAGER_HELP #language en-US "This selection will take you to the Boot Manager"
|
||||
#language fr-FR "This selection will take you to the Boot Manager"
|
||||
#string STR_HELP_FOOTER #language en-US "Use the <↑> and <↓> keys to choose a boot option, the <Enter> key to select a boot option, and the <Esc> key to exit the Boot Manager Menu."
|
||||
#language fr-FR "<↑> pour <↓> changer l'option, <ENTRER> choisir une option, <ESC> pour sortir"
|
||||
#string STR_AND #language en-US " and "
|
||||
#language fr-FR " et "
|
||||
#string STR_BOOT_OPTION_BANNER #language en-US "Boot Manager Menu"
|
||||
#language fr-FR "le Menu d'Option de Botte"
|
||||
#string STR_BM_BANNER #language en-US "One Time Boot"
|
||||
#string STR_BOOT_MANAGER_HELP #language en-US "Boot an entry one time"
|
||||
#string STR_ANY_KEY_CONTINUE #language en-US "Press any key to continue..."
|
||||
#language fr-FR "Appuie n'importe quelle pour continuer..."
|
||||
#string STR_LAST_STRING #language en-US ""
|
||||
#language fr-FR ""
|
||||
|
||||
#string STR_NO_BOOTABLE_MEDIA #language en-US "No bootable media found"
|
||||
#string STR_EMPTY_STRING #language en-US ""
|
||||
|
@ -8,7 +8,7 @@
|
||||
//**/
|
||||
#define FORMSET_GUID { 0x847bc3fe, 0xb974, 0x446d, 0x94, 0x49, 0x5a, 0xd5, 0x41, 0x2e, 0x99, 0x3b }
|
||||
|
||||
#define BOOT_MANAGER_FORM_ID 0x1000
|
||||
#define BOOT_MANAGER_FORM_ID 0x1030
|
||||
|
||||
#define LABEL_BOOT_OPTION 0x00
|
||||
#define LABEL_BOOT_OPTION_END 0x01
|
||||
@ -20,22 +20,18 @@ formset
|
||||
classguid = gEfiIfrFrontPageGuid,
|
||||
|
||||
form formid = BOOT_MANAGER_FORM_ID,
|
||||
title = STRING_TOKEN(STR_BM_BANNER);
|
||||
|
||||
subtitle text = STRING_TOKEN(STR_LAST_STRING);
|
||||
subtitle text = STRING_TOKEN(STR_BOOT_OPTION_BANNER);
|
||||
subtitle text = STRING_TOKEN(STR_LAST_STRING);
|
||||
title = STRING_TOKEN(STR_BM_BANNER);
|
||||
|
||||
//
|
||||
//Add this invisable text in order to indicate enter Boot Manager form.
|
||||
//
|
||||
suppressif TRUE;
|
||||
text
|
||||
help = STRING_TOKEN(STR_LAST_STRING ),
|
||||
text = STRING_TOKEN(STR_LAST_STRING ),
|
||||
flags = INTERACTIVE,
|
||||
key = 0x1212;
|
||||
endif;
|
||||
text
|
||||
help = STRING_TOKEN(STR_EMPTY_STRING),
|
||||
text = STRING_TOKEN(STR_EMPTY_STRING),
|
||||
flags = INTERACTIVE,
|
||||
key = 0x1212;
|
||||
endif;
|
||||
|
||||
//
|
||||
// This is where we will dynamically add choices for the Boot Manager
|
||||
@ -43,9 +39,6 @@ formset
|
||||
label LABEL_BOOT_OPTION;
|
||||
label LABEL_BOOT_OPTION_END;
|
||||
|
||||
subtitle text = STRING_TOKEN(STR_LAST_STRING);
|
||||
subtitle text = STRING_TOKEN(STR_HELP_FOOTER);
|
||||
|
||||
endform;
|
||||
|
||||
endformset;
|
||||
|
Reference in New Issue
Block a user