diff options
author | Jeremy Bettis <jbettis@google.com> | 2021-09-27 14:16:30 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-27 23:00:24 +0000 |
commit | 8c8b62f6cb1b469a2c21898941a60f6364686762 (patch) | |
tree | fb1b12013dcea9137b60e65d5f20b3d949fe8acb | |
parent | dcd24535cf751fcdaa7c5f025c2e54705e4053f3 (diff) | |
download | chrome-ec-8c8b62f6cb1b469a2c21898941a60f6364686762.tar.gz |
zephyr: Fix broken volteer build
On github, the volteer build was failing with error:
undefined reference to `ppc_is_vbus_present'
but it was building in the chroot. It seems the chroot linker can
determine that the pd_snk_is_vbus_provided function is never called,
but the zephyr toolchain linker cannot, or perhaps it does missing
function detection before removing unused functions.
Remove pd_snk_is_vbus_provided if CONFIG_USB_PD_VBUS_DETECT_PPC is not
set.
BRANCH=None
BUG=b:194375840
TEST=In docker container:
PROJECT=volteer; PROJECT_SUBDIR=volteer/; VERSION=26; unset TOOLCHAIN
zmake -j1 --zephyr-base "${ZEPHYR_BASE}${VERSION}" \
--modules-dir "${MODULES_DIR}" -l DEBUG configure -b \
-B "${BUILD_DIR}/${PROJECT}" -t ${TOOLCHAIN:-zephyr} \
zephyr/projects/${PROJECT_SUBDIR}${PROJECT}
In chroot: zmake configure -b zephyr/projects/volteer/volteer
Change-Id: I59679a12e89e8b2e5fa2f62dc5fa60d108234d23
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3188214
Reviewed-by: Yuval Peress <peress@google.com>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Reviewed-by: Parth Malkan <parthmalkan@google.com>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Yuval Peress <peress@google.com>
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r-- | baseboard/volteer/usb_pd_policy.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/baseboard/volteer/usb_pd_policy.c b/baseboard/volteer/usb_pd_policy.c index 80615a8e09..f939998b3d 100644 --- a/baseboard/volteer/usb_pd_policy.c +++ b/baseboard/volteer/usb_pd_policy.c @@ -62,10 +62,12 @@ int pd_set_power_supply_ready(int port) return EC_SUCCESS; } +#ifdef CONFIG_USB_PD_VBUS_DETECT_PPC int pd_snk_is_vbus_provided(int port) { return ppc_is_vbus_present(port); } +#endif /* defined(CONFIG_USB_PD_VBUS_DETECT_PPC) */ int board_vbus_source_enabled(int port) { |