diff --git a/QcomModulePkg/Include/Library/DrawUI.h b/QcomModulePkg/Include/Library/DrawUI.h index 72260dd086..26d2610272 100644 --- a/QcomModulePkg/Include/Library/DrawUI.h +++ b/QcomModulePkg/Include/Library/DrawUI.h @@ -93,6 +93,7 @@ typedef enum { BGR_YELLOW, BGR_RED, BGR_GREEN, + BGR_GREEN_DARK, BGR_BLUE, BGR_CYAN, BGR_SILVER, diff --git a/QcomModulePkg/Library/BootLib/DrawUI.c b/QcomModulePkg/Library/BootLib/DrawUI.c index 2f1c0aa646..e50b4d3f72 100644 --- a/QcomModulePkg/Library/BootLib/DrawUI.c +++ b/QcomModulePkg/Library/BootLib/DrawUI.c @@ -56,6 +56,7 @@ STATIC EFI_GRAPHICS_OUTPUT_BLT_PIXEL mColors[] = { [BGR_YELLOW] = {0x00, 0xff, 0xff, 0x00}, [BGR_RED] = {0x00, 0x00, 0x98, 0x00}, [BGR_GREEN] = {0x00, 0xff, 0x00, 0x00}, + [BGR_GREEN_DARK] = {0x00, 0x99, 0x00, 0x00}, [BGR_BLUE] = {0xff, 0x00, 0x00, 0x00}, [BGR_CYAN] = {0xff, 0xff, 0x00, 0x00}, [BGR_SILVER] = {0xc0, 0xc0, 0xc0, 0x00}, diff --git a/QcomModulePkg/Library/BootLib/FastbootMenu.c b/QcomModulePkg/Library/BootLib/FastbootMenu.c index d6a85f9bb3..05d54821df 100644 --- a/QcomModulePkg/Library/BootLib/FastbootMenu.c +++ b/QcomModulePkg/Library/BootLib/FastbootMenu.c @@ -102,6 +102,7 @@ STATIC MENU_MSG_INFO mFastbootOptionTitle[] = { #define FASTBOOT_MSG_INDEX_SECURE_BOOT 10 #define FASTBOOT_MSG_INDEX_DEVICE_STATE_UNLOCKED 11 #define FASTBOOT_MSG_INDEX_DEVICE_STATE_LOCKED 12 +#define FASTBOOT_MSG_INDEX_MAINLINE 13 STATIC MENU_MSG_INFO mFastbootCommonMsgInfo[] = { {{"\nPress volume key to select, " @@ -196,6 +197,26 @@ STATIC MENU_MSG_INFO mFastbootCommonMsgInfo[] = { COMMON, 0, NOACTION}, + {{"\n"}, + COMMON_FACTOR, + BGR_GREEN_DARK, + BGR_BLACK, + COMMON, + 0, + NOACTION}, +}; + +STATIC CONST CHAR8 MAINLINE_LOGO_PMOS[][MAX_RSP_SIZE] = { +" /\\\n", +" / \\\n", +" / \\\n", +" \\__ \\\n", +" /\\__ \\ \\\n", +" / / \\ _\\\n", +" / / \\/ __\n", +" / / ______/ \\\n", +" / \\ \\ \\\n", +"/_____/ /__________\\\n", }; /** @@ -264,6 +285,7 @@ FastbootMenuShowScreen (OPTION_MENU_INFO *OptionMenuInfo) UINT32 OptionItem = 0; UINT32 Height = 0; UINT32 i = 0; + UINT32 j = 0; CHAR8 StrTemp[MAX_RSP_SIZE] = ""; CHAR8 StrTemp1[MAX_RSP_SIZE] = ""; CHAR8 VersionTemp[MAX_VERSION_LEN] = ""; @@ -374,6 +396,17 @@ FastbootMenuShowScreen (OPTION_MENU_INFO *OptionMenuInfo) if (IsUnlocked ()) continue; break; + case FASTBOOT_MSG_INDEX_MAINLINE: + /* Print random mainline logo (right now only pmOS though) */ + if (!IsMainlineOptimizationEnabled ()) + continue; + + for (j = 0; j < ARRAY_SIZE (MAINLINE_LOGO_PMOS); j++) { + AsciiStrnCatS ( + mFastbootCommonMsgInfo[i].Msg, sizeof (mFastbootCommonMsgInfo[i].Msg), + MAINLINE_LOGO_PMOS[j], sizeof (MAINLINE_LOGO_PMOS[j])); + } + break; } mFastbootCommonMsgInfo[i].Location = Location;