Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

Commit 80b2e2e

Browse files
committed
FastbootMenu: print PRODUCT_MODEL
Change-Id: If26fcc711aa81f4e1a930c2d319cfe0b0f8b71a9 Signed-off-by: Alexander Martinz <[email protected]>
1 parent 8bc4669 commit 80b2e2e

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

AndroidBoot.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ else
7474
BOARD_BOOTLOADER_PRODUCT_NAME := QC_Reference_Phone
7575
endif
7676

77+
ifneq ($(TARGET_BOOTLOADER_BOARD_MODEL),)
78+
BOARD_BOOTLOADER_PRODUCT_MODEL := $(TARGET_BOOTLOADER_BOARD_MODEL)
79+
else
80+
BOARD_BOOTLOADER_PRODUCT_MODEL := unknown
81+
endif
82+
7783
ifneq ($(TARGET_BOARD_TYPE),auto)
7884
TARGET_BOARD_TYPE_AUTO := TARGET_BOARD_TYPE_AUTO=0
7985
else
@@ -167,4 +173,5 @@ $(TARGET_ABL): $(LOCAL_ABL_SRC_FILE) | $(ABL_OUT) $(INSTALLED_KEYSTOREIMAGE_TARG
167173
CLANG_GCC_TOOLCHAIN=$(CLANG35_GCC_TOOLCHAIN)\
168174
TARGET_ARCHITECTURE=$(TARGET_ARCHITECTURE) \
169175
BOARD_BOOTLOADER_PRODUCT_NAME=$(BOARD_BOOTLOADER_PRODUCT_NAME) \
176+
BOARD_BOOTLOADER_PRODUCT_MODEL=$(BOARD_BOOTLOADER_PRODUCT_MODEL) \
170177
USERDATAIMAGE_FILE_SYSTEM_TYPE=$(USERDATAIMAGE_FILE_SYSTEM_TYPE)

QcomModulePkg/Library/BootLib/FastbootMenu.c

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,13 @@ STATIC MENU_MSG_INFO mFastbootCommonMsgInfo[] = {
110110
COMMON,
111111
0,
112112
NOACTION},
113+
{{"PRODUCT_MODEL - "},
114+
COMMON_FACTOR,
115+
BGR_WHITE,
116+
BGR_BLACK,
117+
COMMON,
118+
0,
119+
NOACTION},
113120
{{"VARIANT - "},
114121
COMMON_FACTOR,
115122
BGR_WHITE,
@@ -257,6 +264,12 @@ FastbootMenuShowScreen (OPTION_MENU_INFO *OptionMenuInfo)
257264
AsciiStrLen (PRODUCT_NAME));
258265
break;
259266
case 3:
267+
/* Get product model */
268+
AsciiStrnCatS (mFastbootCommonMsgInfo[i].Msg,
269+
sizeof (mFastbootCommonMsgInfo[i].Msg), PRODUCT_MODEL,
270+
AsciiStrLen (PRODUCT_MODEL));
271+
break;
272+
case 4:
260273
/* Get variant value */
261274
BoardHwPlatformName (StrTemp, sizeof (StrTemp));
262275
GetRootDeviceType (StrTemp1, sizeof (StrTemp1));
@@ -271,45 +284,45 @@ FastbootMenuShowScreen (OPTION_MENU_INFO *OptionMenuInfo)
271284
sizeof (mFastbootCommonMsgInfo[i].Msg), StrTemp1,
272285
sizeof (StrTemp1));
273286
break;
274-
case 4:
287+
case 5:
275288
/* Get bootloader version */
276289
GetBootloaderVersion (VersionTemp, sizeof (VersionTemp));
277290
AsciiStrnCatS (mFastbootCommonMsgInfo[i].Msg,
278291
sizeof (mFastbootCommonMsgInfo[i].Msg), VersionTemp,
279292
sizeof (VersionTemp));
280293
break;
281-
case 5:
294+
case 6:
282295
/* Get baseband version */
283296
ZeroMem (VersionTemp, sizeof (VersionTemp));
284297
GetRadioVersion (VersionTemp, sizeof (VersionTemp));
285298
AsciiStrnCatS (mFastbootCommonMsgInfo[i].Msg,
286299
sizeof (mFastbootCommonMsgInfo[i].Msg), VersionTemp,
287300
sizeof (VersionTemp));
288301
break;
289-
case 6:
302+
case 7:
290303
/* Get serial number */
291304
ZeroMem (StrTemp, sizeof (StrTemp));
292305
BoardSerialNum (StrTemp, MAX_RSP_SIZE);
293306
AsciiStrnCatS (mFastbootCommonMsgInfo[i].Msg,
294307
sizeof (mFastbootCommonMsgInfo[i].Msg), StrTemp,
295308
sizeof (StrTemp));
296309
break;
297-
case 7:
310+
case 8:
298311
/* Get hardware revision */
299312
ZeroMem (StrTemp, sizeof (StrTemp));
300313
BoardHardwareRevision (StrTemp, MAX_RSP_SIZE);
301314
AsciiStrnCatS (mFastbootCommonMsgInfo[i].Msg,
302315
sizeof (mFastbootCommonMsgInfo[i].Msg), StrTemp,
303316
sizeof (StrTemp));
304317
break;
305-
case 8:
318+
case 9:
306319
/* Get secure boot value */
307320
AsciiStrnCatS (
308321
mFastbootCommonMsgInfo[i].Msg, sizeof (mFastbootCommonMsgInfo[i].Msg),
309322
IsSecureBootEnabled () ? "yes" : "no",
310323
IsSecureBootEnabled () ? AsciiStrLen ("yes") : AsciiStrLen ("no"));
311324
break;
312-
case 9:
325+
case 10:
313326
/* Get device status */
314327
AsciiStrnCatS (
315328
mFastbootCommonMsgInfo[i].Msg, sizeof (mFastbootCommonMsgInfo[i].Msg),

QcomModulePkg/QcomModulePkg.dsc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
GCC:*_*_*_DLINK_FLAGS = -Ttext=0x0
9696
GCC:*_*_*_CC_FLAGS = -DZ_SOLO
9797
GCC:*_*_*_CC_FLAGS = -DPRODUCT_NAME=\"$(BOARD_BOOTLOADER_PRODUCT_NAME)\"
98+
GCC:*_*_*_CC_FLAGS = -DPRODUCT_MODEL=\"$(BOARD_BOOTLOADER_PRODUCT_MODEL)\"
9899

99100
!if $(VERIFIED_BOOT)
100101
GCC:*_*_*_CC_FLAGS = -DVERIFIED_BOOT

0 commit comments

Comments
 (0)