From 734ebcbbb4e1e6f816225c59acef08ebd1094a2c Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Fri, 21 Jul 2017 10:20:49 -0700 Subject: [PATCH] extra: usb_updater: include config.h board.h and config-chip.h should only be called from config.h, otherwise some #define may not be set properly. BUG=chromium:746471 BRANCH=none TEST=Found a bug while compiling OTP changes (c/580289/) (https://luci-milo.appspot.com/buildbot/chromiumos.tryserver/ no_vmtest_pre_cq/81548) The size of the serial number string is set in config.h when CONFIG_USB_SERIALNO is needed. Compile with ec-utils with cr50_onboard USE flag set. Change-Id: I5a2306bd0dc1dea29265226f2986829b768cfb61 Signed-off-by: Gwendal Grignou Reviewed-on: https://chromium-review.googlesource.com/581887 Reviewed-by: Randall Spangler Reviewed-by: Nicolas Boichat --- extra/usb_updater/Makefile | 2 +- extra/usb_updater/usb_updater.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/extra/usb_updater/Makefile b/extra/usb_updater/Makefile index 0a2b3a035e..f7b74a6f94 100644 --- a/extra/usb_updater/Makefile +++ b/extra/usb_updater/Makefile @@ -30,7 +30,7 @@ endif # LIBS += $(shell $(PKG_CONFIG) --libs libusb-1.0) CFLAGS += $(shell $(PKG_CONFIG) --cflags libusb-1.0) -CFLAGS += -I../../include -I../../util +CFLAGS += -I../../include -I../../util -I../../test BOARD ?= cr50 LIBS_g = $(shell $(PKG_CONFIG) --libs libcrypto) diff --git a/extra/usb_updater/usb_updater.c b/extra/usb_updater/usb_updater.c index c063198b20..669bac3b97 100644 --- a/extra/usb_updater/usb_updater.c +++ b/extra/usb_updater/usb_updater.c @@ -23,8 +23,7 @@ #define __packed __attribute__((packed)) #endif -#include "config_chip.h" -#include "board.h" +#include "config.h" #include "compile_time_macros.h" #include "misc_util.h"