diff options
author | Brian Norris <briannorris@chromium.org> | 2022-11-18 18:36:27 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-11-19 04:37:50 +0000 |
commit | 87663c3bef0f6b198945cf3eb83632f461a5d6f8 (patch) | |
tree | 5437a0949bda540a9b6ef245d2f378872a20c4f6 /host/arch/x86/lib/crossystem_arch.c | |
parent | 0d5f3ca53047313b96aa620a14f8401a2392a220 (diff) | |
download | vboot-87663c3bef0f6b198945cf3eb83632f461a5d6f8.tar.gz |
Revert "crossystem: Add board_id property"stabilize-15251.B
This reverts commit db1b34f559fdbf5584b57007da43e4dddda43c6a.
Reason for revert: seems to break scarlet - b/259702907
Original change's description:
> crossystem: Add board_id property
>
> futility is one of a few places in ChromeOS that uses "mosys platform
> version". The goal is to remove this command from mosys.
>
> This commit adds a new property to crossystem, "board_id", which
> reads the board revision from SMBIOS/FDT, and replaces the call in
> futility with the appropriate VbGetSystemPropertyInt.
>
> BUG=b:187790074
> BRANCH=none
> TEST="crossystem board_id" on hana and brya
>
> Change-Id: Id69c8e309c0e509a165aa6da2778573ac7de3455
> Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4029537
> Reviewed-by: Julius Werner <jwerner@chromium.org>
Bug: b:187790074, b:259702907
Change-Id: Ibdc2525d6f395e2ef63354d36ca02b71543e8079
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4038443
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Brian Norris <briannorris@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Owners-Override: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'host/arch/x86/lib/crossystem_arch.c')
-rw-r--r-- | host/arch/x86/lib/crossystem_arch.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/host/arch/x86/lib/crossystem_arch.c b/host/arch/x86/lib/crossystem_arch.c index f3e631ad..e6bd7e31 100644 --- a/host/arch/x86/lib/crossystem_arch.c +++ b/host/arch/x86/lib/crossystem_arch.c @@ -83,10 +83,6 @@ #define GPIO_BASE_PATH "/sys/class/gpio" #define GPIO_EXPORT_PATH GPIO_BASE_PATH "/export" -/* Base for SMBIOS information files */ -#define SMBIOS_BASE_PATH "/sys/class/dmi/id" -#define SMBIOS_PRODUCT_VERSION_PATH SMBIOS_BASE_PATH "/product_version" - /* Filename for NVRAM file */ #define NVRAM_PATH "/dev/nvram" @@ -838,25 +834,6 @@ static int ReadGpio(unsigned signal_type) return (value == active_high ? 1 : 0); } -static int GetBoardId(void) -{ - /* - * Can't use vb2_read_file here, as it expects to be able to - * seek to the end of the file to tell the size, and the sysfs - * SMBIOS implementation will seek to offset 4096. - */ - int board_id = -1; - FILE *f = fopen(SMBIOS_PRODUCT_VERSION_PATH, "r"); - - if (!f) - return -1; - - if (fscanf(f, "rev%d\n", &board_id) != 1) - board_id = -1; - - fclose(f); - return board_id; -} int VbGetArchPropertyInt(const char* name) { @@ -920,9 +897,6 @@ int VbGetArchPropertyInt(const char* name) value = (int)fwupdate_value; } - if (!strcasecmp(name, "board_id")) - return GetBoardId(); - return value; } |