| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update **test** directory description to README.md.
* Add ** fuzz** directory description to README.md.
* Add unit test and fuzzer make targets to `make help`
* Change showboards to print-boards to be more consistent
* Change showboards to use auto pretty print
* Add print-tests, print-host-tests, and print-host-fuzzers
This is necessary to remove the ambiguity about what a special
name is for a given unit test.
Documentation Story:
The idea is to give a brief overview of what the test and fuzz
directories are in README.md.
README.md also mentions you should see `make help` for more detail.
Running `make help` shows you more general test/fuzz commands,
including the print-* commands.
Running the print-* commands show you exact target names for all
possible unit/fuzz test (both the build-only and run target names).
BRANCH=none
BUG=none
TEST=make help
TEST=make print-tests
TEST=make print-host-tests
TEST=make print-host-fuzzers
TEST=make print-host-fuzzers | cat
TEST=make print-boards
TEST=make print-boards | cat
TEST=make buildall -j
Change-Id: I34b68196ac635ba71a1d45ceb5d35a3b36fd129f
Signed-off-by: Craig Hesling <hesling@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1684714
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aon task image build rules are lack of dependent rules of source code,
so can't track the source code changes and trigger auto build.
Refactor build rules for aon task to make sure always auto rebuild when
aon task's source code and dependent header files update
BUG=b:136691893
BRANCH=none
TEST= ish aon task should always rebuild when it's code and dependent
header files update
Change-Id: I0d8c7c6a4a2b7e99d724b88b233e09a29b8facea
Signed-off-by: Hu, Hebo <hebo.hu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1688701
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Hebo Hu <hebo.hu@intel.corp-partner.google.com>
Tested-by: Hebo Hu <hebo.hu@intel.corp-partner.google.com>
Commit-Queue: Jack Rosenthal <jrosenth@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When sanitizers are enabled, the libec.a related steps print a very
large amount of warnings that polute the build log and make it hard to
troubleshoot.
BRANCH=none
BUG=chromium:950310
TEST=USE="asan fuzzer" emerge-${BOARD} chromeos-ec
Change-Id: Ica06322291c95595b01941cffcfc297f2368ca02
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1566655
Reviewed-by: Andrey Pronin <apronin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CPPFLAGS are flags for the preprocessor, not the C compiler.
clang warns when linking that we don't have the blx instruction:
lld.real: warning: lld uses blx instruction, no object with architecture
supporting feature detected
but this is because the linker command was not being passed the correct
architecture because it was missing the CFLAGS that specified them:
Before:
"/usr/bin/clang-8" -cc1as -triple armv4t-none-unknown-eabi
After:
"/usr/bin/clang-8" -cc1as -triple thumbv7em-none-unknown-eabi
BRANCH=nocturne,nami
BUG=chromium:931797
TEST=make buildall -j
TEST=revert change
rm -rf build && make buildall -j | grep 'bytes in flash and' | \
| sort > build.before
=> apply change
rm -rf build && make buildall -j | grep 'bytes in flash and' | \
| sort > build.after
diff build.before build.after
=> no difference
Change-Id: I6401b60fa3721c441df126f69634a13d6c7c06fe
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1470781
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order for chromeos-ish ebuild to run tests, it must run the fuzz
tests, which are not related to ISH features, and introduce a lot of
library dependencies into the ebuild.
Provide two new targets: runhosttests and runfuzztests to allow the
host tests to be run separately. runtests (and buildall) remain the
same.
BUG=b:134446400
BRANCH=none
TEST=ran new targets, they functioned as intended
Change-Id: Idba7fcfe707caeb0e51ce0c38caeac9da87e3baf
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1642887
Reviewed-by: Jett Rink <jettrink@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 5c986c3bbf1c414ada67f785f602418fd29e0132.
Presumably the previous CL fixes the flakiness.
BRANCH=none
BUG=chromium:963768
TEST=make buildall -j
Change-Id: I972ce5c20586410773a78afe21a1b0c02d9c5f0b
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1623051
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a currently a frequent race when running fuzzing tests,
let's not run them to avoid continuously breaking the CQ.
BRANCH=none
BUG=chromium:963768
TEST=make buildall -j => no fuzzing tests are run
Change-Id: Ic789dc207ecb064d0918ab04fd8644d0b77f7c0f
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1621447
Reviewed-by: John L Chen <zuan@chromium.org>
Commit-Queue: John L Chen <zuan@chromium.org>
Tested-by: John L Chen <zuan@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IPI table is board-specific. This CL removes the original
IPI table in chip layer, and uses gen_ipi_table to generate
the table for each board to reduce the maintenance effort.
TEST=make BOARD=kukui_scp, and see build/kukui_scp/ipi_table_gen.inc
exists. Push to Kukui, and see SCP boots.
TEST=modify IPI_COUNT in board.h and see it generates a new
ipi_table_gen.inc
BUG=b:130508869
BRANCH=None
Change-Id: I0c05319447d15917e8833aa80d61166c4e396370
Signed-off-by: Yilun Lin <yllin@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1568890
Commit-Ready: Yilun Lin <yllin@chromium.org>
Tested-by: Yilun Lin <yllin@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recently merged patch (34cc1f91c) introduced printing of free space
stats for both RO and RW images, without actually describing which
image the message applies to.
This change adds this additional description.
BRANCH=none
BUG=none
TEST=built a cr50 image:
$ make BOARD=cr50 -j
...
*** 8148 bytes in flash ... still available on cr50 RO ****
*** 8880 bytes in flash ... still available on cr50 RW ****
Change-Id: Ib7d5890c94ea93906d8f6a7a7c95819c47ffab8a
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1582456
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a rule to generate a new cros_ec_commands.h when ec_commands.h is
modified. The rule is checked when buildall is invoked.
At Presubmit stage, check a cros_ec_commands.h exists if ec_commands.h
is modified.
The CL author is responsible to upstream that file.
BUG=chromium:945948
BRANCH=none
Cq-Depend: chromium:1558853
TEST=Check manually cros_ec_commands.h is generated with
make build_cros_ec_commands
Check no bread crumbs are left-over when the rule fails.
Check checkpatch triggers when it finds an invalid syntax in the output
file.
Check ../../repohooks/pre-upload.py returns a meaningful error when
cros_ec_commands.h file is not present.
Change-Id: Ibc8ed7165914d39b5f0bd41643932a8514768925
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1559380
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, only buildall can print flash space stats.
This patch adds 'stats:' target, which prints the smallest flash spaces.
This target can print flash stats without running other recipes
associated with buildall.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=none
BRANCH=none
TEST=make stats
Change-Id: I30e0cb7cda60c4309212024a7b842f6b37d836ff
Reviewed-on: https://chromium-review.googlesource.com/1554842
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, buildall prints only free spaces in RW flash. This patch
makes it print smallest free spaces in RO flash as well.
If the board doesn't have RO (i.e. #undef CONFIG_FW_INCLUDE_RO), it'll
be ignored.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/129746223
BRANCH=none
TEST=buildall
Change-Id: I953cb6fd998c3868e54be2ea3c2ce0ab51275b64
Reviewed-on: https://chromium-review.googlesource.com/1554841
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1: D0i1(TCG) and D0i2(TCG + SRAM retention) implemented
2: D0i3 (TCG + SRAM power off) implemented
BUG=b:122364080
BRANCH=none
TEST=tested on arcada
Change-Id: I851d7c138b056a92d1616622e7cbfdfb94d86e5c
Signed-off-by: Hu, Hebo <hebo.hu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/1531772
Commit-Ready: Hebo Hu <hebo.hu@intel.corp-partner.google.com>
Tested-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Hebo Hu <hebo.hu@intel.corp-partner.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AON PM framework including:
1: AON task skeleton
2: task switching between main FW and AON task
3: 'idlestats' console command for D0ix statistic information
4: D0ix entrance in idle task
BUG=b:122364080
BRANCH=none
TEST=tested on arcada
Change-Id: Iefa9e067892d5c42d9f0c795275fe88e5a36115b
Signed-off-by: Hu, Hebo <hebo.hu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/1510518
Commit-Ready: Rushikesh S Kadam <rushikesh.s.kadam@intel.com>
Commit-Ready: Hebo Hu <hebo.hu@intel.corp-partner.google.com>
Tested-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Hebo Hu <hebo.hu@intel.corp-partner.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will be useful for some targets (which will still need to fixup
the dependencies themselves).
BRANCH=none
BUG=b:124804731
TEST=With follow-up TEST CLs, libprivate.a can be created
Change-Id: I5a1f4726794b308824275530b08f327e679eb904
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1475108
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The _tsk_cfg_rw is a series of flags like HAS_TASK_MOTIONSENSE, which
doesn't make sense to be used as a command.
BRANCH=none
BUG=b:126308353
TEST=make BOARD=kukui print-configs works
TEST=print-configs on all boards, and check that output is not changed
except for boards that RW Config can't be printed due to this
bug.
Change-Id: I513e88032abb8a418b22179d9e9c92a1dd8fbf3a
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1498954
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
kukui_scp has no flash, so let's just print the leftover space
in RAM instead.
BRANCH=none
BUG=b:123327630
TEST=make buildall -j 2>&1 | grep "still available" | sort > avail
before and after this change, only this line changes:
*** -29956 bytes in flash and 468976 bytes in RAM still available on kukui_scp ****
*** 468976 bytes in RAM still available on kukui_scp ****
TEST=kukui_scp does not appear in "Tightest boards' RW flash"
summary.
TEST=make savesizes/newsizes still reports changes in RAM space
on kukui_scp
Change-Id: I4e17a142777ae20bb8e8c66b5402edf2838250a3
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1496685
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to properly place ISH firmware at the correct path, the
chromeos-ish ebuild needs information on the CHIP_VARIANT make variable.
This adds a simple target to print the value of that variable.
BUG=b:122371717
BRANCH=none
TEST=ran Makefile with BOARD set and target, got correct value
Change-Id: I882660aea19bf92e74072740d7d30574e81b0cb5
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1487112
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We manually copy other .data from the original section on boot, and
clear DRAM .bss.
This way, a single object file (or archive) can be moved fully to
DRAM.
BRANCH=none
BUG=b:122058243
TEST=With next CL, dram_test works
Change-Id: I1a434bbd8a4135d16b3f49b0d1b75b96506e3e24
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1445652
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a board configuration produces an RW image for its B side, it makes
sense that requesting the "hex" target would produce a hex file for the B
side image as well as the A side image.
BUG=none
BRANCH=none
TEST=make -j buildall
Signed-off-by: Carl Hamilton <carlh@chromium.org>
Change-Id: Ib4ff1e41272ebf199c6361da4b572a43d403a003
Reviewed-on: https://chromium-review.googlesource.com/1369686
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When processing the result of comparison of current and previous
./util/getversion.sh outputs, remove temp file only if it matches the
previous version. Otherwise the temp file would be moved to the target
file and does not need to be explicitly removed.
BRANCH=none
BUG=none
TEST=observed successful completion of 'make BOARD=cr50' with and
without modified files in the tree.
Change-Id: I70c848179b5c97bc3ff1e8ec001aedaebce515bd
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1450180
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When buildall fails for a reason other than failure to build a board
image, it is difficult to figure out what exactly went wrong, the
amount of output on the screen is overwhelming, the vast majority of
it having nothing to do with the failure.
Also, experience shows that the user does not really care about the
exact build phase when a failure happened. As soon as the user
detects file(s) in .failedboards directory, he/she can try building
the board separately and see what the problem is.
With this patch not only building the boards, but also running regular
tests, fuzz and cts tests will create appropriate files in the
./.failedboards directory when starting the appropriate make step and
will remove the files when succeeding.
Management of ./.failedboards directory is also being simplified: its
creation is enforced before building various targets, but cleaning
happens only when the target is buildall.
Now, after running 'make buildall' files in ./.failedboards give a
better indication of what went wrong:
- regular files - building board with this name failed
- files host-XXXX_fuzz - fuzzer XXX_fuzz failed
- files host-XXXX - test XXXX failed
- files cts-XXXX-YYY cts test for board XXX test YYY failed
BRANCH=none
BUG=none
TEST=created various failures and observed the appropriate leftovers
in ./.failedboards
Change-Id: Iadfe1c63da5db7fe37b8647b277b61a461de5399
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1444795
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 allows to store specific code/data in a .dram region. This
is used by mt_scp to run code off DRAM, as we plan to have more
code than what can fit in SRAM.
BRANCH=none
BUG=b:122058243
TEST=make BOARD=kukui_scp -j
objdump -x build/kukui_scp/ec.obj
=> Some code is loaded in DRAM
TEST=Load kukui_scp, icachetest works
Change-Id: Idbab809ba86cabe3b984944adc2781b37d2d544b
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1391542
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 1d9dbd408f7d837cb2725ed0e37d775967f6bb21.
Reason for revert: There is a compiler fix in llvm r351247.
Original change's description:
> Remove fuzzer test runs from buildall.
>
> This removes the test runs for fuzzer targets temporarily until
> crbug.com/918662 is resolved.
>
> BRANCH=None
> BUG=chromium:918662
> TEST=make -j buildall
>
> Change-Id: I80b9c4cd403924e41704462277da6d288796abc8
> Signed-off-by: Allen Webb <allenwebb@google.com>
> Reviewed-on: https://chromium-review.googlesource.com/1399201
> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Bug: chromium:918662
Change-Id: I002046822af9550312f6a88828331637c83e4682
Reviewed-on: https://chromium-review.googlesource.com/1418250
Commit-Ready: Allen Webb <allenwebb@google.com>
Tested-by: Allen Webb <allenwebb@google.com>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Allen Webb <allenwebb@google.com>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the test runs for fuzzer targets temporarily until
crbug.com/918662 is resolved.
BRANCH=None
BUG=chromium:918662
TEST=make -j buildall
Change-Id: I80b9c4cd403924e41704462277da6d288796abc8
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1399201
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want to be able to build fuzzing tests individually, and running
one test should not require to build them all.
Move the environment change to each fuzz-test-target.
BRANCH=none
BUG=none
TEST=make host-host_command_fuzz works
Change-Id: Ic80c32d4b17fd30f30e8de0cfea7eee341c68978
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1389989
Tested-by: Allen Webb <allenwebb@google.com>
Reviewed-by: Allen Webb <allenwebb@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This incorporates the fuzz targets into buildall and adds a quick
sanity check to each fuzz target to make sure it exits successfully for
an empty input.
This adds roughly 5.88 seconds to "make -j buildall" (This includes an
addtionally target that will be enabled in a later CL).
time make -j buildall # BEFORE
real 1m19.519s
user 23m9.220s
sys 5m1.690s
time make -j buildall # AFTER
real 1m25.399s
user 23m35.753s
sys 5m12.609s
BRANCH=None
BUG=None
TEST=make -j buildall
Change-Id: Ib77a57297ee896569c509d0c8c998552d2a3a76c
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1370934
Reviewed-by: Vadim Bendebury <vbendeb@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 adds a rule for building c++ object files to make it possible
to use libprotobuf-mutator in fuzzing targets.
BRANCH=none
BUG=chromium:876582
TEST=make -j buildfuzztargets &&
./build/host/cr50_fuzz/cr50_fuzz.exe
Change-Id: I1355c313e47a1a83a599eb0f0b9142fefdf6de8b
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1183535
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a minimal pinweaver fuzzer as a foundation for further work.
It will not be able to achieve good coverage because it doesn't have a
proper description of the protocol, however it demonstrates that the
prerequisites to build against dcrypto, nvmem_vars, and nvcounter are
satisfied for the host board.
CQ-DEPEND=CL:1183532
BRANCH=none
BUG=chromium:876582
TEST=make -j buildfuzztests &&
./build/host/cr50_fuzz/cr50_fuzz.exe
Change-Id: I520d71c224d583c51dc3292dc051ee8de4a4116a
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1183534
Reviewed-by: Randall Spangler <rspangler@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some boards are pretty tight on RAM space. Print out remain RAM bytes
for each board along with the tightest 3 boards during buildall.
BRANCH=none
BUG=none
TEST=buildall now outputs the tightest boards on RAM.
Change-Id: I819e554400e88937bb937f2ca51daf737588a9a5
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1194342
Reviewed-by: Jonathan Brandmeyer <jbrandmeyer@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When building with stdout redirected to /dev/null:
make buildall -j >/dev/null
One would still see "error" message like:
cmp: build/hammer/ec_version.h: No such file or directory
BRANCH=none
BUG=none
TEST=make buildall -j > /dev/null is quiet again.
Change-Id: I3ee9d090d3d46a70a096db0bebbfecaf293dca6d
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1141448
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=none
TEST=buildall with no change is much faster now (no relinking of
ec.*.elf)
Change-Id: I844b5f6836462efaa98a1d26edcaf8f8a3c47567
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1126316
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Packs a bootblock into EC image. The bootblock content will be firstly
tranlated to eMMC emulated data, and then been packed to the RO image.
Getting idear from: CL:1039105(which generates eMMC data as a header file).
BRANCH=none
BUG=b:80159522
TEST=BOOTBLOCK=xyz make BOARD=kukui -j
BOOTBLOCK=xyz make BOARD=kukui -j # check it doesn't repack.
BOOTBLOCK=abc make BOARD=kukui -j # check it repacks the bootblock.
Change-Id: Ia1564d6c54aed7a91fc42210d6247bdecfd82f4e
Signed-off-by: Yilun Lin <yllin@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1075907
Commit-Ready: Yilun Lin <yllin@chromium.org>
Tested-by: Yilun Lin <yllin@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kevin/Gru are running out of space and we already have another ARM board on
ToT for development. Remove maintenance burden of keeping them around.
BRANCH=none
BUG=chromium:851512
TEST=build_packages --board=kevin works with dependent CLs.
CQ-DEPEND=CL:1102565,CL:*640973,CL:*640974
Change-Id: Ie7c65c7799acc9f4d266e40b29b37240fec345c6
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1100011
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On successful build reports something like the following:
Tightest boards' RW images, bytes left:
zinger : 1580
minimuffin: 1584
wheatley : 2644
BUG=b:110043829
BRANCH=none
TEST=make buildall emits a list of boards like shown above
Change-Id: I36723cfdc9ae33e5861c1e0dfca322433520dce8
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1096042
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In rare cases, it is useful to be able to build tests for all boards:
buildall only builds the main image, but -paladin builders also builds
test cases for each board.
Also remove/fix tests for boards that currently fail.
BRANCH=none
BUG=b:35647963
TEST=make buildalltests -j, wait a long time, tests pass.
Change-Id: Id6d978705a40a2045731cb08ad2ca5d62cc12ebb
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1072218
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Room remaining in flash is an ever important property of many EC
images. This patch adds a makefile rule with will calculate how much
free room is left in the RW partition with the current image.
The calculation uses two variables set by the linker: 'FLASH' which
shows how much room is allocated to the image and '__image_size' which
shows how much room is actually taken. The difference is how much room
is still available.
Wnen building with V=0, size is not reported.
BRANCH=cr50, cr50-mp
BUG=b:65253310
TEST=observed reported values:
$ make BOARD=cr50 -j
...
*** 7864 bytes still available in flash on cr50 ****
$ rm -rf build/cr50/
$ make BOARD=cr50 CR50_DEV=1 -j
*** 4488 bytes still available in flash on cr50 ****
Change-Id: I66e23dc72905988b21666c5dc9608d92e3fead50
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1030909
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is used verify moving define from board to baseboard
is a no-op
BRANCH=none
BUG=none
TEST=make BOARD=yorp print-configs works
Change-Id: I6868e9ee9e52cd80791df734961d380bbe95bd1e
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1038895
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
|