Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42881 )
Change subject: util/futility: Check for pkg-config and libcrypto
......................................................................
util/futility: Check for pkg-config and libcrypto
When building a configuration that requires futility (e.g. Chrome OS
builds), pkg-config and libcrypto are required. Since vboot's build
system isn't the most helpful about it, test ourselves and fail out
with some actionable message.
Tested:
- configs that don't need futility don't test for pkg-config, so it's
not required for them.
- failing pkg-config test leads to the message
- working pkg-config test leads to a successful build
Fixes https://ticket.coreboot.org/issues/242
Change-Id: I103ce5115284352e0a3a7fdcf8b427f56ce15ba7
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
---
M util/futility/Makefile.inc
1 file changed, 9 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/42881/1
diff --git a/util/futility/Makefile.inc b/util/futility/Makefile.inc
index ee4ad05..ed185ce 100644
--- a/util/futility/Makefile.inc
+++ b/util/futility/Makefile.inc
@@ -2,15 +2,22 @@
VBOOT_FUTILITY = $(VBOOT_HOST_BUILD)/futility/futility
-$(VBOOT_FUTILITY):
+HOSTPKGCONFIG ?= pkg-config
+
+$(VBOOT_FUTILITY): check-openssl-presence
@printf " MAKE $(subst $(objutil)/,,$(@))\n"
unset CFLAGS LDFLAGS; $(MAKE) -C $(VBOOT_SOURCE) \
BUILD=$(VBOOT_HOST_BUILD) \
CC="$(HOSTCC)" \
- $(if $(HOSTPKGCONFIG), PKG_CONFIG="$(HOSTPKGCONFIG)") \
+ PKG_CONFIG="$(HOSTPKGCONFIG)" \
V=$(V) \
$@
+.PHONY: check-openssl-presence
+check-openssl-presence:
+ $(HOSTPKGCONFIG) --exists libcrypto || \
+ (echo "Error: Ensure that pkg-config and openssl's libcrypto, including header files, are installed."; exit 1)
+
$(objutil)/futility/futility: $(VBOOT_FUTILITY)
mkdir -p $(dir $@)
cp $< $@.tmp
--
To view, visit https://review.coreboot.org/c/coreboot/+/42881
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I103ce5115284352e0a3a7fdcf8b427f56ce15ba7
Gerrit-Change-Number: 42881
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-MessageType: newchange
Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42880 )
Change subject: util/cbfstool: Defuse vboot's openssl linking
......................................................................
util/cbfstool: Defuse vboot's openssl linking
Vboot determines openssl through pkgconfig, so pointing its build
system to /bin/true makes the build not break unless it needs to use
valid information about openssl.
Vboot's use of openssl is only for some special features, mostly around
PKCS key format parsing and not needed by cbfstool. While cbfstool
can link vboot, it can't link with openssl because openssl's license
is deliberately incompatible with the GPL.
Change-Id: Ia3825f9625a1964d7cefc47ab3c3a8250ceefafb
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
---
M util/cbfstool/Makefile.inc
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/42880/1
diff --git a/util/cbfstool/Makefile.inc b/util/cbfstool/Makefile.inc
index f38c825..bc2ff48 100644
--- a/util/cbfstool/Makefile.inc
+++ b/util/cbfstool/Makefile.inc
@@ -133,7 +133,7 @@
unset CFLAGS LDFLAGS; $(MAKE) -C $(VBOOT_SOURCE) \
BUILD=$(VBOOT_HOST_BUILD) \
CC="$(HOSTCC)" \
- $(if $(HOSTPKGCONFIG), PKG_CONFIG="$(HOSTPKGCONFIG)") \
+ PKG_CONFIG="true" \
V=$(V) \
hostlib
--
To view, visit https://review.coreboot.org/c/coreboot/+/42880
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia3825f9625a1964d7cefc47ab3c3a8250ceefafb
Gerrit-Change-Number: 42880
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40278 )
Change subject: mb/purism/librem_whl: Add new board Librem Mini (WHL-U)
......................................................................
Patch Set 5: Code-Review+1
(1 comment)
a
https://review.coreboot.org/c/coreboot/+/40278/5/src/mainboard/purism/libre…
File src/mainboard/purism/librem_whl/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/40278/5/src/mainboard/purism/libre…
PS5, Line 1: ##
: ##
: ##
ew, that was from the SPDX replacements. Where did you copy it from? (it also needs to be removed from there)
--
To view, visit https://review.coreboot.org/c/coreboot/+/40278
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I36af42766f85eb17f86f6ec9b48b87125fb911e6
Gerrit-Change-Number: 40278
Gerrit-PatchSet: 5
Gerrit-Owner: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Wed, 01 Jul 2020 17:56:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42938 )
Change subject: mb/google/zork: Add support for active low wifi power enable
......................................................................
mb/google/zork: Add support for active low wifi power enable
A late change went into v3+ of reference schematics which inverted
EN_PWR_WIFI to meet PCIe reset/power timings for WiFi device. This is
incorporated into v3.51+ for Trembyle reference and v3.2+ for Dalboz
reference. However, some variants are built with v3+ reference
schematics, but without the inversion of EN_PWR_WIFI polarity. Thus,
we need to add support for following combinations:
1. Pre-v3 Schematics
2. V3+ Schematics
3. V3+ Schematics + Active low wifi power
This change adds a new Kconfig
`VARIANT_MIN_BOARD_ID_WIFI_POWER_ACTIVE_LOW` that sets the minimum
board ID that has EN_PWR_WIFI active low in hardware. Variants that
missed this change in V3+ integration (berknip and vilboz) have board
IDs set to VARIANT_MIN_BOARD_ID_V3_SCHEMATICS + 1. For others, this
defaults to VARIANT_MIN_BOARD_ID_V3_SCHEMATICS.
BUG=b:159749536
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
Change-Id: Ib8da7fba5f4a518a51b203d6a01a9551e261d8b6
---
M src/mainboard/google/zork/Kconfig
M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c
M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c
3 files changed, 94 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/42938/1
diff --git a/src/mainboard/google/zork/Kconfig b/src/mainboard/google/zork/Kconfig
index a9e9562..885de14 100644
--- a/src/mainboard/google/zork/Kconfig
+++ b/src/mainboard/google/zork/Kconfig
@@ -141,5 +141,12 @@
default 2 if BOARD_GOOGLE_BERKNIP
default 3 if BOARD_GOOGLE_DALBOZ
default 2 if BOARD_GOOGLE_VILBOZ
+ default 256
+
+config VARIANT_MIN_BOARD_ID_WIFI_POWER_ACTIVE_LOW
+ int
+ default 3 if BOARD_GOOGLE_BERKNIP
+ default 3 if BOARD_GOOGLE_VILBOZ
+ default VARIANT_MIN_BOARD_ID_V3_SCHEMATICS
endif # BOARD_GOOGLE_BASEBOARD_TREMBYLE || BOARD_GOOGLE_BASEBOARD_DALBOZ
diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c
index 5f007f7..44bffc2 100644
--- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c
+++ b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c
@@ -219,20 +219,20 @@
return NULL;
}
-static void wifi_power_reset_configure_v3(void)
+static void wifi_power_reset_configure_active_low_power(void)
{
/*
* Configure WiFi GPIOs such that:
* - WIFI_AUX_RESET is configured first to assert PERST# to WiFi device.
- * - Enable power to WiFi using EN_PWR_WIFI.
+ * - Enable power to WiFi using EN_PWR_WIFI_L.
* - Wait for 50ms after power to WiFi is enabled.
- * - Deassert PERST# to WiFi device by driving WIFI_AUX_RESET low.
+ * - Deassert WIFI_AUX_RESET.
*/
static const struct soc_amd_gpio v3_wifi_table[] = {
/* WIFI_AUX_RESET */
PAD_GPO(GPIO_29, HIGH),
- /* EN_PWR_WIFI */
- PAD_GPO(GPIO_42, HIGH),
+ /* EN_PWR_WIFI_L */
+ PAD_GPO(GPIO_42, LOW),
};
program_gpios(v3_wifi_table, ARRAY_SIZE(v3_wifi_table));
@@ -240,6 +240,41 @@
gpio_set(GPIO_29, 0);
}
+static void wifi_power_reset_configure_active_high_power(void)
+{
+ /*
+ * When GPIO_42 is configured as active high for enabling WiFi power, WIFI_AUX_RESET
+ * gets pulled high because of external PU to PP3300_WIFI. Thus, EN_PWR_WIFI needs to be
+ * set low before driving it high to trigger a WiFi power cycle to meet PCIe
+ * requirements. Thus, configure GPIOs such that:
+ * - WIFI_AUX_RESET is configured first to assert PERST# to WiFi device
+ * - Disable power to WiFi.
+ * - Wait 10ms for WiFi power to go low.
+ * - Enable power to WiFi using EN_PWR_WIFI.
+ * - Deassert WIFI_AUX_RESET.
+ */
+ static const struct soc_amd_gpio v3_wifi_table[] = {
+ /* WIFI_AUX_RESET */
+ PAD_GPO(GPIO_29, HIGH),
+ /* EN_PWR_WIFI */
+ PAD_GPO(GPIO_42, LOW),
+ };
+ program_gpios(v3_wifi_table, ARRAY_SIZE(v3_wifi_table));
+
+ mdelay(10);
+ gpio_set(GPIO_42, 1);
+ mdelay(50);
+ gpio_set(GPIO_29, 0);
+}
+
+static void wifi_power_reset_configure_v3(uint32_t board_version)
+{
+ if (board_version >= CONFIG_VARIANT_MIN_BOARD_ID_WIFI_POWER_ACTIVE_LOW)
+ wifi_power_reset_configure_active_low_power();
+ else
+ wifi_power_reset_configure_active_high_power();
+}
+
static void wifi_power_reset_configure_pre_v3(void)
{
/*
@@ -275,7 +310,7 @@
if (!google_chromeec_cbi_get_board_version(&board_version) &&
(board_version >= CONFIG_VARIANT_MIN_BOARD_ID_V3_SCHEMATICS))
- wifi_power_reset_configure_v3();
+ wifi_power_reset_configure_v3(board_version);
else
wifi_power_reset_configure_pre_v3();
}
@@ -285,6 +320,12 @@
PAD_GPO(GPIO_5, LOW),
/* PCIE_RST1_L */
PAD_GPO(GPIO_27, LOW),
+ /*
+ * On pre-v3 schematics, GPIO_29 is EN_PWR_WIFI. So, setting to high should be no-op.
+ * On v3+ schematics, GPIO_29 is WIFI_AUX_RESET. Setting to high ensures that PERST# is
+ * asserted to WiFi device until coreboot reconfigures GPIO_29 on resume path.
+ */
+ PAD_GPO(GPIO_29, HIGH),
/* NVME_AUX_RESET_L */
PAD_GPO(GPIO_40, LOW),
/* EN_PWR_CAMERA */
diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c
index a395e2e..97ee130 100644
--- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c
+++ b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c
@@ -214,20 +214,20 @@
return NULL;
}
-static void wifi_power_reset_configure_v3(void)
+static void wifi_power_reset_configure_active_low_power(void)
{
/*
* Configure WiFi GPIOs such that:
* - WIFI_AUX_RESET_L is configured first to assert PERST# to WiFi device.
- * - Enable power to WiFi using EN_PWR_WIFI.
+ * - Enable power to WiFi using EN_PWR_WIFI_L.
* - Wait for 50ms after power to WiFi is enabled.
* - Deassert WIFI_AUX_RESET_L.
*/
static const struct soc_amd_gpio v3_wifi_table[] = {
/* WIFI_AUX_RESET_L */
PAD_GPO(GPIO_86, LOW),
- /* EN_PWR_WIFI */
- PAD_GPO(GPIO_42, HIGH),
+ /* EN_PWR_WIFI_L */
+ PAD_GPO(GPIO_42, LOW),
};
program_gpios(v3_wifi_table, ARRAY_SIZE(v3_wifi_table));
@@ -235,6 +235,41 @@
gpio_set(GPIO_86, 1);
}
+static void wifi_power_reset_configure_active_high_power(void)
+{
+ /*
+ * When GPIO_42 is configured as active high for enabling WiFi power, WIFI_AUX_RESET_L
+ * gets pulled high because of external PU to PP3300_WIFI. Thus, EN_PWR_WIFI needs to be
+ * set low before driving it high to trigger a WiFi power cycle to meet PCIe
+ * requirements. Thus, configura GPIOs such that:
+ * - WIFI_AUX_RESET_L is configured first to assert PERST# to WiFi device
+ * - Disable power to WiFi.
+ * - Wait 10ms for WiFi power to go low.
+ * - Enable power to WiFi using EN_PWR_WIFI.
+ * - Deassert WIFI_AUX_RESET_L.
+ */
+ static const struct soc_amd_gpio v3_wifi_table[] = {
+ /* WIFI_AUX_RESET_L */
+ PAD_GPO(GPIO_86, LOW),
+ /* EN_PWR_WIFI */
+ PAD_GPO(GPIO_42, LOW),
+ };
+ program_gpios(v3_wifi_table, ARRAY_SIZE(v3_wifi_table));
+
+ mdelay(10);
+ gpio_set(GPIO_42, 1);
+ mdelay(50);
+ gpio_set(GPIO_86, 1);
+}
+
+static void wifi_power_reset_configure_v3(uint32_t board_version)
+{
+ if (board_version >= CONFIG_VARIANT_MIN_BOARD_ID_WIFI_POWER_ACTIVE_LOW)
+ wifi_power_reset_configure_active_low_power();
+ else
+ wifi_power_reset_configure_active_high_power();
+}
+
static void wifi_power_reset_configure_pre_v3(void)
{
/*
@@ -267,7 +302,7 @@
if (!google_chromeec_cbi_get_board_version(&board_version) &&
(board_version >= CONFIG_VARIANT_MIN_BOARD_ID_V3_SCHEMATICS))
- wifi_power_reset_configure_v3();
+ wifi_power_reset_configure_v3(board_version);
else
wifi_power_reset_configure_pre_v3();
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/42938
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib8da7fba5f4a518a51b203d6a01a9551e261d8b6
Gerrit-Change-Number: 42938
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan(a)google.com>
Gerrit-MessageType: newchange
Hello Aaron Durbin,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/42936
to review the following change.
Change subject: mb/google/zork: Move PCIE_RST1_L deassertion to happen early for dalboz
......................................................................
mb/google/zork: Move PCIE_RST1_L deassertion to happen early for dalboz
This change moves PCIE_RST1_L deassertion to happen as part of
variant_pcie_power_reset_configure() instead of
variant_romstage_entry() since romstage is guaranteed to run 100ms+
after PP3300_NVME is enabled. This is one of the first things that
coreboot on x86 does as part of early mainboard configuration.
Additionally, this change also drops deassertion of PCIE_RST0_L on bid
1 for dalboz since PCIE_RST0_L is already deasserted much earlier in
the boot flow.
BUG=b:152582706
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
Change-Id: Ib734aa6ff664268e68388b1997ddce676504f8d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/…
Reviewed-by: Aaron Durbin <adurbin(a)google.com>
Commit-Queue: Aaron Durbin <adurbin(a)google.com>
Tested-by: Aaron Durbin <adurbin(a)google.com>
---
M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c
M src/mainboard/google/zork/variants/dalboz/Makefile.inc
D src/mainboard/google/zork/variants/dalboz/romstage.c
3 files changed, 3 insertions(+), 27 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/42936/1
diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c
index ba50362..2b6f516 100644
--- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c
+++ b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c
@@ -270,6 +270,9 @@
{
uint32_t board_version;
+ /* Deassert PCIE_RST1_L */
+ gpio_set(GPIO_27, 1);
+
if (!google_chromeec_cbi_get_board_version(&board_version) &&
(board_version >= CONFIG_VARIANT_MIN_BOARD_ID_V3_SCHEMATICS))
wifi_power_reset_configure_v3();
diff --git a/src/mainboard/google/zork/variants/dalboz/Makefile.inc b/src/mainboard/google/zork/variants/dalboz/Makefile.inc
index a616e2f..51d19fe 100644
--- a/src/mainboard/google/zork/variants/dalboz/Makefile.inc
+++ b/src/mainboard/google/zork/variants/dalboz/Makefile.inc
@@ -2,7 +2,5 @@
subdirs-y += ./spd
-romstage-y += romstage.c
-
ramstage-y += gpio.c
ramstage-y += variant.c
diff --git a/src/mainboard/google/zork/variants/dalboz/romstage.c b/src/mainboard/google/zork/variants/dalboz/romstage.c
deleted file mode 100644
index 42e36c4..0000000
--- a/src/mainboard/google/zork/variants/dalboz/romstage.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-
-#include <stddef.h>
-#include <soc/romstage.h>
-#include <baseboard/variants.h>
-#include <ec/google/chromeec/ec.h>
-#include <gpio.h>
-#include <soc/gpio.h>
-#include <variant/gpio.h>
-
-void variant_romstage_entry(void)
-{
- uint32_t board_version;
-
- if (google_chromeec_cbi_get_board_version(&board_version))
- board_version = 1;
-
- if (board_version < 2) {
- /* SET PCIE_RST0_L HIGH */
- gpio_set(WIFI_PCIE_RESET_L, 1);
- } else {
- /* SET PCIE_RST1_L HIGH */
- gpio_set(PCIE_RST1_L, 1);
- }
-}
--
To view, visit https://review.coreboot.org/c/coreboot/+/42936
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib734aa6ff664268e68388b1997ddce676504f8d2
Gerrit-Change-Number: 42936
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange