summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)Author
2023-09-11Switch jenkins node over to use encapsulate main branchStefan Reinauer
This is only needed once we want to recreate the docker Change-Id: I493acb4de615508b08826f814ef6ac1b37cbdf0c Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75781 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-11Switch gitconfig.sh over to use main branchStefan Reinauer
Change-Id: Iea1a7e61b60c4bf04be2fed9c503eaf7e20fe462 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75783 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-11Switch board_status.sh to use main branchStefan Reinauer
... so we can switch coreboot over. Change-Id: Ib0487014fd49829e0d021533b04df9e8bd1a757a Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75779 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2023-09-07util/docker: Replace use of sed with build argsTim Crawford
Change-Id: I9ab101e06ed670dfe6802f9bd0df128d056446db Signed-off-by: Tim Crawford <tcrawford@system76.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77540 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-05amdfwtool: Add FW type FUSE_CHAIN in the config fileZheng Bao
We don't have file for the fuse chain, but we need to set the level for some cases. Change-Id: Idb546f761ae10b0d19a9879a9a644b788828d523 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77506 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2023-08-31crossgcc: Upgrade MPFR from 4.2.0 to 4.2.1Elyes Haouas
Change-Id: I1fb3630bf5e8a56ddcf6102faffde568134accc9 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77375 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-31util/crossgcc: Update binutils from 2.40 to 2.41Elyes Haouas
Change-Id: I6c985974e2eeea1329b2dbb232711c72b0bd99bc Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76852 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-31util/crossgcc: Update GMP from 6.2.1 to 6.3.0Elyes Haouas
Change-Id: I67d443cb15d89482b20b01f4068502b16ac8fc8e Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76865 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-30amdfwtool: Print more information when debug mode is setZheng Bao
Change-Id: I08187c339ebbe84b183f3c6e53f0eea540620fbf Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77505 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-08-29util/cbfstool: Add eventLog support for ELOG_TYPE_FW_SPLASH_SCREENSubrata Banik
This patch adds support for logging the firmware splash screen event to the event log. There could be two possible scenarios for this event: enabled and disabled. BUG=b:284799726 TEST=Verify that the event shows up in the event log when the user selects the HAVE_FSP_LOGO_SUPPORT and BMP_LOGO configs to display the firmware splash screen. Change-Id: I1e224903df21159d6eef2849a7d6fb05de09f543 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77508 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-08-28util/msrtool: Don't use old style function definitionElyes Haouas
Use "int foo(void)" instead of old-style "int foo()". Change-Id: Ieb151c2db1c0ee9222dbacccae78ca725bdcde08 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77498 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-28util/coreboot-configurator: Don't use old style function definitionElyes Haouas
Use "int foo(void)" instead of old-style "int foo()". Change-Id: I19869ce2f47b543af4552ea23ce1fd1beea2f892 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77497 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-28util/inteltool: Don't use old style function definitionElyes Haouas
Use "int foo(void)" instead of old-style "int foo()". Change-Id: I609c0332132389c07b03db40dc48dc94ca836a56 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77496 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-08-28util/xcompile: Fix libpayload compilation with clang/llvmArthur Heymans
x86 assembly code uses a lot of nested macros so increase the default value from 20 to 1000. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: Ic23c452514de7dc1aa420541b756c443180b8b37 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77430 Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-27util/kconfig: Update toada to halt on errorsMartin Roth
The tool 'toada' which converts the Kconfig output to ada syntax keeps running even when it can't parse something. Change that behavior to halt, and update the error message to show where the error is coming from. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I29807a054581060d04b9ecbe02f2ba666c46bcf2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77422 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-27util/kconfig: Allow toada to handle negative integersMartin Roth
Any builds using ADA were getting a message saying: `couldn't parse value '-1' for 'SEABIOS_DEBUG_LEVEL'` This change allows toada to parse negative integers. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I6507c54976b67f1ad70846b6bd6c54c861130d3d Reviewed-on: https://review.coreboot.org/c/coreboot/+/77421 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-27doc,util: Regenerate documentation filesFelix Singer
Add new documentation generated by util/util_readme/util_readme.sh. This also fixes the following Sphinx warning: util/abuild/index.md: WARNING: document isn't included in any toctree Change-Id: I26c33af3c5a5853f6bcce23e982a6b192b01f1d7 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77441 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2023-08-25util/cbfstool: Add eventlog support for PSR data backup statusKrishna Prasad Bhat
In order to support logging of events for PSR data backup command status during CSE firmware downgrade, add support for ELOG_TYPE_PSR_DATA_BACKUP and ELOG_TYPE_PSR_DATA_LOST types. BRANCH=None BUG=b:273207144 TEST=Verify event shows in eventlog after CSE firmware downgrade Change-Id: Ibb78ac8d420bb7a64328ce009ddcb99030519ec6 Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com> Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77005 Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anil Kumar K <anil.kumar.k@intel.com>
2023-08-23util/release: Update build-release script to pause for the PGP keyMartin Roth
When the script is run, it fetches a new copy of the repo, then creates a tag, signed by GPG. When this signing step runs, a window pops up for the user to enter their PGP key's passphrase. This window prevents the user from doing anything else on their desktop, like looking up the passphrase. It also times out after a while, and causes the script to fail at that point. To prevent this annoyance, pause right before the step asking for the passphrase until the user is ready. Because the submodules aren't tagged, we can delay their update until after the tag is created to lower the amount of time needed before the tag & signing step. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I414dfc0f8944b4408881392278a2bce2a364992b Reviewed-on: https://review.coreboot.org/c/coreboot/+/77366 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-23util/release: Upload script to abandon patches older than 1 yearMartin Roth
This script allows any user with abandon rights to abandon patches that haven't been touched (reviewed, commented on, rebased, etc) in over a year. As a part of the release process, we're now going to run the script to abandon all of those patches so that we don't get to the point of needing to abandon 1300 patches again in the future. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I4a07c09edf02d9c1858a58322095eefbceb529d3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77365 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-21util/docker: Update Dockerfiles for building the documentationNicholas Chin
The doc.coreboot.org container is several years out of date, using the three year old Alpine 3.8 as the base image along with Sphinx related pip packages which are even older. Accordingly, update the documentation related pip packages in the coreboot-jenkins-node container as well. - Update doc.coreboot.org to Alpine 3.18.3 - Update documentation related pip packages on coreboot-jenkins-node and doc.coreboot.org to the latest versions on PyPI - Update Sphinx to 6.2.1 as the latest version of sphinx_rtd_theme does not yet support sphinx >= 7 The updates also noticeably improve performance, dropping documentation build times from ~75 s down to ~42 s on my system from the Alpine+Python updates alone, and further down to ~35 s with the rest of the updates. TEST: The documentation builds and renders properly when built using the updated container. Change-Id: I38dfd22ee71c3779ab5fd3b3060e4675e9e3fe54 Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/73159 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-21util/genbuild: Correctly remove IASL warningMartin Roth
If IASL isn't installed, the genbuild script throws a confusing warning. This can and should be ignored because toolchain.inc will find this and provide a much better error message. The trailing >/dev/null was probably intended to do this, but didn't actually affect anything. Adding quotes around the IASL command will make "" be the command that tries to get run instead of `-v` when IASL isn't present. This will always be a failure, whereas `-v` could theoretically be a valid command. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ibff93db670766c4de21faa7553f2003450465407 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76857 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-21util/crossgcc: rename binutils patch from 'loosing' to 'losing'Martin Roth
This binutils patch was pushed by the original author using the word "loosing", which means "to release" instead of "losing", meaning to drop or misplace. I did not change the spelling of the commit message inside the patch so that the patch can still be tracked easily, but wanted to fix the mistaken spelling which appears when the patch is applied when building the crossgcc toolchain. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I66fd596a79c9eb331f473d175180cf7bb5a38529 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77327 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-21util/release: Update gerrit_stats script for releaseMartin Roth
- Change delimiter characters to safe characters to keep the output from getting mangled when imported into a spreadsheet. - Change hyphens for statistics to asterisks for easier use in the release notes. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I94f581d697f58cb29a662ac70ef9fd1d8c1e98ef Reviewed-on: https://review.coreboot.org/c/coreboot/+/77332 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-21util/release: Update genrelnotes script for new release formatMartin Roth
- Print submodule updates the way we want it for the release. - Change hyphens on stats to asterisks. - Add asterisks before authors. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I23e39fa47fe418ee51fb957fcb5fc25b50950e38 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77331 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-21util/crossgcc: Add --fetch option to download tarballsMartin Roth
The -f|--fetch option is being added to download and verify the tarballs without doing a build. This will be used specifically to archive the toolchain tarballs for the release. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ia68dbdcbf2d0fa4bb433511dc5e2f980f6762204 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77333 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-21util/testing: Add a few build tests using all coresMartin Roth
We've had issues in the past where building with a sufficient number of processors would expose a previously hidden timing issue in the build. Those have frequently been in the path of a single chip or architecture, so this adds a few different builds. I'd like to have a representative sampling without increasing the build time too much so maybe in the future, we can modify the clang build targets to be different than the GCC targets. These can be updated to different targets over time. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I51e39bc1ce6b9b7c257d0170ce3d2b5ab99d35df Reviewed-on: https://review.coreboot.org/c/coreboot/+/77329 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-21util/testing/Makefile.inc: Add missing dash to scanbuild switchFelix Singer
The test-abuild target fails since the `scan-build` switch is missing a dash. Fix it. Change-Id: Iae10f639c43fed7709698e620e732cddce5658d8 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74240 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-08-21util/testing: Separate ccache option from abuild optionsMartin Roth
scanbuild and ccache don't work together, so separate ccache from the rest of the abuild options. All of the other tests get ccache, but scanbuild never does. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: If057ed20c687ac8b501d20c6b4af91f8c0ab84b7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77326 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-08-21util/docker/jenkins-node: Don't install python modules as rootMartin Roth
When installing the python modules with pip3 as root, the installer throws a lot of warnings about conflicts and recommends that it not be run that way. This change installs the python modules as the coreboot user instead. The --break-system-packages argument can now be removed. It takes along some other changes made to the coreboot home directory which also don't need to be run as root, and now adds the .local/bin directory into the path. The trailing docker PATH configuration is discarded as cleanup - it doesn't have any effect. Nothing uses it in the Dockerfile, and it doesn't end up updating the path, which is set by /etc/profile. Change-Id: Ie8273009bb527e267584bba84504191aa7294ca3 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76855 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-21util/docker: Update the coreboot-sdk from libfreetype6 to libfreetypeMartin Roth
The libfreetype6-dev has been a transitional package pointing at libfreetype-dev for a while now. The libfreetype6-dev package is currently out of date in debian sid, so it's a good time to switch away from it. TEST=Rebuild coreboot-sdk Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: If40e9eacf871d3840745ea18ec2ff5975cc62da7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77328 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-21util/board_status: Switch branch to main for uploading resultsNicholas Chin
The default branch for the board-status repo was renamed to main, and thus the -u option for board_status.sh no longer works as it tries to push to master. Update the branch accordingly. TEST: board_status.sh is able to upload results to review.coreboot.org using the -u flag. Change-Id: Ic90e95d8701e21c4ae30a7ac85560eebe7658d79 Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77324 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-21util/amdfwtool: Add Genoa supportArthur Heymans
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: I83e3c383faec0fd7b2cf768b7a4c237edd986666 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76469 Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-20util/docker/coreboot-sdk: Exclude recommended packages from installationFelix Singer
Excluding the "recommended" packages reduces the size of the container image from ~8.40GB to ~7.23GB. Install the following packages in addition as they are useful for one or the other case, or at some point even required: * ca-certificates * less * neovim * openssh-client Change-Id: Ic38ba75765e3a0c21bbfe3f380880c9ac575d0d2 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76085 Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-20util/docker/coreboot-sdk: Install an explicit version of GNATFelix Singer
While Debian Sid provides GCC version 13, GNAT is still on version 12. To keep them in sync, install GNAT 13 explicitly instead of the meta package that is still referring to GNAT 12. The coreboot toolchain including GNAT still compiles fine. Change-Id: Ifb2b4c5fbaf3c0a8a78f6ebe244e2ccfec664b41 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77191 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-17util/lint/kconfig_lint: Exclude site-local directory by defaultMartin Roth
The site-local directory is not checked into the coreboot tree, so this change excludes it by default. By adding the site-local directory, an issue could be missed in the rest of the coreboot tree. This change also adds a new command-line argument of -S or --site_local that re-enables the site-local checking. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I95efa3e7b2cbb84e5c84d263222d8e914626d314 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77138 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-08-15util/docker: Add docker-jenkins-shell targetMartin Roth
The docker-shell target was originally intended to point at the docker-jenkins-node image, and was documented as such. It was actually split into two targets - docker-shell and docker-jenkins-shell. This fixes the documentation for docker-shell and adds new help for docker-jenkins-shell. The docker-jenkins-shell target is also noted as phoney now. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ib3ce82f6a73a2f81e5ae51ce8063ae4e59ef67db Reviewed-on: https://review.coreboot.org/c/coreboot/+/76854 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-15util/lint: Add SPDX checker for makefilesMartin Roth
Now that all of the makefiles under the src tree have SPDX headers, add that expectation to the license header lint tool by removing the exception for Makefile.inc. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Iab9d3262621af09a1c625378ae2e61e8a736cdf8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76952 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-12Documentation: Bring back abuild documentationKeith Hui
Based on contents from coreboot wiki[1], this patch adds much needed documentation for the very important abuild utility. On top of what was there: - Mainboard targets have been updated - Added example for building one variant of one board - Added example for building boards selectively and/or with custom configurations using --skip_set/--skip_unset, -K, and config files [1] https://www.coreboot.org/Abuild Change-Id: I69701eaeef616828bc30736aba2f617e844a3148 Signed-off-by: Keith Hui <buurin@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76775 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-10util/scripts/update_submodules: Fix branch name grepingYu-Ping Wu
The command "git branch -a | grep -q ${branch}" may not exit with 0 when pipefail is set. "grep -q" exits immediately with exit code 0 as soon as a match is found. However, at that point "git branch -a" may be still writing to the pipe, leading to SIGPIPE. When pipefail is set, PIPESTATUS 141 will be returned. Fix the problem by not using "grep -q". Also fix the branch name in the generated commit subject. Change-Id: Ic07efb5e2a4f3b7bbc6e76da9e026771bc685bdb Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77085 Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-09intetool: Add support for 700 series PCHMichał Żygowski
The change does the following: - adds PCH IDs for 700 series chipsets per the DOC# 619362 rev 2.2 - updates GPIO table for PCH-S per the DOC# 618659 rev 2.1 - enables dumping GPIOs for 700 series PCH Change-Id: I4509ad714772ce90cdee5135227c02640acb6085 Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75873 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-09superiotool/ite: Add IT8784E supportMichał Żygowski
IT8784E is basically a IT8786E stripped from serial ports 3-6. There are very few minor register differences in EC IO space and GPIO LDN, which are covered by this patch. Based on IT8784E-I Preliminary Specification V0.7.1 (non-public). TEST=Dump SIO configuration on Protectli VP4670 (vault_cml). Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Change-Id: I5de8aeaff9697b854281391083f77a1083d12fe6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/74172 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-09lint/checkpatch.pl: Check for 0-length and 1-element arraysElyes Haouas
Use C99 flexible arrays instead of deprecated fake flexible arrays. This reduce difference with upstream. Change-Id: I24016493280e22f34ae5cce49fe7c1f520270f9a Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76869 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-09lint/checkpatch: Add check for unnecessary <signed> int declarationsElyes Haouas
This reduce the difference with linux v6.5-rc4. Change-Id: I64bbc09b531ea217514601386dd517af92aa40f1 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70200 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-09lint/checkpatch: Add check for old-style declarationsElyes Haouas
This reduce the difference with linux v6.5-rc4. and check for const static or static <non ptr type> const declarations. Change-Id: Ib4b37e130f2edbfe0385f0707a8c910a244bcfc7 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70202 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-09lint/checkpatch: Add check for initialized const char arraysElyes Haouas
This reduces the difference with linux v6.5-rc4. Change-Id: I9f0e9f12a177c32b401fda74cbb30c5c259b3744 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70201 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-09lint/checkpatch.pl: Update check for TRAILING_STATEMENTSElyes Haouas
This reduces the difference with linux v6.5-rc4. Change-Id: I59d9619f2e58f24e0a5474bcfa79351e3afb933d Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76870 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-09lint/checkpatch: Update 'check for illegal assignment in if conditional'Elyes Haouas
This reduce the difference with linux v6.5-rc4. Change-Id: I63b3561471d3bd0ebfe7e5733c6dd6fb673904e0 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65829 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-06abuild: Fix board variant handlingKeith Hui
Problem: Me: $ util/abuild/abuild -t asus/p2b -b p2b-ls abuild: No such target: asus/p2b, variant: p2b-ls Cause: We identify boards and variants using path names in tree, so I type in the test command above. abuild identifies all board variants the Kconfig way, in all caps and all underscores. Result: Expectation gap and abuild can't find anything where we expect it to. All variants with a hyphen in their names are affected. Fix: Add a substitution to replace hyphens with underscores. Test: I get my abuild with the command above, even a variant-specific test config works. Change-Id: I10d5b471dac41c50a85c4a309ec561b02687bb9a Signed-off-by: Keith Hui <buurin@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41918 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2023-08-04coreboot-jenkins-node/Dockerfile: Upgrade lua5 from lua5.3 to lua5.4Elyes Haouas
Change-Id: Ic1450f0fa8eb69273aa907dea2eba8f7e7131ef1 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/72510 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-04util/docker/coreboot-sdk: add mrc extraction packagesTom Hiller
Add packages required to extract the `mrc.bin` from a ChromeOS firmware image as per the instructions provided in https://doc.coreboot.org/northbridge/intel/haswell/mrc.bin.html Change-Id: I81ed4ef55f0ba745a8a0a0cc85c2b00360f59297 Signed-off-by: Tom Hiller <thrilleratplay@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67160 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-04util/docker: refactor out and fix docker cache dir testMartin Roth
The test for the docker cache directory was used by two different targets, so turn it into its own target. Add missing $ for whoami commands. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ic5e1d28110097eb502959e81bafe77faa0fc7fae Reviewed-on: https://review.coreboot.org/c/coreboot/+/76707 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-04util/docker: Update coreboot-sdk-test to coreboot-jenkins-testMartin Roth
The coreboot-jenkins-test docker image takes the coreboot-jenkins-node docker image and runs a series of tests to verify that things build properly. This was original created to test the coreboot-sdk, but build functions like the documentation have been moved from the sdk image into the jenkins node, so the test needs to be renamed. Add the makefile target to the help and phony target list at the same time. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I0e6282bbb163064f177c8e68e7180ba2bdc101f1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76706 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-08-04util/amdfwtool: Introduce support for Hash Table v2Karthikeyan Ramasubramanian
Some stages in bootflow prefer to use 16 bytes UUID instead of traditional 2 bytes FWID to identify the firmware components they verify/validate. Hence add version 2 of hash table which identifies firmware components using UUID. Other than UUID and a reserved field for alignment reasons, the format of the hash table is very similar to hash table v1. BUG=b:277292697 TEST=Build and boot to OS in Myst with PSP Verstage enabled. Ensure that the hash table v2 is built and installed into BIOS image for the components that are configured in amdfw.cfg file. Ensure that the validation by PSP is successful for all the relevant components during the boot flow. Change-Id: I2899154086cf8e90c3327178157b07ead034b16e Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76586 Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-04util/amdfwtool: Support multiple firmware identifier typesKarthikeyan Ramasubramanian
Currently this tool generates a hash table to verify signed binaries, with a 2 byte FWID as the only kind of identifier. Going forward some binaries are going to adopt 16 byte UUID identifiers and more binaries will follow in the future SoCs. Hence add support for handling multiple firmware identifier types. While at this remove the unused fwid from the PSP FW table. BUG=b:277292697 TEST=Build BIOS image and boot to OS in Myst & Skyrim. Change-Id: I5180dc0fe812b174b1d40fea9f00a85d6ef00f2f Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76585 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-03docker/coreboot-sdk/Dockerfile: Remove old workaroundElyes Haouas
Remove old workaround for automake and aclocal. Change-Id: Ifc00a479fd08d9ee4d97df6da8762bae2d097827 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76740 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-03util/docker: Remove manual symlink python3 to pythonElyes Haouas
Debian sid symlinks already python3 to python. Change-Id: Ibc3b2b047df7e1066624d4dd8aa9664ab1869222 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75875 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-08-03linux_trampoline: Handle 64-bit framebuffer addressesNico Huber
To support full 64-bit addresses, there is a new field `ext_lfb_base` since Linux 4.1. It is unclear, however, how a loader is supposed to know if the kernel is compatible with this. Filling these previously reserved bits doesn't hurt, but an old kernel would probably ignore them and not know that it's handling a clipped, invalid address. So we play safe, and only allow 64-bit addresses for kernels after the 2.15 version bump of the boot protocol. Change-Id: Ib20184cf207f092062a91ac3e6aa819b956efd33 Signed-off-by: Nico Huber <nico.h@gmx.de> Co-authored-by: Bill XIE <persmule@hardenedlinux.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76479 Reviewed-by: Bill XIE <persmule@hardenedlinux.org> Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-03util/abuild: Add per-build statistics tarfileKyösti Mälkki
Change-Id: Icb9a5bdf94013fe493dc8ec634cf3094bcff2838 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75803 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2023-08-01Revert "util/amdfwtool: Add some PSP entries to both levels"Matt DeVillier
This reverts commit 91f5da477677cc6a7a7d5cdc50f5d2bf71981e44. Commit breaks booting on MDN (and likely others). Boot hangs on: [NOTE ]  MRC: no data in 'RW_MRC_CACHE' Change-Id: Id8042690af2764d6e46fe01287be598091b1a239 Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76718 Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-08-01linux_trampoline: Handle coreboot framebufferNico Huber
Translate the coreboot framebuffer info from coreboot tables to the Linux zero page. Tested in QEMU/Q35 with a kernel w/ efifb enabled. Change-Id: I2447b2366df8dd8ffe741c943de544d8b4d02dff Signed-off-by: Nico Huber <nico.h@gmx.de> Co-authored-by: Bill XIE <persmule@hardenedlinux.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76431 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com> Reviewed-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Bill XIE <persmule@hardenedlinux.org>
2023-08-01util: Use C99 flexible arraysElyes Haouas
Use C99 flexible arrays instead of older style of one-element or zero-length arrays. It allows the compiler to generate errors when the flexible array does not occur at the end in the structure. Change-Id: I6b87680ec9f501945ae266ae4e4927efd2399d56 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76815 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-31util/sconfig: rework help text printingFelix Held
Drop the program name and split the printf call with multiple lines of text into separate printk calls. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I43df1fd02ce0fdbb6b22e1d4eda45017811c48d8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76774 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-31util/sconfig: Don't hardcode PCI device domainArthur Heymans
Use the domain number in static references to pci device so that device domain 0x20 on device pci 00.0 on end end results in DEVTREE_CONST struct device *const __pci_32_00_0 = &dev_#something; in static.c Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: I7a98b2325ee08feb1a3d1d4b333f3f4e53934b00 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76466 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-07-31util/amdfwtool: Add some PSP entries to both levelsArthur Heymans
Some SoC like Genoa require this. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: I01ff792e8016b16f34bc69722469b63cae5a42ff Reviewed-on: https://review.coreboot.org/c/coreboot/+/76468 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2023-07-24amdfwtool: Add early vga BIOS ID to enumArthur Heymans
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: Ife8c166350030cb89d794ac42834d79ec933f278 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76467 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-07-23util/docker: Update libncurses5-dev to libncurses-dev packageMartin Roth
The libncurses5-dev package no longer seems to be available in debian sid. It's been marked as a transitional package, pointing to libncurses-dev (ncurses 6) for since 2018, so this patch updates the package to the new name. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I81e1a174ab25f573a7d7711eeeb26ef22fd3854b Reviewed-on: https://review.coreboot.org/c/coreboot/+/76705 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-07-18spd_tools: bring README up to dateNick Vaccaro
bug=b:260128250 TEST=none Change-Id: I412044a13f636e87db1d2266b33c9134e746e1a2 Signed-off-by: Nick Vaccaro <nvaccaro@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76543 Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-18Makefile,genbuild: Provide length for abbreviated commit hashesNico Huber
The original default, minimum abbreviated hash length was 7. It dif- fers on newer systems, however. This breaks reproducibility, so set an explicit length. 12 hex digits should be good enough. Note: This sets only a minimum. With a high enough number of commit objects in the repository, Git could still decide to use a longer hash, again breaking reproducibility. 12 digits will hopefully pro- vide enough margin. Change-Id: Ia86e9cc41e27a0a57d498dcb13aec954c4ea0f04 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76560 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-07-17Center bootsplash on bigger framebuffersNico Huber
In the JPEG decoder, use `bytes_per_line` instead of `width` for address calculations, to allow for bigger framebuffers. When calling jpeg_decode(), add an offset to the framebuffer address so the picture gets centered. Change-Id: I0174bdccfaad425e708a5fa50bcb28a1b98a23f7 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76424 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-07-17util/xcompile: Add NASM to xcompileArthur Heymans
Reason: opensil uses nasm code. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: Ib8d89354bfd21113f77927186e418e2ec3eab44c Reviewed-on: https://review.coreboot.org/c/coreboot/+/76465 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-17crossgcc: Enable rv32iafc-ilp32 configurationPatrick Georgi
rv32iafc-ilp32 is compatible with rv32iac-ilp32 for library implementation, so add a reuse rule allowing the default configuration to support rv32iafc. -IAFC is an unusual configuration (much less common than -IMAFC), but multilib reuse has essentially no cost: this change is useful to users of platforms that support hardware floating-point but cannot use hardware multiply/divide for any reason. To avoid generating a new set of libraries this is limited to the soft-float ABI. Tested by verifying that `gcc -march=rv32iafc -mabi=ilp32 --print-search-dirs` refers to the rv32iac/ilp32 library directory as expected, rather than just the root library directory as occurs when an unsupported target is selected (for instance, rv32id). Change-Id: Ie056ba6488a138fe0876eebf7cbc59477b3c3518 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76539 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2023-07-15util/intelmetool: Remove useless break after a breakElyes Haouas
Change-Id: Ifb76d8fa09585ad6da9bfb1488a15bf853c4da99 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76475 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-07-14util/crossgcc: Update GCC version from 11.3 to 11.4Felix Singer
Change-Id: Ia9063af4495735a0e47f4cab1179441185d888b3 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76364 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2023-07-14util/lint/checkpatch_json.py: Make output message verbatimYu-Ping Wu
Some of the error messages of checkpatch.pl contain "*". Since now Gerrit supports markdown, messages with "*" will be rendered incorrectly. For example, foo* bar should be foo *bar will be shown as foo bar should be foo bar with "bar should be foo" being in italics. Fix the problem by surrounding the output message with "`" to make it verbatim. Change-Id: I02d0e894adf7f94a9e154f99321f51d4097963a5 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76392 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yidi Lin <yidilin@google.com>
2023-07-11util/crossgcc: Fix broken link by Intel to acpica tarballFelix Singer
All requests to acpica.org are redirected to an intel.com site now, which breaks our buildgcc script as it's unable to download the source tarball. Use GitHub again as it's a more reliable source. *rant* Change-Id: Ie4570539d6c8abe59295e5a29b323b091e939f90 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76399 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-06util/apcb: Add apcb edit tool for phoenixRob Barnes
Add a new apcb edit tool, apcb_v3a_edit.py, that injects SPDs into an APCB for phoenix platform. The tool makes several assumptions: * Each SPD only uses blocks 0, 1, 3 and 5. All other blocks are zero. * Each block is 64 bytes. * Dimm and socket are always 0 * Unused SPD entries are zero'd BUG=b:281983434 BRANCH=None TEST=build, flash, boot myst Change-Id: Ifb50287de77138170714a702ab87d56427aacfef Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76188 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-04util/cbmem: add parsing of TPM logs per specsSergii Dmytruk
CBMEM can contain log in different forms (at most one is present): - coreboot-specific format (CBMEM_ID_TPM_CB_LOG exported as LB_TAG_TPM_CB_LOG) - TPM1.2 format (CBMEM_ID_TCPA_TCG_LOG) - TPM2 format (CBMEM_ID_TPM2_TCG_LOG) The last two follow specifications by Trusted Computing Group, but until now cbmem couldn't print them. These formats were added not so long ago in: - commit 4191dbf0c9a5 ("security/tpm: add TPM log format as per 1.2 spec") - commit 53db677586e3 ("security/tpm: add TPM log format as per 2.0 spec") These changes make cbmem utility check for existence of TPM1.2/TPM2 logs in CBMEM and add code necessary for parsing and printing of their entries. TEST=`cbmem -L` for CONFIG_TPM1=y case TCPA log: Specification: 1.21 Platform class: PC Client TCPA log entry 1: PCR: 2 Event type: Action Digest: 5622416ea417186aa1ac32b32c527ac09009fb5e Event data: FMAP: FMAP TEST=`cbmem -L` for CONFIG_TPM2=y case TPM2 log: Specification: 2.00 Platform class: PC Client TPM2 log entry 1: PCR: 2 Event type: Action Digests: SHA256: 68d27f08cb261463a6d004524333ac5db1a3c2166721785a6061327b6538657c Event data: FMAP: FMAP Change-Id: Ib76dc7dec56dd1789a219539a1ac05a958f47a5c Ticket: https://ticket.coreboot.org/issues/425 Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com> Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68749 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-03util/sconfig: Improve usage and long optionsJakub Czapiga
Move usage function closer to main(), remove excessive printf() calls, use descriptive argument flags. Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Change-Id: If5252de63692c5e43bfbde4d7d93e1d7a84e8dff Reviewed-on: https://review.coreboot.org/c/coreboot/+/70524 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2023-07-02util/docker/coreboot-sdk: Drop legacy libftdi packageFelix Singer
flashrom does not support libftdi 0.20 anymore and it's not used by anything else. Its build systems (Makefile and Meson) only reference libftdi1 and it still compiles fine without the legacy package. Thus, drop it from the package list. Change-Id: If1b575bc9abfd192e93811a83d8615bed61eba0c Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76084 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
2023-07-02util/docker/coreboot-sdk: Drop legacy libusb packageFelix Singer
flashrom does not support libusb 0.1 anymore and it's not used by anything else. Its build systems (Makefile and Meson) only reference libusb1 and it still compiles fine without the legacy package. Thus, drop it from the package list. Change-Id: Ib9b7530e5b707e12fbf3f8058999456dc1f8dff4 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76083 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-07-02crossgcc: Upgrade IASL from 20230331 to 20230628Elyes Haouas
Changes: https://acpica.org/node/204 Change-Id: I4a1be7ffa6cb363d3fe0cddc59f0f4283fcc5257 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76164 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-06-27util/docker/coreboot-sdk: Install GNAT meta package instead gnat-12Felix Singer
The versions of both GCC and GNAT need to be in sync and the meta package for GCC is already used. So use the meta package for GNAT as well. Change-Id: Ifcd6960731bc02c70a510e520b385ca300caf88f Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76086 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2023-06-26util/docker/coreboot-sdk: Drop subversion packageFelix Singer
Subversion is not used anywhere (anymore?). Thus, drop it from the package list. Change-Id: Ibf8073c7878c130ff688102e850bbdcd66e3becc Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76082 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2023-06-24util/crossgcc: Update LLVM from version 16.0.5 to 16.0.6Felix Singer
Change-Id: I68f776c676b1c3c5562e9209c68c7a840198e36f Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76080 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2023-06-23commonlib/console/post_code.h: Change post code prefix to POSTCODElilacious
The prefix POSTCODE makes it clear that the macro is a post code. Hence, replace related macros starting with POST to POSTCODE and also replace every instance the macros are invoked with the new name. The files was changed by running the following bash script from the top level directory. sed -i'' '30,${s/#define POST/#define POSTCODE/g;}' \ src/commonlib/include/commonlib/console/post_codes.h; myArray=`grep -e "^#define POSTCODE_" \ src/commonlib/include/commonlib/console/post_codes.h | \ grep -v "POST_CODES_H" | tr '\t' ' ' | cut -d ' ' -f 2`; for str in ${myArray[@]}; do splitstr=`echo $str | cut -d '_' -f2-` grep -r POST_$splitstr src | \ cut -d ':' -f 1 | xargs sed -i'' -e "s/POST_$splitstr/$str/g"; grep -r "POST_$splitstr" util/cbfstool | \ cut -d ':' -f 1 | xargs sed -i'' -e "s/POST_$splitstr/$str/g"; done Change-Id: I25db79fa15f032c08678f66d86c10c928b7de9b8 Signed-off-by: lilacious <yuchenhe126@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76043 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-06-23soc/intel/alderlake/hsphy: Add possibility to cache HSPHY in flashMichał Żygowski
The patch adds a possibility to cache the PCIe 5.0 HSPHY firmware in the SPI flash. New flashmap region is created for that purpose. The goal of caching is to reduce the dependency on CSME and the HECI IP LOAD command which may fail when the CSME is disabled, e.g. soft disabled by HECI command or HAP disabled. This change allows to keep PCIe 5.0 root ports functioning even if CSME/HECI is not functional. TEST=Boot Ubuntu 22.04 on MSI PRO Z690-A and notice PCIe 5.0 port is functional after loading the HSPHY from cache. Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Change-Id: I5a37f5b06706ff30d92f60f1bf5dc900edbde96f Reviewed-on: https://review.coreboot.org/c/coreboot/+/68987 Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-23util/qemu: Add config for AArch64Nico Huber
Most arguments taken from the Kconfig help. RAM needs to be >= 531M, as coreboot is linked to reside between 512M..531M. Tested `make qemu` with QEMU 7.2.0. Change-Id: Id7f23918a786bc126188d5caf285e9f532dbb0ed Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76042 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-06-14util/abuild: Improve elapsed time measurementKyösti Mälkki
Time elapsed for a single board build with ccache typically measures well below 10 seconds. Improve the measurements to milliseconds resolution using bash EPOCHREALTIME (pseudo) environment variable. Change-Id: Iaedc470bb45cf9bb6f14ff8b37cd6f7ae3818a08 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75802 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-06-14util/docker: Add Alpine DockerfileFelix Singer
Add a Dockerfile for Alpine to build-test with musl-libc. Change-Id: If90412146acc94f01a89cd681539aad48e92dd2e Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75049 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jan Samek <jan.samek@siemens.com>
2023-06-12Update goswid submodule to upstream masterStefan Reinauer
Updating from commit id bdd55e4: 2022-08-11 13:59:07 +0200 - (Add json minify to remove comments in JSON files) to commit id 567a1c9: 2023-01-18 20:38:13 +0100 - (Fix README.md uSWID table) This brings in 5 new commits: 567a1c9 Fix README.md uSWID table f5fd52f Add PlantUML Documentation cd56b5b Add uSWID Documentation 1a294af Add more comprehensive example in README b0e66ae Add plantuml output Change-Id: Ib399578a20c5c64978edf4b6198439bf6983ea44 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75797 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-06-12Update cbootimage submodule to upstream masterStefan Reinauer
Updating from commit id 65a6d94: 2019-07-17 17:47:14 -0600 - (Free image buffer on read error) to commit id 80c499e: 2019-09-19 12:41:46 -0600 - (Correct spelling mistakes) This brings in 1 new commits: 80c499e Correct spelling mistakes Change-Id: I0557e7116052e98266ee1d078a078d698232bb2c Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75798 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-10board_status: Point to documentation in headerDavid Hendricks
This adds a pointer to the README and to the wiki in the header of board_status.sh. Change-Id: I5877a3bf3544f175ac74a5e5a8e1ef1cab366ab8 Signed-off-by: David Hendricks <david.hendricks@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/21569 Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-10util/inteltool: Fix building with musl libcEvgeny Zinoviev
1. Make sure __always_inline is defined. 2. To test if we're on Linux, check presence of __linux__ instead of __GLIBC__. Change-Id: I2ccfc4d2ef4c60877e24508f9926b533cffec0ed Signed-off-by: Evgeny Zinoviev <me@ch1p.io> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50412 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2023-06-10util/inteltool: suggest booting with iomem=relaxedPeter Lemenkov
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> Change-Id: Ib80efd7d1ba516cb0ae4bdb86f95877855195ce0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63999 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-04util/qemu: Revise q35 configsNico Huber
Add an NVMe drive and be more conservative with hotplug-capable PCIe ports. QEMU treats everything as hotpluggable by default, so devices can be added at runtime. However, this leads to unrealistic resource allocations with PCIEXP_HOTPLUG enabled. Tested recent allocator changes with QEMU/Q35 config and: $ make qemu QEMU_EXTRA_CFGS=util/qemu/q35-alpine.cfg Change-Id: I23746b642329356c6767b04ec177cd9411e3adb9 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67026 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2023-06-04crossgcc: Upgrade LLVM from version 16.0.4 to 16.0.5Elyes Haouas
Change-Id: I1f227bf55bac51e6226ca5d13156e54220e33629 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75635 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-04crossgcc: Upgrade CMake from version 3.26.3 to 3.26.4Elyes Haouas
Change-Id: Id6dca6be8f7a82eadcbc18b4736219faf51b843c Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75634 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-06-02util/amdfwtool: Add ability to split hash tableKarthikeyan Ramasubramanian
Hash table containing hashes of all signed PSP binaries is compiled at build time and installed into the concerned CBFS. During boot, PSP verstage reads the hash table binary and passes it to PSP bootloader. PSP bootloader in turn uses the hash table to verify the signed PSP binaries. Currently the hashes for all the signed PSP binaries are compiled into one hash table. On upcoming platforms with more number of signed PSP binaries, PSP bootloader does not have resources to handle one monolithic hash table. Instead PSP bootloader recommends splitting them into smaller hash tables (currently limited to 3 hash tables). Update amdfwtool tool to support splitting hash tables. This is done by adding an optional hash table id to the entries in the amdfw.cfg file. By default, one hash table binary is always compiled and it's name is of the format ${signed_rom}.hash. If an entry has a hash table id defined, then this utility will compile a separate hash table binary whose name is of the format ${signed_rom}.${N}.hash where N is the hash table id. BUG=b:277292697 TEST=Build Skyrim BIOS image and boot to OS. Ensure that the hash table is identical with and without this change. Perform suspend/resume cycles, warm/cold reset cycles for 50 iterations each. TEST=Artificially inject hash table id against some entries in amdfw.cfg and ensure that the concerned hash table binaries are getting compiled. Change-Id: I7ef338d67695a34c33b5c166924832939f381191 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75188 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
2023-06-02util/docker: Split coreboot-sdk test into its own docker imageMartin Roth
This allows the coreboot-sdk docker image to build properly even if the testing fails, and keeps the added overhead out of the coreboot-sdk image. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I6488799256f57ad64e14c93e7317b7ad2a71781c Reviewed-on: https://review.coreboot.org/c/coreboot/+/75494 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>