[coreboot-gerrit] New patch to review for coreboot: vendorcode/google/chromeos: Fill in firmware ID regions
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Sat Dec 10 21:04:04 CET 2016
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17788
-gerrit
commit 3631f0b4168a8a23ea58810b9230ec39ab33805e
Author: Patrick Georgi <pgeorgi at google.com>
Date: Tue Dec 6 21:59:23 2016 +0100
vendorcode/google/chromeos: Fill in firmware ID regions
Chrome OS images have three firmware ID regions, to store version
information for the read-only and the two read-write areas. Fill them
with a suitable default and allow configuring a different scheme.
There's already an override in google/foster and google/rotor to match
the naming scheme used so far (in depthcharge).
BUG=chromium:595715
BRANCH=none
TEST=/build/$board/firmware/coreboot.rom has the expected values in the
regions.
Change-Id: I5fade5971135fa0347d6e13ec72909db83818959
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Original-Commit-Id: d2e3be81faa8d21f92325294530714a4b18a1b3e
Original-Change-Id: I2fa2d51eacd832db6864fb67b6481b4d27889f52
Original-Signed-off-by: Patrick Georgi <pgeorgi at google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/417320
Original-Commit-Ready: Patrick Georgi <pgeorgi at chromium.org>
Original-Tested-by: Patrick Georgi <pgeorgi at chromium.org>
Original-Reviewed-by: Stefan Reinauer <reinauer at chromium.org>
---
src/mainboard/google/foster/Kconfig | 5 +++++
src/mainboard/google/rotor/Kconfig | 4 ++++
src/mainboard/google/veyron/Kconfig | 13 +++++++++++++
src/mainboard/google/veyron_mickey/Kconfig | 5 +++++
src/vendorcode/google/chromeos/Kconfig | 14 ++++++++++++++
src/vendorcode/google/chromeos/Makefile.inc | 12 ++++++++++--
6 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/src/mainboard/google/foster/Kconfig b/src/mainboard/google/foster/Kconfig
index 8a9e53d..3f02e68 100644
--- a/src/mainboard/google/foster/Kconfig
+++ b/src/mainboard/google/foster/Kconfig
@@ -84,4 +84,9 @@ config GBB_HWID
string
depends on CHROMEOS
default "FOSTER TEST 1184"
+
+config CHROMEOS_FWID_MODEL
+ string
+ default "Nvidia_Foster"
+
endif # BOARD_GOOGLE_FOSTER
diff --git a/src/mainboard/google/rotor/Kconfig b/src/mainboard/google/rotor/Kconfig
index daf2ed2..a47a766 100644
--- a/src/mainboard/google/rotor/Kconfig
+++ b/src/mainboard/google/rotor/Kconfig
@@ -37,6 +37,10 @@ config GBB_HWID
depends on CHROMEOS
default "ROTOR TEST 1234"
+config CHROMEOS_FWID_MODEL
+ string
+ default "Marvell_Rotor"
+
config DRAM_SIZE_MB
int
default 232
diff --git a/src/mainboard/google/veyron/Kconfig b/src/mainboard/google/veyron/Kconfig
index 1729155..0bd1e2e 100644
--- a/src/mainboard/google/veyron/Kconfig
+++ b/src/mainboard/google/veyron/Kconfig
@@ -114,4 +114,17 @@ config GBB_HWID
default "SPEEDY TEST A-A 8421" if BOARD_GOOGLE_VEYRON_SPEEDY
default "THEA TEST A-A 7163" if BOARD_GOOGLE_VEYRON_THEA
+config CHROMEOS_FWID_MODEL
+ string
+ default "Google_Veyron_Gus" if BOARD_GOOGLE_VEYRON_GUS
+ default "Google_Veyron_Jaq" if BOARD_GOOGLE_VEYRON_JAQ
+ default "Google_Veyron_Jerry" if BOARD_GOOGLE_VEYRON_JERRY
+ default "Google_Veyron_Mighty" if BOARD_GOOGLE_VEYRON_MIGHTY
+ default "Google_Veyron_Minnie" if BOARD_GOOGLE_VEYRON_MINNIE
+ default "Google_Veyron_Nicky" if BOARD_GOOGLE_VEYRON_NICKY
+ default "Google_Veyron_Pinky" if BOARD_GOOGLE_VEYRON_PINKY
+ default "Google_Veyron_Shinky" if BOARD_GOOGLE_VEYRON_SHARK
+ default "Google_Veyron_Speedy" if BOARD_GOOGLE_VEYRON_SPEEDY
+ default "Google_Veyron_Thea" if BOARD_GOOGLE_VEYRON_THEA
+
endif # BOARD_GOOGLE_VEYRON
diff --git a/src/mainboard/google/veyron_mickey/Kconfig b/src/mainboard/google/veyron_mickey/Kconfig
index d1a481f..1a94831 100644
--- a/src/mainboard/google/veyron_mickey/Kconfig
+++ b/src/mainboard/google/veyron_mickey/Kconfig
@@ -72,4 +72,9 @@ config GBB_HWID
string
depends on CHROMEOS
default "MICKEY TEST A-A 0352"
+
+config CHROMEOS_FWID_MODEL
+ string
+ default "Google_Veyron_Mickey"
+
endif # BOARD_GOOGLE_VEYRON_MICKEY
diff --git a/src/vendorcode/google/chromeos/Kconfig b/src/vendorcode/google/chromeos/Kconfig
index b7431b2..238b4e5 100644
--- a/src/vendorcode/google/chromeos/Kconfig
+++ b/src/vendorcode/google/chromeos/Kconfig
@@ -113,6 +113,20 @@ config HAVE_REGULATORY_DOMAIN
help
This option is needed to add ACPI regulatory domain methods
+config CHROMEOS_FWID_MODEL
+ string "Chrome OS Firmware ID model"
+ default "$(CONFIG_MAINBOARD_VENDOR)_$(CONFIG_MAINBOARD_PART_NUMBER)"
+ help
+ This is the first part of the FWID written to various regions of a
+ Chrome OS firmware image to identify its version.
+
+config CHROMEOS_FWID_VERSION
+ string "Chrome OS Firmware ID version"
+ default "$(KERNELVERSION)"
+ help
+ This is the second part of the FWID written to various regions of a
+ Chrome OS firmware image to identify its version.
+
menu "GBB configuration"
config GBB_HWID
diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc
index c94d6ab..cd3831c 100644
--- a/src/vendorcode/google/chromeos/Makefile.inc
+++ b/src/vendorcode/google/chromeos/Makefile.inc
@@ -41,6 +41,8 @@ CONFIG_GBB_BMPFV_FILE := $(call strip_quotes,$(CONFIG_GBB_BMPFV_FILE))
CONFIG_VBOOT_KEYBLOCK := $(call strip_quotes,$(CONFIG_VBOOT_KEYBLOCK))
CONFIG_VBOOT_FIRMWARE_PRIVKEY := $(call strip_quotes,$(CONFIG_VBOOT_FIRMWARE_PRIVKEY))
CONFIG_VBOOT_KERNEL_KEY := $(call strip_quotes,$(CONFIG_VBOOT_KERNEL_KEY))
+CONFIG_CHROMEOS_FWID_MODEL := $(call strip_quotes,$(CONFIG_CHROMEOS_FWID_MODEL))
+CONFIG_CHROMEOS_FWID_VERSION := $(call strip_quotes,$(CONFIG_CHROMEOS_FWID_VERSION))
# bool-to-mask(var, value)
# return "value" if var is "y", 0 otherwise
@@ -95,9 +97,15 @@ ifneq ($(CONFIG_GBB_BMPFV_FILE),)
endif
mv $@.tmp $@
-build_complete:: $(obj)/gbb.region
+$(obj)/fwid.region:
+ printf "$(CONFIG_CHROMEOS_FWID_MODEL)$(CONFIG_CHROMEOS_FWID_VERSION)\0" > $@
+
+build_complete:: $(obj)/gbb.region $(obj)/fwid.region
@printf " WRITE GBB\n"
- $(CBFSTOOL) $(obj)/coreboot.rom write -u -r GBB -f $<
+ $(CBFSTOOL) $(obj)/coreboot.rom write -u -r GBB -i 0 -f $(obj)/gbb.region
+ $(CBFSTOOL) $(obj)/coreboot.rom write -u -r RO_FRID -i 0 -f $(obj)/fwid.region
+ $(CBFSTOOL) $(obj)/coreboot.rom write -u -r RW_FWID_A -i 0 -f $(obj)/fwid.region
+ $(CBFSTOOL) $(obj)/coreboot.rom write -u -r RW_FWID_B -i 0 -f $(obj)/fwid.region
# Extract FW_MAIN_? region and minimize it if the last file is empty, so it
# doesn't contain this empty file (that can have a significant size),
More information about the coreboot-gerrit
mailing list