| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the interest of making long-term branch maintenance incur as little
technical debt on us as possible, we should not maintain any files on
the branch we are not actually using.
This has the added effect of making it extremely clear when merging CLs
from the main branch when changes have the possibility to affect us.
The follow-on CL adds a convenience script to actually pull updates from
the main branch and generate a CL for the update.
BUG=b:204206272
BRANCH=ish
TEST=make BOARD=arcada_ish && make BOARD=drallion_ish
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 695b3c909c4846493eacd324e9c26933847372d1.
Reason for revert: Broke CQ
See https://ci.chromium.org/ui/p/chromeos/builders/postsubmit/trogdor-zephyr-postsubmit/314
Original change's description:
> zmake: Trim short version on full hashes
>
> The ec_version.h contains both a long build string and also a 31 char
> string. Change the short string to omit the commit count, and only
> include full hashes, i.e. hayato_v2.6-ec:5bd1aa,os:ade7b4 not
> hayato_v2.6.73670-ec:5bd1aa,os:
>
> Change test to be a real version string with hashes of the right length.
>
> BUG=None
> BRANCH=None
> TEST=./zephyr/zmake/run_tests.sh
>
> Change-Id: I18d73345036933594b8c74187796c3727f868629
> Signed-off-by: Jeremy Bettis <jbettis@google.com>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3160464
> Tested-by: Jeremy Bettis <jbettis@chromium.org>
> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Bug: None
Change-Id: Ib4282f761c514c0ca2da6249d38ccc9cba852f6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3172040
Auto-Submit: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ec_version.h contains both a long build string and also a 31 char
string. Change the short string to omit the commit count, and only
include full hashes, i.e. hayato_v2.6-ec:5bd1aa,os:ade7b4 not
hayato_v2.6.73670-ec:5bd1aa,os:
Change test to be a real version string with hashes of the right length.
BUG=None
BRANCH=None
TEST=./zephyr/zmake/run_tests.sh
Change-Id: I18d73345036933594b8c74187796c3727f868629
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3160464
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the CQ fails because of code formatting, it is hard to figure out
what to fix. Change run_tests.sh to show the diff.
BUG=None
TEST=Ran run_tests.sh locally
BRANCH=None
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I05cc976919cad6f6e14e35843451845e0f8038d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3160501
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the nanopb zephyr module to zmake. This is needed by Chameleon V3.
BRANCH=none
BUG=none
TEST=build brya and check that the module is there
Cq-Include-Trybots: luci.chromeos.cq:cq-orchestrator
Cq-Depend: chromium:3154336
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I7eb988c4918059f77759faacc6a0ce6555c8346f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3149344
Tested-by: Yuval Peress <peress@google.com>
Auto-Submit: Yuval Peress <peress@google.com>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new flag --log-label to be the inverse of --no-log-label.
Set defaults to --log-level=INFO --no-log-label, but if --log-level is
set by the user, then default to --log-label. So a bare zmake command
will output at INFO with no labels, but zmake -l INFO will include
labels.
Suppress the job names [/mnt/.../hayato:ro] from the log lines if
--no-log-label.
Don't remove leading whitespace from logged lines, it messes up the
memory usage table.
Wait for file descriptors to stop writing output before checking for
warnings and errors in the output.
Change "Output file '...' created" to be at DEBUG instead of INFO.
BUG=None
TEST=zmake w/ no flags, -l ERROR, --log-label, --no-log-label
BRANCH=None
Change-Id: I76567ab49d5d9019c5f25c618fe10816fb2cfd35
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3153592
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EC version does not follow the the AP and OS version. This causes
confusion during development. This change augments the EC version output
to include the CrOS FWID when available. The CrOS FWID will be missing
when the CrOS EC is built outside of cros_sdk. When CrOS FWID is missing
'CROS_FWID_MISSING' will be used.
Zephyr/zmake support will be added later, CROS_FWID32 is set to
'CROS_FWID_MISSING' in zephyr builds until then.
BUG=b:188073399
TEST=version
21-05-20 16:43:18.627 Chip: Nuvoton NPCX993F A.00160101
21-05-20 16:43:18.631 Board: 1
21-05-20 16:43:18.631 RO: guybrush_v2.0.8770+f47439f75
21-05-20 16:43:18.634 guybrush_13983.0.21_05_20
21-05-20 16:43:18.639 RW_A: * guybrush_v2.0.8770+f47439f75
21-05-20 16:43:18.641 * guybrush_13983.0.21_05_20
21-05-20 16:43:18.644 RW_B: guybrush_v2.0.8770+f47439f75
21-05-20 16:43:18.644 guybrush_13983.0.21_05_20
21-05-20 16:43:18.647 Build: guybrush_v2.0.8770+f47439f75
21-05-20 16:43:18.651 guybrush_13983.0.21_05_20 2021-05-20
21-05-20 16:43:18.657 16:31:19 robbarnes@robbarnes0
ectool version
RO version: guybrush_v2.0.8770+f47439f75
RO cros fwid: guybrush_13983.0.21_05_20
RW version: guybrush_v2.0.8770+f47439f75
RW cros fwid: guybrush_13983.0.21_05_20
Firmware copy: RO
Build info: guybrush_v2.0.8770+f47439f75
guybrush_13983.0.21_05_20 2021-05-20 16:31:19 robbarnes@robbarnes0
Tool version: 1.1.9999-f47439f @robbarnes0
BRANCH=None
Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: Ief0a0c6e9d35edc72ac2d4780ee203be41d7305f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2894145
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Linux, both filenames and paths are not unbounded in size. The
typical constants NAME_MAX and PATH_MAX specify the maximum size (in
bytes) of a file name and a file path, respectively. In Linux, these
constants are 256 and 4096.
The regex which was previously used here assumed file names could be
infinitely long. Bound it. Additionally, we need to limit to ASCII
word characters, as Unicode characters may sometimes be more than one
byte.
BUG=b:199769823
BRANCH=none
TEST=run unit tests
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I404302ea10ec27acc9c8e6988bb6dd6050deb09a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3158895
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The coverage report removes the chroot prefix from the paths, but we
need to use the module_paths instead of checkout so it will work on
gitlab.
BUG=None
TEST=Pushed to gitlab coverage branch
BRANCH=None
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I0ff47d71f95deae55714988f69d710ba95b71e6f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3139095
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our GitLab builder uses different toolchains than the supported ones
we use for development. At present, this means that the GitLab CI
needs to call -t for each build with the desired toolchain, preventing
us from using the more general commands "zmake coverage" or "zmake
testall".
Extend the idea of toolchain in our config files to be "supported
toolchains" instead (i.e., multiple toolchains can be supported
instead of one. We do this by refactoring our toolchain support code
to consist of two related methods:
- "probe" returns True if the toolchain is detected on the system, or
False otherwise
- "get_toolchain_config" returns the BuildConfig associated with the
toolchain for the system, mirroring the functionality previously
implemented in lambda functions.
Also dropped support for arm-none-eabi, as I believe this was only
used early on during scarlet development, and am not aware of any
current users.
BUG=b:178731498
BRANCH=none
TEST=./run_tests.sh
TEST=zmake testall
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I9b2ad508ae6703f0c3b56518fc32606c0ff1777c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3134668
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we are running zmake -j1 coverage, then wait after each job so that
nothing runs in parallel.
BUG=None
TEST=zmake -j1 coverage
BRANCH=None
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: Ic709cd187414f3886bc28731f78748993bfac95e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3130624
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a reland of commit 769264c30d58e0b12795411e99e7d3efbbf78e2d.
CL:3131701 removes the "zephyr" use flag, so the hatch and trogodr
builders will no longer build both zephyr_ec and cros_ec images.
Original change's description:
> zmake: add NPCX monitor to output packer list
>
> Add the NPCX monitor binary to the output directory when using the NPCX
> output packer.
>
> BUG=b:197162681
> BRANCH=none
> TEST=Build zephyr for volteer, verify npcx_monitor.bin is present in the
> output directory with the zephyr.bin image.
>
> Signed-off-by: Keith Short <keithshort@chromium.org>
> Change-Id: I5ab29a797830b6870df5b86e70ebe86a62ff430b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3122866
> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
> Reviewed-by: Yuval Peress <peress@chromium.org>
BUG=b:197162681
BRANCH=none
TEST=Build zephyr for volteer, verify npcx_monitor.bin is present in the
output directory with the zephyr.bin image.
Cq-Include-Trybots: luci.chromeos.cq:cq-orchestrator
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Iee33430047257ab2eaf5f88252a91aca60ee60ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3133466
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In chroot, you can always use llvm-cov to parse the coverage files, but
in zephyr sdk, you have to use the right gcov binary for each toolchain.
Use cmake to build a gcov shell script, and call it from zmake coverage.
BUG=None
TEST=zmake coverage in chroot and gitlab
BRANCH=None
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I6203445f0a412193e8280bb5cdf7994d5346fdbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3130622
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Yuval Peress <peress@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 769264c30d58e0b12795411e99e7d3efbbf78e2d.
Reason for revert: This CL is causing b:197899072
Original change's description:
> zmake: add NPCX monitor to output packer list
>
> Add the NPCX monitor binary to the output directory when using the NPCX
> output packer.
>
> BUG=b:197162681
> BRANCH=none
> TEST=Build zephyr for volteer, verify npcx_monitor.bin is present in the
> output directory with the zephyr.bin image.
>
> Signed-off-by: Keith Short <keithshort@chromium.org>
> Change-Id: I5ab29a797830b6870df5b86e70ebe86a62ff430b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3122866
> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
> Reviewed-by: Yuval Peress <peress@chromium.org>
Bug: b:197162681
Change-Id: I6b3f08aa2a7649b06ce8059f58b0f94fe803982d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3123838
Auto-Submit: Keith Short <keithshort@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the NPCX monitor binary to the output directory when using the NPCX
output packer.
BUG=b:197162681
BRANCH=none
TEST=Build zephyr for volteer, verify npcx_monitor.bin is present in the
output directory with the zephyr.bin image.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I5ab29a797830b6870df5b86e70ebe86a62ff430b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3122866
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Exclude the NPCX monitor binary sources from coverage
BUG=b:197162681
BRANCH=none
TEST=zmake testall, zmake converage /tmp/zephyr-coverage
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I86c5270d3599ac486c84479e64225839b4374502
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3122865
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add some logic to re-exec zmake when running inside of a chroot and we
find the source code available (to reduce the number of times we have
to update the chroot).
Note: we also discussed adding a chroot-upgrade-required warning
logic. This is actually a separate idea so will be handled in a
separate CL.
BUG=b:197636145
BRANCH=none
TEST=unit tests
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I26ecbb9a575f22c8667a1928e4bd5836f6fd4fe1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3114503
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
zmake build was changed to generate ec_version.h, update zmake coverage
to do the same.
BUG=None
TEST=zmake coverage
BRANCH=none
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: Ib65f862843617a3ee64d0e68b2b9e204afc85787
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115429
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't use getversion.sh for our version strings, and this is purely
for informational purposes only, so just delete it.
BUG=b:184832251
BRANCH=none
TEST=unit tests
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I479c25e4b2cc675cd24d173e56cc505c7e29f1ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3111229
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 93adb802c1a626fbb73d762124e90be4fee08a8b.
This commit was reverted due to build failures with the
chromeos-zephyr ebuild. The root cause of the build failures was that
the ebuild uses different working directories between the configure
and build phases, and so the path to the include directory we generate
during the configure phase won't work in the build phase.
Use the full path here so that we can run the diffrerent phases in
different working directories.
Diff from original commit:
Change-Id: Idcbd0c0546f9fcb12fcd66c617e024b8aa2a893a
> --- a/zephyr/zmake/zmake/zmake.py
> +++ b/zephyr/zmake/zmake/zmake.py
> @@ -235,7 +235,7 @@ class Zmake:
> self.logger.info("Clearing old build directory %s", build_dir)
> shutil.rmtree(build_dir)
>
> - generated_include_dir = build_dir / "include"
> + generated_include_dir = (build_dir / "include").resolve()
> base_config = zmake.build_config.BuildConfig(
> environ_defs={"ZEPHYR_BASE": str(zephyr_base), "PATH": "/usr/bin"},
> cmake_defs={
BUG=b:197287679
BRANCH=none
TEST=emerge-volteer chromeos-zephyr
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I80cec7a1622edcecc670b7dbeed56dadcdf71555
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3111305
Commit-Queue: Yuval Peress <peress@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 10809eb023d475681b45863e68d906fae4667eda.
Reason for revert: Causing build errors b/197287679
Original change's description:
> zephyr: pull in the version string from zmake
>
> Zmake computes a version string and stores it in FRID/FWID, but this
> was never plumbed all the way out into the version functionality in
> the OS, which was reporting the version generated by
> util/getversion.sh.
>
> Add a mechanism to generate the version header from zmake and replace
> the getversion.sh generation with that.
>
> BUG=b:184832251
> BRANCH=none
> TEST=provided unit tests
> TEST=get this version string on posix-ec:
> posix-ec_v2.6.73347-cmsis:c3bd20,ec:c814a9,hal_stm32:f8ff8d,os:efe095
> 2021-08-18 14:10:18 jrosenth@germania
>
> Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
> Change-Id: Idec1c5f8b5f014126706e4fdc1f3d158edf40a63
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104625
> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Bug: b:184832251
Change-Id: Ifcc4830e3097c8dc8126bb76adfeb3ce75a7a667
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3110293
Auto-Submit: Rob Barnes <robbarnes@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Put EC repo first, since that's probably the most useful commit
hash.
- Put Zephyr kernel second, since that's probably the second most
useful commit hash.
- Put all other modules after that, alphasorted.
BUG=b:184832251
BRANCH=none
TEST=updated unit tests
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Id14e9706980d733637e29643dd355aaa82a51fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3105265
Reviewed-by: Yuval Peress <peress@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Zmake computes a version string and stores it in FRID/FWID, but this
was never plumbed all the way out into the version functionality in
the OS, which was reporting the version generated by
util/getversion.sh.
Add a mechanism to generate the version header from zmake and replace
the getversion.sh generation with that.
BUG=b:184832251
BRANCH=none
TEST=provided unit tests
TEST=get this version string on posix-ec:
posix-ec_v2.6.73347-cmsis:c3bd20,ec:c814a9,hal_stm32:f8ff8d,os:efe095
2021-08-18 14:10:18 jrosenth@germania
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Idec1c5f8b5f014126706e4fdc1f3d158edf40a63
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104625
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
v2.5 is now unused, cleanup the last tidbits in zmake supporting it.
BUG=b:195571108
BRANCH=none
TEST=zephyr/zmake/run_test.sh
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Iea93f1d8703ad7e9c5c9bac18af0c47aed1e9a7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3086367
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This command was intended for use in ebuild, but never instrumented.
Remove the dead code.
BUG=b:195571108
BRANCH=none
TEST=zephyr/zmake/run_tests.sh
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I68d3da2e4dfdb4a44b5a58d2b8e2c01da373c06f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3086366
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ninja doesn't know how to talk to a jobserver, and so all of our
ninjas go out of control, each trying to hit the CPU on all available
cores. We have enough builds now that this is actually becoming
problematic as well.
-j1 forces sequential execution of the ninjas, which will mitigate the
problem until we switch to GNU Make.
BUG=b:178196029
BRANCH=none
TEST="zmake -D testall" executes sequentially
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I45516e22cca150a99f2da7a7b784d15c3fc78aab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3075401
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
zmake no longer needs to set BOARD_ROOT to a project directory if that
exists, since we don't want boards located in project directories
anymore.
BUG=b:193814903
BRANCH=none
TEST=unit tests pass
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I46d3ad446239e936df77a573bb41e80bed2492c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3035223
Commit-Queue: Yuval Peress <peress@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix import position in project.py to make flake8 happy.
This resolves all the flake8 messages, so we can enable the check in
run_tests.sh to prevent regression.
BUG=b:192389533
BRANCH=none
TEST=./run_tests.sh
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I4abf4af111e1914cd1b98bf9d0b69cb2a6389b43
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3002841
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove unused variable "testall" from main function.
This makes flake8 more happy.
BUG=b:192389533
BRANCH=none
TEST=run_tests.sh
TEST=flake8 reports less errors
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: If81b2b465cf959830311832be74cdf78ee8d7c06
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3002840
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run black on all files. Enable check in run_tests.sh to enforce
future formatting requirements.
BUG=b:192389533
BRANCH=none
TEST=run_tests.sh
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I5d93ef61d32d0dab4fe4bf3a77faf3f6693be627
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3002839
Commit-Queue: Yuval Peress <peress@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The logging thread was crashing the test_zmake.py logic that is using
the TestCase class. It seems that pytest was triggering the logging
thread to die (since it's set up as a daemon) when one TestCase finished
running. This caused the next TestCase to run into the .start() call
which crashed since we can't start the same thread multiple times.
BRANCH=none
BUG=none
TEST=zmake testall
TEST=pytest zephyr/zmake/tests
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I389f483a1d30d4ac21aaf547cd84c8adb9d8aa24
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3017598
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:180531609, b:190731415
TEST=build volteer
Cq-Depend: chrome-internal:3950225, chromium:2991827, chromium:2983914
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I14813c5cc89de795b266300ec74acb90e0141b46
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3001189
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run isort on all files, and enforce future formatting checks by
putting in run_tests.sh.
BUG=b:192389533
BRANCH=none
TEST=run_tests.sh
Cq-Depend: chromium:3003455
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I5795ffae30b88fe3a5f093ab7a0d8cd9389da285
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3002838
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Putting execution of "pytest" inside of zmake testall itself is
problematic: The path this code runs relies on a lot of zmake's
features, and if there were a bug in zmake that prevented that code
from being reached, the code could never get executed. Additionally,
the log output is impossible to read as it gets mixed in with all the
build output.
Separate it into a simple shell script, which greatly simplifies the
code, and makes it easier to add further style tests down the
road (isort, flake8, black).
BUG=b:192389533
BRANCH=none
TEST=run firmware_builder.py
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I8795ba0c0225183b597f3738575c790ba73610f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3002837
Commit-Queue: Yuval Peress <peress@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cleans up F401 errors reported by flake8.
BUG=b:192389533
BRANCH=none
TEST="flake8 | grep F401" ... reports nothing
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I1d206a85d75157d30926308cc650e3846f789afc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3002836
Commit-Queue: Yuval Peress <peress@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add black-compatible isort and flake8 configs, as documented here:
https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html
BUG=b:192389533
BRANCH=none
TEST=run flake8 and isort
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I744011f03ff2dfde07d940aa568ccbe7fba67f55
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3002835
Commit-Queue: Yuval Peress <peress@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Zephyr v2.6 (when building using the zephyr SDK) tries to find the sdk
using $ENV{ZEPHYR_SDK_INSTALL_DIR}. Add the environment variable def
into the toolchain rule of zmake. Note that the cmake -D value for the
same key isn't removed. This is to avoid breaking any other uses that
attempt to resolve ${ZEPHYR_SDK_INSTALL_DIR} (which is used in several
places.
BRANCH=none
BUG=none
TEST=Install zephyr SDK and build volteer
TEST=Added unit tests
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I2cee8942c453dc332061df1a57b32cfc00c6c4d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2991395
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "npcx" packer in zmake was hard-coded for Nuvoton devices.
Restructure into a new packer, BinmanPacker, which makes no Nuvoton
assumptions, and subclass it for the NpcxPacker.
Note: there's some file size check here which was coded for Nuvoton
only. I think it's not actually necessary since binman already checks
to see if the region overflowed, and will error if it did. The best
thing to do here is to keep the existing behavior and evaluate if that
Nuvoton-only size check can just be removed from zmake.
BUG=b:192401039
BRANCH=none
TEST=zmake testall
TEST=inspected fmap of hayato image, note I don't have a device to
test on right now
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ic45a030d0dd02451834161305f048487f7b273e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2995602
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This simple subcommand in zmake prints the compatible Zephyr
versions for the project. It will be used in the zephyr
ebuild to set the correct zephyr-base and modules directories.
BRANCH=none
BUG=b:190731415, b:191892353
TEST=zmake print-versions zephyr/projects/volteer/volteer
TEST=added unit tests
Change-Id: If597035f71cca1e90c9402dbdb0e5e558e1e0892
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2984298
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both Cmake and ninja can report errors and warnings which are
currently lost, unless debugging is on. Update the filters to handle
all warnings/errors the same.
BUG=b:184298184
BRANCH=none
TEST=manually tested after seeing errors/warnings along the way
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Ib1893e3d634e22962623f132672e6df80d00da20
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2957551
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow passing a --cq flag to zmake for running a CQ pass. When done,
zmake will remove flaky features such as hypothesis health checks which
cause pytests to fail when taking longer than "expected". Note that the
health checks ignore the deadline set on each function and will still
fail if they deem the test to have run too long.
BRANCH=none
BUG=b:190229270, b:190957007
TEST=sudo emerge chromeos-base/zephyr-build-tools && \
zmake --cq testall
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Iaf9a38e0bbd65f0be9521019a615279d8b5fbb49
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2977586
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Zephyr v2.6 we no longer have the option of setting the output file
name. Set it to match so projects can build with either 2.5 or 2.6
BRANCH=none
BUG=b:190731415
TEST=build projects with 2.5 and 2.6
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I3637e832eeac43e497f31dd1bf60bcd525b4497c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2970985
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support to the configuration schema to allow kernel 2.6 builds.
BRANCH=none
BUG=b:190731415
TEST=manually updated zmake.yaml to v2.6 and made sure it validates
Cq-Depend: chrome-internal:3904822
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I350eaf81c4ebd3f708f60a5138e093745f0012fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2970983
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Zephyr's build allows the image to consume the full flash size
(CONFIG_FLASH_SIZE) since it doesn't assume anything about how
chromium lays out the images (using RO/RW). This means that in
systems with 512Kb of flash space, images taking up more than
256Kb will successfully build (even though the final image will
be larger than 512Kb).
Add a check in the output packers for the final size. This test
ignores by default the .elf extension.
BRANCH=none
BUG=b:190435084
TEST=Added unit tests
TEST=build brya
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I94f1657d0ff44d79920ae5e8e7f11edf1580de05
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2948169
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kconfig generates an autoconf.h header from the various Kconfig files.
These values (such as CONFIG_FLASH_SIZE) may not be obvious to find.
This is especially true since some Kconfig values are passed in from
zmake while others reside in Kconfig files.
Add a utility to get the #define value from the autoconf.h that's
generated during the build.
BRANCH=none
BUG=b:190435084
TEST=Added unit tests
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Id2c1f05a809e17f67a435209e35606ffd7245174
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2948168
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In CQ some tests that require file access may take a long time.
Update the deadline for the tests to 1 minute which matches the
deadline of tests in test_util.py.
BRANCH=none
BUG=b:188492664
TEST=run pytest (but the real test will be in CQ)
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I00b15667bf4bdbbfe8101b21a58aefdce6d4ec91
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2948164
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the drivers were being excluded from the coverage report
because of symlinks in the build/zephyr/test directory, which matched
*/test/*. Changed to be */ec/test/* and */ec/zephyr/test/*.
Also exclude the emulators, as they should not affect coverage numbers.
BUG=b:183007888
TEST=sudo emerge zephyr-build-tools && \
zmake coverage build/zmake-coverage
BRANCH=None
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I95aa2655f0396672c25b7c317e1e08c403703510
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2937741
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
5 seconds is too low for the CQ. Increase it to 60 in case the builders
are very backed up.
BUG=b:189948512
BRANCH=none
TEST=CQ
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I058b8199df2a1fd855fbbcefdddcaa5e19d1d3c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2935176
Commit-Queue: Simon Glass <sjg@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit a984234afc7763018f9b5f9e767e567fd1137e4c.
Reason for revert: Seeing if this can be landed now
Original change's description:
> Revert "zephyr: zmake: Show devicetree / compiler errors"
>
> This reverts commit 6b3b01cbf8a7c2a6a41402fcbc504028b4434497.
>
> Reason for revert: depends on CL:2807486, which is responsible for CQ
> failures (crbug.com/1198472).
>
> BUG=chromium:1198472
> BRANCH=none
> TEST=pytest zephyr/zmake/test
>
> Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
> Change-Id: I3f05e547c95b05d0ac3803bed946d7666346bf25
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2823546
> Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
BUG=b:184298184, chromium:1198472
BRANCH=none
TEST=(cd zephyr/zmake/; python3 -m pytest tests/*.py -v -k test_filter)
Change-Id: I9065a5682090b5e32414bbb6a518788ec02a6f0c
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2841024
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Put these tests in a class and add a main program so we can run the
tests directly.
This makes it easier to see any output produced by the test, for
debugging purposes. For example a print() added to a test will not be
suppressed. This makes debugging easier.
BUG=b:184298184
BRANCH=none
TEST=(cd zephyr/zmake/; PYTHONPATH=`pwd` python3 tests/test_zmake.py
TestFunctional.test_filter )
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Ic5384d8926e54322a4bf828dd6ee91b1ab4507ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2911474
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
|