| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update cmd_cxx_to_host to match current cmd_c_to_host. Switch HOSTCXX to
clang++ to match "CXX" in Makefile.toolchain (and the toolchain that we
use in the rest of Chrome OS). Add "-std=gnu++17" to match the C++
standard that we use in the rest of Chrome OS.
Followup commits will make use of these changes.
BRANCH=none
BUG=b:144959033
TEST=make buildall
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I5878ae64dc5ac76db22b3c331915b191a00f4257
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2872429
Reviewed-by: Eric Yilun Lin <yllin@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This header cannot currently be accessed by Zephyr since it is in a
driver directory, not an include directory. This header has quite a
bit of public stuff in it, so it seems reasonable to consider
everything public.
Move the header file and update all users.
BUG=b:175434113
BRANCH=none
TEST=make buildall -j30
build volteer on zephyr
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Ibba37f47a06783fafb5095f853f2a68d92b6df87
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607745
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:176500425
TEST=none
Signed-off-by: Craig Hesling <hesling@chromium.org>
Change-Id: I43839f509228299c1e31d3c824fd43c66d4a594a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2606467
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a helper running on the host, so should use host tooling.
Changing this avoids a build failure on cheza where chromeos-ec the
would fail to build before the openssl package (which is supposed to
work given that chromeos-ec doesn't list openssl in its dependencies,
and this pkg-config invocation is not a reason to start doing so).
BUG=None
BRANCH=None
TEST=emerge-cheza -v1 chromeos-ec
Signed-off-by: Mattias Nissler <mnissler@chromium.org>
Change-Id: I45161285db17a56b29a36549d3b113f42dff9362
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2550660
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed problems that were preventing us from building the unit tests
with code coverage testing via `make coverage`.
* Changed test_util so that programs will cleanly exit on SIGTERM.
* Changed run_host_test to wait for the child process to exit, and only
proc.kill() if it times out, so the child process will generate code
coverage output files on exit.
* Changed Makefile.toolchain to use the --coverage flag for both compile
and link.
* Changed build.mk and Makefile.rules to exclude certain tests from code
coverage because they were causing failures either during the
individual stage of code coverage, or generating the overall report.
BUG=b:143065231
BRANCH=none
TEST=`make coverage` produces results
Signed-off-by: Paul Fagerburg <pfagerburg@chromium.org>
Change-Id: I8575013551ce1dba3fd249cd933a3cf6d110db8d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2186853
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want to use the value of CHIP_FAMILY to define chip family code via
macros. (See the child CL for details.) In convention, a macro should be
defined with uppercase letters.
This CL changes the lowercase value of CHIP_FAMILY to the uppercase.
BUG=none
BRANCH=none
TEST=No error for "make buildall"
TEST="grep -rw --exclude="build.mk" "CHIP_FAMILY" ./"; Make sure
CHIP_FAMILY is not used in the source. So it won't have the side effect.
Signed-off-by: CHLin <CHLIN56@nuvoton.com>
Change-Id: I077d327c609387e87cd1ac128cf8c9974da21c53
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2142833
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: CH Lin <chlin56@nuvoton.com>
Tested-by: CH Lin <chlin56@nuvoton.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was some leftover constants and a #include we are no longer
using due to using a monotonic counter, clean it up.
BUG=chromium:1013701
BRANCH=none
TEST=buildall
Change-Id: Ieeb130aef9ee89d65459f52c8f34753c30c3c388
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1879335
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC 9 enabled the -Waddress-of-packed-member warning by default, which
causes the build to fail. This is already ignored for Clang, so do the
same for GCC. Tidy up the organization of the flags while we're at it.
BUG=none
BRANCH=none
TEST=make buildall -j
Change-Id: I8796b268503c9fef2be9336ee01beaf5309024f6
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1826289
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are many projects (e.g., kernel, coreboot, flashrom, mosys) having
their own copy of the ec_commands.h header file. To reduce the effort of
synchronization, this file should be maintained so that it can be copied
and included without modification whenever possible.
Currently ec_commands.h includes compile_time_macros.h only if
__KERNEL__ is not defined. However, there are many macros defined in the
latter file (e.g., ARRAY_SIZE) that are already defined in other projects,
leading to a redefinition error. To resolve this issue, ec_commands.h is
modified in this CL so that compile_time_macros.h is only included when
inside the Chromium EC repository, which is controlled by the macro
CHROMIUM_EC.
Option '-DCHROMIUM_EC' is also added to CPPFLAGS to avoid redefinition
error of macro 'BUILD_ASSERT'.
BUG=b:109900671,b:118654976,chromium:984623
BRANCH=none
TEST=make buildall -j
Cq-Depend:chromium:1760656
Change-Id: I38c77f0233ff5962b6f90f25ba96802d05e706d7
Signed-off-by: Yu-Ping Wu <yupingso@chromium.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1535086
Tested-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New pass manager in clang is breaking EC builds.
Fix by explicitily passing -fno-experimental-new-pass-manager in EC
makefile when building fuzzers.
BUG=chromium:955021
TEST=fuzzers work.
Change-Id: Ia4f62bb94b144772a845fe9974588dcb00eabe9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1688411
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ran the following command:
git grep -l 'Copyright (c)' | \
xargs sed -i 's/Copyright (c)/Copyright/g'
BRANCH=none
BUG=none
TEST=make buildall -j
Change-Id: I6cc4a0f7e8b30d5b5f97d53c031c299f3e164ca7
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1663262
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This command line option causes .o files to include additional
information and seems to be triggering a more thorough code analysis.
In particular, the uninitalized variable use cases previously missed
trigger compilation warnings when this option is enabled.
Generated code size for the Cr50 target does not change.
BRANCH=cr50, cr50-mp
BUG=b:134623681
TEST=make buildall -j
Change-Id: I1d916f0e6592757a073ae44e8e38c8a60384d576
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1648924
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IS_ENABLED works for an empty-string-defined macro.
However, -D options default to define the macro to 1. This CL forces
those macros, such as BOARD_* CHIP_*, CORE_*, CHIP_VARIANT_* and
CHIP_FAMILIY_*, to be defined as an empty string, so that it can
be supported by IS_ENABLED macro.
TEST=use if(IS_ENABLED(BOARD_KRANE)) and see compilation success.
TEST=compares build directory w/ and w/o this CL, and see the .smap
are the same:
ls build/*/*/ec.*.smap | sed -e 's|build/||' | \
xargs -I{} diff -u -a build/{} build.new/{}
BUG=none
BRANCH=None
Change-Id: I96e2aa1cb5f3369e5e445a674595a9234f26707a
Signed-off-by: Yilun Lin <yllin@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1627840
Commit-Ready: Yilun Lin <yllin@chromium.org>
Tested-by: Yilun Lin <yllin@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If IS_ENABLED is called with any unknown values, a compiler error will be
thrown. This change requires that the optimizer always be enabled,
otherwise errors will be thrown when a value is not defined.
BUG=none
BRANCH=none
TEST=make runtests TEST_LIST_HOST="is_enabled_error is_enabled"
Change-Id: I1b166311f81d07e48b3665f4bc0e9502d2ccc4c6
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1592728
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iteflash is a flash tool for ITE EC, and needs to be installed
in labstations. iteflash should belong to host-util like other
EC flash tools.
BUG=b:130036463
BRANCH=None
TEST=built and ran iteflash on Ampton using servo_v2, servo_micro
and Suzy-Q.
Change-Id: If711a26f7d6d3979332b9064313a7e1b87cd594a
Signed-off-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1560143
Reviewed-by: Matthew Blecker <matthewb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That function is only used to set CROSS_COMPILE, and we never need
leading whitespace in there. It sneaks in when the set-option call is
split across several lines, breaking the analyzestack target.
BUG=chromium:875295
BRANCH=none
TEST=make BOARD=yorp analyzestack works
Change-Id: I1b2dccd9753b0662067d77bd9c58d4ccf6daeb4d
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1547563
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This defines PROTOBUF_MIN_PROTOC_VERSION so protobuf headers don't fail
with -Wundef and sets -Wno-unreachable-code to allow for maps to be used
in protocol buffers.
BRANCH=None
BUG=chromium:937442
TEST=make -j buildall
Change-Id: Id595825c224e34df1034c26d49bb4f6263358470
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1531336
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On newer desktop distributions pkg-config queries for libftdi do not
include usb-1.0 library specific output any more, so both libraries'
compilation and linking flags need to be retrieved explicitly.
BRANCH=none
BUG=none
TEST=verified that
make BOARD=host clean; make BOARD=host utils
succeed both inside and outside chroot.
Change-Id: I659d31fac2d9b9c8c50a13d18ed09e86b913ec74
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1474893
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang now supports this flag as mentioned in the TODO
BRANCH=none
BUG=chromium:854924
TEST=make V=1 BOARD=nocturne_fp run-host_command_fuzz
TEST=make buildall -j
Change-Id: I6afc0be2f92c68d7ef6e25299554ef1fbaa903ae
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1435095
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Allen Webb <allenwebb@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Centroiding source is in C++. This CL removes -W flags only for building
C files from CFLAGS and also prevents typedef existing C++ keyword
wchar_t.
BUG=b:120961468
BRANCH=none
TEST=make buildall
Change-Id: Ifb8793a8e7e69b26a742b7dbf70289747a0ee7b3
Signed-off-by: Rong Chang <rongchang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1372874
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Tai-Hsu Lin <sheckylin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This addresses a cross compilation bug for fuzzing targets where
CROSS_COMPILE was always ''.
BRANCH=None
BUG=chromium:911310
TEST=USE="ubsan asan fuzzer" ./build_packages \
--board=amd64-generic --skip_chroot_upgrade chromeos-ec &&
(cd ../platform/ec && unset BOARD && make -j buildall)
Change-Id: I1c0b99f4ecef1e6ddec489568ccb13a8e8f5fb85
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1363541
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for building fuzz targets with memory and undefined
behavior sanitizers.
BRANCH=None
BUG=chromium:911310
TEST=USE="ubsan fuzzer" ./build_packages \
--board=amd64-generic --skip_chroot_upgrade chromeos-ec &&
(cd ../platform/ec && unset BOARD && make -j buildall
buildfuzztests)
Change-Id: Ic7f4c1d7fcc1f6347f091b98567167066787cb9c
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1364326
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes cross compilation by setting --sysroot=${SYSROOT} when
applicable so that targets that depend on outside libraries link
correctly.
BRANCH=None
BUG=chromium:911310
TEST=USE="ubsan asan fuzzer" ./build_packages \
--board=amd64-generic --skip_chroot_upgrade chromeos-ec &&
(cd ../platform/ec && unset BOARD && make -j buildall)
Change-Id: I6b0d3554d91460a9bca58e800c9e1cea9c3caf7a
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1363674
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This prevents a bunch of warnings that show when trying to run
pkg-config for libprotobuf-mutator when not building the fuzzer
targets.
BRANCH=None
BUG=None
TEST=make -j buildall
Change-Id: Idf8de959d86db744754cd237796ccaacd3668a63
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1338605
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libprotobuf-mutator is a helper library for fuzzing using protocol
buffers.
BRANCH=None
BUG=None
TEST=make -j buildfuzztests && make -j buildall
Change-Id: I855691860042bdbdeafe68cc0e0d7bea0f2667cc
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1334030
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To facilitate using libprotobuf-mutator in fuzzing targets, rules
for generating sources from proto files and compiling those to
object files were added.
BRANCH=none
BUG=chromium:876582
TEST=rm -rf build && make -j buildfuzztests &&
./build/host/cr50_fuzz/cr50_fuzz.exe (after cr50_fuzz.proto is added)
Change-Id: Id645d0b60397bfeb71d60d601c4f65eefcbdf228
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1184106
Reviewed-by: Mattias Nissler <mnissler@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This creates a build target called libec.a by setting the visibility
of functions that conflict with cstdlib to hidden. It then links
those symbols locally into one large object file that makes up libec.a
Fuzzing targets are linked against libec.a so that they can invoke ec
functionality while depending on outside libraries that need cstdlib.
When linking a particular object against cstdlib, to avoid conflicting
function declarations put the following before any includes from the
ec codebase:
#define __stdlib_compat(...)
The fuzzing targets are now linked using clang++, so that c++ libraries
and objects can be used as part of the fuzzers.
BRANCH=none
BUG=chromium:876582
TEST=make -j buildfuzztests &&
./build/host/host_command_fuzz/host_command_fuzz.exe
Change-Id: Ifdfdc6a51c6ef23b4e192b013ca993bf48a4411b
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1180401
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Writing fuzzing tests is a little tricky, as clang takes over the main
function. Instead, we start the test main function in a thread, and
have LLVMFuzzerTestOneInput prepare the host command buffer, and
wake the TEST_RUNNER task.
To make fuzzing faster, we only send somehow correctly formed requests,
with a valid checksum and length (this can be disabled with an option).
We also make sure that the emulator does not hibernate, reboot or jump
to a different image when fuzzing is enabled.
BRANCH=none
BUG=chromium:854975
TEST=make buildfuzztests -j
ASAN_OPTIONS="log_path=stderr" \
build/host/host_command_fuzz/host_command_fuzz.exe -timeout=5
Change-Id: I27b25e44c405f118dfc1296247479245e15e54b4
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1107523
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Jonathan Metzman <metzman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Automatically use CC=clang if TEST_ASAN is specified.
Also, add a __no_sanitize_address attribute macro to prevent ASan
from adding guards around host_command, mkbp_event, and hook
"arrays" that are generated at link-time.
Also, set ASAN_OPTIONS env variable in run_host_test.
BRANCH=none
BUG=chromium:854924
TEST=make TEST_ASAN=y runtests -j
Change-Id: Iaf0ec405022760d757a8a9d62a5022460d1b16e1
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1109661
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We might want to try out address sanitizer/fuzzer on some host
tests: make it possible to build host tests using clang.
Board builds are broken, and there is no intention to fix them,
at least for now.
BRANCH=none
BUG=chromium:854924
TEST=make buildall -j
TEST=make CC=clang runtests -j
Change-Id: Id49a1b8537bc403d53437a2245f4fab6ceae89ac
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1107522
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Makes it more straightforward to switch to clang preprocessor later
on.
This requires a few other modifications in the Makefiles (gcc -E does
not read from stdin by default, and does not process files that do not
end in .c/.h).
BRANCH=none
BUG=chromium:854924
TEST=make buildall -j
TEST=Before and after the change, all ec.bin binaries are identical:
git checkout m/master
make REAL_SIGNER=dummy buildall -j
mv build build-master
find build-master -type d | sed -e 's/-master//' | \
xargs -I{} mkdir -p {}
find build-master -name ec_version.h | sed -e 's|build-master/||' | \
xargs -I{} cp build-master/{} build/{}
git checkout this-cl
=> comment out .PHONY: $(out)/ec_version.h in Makefiles.rules
make REAL_SIGNER=dummy buildall -j
find build-master -name ec.bin | sed -e 's|build-master/||' | \
xargs -I{} diff build-master/{} build/{}
=> No difference
Change-Id: If07f033dc7e9a73245499c656562bb906dcd4130
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1117721
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC 8.1's linker tries to rewrite the code to match the lowest common
denominator, reintroducing references to __aeabi_idivmod and friends
even on ARM revisions that don't need them.
Tell it what it's linking for to keep it harmless.
BUG=b:65441143
BRANCH=none
TEST=make buildall works with gcc 8.1
Change-Id: I7296aa80f587aa4f004fb20958714766793ab2b5
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1061693
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL introduces /baseboard to the EC project which can contain
config options and code which is specific to certain family, but can
be shared among the board derivatives of that family. Only the
infrastructure changes are included with an empty baseboard.c/.h for
octopus.
BRANCH=none
BUG=b:74358864
TEST='make buildall' and ensure that all boards build successfully. In
addition, temporarily moved config options for USB-C and charger to
baseboard.h and tested that 'make BOARD=yorp' is successful.
Change-Id: I16656574f835c56598a9d2bf49bc1e946d71fe76
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/954444
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=
TEST=Review only. Committing small pieces until
all code passes review.
Change-Id: I9d16f95314a7c97b11c4fe61602c6db2621e6024
Signed-off-by: Scott Worley <scott.worley@microchip.corp-partner.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will prevent userland code to pull in includes
from core/stm32 etc.
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
BRANCH=none
BUG=none
TEST=make buildall -j
Change-Id: I450b17baf579cbaee04c253c1e86d998f6e329da
Reviewed-on: https://chromium-review.googlesource.com/618270
Commit-Ready: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a static analysis tool for firmware stack usage.
Add an new Makefile rule to analyze the stack usages of firmwares.
Details about the tool can be found in extra/stack_analyzer/README.md.
BUG=chromium:648840
BRANCH=none
TEST=extra/stack_analyzer/stack_analyzer_unittest.py
make BOARD=elm && make BOARD=elm build/elm/RW/ec.RW.taskinfo && \
extra/stack_analyzer/stack_analyzer.py \
--objdump=arm-none-eabi-objdump \
--addr2line=arm-none-eabi-addr2line \
./build/elm/RW/ec.RW.elf ./build/elm/RW/ec.RW.taskinfo
make BOARD=${BOARD} SECTION=${SECTION} analyzestack
Change-Id: Ifb1b5f5ad6be8f8b125b14d6ee03e25cb385895b
Signed-off-by: Che-yu Wu <cheyuw@google.com>
Reviewed-on: https://chromium-review.googlesource.com/576411
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the "make buildall", since no BOARD is defined, core/minute-ia
has to use whatever toolchain value set by previous board build.
"arm-none-eabi-" is used instead of "i686-pc-linux-gnu-" and causes
build failed.
BUG=none
BRANCH=None
TEST=Including Soraka ISH board, make buildall passed.
Change-Id: I2682e4b73f608756842870e584f559166354b00b
Signed-off-by: li feng <li1.feng@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/595221
Commit-Ready: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Li1 Feng <li1.feng@intel.com>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Li1 Feng <li1.feng@intel.com>
Reviewed-by: Kyoung Il Kim <kyoung.il.kim@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add "-g" to "LDFLAGS" for preserving debug symbol when enabling LTO.
BUG=chromium:742697
BRANCH=none
TEST=make BOARD=eve -j
arm-none-eabi-objdump -h build/eve/RW/ec.RW.elf | grep debug_loc
7 .debug_loc 00027bf0 00000000 00000000 0009a549 2**0
Change-Id: I6b2b00846ce71002262a10357fd4dccbe82b6e6f
Signed-off-by: Che-yu Wu <cheyuw@google.com>
Reviewed-on: https://chromium-review.googlesource.com/575312
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of having to pass in both the board and the arch used there
(which might be complicated in the light of different ECs with different
arches), allow passing in the board and a set of cross compilers.
The core/*/build.mk then pick the compiler that is responsible for them.
The current method works just the same: If you've already set
CROSS_COMPILE, no override happens. If you set neither CROSS_COMPILE nor
CROSS_COMPILE_$arch, the same default as before this CL is set.
BUG=none
BRANCH=none
TEST=emerge-{samus,kevin} chromeos-ec behave reasonably with adapted
ebuild
Change-Id: Icf1866f296412dd92ecfe134394224c49f7c3df5
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/549344
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes each test print start marker before sync. This will
allow us to distinguish the failure before even sync is attempted
(CTS_RC_DID_NOT_START, thus probably caused by the previous test)
and the failure caused by the hanging partner, in which case the one
good and alive will be stuck in sync (and should return _DID_NOT_END
or even better _BAD_SYNC once we implement timeout in sync).
This patch also:
* Adds did_not_start_test to and removes debug_test from meta suite
* Consolidates test runner loops into common cts_main_loop
* Removes dut_common.h and th_common.h
* Removes debug print macro and CTS_DEBUG
* Replaces all infinite loops after tests with task_wait_event(-1)
* Removes meaningless comments and debug printfs
* Removes CTS_TEST_ID_*
* Adds sync() to task suite
BUG=chromium:736104
BRANCH=none
TEST=Run run_ects.sh and verify all tests pass
Change-Id: I6ccdf26afac6b8e8cb16483c5d75e4e77e7962f4
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/545176
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds new macros for tasks (_RO and _RW), which allows to
enable a task only for RO or RW section.
We also create a new task_filter.h include file, that helps
pre-filter those tasks, and can be used either from Makefile,
or included from task_id.h.
BRANCH=none
BUG=b:35582031
TEST=make buildall -j; make savesizes
Apply this CL
make buildall -j; make newsizes => No size change
Change-Id: I472bc6d4ab250a0a0e1fa6aeb4b748ba6968bedf
Reviewed-on: https://chromium-review.googlesource.com/479491
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Nick Sanders <nsanders@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The host command parameter and response buffers should be explicitly
aligned by the LPC/SPI/I2C drivers. But the host command handlers don't
know that, and the structs are all __packed, so the compiler generates
horribly inefficient ARM Cortex-M code to cope with unaligned accesses.
Add __ec_align{1,2,4} to force the param / response structs to be
aligned. Use it in a few structs now which were straightforward to
test. It should be added to more structs as space is needed, but that
would make this change unwieldy to review and test.
Add CONFIG_HOSTCMD_ALIGNED to enable the additional alignment.
Currently, this is enabled only for LM4 and samus_pd, so that EC code
can be tested without affecting other non-samus ToT development (none of
which uses LM4).
Fix the two handlers that weren't actually aligned (despite one of
them having comments to the contrary).
Also, add a CHROMIUM_EC define that can be used to determine if a file
is being compiled for an EC target. We need that so that we only force
structure alignment for EC binaries. On the AP side, buffers may not be
aligned, so we should not force alignment.
BUG=chromium:647727
BRANCH=none
TEST=Flash samus and samus_pd. Boot samus and run a bunch of ectool
commands (with and without --dev=1, so it tests both EC and PD).
System boots and all commands return expected results.
Change-Id: I4537d61a75cf087647e24281288392eb85f22eba
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/387126
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you try to build the EC codebase with GNU make version 3.81 or
less, you currently get an error:
Makefile.rules:286: *** multiple target patterns. Stop.
Since this message isn't helpful in letting you know that the version
of make needs to be updated, let's print something more useful.
ERROR: GNU make version 3.82 or higher required. Stop.
TEST=Built with Make 3.81 and saw the new error message. Built with
make 3.82 and 4.0 and the EC built correctly.
BRANCH=None
BUG=None
Change-Id: I5813fd26fa8120742544567c5ae04af01f993f94
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/367944
Reviewed-by: David Hendricks <dhendrix@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
You can now add debug messages into a cts test and
they will be displayed with the test report html page.
The macro to use is CTS_DEBUG_PRINTF
Adding debug messages can potentially change test
results by slowing down the test, so you can choose
when compiling a test suite if you want the debug
messages present or not by adding --debug as an
argument when you call ./cts --build.
BRANCH=None
BUG=None
TEST=Manual
- Add a debug statement to a test
- Build the test suite with --debug specified
- Flash the boards
- Run './cts/cts.py -r'
- Open /tmp/cts_results/<board_name>/<test_suite>.html
to view see your debug message for the test
Change-Id: Icad8e0ac5cc905010caa4e7616f81572ce6ac771
Reviewed-on: https://chromium-review.googlesource.com/362475
Commit-Ready: Chris Chen <twothreecc@google.com>
Tested-by: Chris Chen <twothreecc@google.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should separate global Makefile from CTS stuff as much as possible.
This makes reading and chaging code simpler.
BUG=none
BRANCH=none
TEST=make buildall
Change-Id: If9e99e0e9b660707b1e22f2362bd6f782930dc09
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/363006
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Chris Chen <twothreecc@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cts.tasklist contains tasks run only for CTS. These tasks are added to the
tasks registered in ec.tasklist with higher priority. This design allows
board directories to be free from CTS stuff.
cts.tasklist can be placed in each suite directory (cts/suite/cts.tasklist).
If a suite does not define its own cts.tasklist, the common list is used
(i.e. cts/cts.tasklist).
BUG=chromium:624520
BRANCH=none
TEST=Ran the followings:
make buildall
make CTS_MODULE=gpio BOARD=nucleo-f072rb
make CTS_MODULE=gpio BOARD=stm32l476g-eval
Change-Id: Ibb242297ee10a397a8fcb6ff73d8cbc560daa885
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/359445
Reviewed-by: Chris Chen <twothreecc@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first time you use this with a particular th,
connect only th and run ./cts.py --th
Then connect both boards and you can run
./cts.py to build/flash both boards.
BRANCH=None
BUG=None
TEST=manual
- Enter chroot
- Navigate to ec/cts
- Connect only th
- 'sudo ./cts.py --th'
- './cts.py -b'
- Exit chroot
- Connect both boards
- './cts.py -f'
Each board should flash successfully
Change-Id: Ib14fccabcd9fdad04f9b92817da597bc0dcb3d89
Reviewed-on: https://chromium-review.googlesource.com/358100
Commit-Ready: Chris Chen <twothreecc@google.com>
Tested-by: Chris Chen <twothreecc@google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When compiling the EC firmware outside of the chroot, some
optional packages may not be installed. Let's be sure the tools
exist before we try to use them.
BUG=none
BRANCH=none
TEST=make buildall, both inside and outside of the chroot
Note that to build outside the chroot, we need to
1. Use GNU make verion 4.1 or later
2. Install the gcc-arm-none-eabi package
Change-Id: I78c75cb4ad658c003ded71b244b0458ae5532e0b
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/337341
Reviewed-by: Shawn N <shawnn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces HOST_CPPFLAGS to be used for all
objects being compiled with HOSTCC rather then the target
compiler.
Since glibc is not linked into the EC, no glibc include files
should be included in the EC code base. Hence, create local
definitions for clock_t and wchar_t that match what the glibc
include would have done, and remove some unneeded includes.
Due to very eager optimization, we have to give gcc a little
notch to not kick out memset.
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
BUG=chrome-os-partner:43025
BUG=chrome-os-partner:49517
BRANCH=none
TEST=compile tested
Change-Id: Idf3a2881fa8352756b0927b09c6a97473358f239
Reviewed-on: https://chromium-review.googlesource.com/322435
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This almost halves buildall times on my machine. Aseda reminded me
of ccache.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=None
BUG=None
TEST=make buildall -j
Change-Id: I819eb1e9558a65fef5bd188c487115609da8ab92
Reviewed-on: https://chromium-review.googlesource.com/321911
Commit-Ready: Anton Staaf <robotboy@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|