summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)Author
2024-01-30crossgcc: Distinguish bootstrap and target compiler optionsPatrick Georgi
GCC_OPTIONS is only used for target specific options right now, so rename to TARGET_GCC_OPTIONS and only use them in the non-bootstrap build. Adapt BINUTILS_OPTIONS for consistency, even though it doesn't have the same problem. Change-Id: I5e4f54b758dd7daf4e69101c19dfa1212fa64cf6 Signed-off-by: Patrick Georgi <patrick@georgi.software> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80229 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>
2024-01-30util/release: Remove makefile.inc references from genrelnotesMartin Roth
Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Id86ebc20cf5af5b65812c3f09235d0cba86d13f2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80126 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <ericllai@google.com>
2024-01-29device/device.h: Drop multiple linksArthur Heymans
Multiple links are unused throughout the tree and make the code more confusing as an iteration over all busses is needed to get downstream devices. This also not done consistently e.g. the allocator does not care about multiple links on busses. A better way of dealing multiple links below a device is to feature dummy devices with each their respective bus. This drops the sconfig capability to declare the same device multiple times which was previously used to declare multiple links. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: Iab6fe269faef46ae77ed1ea425440cf5c7dbd49b Reviewed-on: https://review.coreboot.org/c/coreboot/+/78328 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jincheng Li <jincheng.li@intel.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-01-27util/ifdtool: Refactor GPR0 Unlock ImplemetationSubrata Banik
This patch refactors GPR0 unlock function to add few important logic as below 1. Perform GPR0 unlock if GPR0 is locked. 2. While unlocking dump the GPRD PCH strap details 3. Additionally, print the GPR start and end range if GPR0 protection is enabled. TEST=Able to test GPR0 protection on google/rex and google/yahiko. Exp 1: Trying to unlock GPR0 protection for a locked image > ifdtool -p mtl -g image.bin -O image.bin_unlock File image.bin is 33554432 bytes Value at GPRD offset (64) is 0x83220004 --------- GPR0 Protected Range -------------- Start address = 0x00004000 End address = 0x00322fff Writing new image to image.bin_unlock Exp 2: Trying to unlock GPR0 protection for a unlocked image > ifdtool -p mtl -g image.bin_unlock -O image.bin_unlock File image.bin_unlock is 33554432 bytes GPR0 protection is already disabled Change-Id: Id35ebdefe83182ad7a3e735bdd2998baa0ec3ed7 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80216 Reviewed-by: YH Lin <yueherngl@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2024-01-26src, util: Clean up makefile.inc in text, help & commentsMartin Roth
Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ib69236fb5d68272f92405512dc231fa75ecccaa6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80125 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-01-26src, util: Update toolchain.inc references to .mkMartin Roth
Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ieaf7894f49a90f562b164924cc025e3eab5a3f7f Reviewed-on: https://review.coreboot.org/c/coreboot/+/80129 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-01-26util/autoport: Update Makefile.inc generation to Makefile.mkMartin Roth
Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ib77cb3a0852092ac414fe0160fe10d6e58fcf660 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80127 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-01-26util/mb: Update variant template Makefiles from .inc to .mkMartin Roth
The .inc suffix is confusing to various tools as it's not specific to Makefiles. This means that editors don't recognize the files, and don't open them with highlighting and any other specific editor functionality. This issue is also seen in the release notes generation script where Makefiles get renamed before running cloc. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I2a6a4d1eb7e0d0cd32c8690caf3eff340cdb0d8c Reviewed-on: https://review.coreboot.org/c/coreboot/+/80124 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-01-26util: Rename Makefiles from .inc to .mkMartin Roth
The .inc suffix is confusing to various tools as it's not specific to Makefiles. This means that editors don't recognize the files, and don't open them with highlighting and any other specific editor functionality. This issue is also seen in the release notes generation script where Makefiles get renamed before running cloc. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I434940ebb46853980596f7ad55d27a62c90280fa Reviewed-on: https://review.coreboot.org/c/coreboot/+/80123 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-01-24util/spd_tools: Update Makefile.inc references to Makefile.mkMartin Roth
Make sure that any new files generated get the Makefile.mk name. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I3880d5911ff8de01751befdffc99ba5a961416f7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80113 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <ericllai@google.com>
2024-01-24*/mem_parts_used.txt: Change Makefile.inc to Makefile.mkMartin Roth
Now that the files are renamed, make sure all references to Makefile.inc are updated as well. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I09e235eecf0c32c80a41bfcbbd3580cce6555e10 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80112 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Eric Lai <ericllai@google.com>
2024-01-24payloads: Rename Makefiles from .inc to .mkMartin Roth
The .inc suffix is confusing to various tools as it's not specific to Makefiles. This means that editors don't recognize the files, and don't open them with highlighting and any other specific editor functionality. This issue is also seen in the release notes generation script where Makefiles get renamed before running cloc. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ie7038712de8cc646632d5e7d29550e3260bf2c62 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80103 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-24Makefiles: Rename top-level Makefiles from .inc to .mkMartin Roth
The .inc suffix is confusing to various tools as it's not specific to Makefiles. This means that editors don't recognize the files, and don't open them with highlighting and any other specific editor functionality. This issue is also seen in the release notes generation script where Makefiles get renamed before running cloc. The rest of the Makefiles will be renamed in following commits. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Idaf69c6871d0bc1ee5e2e53157b8631c55eb3db9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80063 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-01-18util/superiotool: reformat alternate dump outputMatt DeVillier
Reformat alternate dump output to show default values before read values, and to use brackets to visually indicate which values differ from the defaults. old output: Register dump: idx val def 0x07: 0x0b (0x00) 0x10: 0xff (0xff) 0x11: 0xff (0xff) ... new output: Register dump: idx def val 0x07: 0x00 [0x0b] 0x10: 0xff 0xff 0x11: 0xff 0xff ... TEST=build/dump registers from Erying SRMJ4 w/Nuvoton NCT6796D. Change-Id: Idef2cc136151328b114620eb297ab8fd62b71bcd Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80004 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-01-18util/superiotool: add support for Nuvoton NCT6796DMatt DeVillier
Registers and default values taken from public datasheet: https://www.nuvoton.com/resource-files/NCT6796D_Datasheet_V0_6.pdf TEST=build/dump SIO registers on Erying SRMJ4 mainboard Change-Id: I0ff940a17b0c38a5ca66e90dd4e075a2b04dcfc1 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80003 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-18util/inteltool: Add support for RPL-H CPUMatt DeVillier
Add PCI IDs and descriptor strings to support the integrated north/south bridges and GPU for the i9-13900H CPU. --- CPU: ID 0xb06a2, Processor Type 0x0, Family 0x6, Model 0xba, Stepping 0x2 Northbridge: 8086:a706 (13th generation (Raptor Lake H family) Core Processor) Southbridge: 8086:519d (Raptor Lake) IGD: 8086:a7a0 (Intel(R) Iris Xe Graphics [RPL-P]) SBREG_BAR = 0xfd000000 (MEM) --- TEST=build/run inteltool on Erying SRMJ4 mainboard, verify PCI IDs not unknown, GPIOs dumped. Change-Id: I4cf3f419f103a1a7d4c6850f2257b7e7d45f3b18 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79962 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-15util/autoport: Improve USB codePatrick Rudolph
Currently autoport fills in USB current '0' if the detected setting isn't one of the known settings. This works as 0 is a valid setting from C point of view, but it's not supported on desktop PCs and on mobile platform results in the lowest possible USB PHY gain. Thus this might cause instabilities as the original firmware had stronger USB drive currents and gain settings. Add more known USB current fields to the map and generate a FIXME as comment when the detected current isn't one of the known entries instead of defaulting to 0. Change-Id: I48f4d636ce3401ba188f5519b5ff45fccf13f080 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78828 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-01-14tree: Use accessor functions for struct region fieldsNico Huber
Always use the high-level API region_offset() and region_sz() functions. This excludes the internal `region.c` code as well as unit tests. FIT payload support was also skipped, as it seems it never tried to use the API and would need a bigger overhaul. Change-Id: Iaae116a1ab2da3b2ea2a5ebcd0c300b238582834 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79904 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-01-12lint/kconfig_lint: Remove SOUTH_BRIDGE_OPTIONSElyes Haouas
SOUTH_BRIDGE_OPTIONS Kconfig symbol is no longer used. Change-Id: I2380f1ce48afd191755d8b3dcab0b51909f5231f Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79913 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>
2024-01-12util/ifdtool: Enable Read Access for SPI device expansion 2 regionSubrata Banik
As per Intel Meteor Lake SPI programming doc, the BIOS region should have a read access enabled for device expansion 2 region (aka region 9). This patch ensures that BIOS region is able to read the device expansion 2 region for Intel Meteor Lake platform as known as SPI padding region. BUG=b:274356894 BRANCH=firmware-rex-15709.B TEST=Able to flash screebo AP FW image using flashrom on DUT. Without this patch: > flashrom -p internal -r /tmp/bios.rom flashrom 1.4.0-devel on Linux 6.1.67-09255-ge8ae3115f8b0 (x86_64) ... ... Found Winbond flash chip "W25Q256JW_DTR" (32768 kB, Programmer-specific) on internal. Reading flash... Transaction error between offset 0x0072f000 and 0x0072f03f (= 0x0072f000 + 63)! read_flash: failed to read (0x72f000..0x7fffff). Read operation failed! FAILED. FAILED With this patch: > flashrom -p internal -r /tmp/bios.rom flashrom 1.4.0-devel on Linux 6.1.68-09294-g001fdda5287d (x86_64) ... ... Found Winbond flash chip "W25Q256JW_DTR" (32768 kB, Programmer-specific) on internal. Reading flash... done. SUCCESS Change-Id: I18c44aa9a0f890f01a889247da118b69a58936e8 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79902 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kapil Porwal <kapilporwal@google.com> Reviewed-by: Reka Norman <rekanorman@chromium.org> Reviewed-by: Eric Lai <ericllai@google.com>
2024-01-08util/lint: Remove the extra `\` in lint-stable-003-whitespaceRuihai Zhou
A following error occurred when I commit, it seems that the extra `\` after `\.md$` is unnecessary. File Binary file src/mainboard/google/guybrush/data.apcb matches has lines ending with whitespace. File Binary file src/mainboard/google/skyrim/data.apcb matches has lines ending with whitespace. File Binary file src/mainboard/google/zork/data.apcb matches has lines ending with whitespace. test failed Signed-off-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com> Change-Id: I315a37ccc3c6ebb67f7a250402549761c699dd1b Reviewed-on: https://review.coreboot.org/c/coreboot/+/79782 Reviewed-by: cong yang <yangcong5@huaqin.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Yidi Lin <yidilin@google.com>
2024-01-08util/ifdtool: Add support for extended region read/write accessReka Norman
Platforms from CNL onwards support up to 16 flash regions, not 12. The permissions for regions [15:12] are stored in extended region read/write access fields in the FLMSTR registers. Currently ifdtool treats these fields as reserved, so they're not modified when locking or unlocking. Add support for extended regions so that they are locked/unlocked by the --lock/--unlock options. This will make the locked/unlocked descriptors generated by ifdtool match those generated by mFIT. BUG=b:270275115 TEST=Without this change: `ifdtool -lr -p adl` on unlocked image: Before: 00000080 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 00000090 ff ff ff ff After: 00000080 ff 07 20 00 ff 05 40 00 ff 00 00 00 00 00 00 00 00000090 ff 00 00 00 `ifdtool -u -p adl` on locked image: Before: 00000080 00 07 20 00 00 05 40 00 00 00 00 00 00 00 00 00 00000090 00 00 00 00 After: 00000080 00 ff ff ff 00 ff ff ff 00 ff ff ff 00 00 00 00 00000090 00 ff ff ff With this change: `ifdtool -lr -p adl` on unlocked image: Before: 00000080 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 00000090 ff ff ff ff After: 00000080 00 07 20 00 00 05 40 00 00 00 00 00 00 00 00 00 00000090 00 00 00 00 `ifdtool -u -p adl` on locked image: Before: 00000080 00 07 20 00 00 05 40 00 00 00 00 00 00 00 00 00 00000090 00 00 00 00 After: 00000080 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 00000090 ff ff ff ff Change-Id: Iaa43524d91c399a996ade56f2f613b4110a44aad Signed-off-by: Reka Norman <rekanorman@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79790 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-01-05util/ifdtool: Add support for disabling GPR0Reka Norman
On ChromeOS devices with updateable CSE firmware, the GPR0 (Global Protected Range) register is used to ensure the CSE RO is write protected even when the FLMSTR-based protection is temporarily disabled by coreboot to allow updating the CSE RW. For more details see Documentation/soc/intel/cse_fw_update/cse_fw_update.md Therefore to allow modifying the CSE firmware from the CPU, the descriptor must have both the FLMSTR-based protection disabled (which can be done using ifdtool --unlock), and GPR0 disabled. Add an ifdtool option for disabling GPR0. For now I've added support for all platforms for which I have the SPI programming guide. Support for more platforms can be added in the future if needed. BUG=b:270275115 TEST=Run `ifdtool -p adl -g image.bin -O image-unlocked.bin` on a locked craask image, check the GPR0 field is set to 0. Change-Id: Iee13ce0b702b3c7a443501cb4fc282580869d03a Signed-off-by: Reka Norman <rekanorman@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79788 Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-29util/liveiso: Update to 23.11 releaseFelix Singer
The package 'bluezFull' got superseded by 'bluez'. So just remove the related line since 'bluez' is the default. Change-Id: Ibf72c37205017b27012064b311a9510136351c0f Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79416 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marvin Evers <marvin.n.evers@gmail.com> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2023-12-29util/docker/fedora: Add Dockerfile.baseFelix Singer
Following commands were used to test if everything builds: * make crossgcc * make clang * make what-jenkins-does Change-Id: I8d04c570f91215f534f173db2ae559b64b58012f Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79316 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2023-12-20util/{cbfstool,nvramtool}: Use same indent levels for switch/caseFelix Singer
Use same indent levels for switch/case in order to comply with the linter. Change-Id: I2dd0c2ccc4f4ae7af7dd815723adf757244d2005 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79448 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-by: Eric Lai <ericllai@google.com>
2023-12-17util/lint: Exclude .apcb files from various checksMatt DeVillier
.apcb files are binary configuration data and not human readable; exclude them from license, newline, and whitespace checks. Change-Id: Idc1ddd5067cb97ef8b5758a0b8bf040d1e421871 Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79589 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-12-13lib/jpeg: Replace decoder with Wuffs' implementationPatrick Georgi
To quote its repo[0]: Wuffs is a memory-safe programming language (and a standard library written in that language) for Wrangling Untrusted File Formats Safely. Wrangling includes parsing, decoding and encoding. It compiles its library, written in its own language, to a C/C++ source file that can then be used independently without needing support for the language. That library is now imported to src/vendorcode/wuffs/. This change modifies our linters to ignore that directory because it's supposed to contain the wuffs compiler's result verbatim. Nigel Tao provided an initial wrapper around wuffs' jpeg decoder that implements our JPEG API. I further changed it a bit regarding data placement, dropped stuff from our API that wasn't ever used, or isn't used anymore, and generally made it fit coreboot a bit better. Features are Nigel's, bugs are mine. This commit also adapts our jpeg fuzz test to work with the modified API. After limiting it to deal only with approximately screen sized inputs, it fuzzed for 25 hours CPU time without a single hang or crash. This is a notable improvement over running the test with our old decoder which crashes within a minute. Finally, I tried the new parser with a pretty-much-random JPEG file I got from the internet, and it just showed it (once the resolution matched), which is also a notable improvement over the old decoder which is very particular about the subset of JPEG it supports. In terms of code size, a QEmu build's ramstage increases from 128060 bytes decompressed (64121 bytes after LZMA) to 172304 bytes decompressed (82734 bytes after LZMA). [0] https://github.com/google/wuffs Change-Id: If8fa7da69da1ad412f27c2c5e882393c7739bc82 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Based-on-work-by: Nigel Tao <nigeltao@golang.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78271 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-12util/abuild: Better identify config string in logMartin Roth
When using the --skip_set and --skip_unset arguments, the config line looked like a statement that the build was being skipped instead of abuild just printing the configuration. This updates those config statements to better show that it's the config and not stating that this particular build is being skipped. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I6cc59f9b33dcda51aeb3640d449037a0aa054e36 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76936 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <ericllai@google.com>
2023-12-08util/docker/alma: Add Dockerfile.baseFelix Singer
Following commands were used to test if everything builds: * make crossgcc * make clang * make what-jenkins-does Change-Id: Iab15fe908aa6ca81724ed7557caf70c38817ad25 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79389 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Zebreus <lennarteichhorn@googlemail.com> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-12-08util/docker/rocky: Add Dockerfile.baseFelix Singer
Following commands were used to test if everything builds: * make crossgcc * make clang * make what-jenkins-does Change-Id: I60e00932332801c0f62d88b7860afb330d9469e4 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79384 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Zebreus <lennarteichhorn@googlemail.com> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-12-08util/docker/archlinux: Rename Dockerfile to Dockerfile.baseFelix Singer
Rename Dockerfile to Dockerfile.base since additional Dockerfiles basing on this one will be added later. Change-Id: I70f2c89f739068749e1017524b6f8ef1b03d6456 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79344 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Zebreus <lennarteichhorn@googlemail.com>
2023-12-08util/docker/archlinux: Add more packages allowing CI buildsFelix Singer
Following commands were used to test if everything builds: * make crossgcc * make clang * make what-jenkins-does Change-Id: I757e6dbac557bcb640777b819529a978bf54ed93 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79314 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Zebreus <lennarteichhorn@googlemail.com> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-12-06util/docker: Add build scriptFelix Singer
Integration for additional container images might be added to the Makefile at some later point. However, in order to build and test new images just add a simple script which fulfills that requirement until then. Change-Id: Ibd0a6d59f395e074c784452849650d7f03b4f1d8 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79361 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-12-06util/docker/alpine: Rename Dockerfile to Dockerfile.baseFelix Singer
Rename Dockerfile to Dockerfile.base since additional Dockerfiles basing on this one will be added later. Change-Id: I611feca234ae7600f9c17ae397f9f3903879c057 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79362 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-12-04inteltool: memory: log PCI id of unknown devicesAlexander Couzens
Change-Id: I25396e5480c45729710b16345f997c78e8bcbccb Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79363 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-12-02inteltool/gpio_names/*.h: Add GPL-2.0-only SPDX license headerNicholas Chin
Inteltool is GPLv2 licensed so all files that link to it should be GPLv2 by default. In addition, the contents of several of these headers were originally moved directly from gpio_groups.c, which is explicitly marked as GPL-2.0-only. Change-Id: Ie897cb238c0c9e89fe677c999cbf1803f5f4609a Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78628 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-11-30build system: Exempt `make *config` from strict symbol checksPatrick Georgi
The "config" targets exist to edit the .config file, and so they should be more forgiving with invalid configs (that they'll convert into valid configs on save). They will still emit warnings about invalid symbols, but not exit with an error. The regular build process still fails if the .config looks unexpected (for example when there's an unknown config flag). Change-Id: If427e075766c68d493dd406609f21b6bb27d1d74 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79298 Reviewed-by: Mike Banon <mikebdp2@gmail.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-27util/kconfig: Import some more of Linux's build infraPatrick Georgi
cmd and cmd_conf_cfg are necessary for `make menuconfig` and `make nconfig`. Change-Id: Ie16ef31a8e0137f3fd4129fb73ca6ef4669173cc Signed-off-by: Patrick Georgi <patrick@georgi.software> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79264 Reviewed-by: Mike Banon <mikebdp2@gmail.com> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-25util/kconfig: Uprev to Linux 6.6's kconfigPatrick Georgi
Upstream reimplemented KCONFIG_STRICT, just calling it KCONFIG_WERROR. Therefore, adapt our build system and documentation. Upstream is less strict at this time, but there's a proposed patch that got imported. TEST=`util/abuild/abuild -C` output (config.h and config.build) remains the same. Also, the failure type fixed in https://review.coreboot.org/c/coreboot/+/11272 can be detected, which I tested by manually breaking our Kconfig in a similar way. Change-Id: I322fb08a2f7308b93cff71a5dd4136f1a998773b Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79259 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-11-25tree wide: Rename VBOOT_MEASURED_BOOT* to TPM_MEASURED_BOOTPatrick Georgi
This follows commit c79e96b4eb3 which did the rename across the tree except in these places. Remove the flag from CHROMEOS abuild builds because it never really belonged there. Change-Id: If98fa27f64d6b676d3edf68ba6fbaacf7ac422e4 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79258 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-11-24crossgcc: Upgrade GCC from 11.4.0 to 13.2.0Elyes Haouas
Changelogs: * https://gcc.gnu.org/gcc-12/changes.html * https://gcc.gnu.org/gcc-13/changes.html Porting guides: * https://gcc.gnu.org/gcc-12/porting_to.html * https://gcc.gnu.org/gcc-13/porting_to.html Change-Id: I4f2ed4de4811abaa13528906de71eee29a8f2910 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Signed-off-by: Nico Huber <nico.h@gmx.de> Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70771 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-24util/kconfig: Uprev to Linux 6.5's kconfigPatrick Georgi
TEST=`util/abuild/abuild -C` output (config.h and config.build) remains the same Change-Id: If717d064d87b0045f276a4ee963db0a62230f5d8 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79182 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-24util/kconfig: Uprev to Linux 6.4's kconfigPatrick Georgi
TEST=`util/abuild/abuild -C` output (config.h and config.build) remains the same Change-Id: Idbcd88165271b58ba3697c66df447af0b8b57b1b Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79181 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-24util/kconfig: Uprev to Linux 6.3's kconfigPatrick Georgi
Minor bugfix, plus stuff that doesn't really affect us. TEST=`util/abuild/abuild -C` output (config.h and config.build) remains the same Change-Id: I0af0c2ae4cb11bb58457830ffcd8bb8c2422a3d1 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79180 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-24util/kconfig: Uprev to Linux 6.2's kconfigPatrick Georgi
The upstream build system uses a newly introduced function `read-file`, so copy that in from Linux 6.2. TEST=`util/abuild/abuild -C` output (config.h and config.build) remains the same Change-Id: Ic100bf189ebd3eaa0eb26904ae8602910329a180 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79179 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-24util/kconfig: Uprev to Linux 6.1's kconfigPatrick Georgi
This also cleans up our patch queue. TEST=`util/abuild/abuild -C` output (config.h and config.build) remains the same Change-Id: I79159130ba3515ede59e9fb9fbf087e2ed76257a Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79203 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-24util/docker/archlinux: Extend the environment with packages and configsFelix Singer
Add more packages which are useful for a coreboot development and build environment and also make neovim the default editor. Change-Id: Ied09a9b9500d85348fc9c3862247bd8b85e50b54 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77724 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-21util/crossgcc: Update CMake from 3.26.4 to 3.27.7Felix Singer
Change-Id: I4dbe9b7a05171bb244ec1ebe6ce7d390a6373d61 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78883 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-20cross-repo-cherrypick: Update downstream branchJon Murphy
ChromeOS has switched to using the main branch, update accordingly. BUG=b:294218930 TEST=None Change-Id: I31f67ef4fb175a4e4896b5bed81d5ae1cdddb827 Signed-off-by: Jon Murphy <jpmurphy@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79143 Reviewed-by: Eric Lai <ericllai@google.com> Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-11-18util/lint: Add linter to keep selects out of Kconfig.nameMartin Roth
While having select statements in Kconfig.name files is valid in the syntax of the Kconfig language, having the selections split between the normal Kconfig file and Kconfig.name files makes it harder to see what's going on. Kconfig.name files will now be limited to their original purpose of selecting a particular board or board variant, not actually configuring that board. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I2aab78e296f2958e77a938b1afa40a25a6aa82b0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78972 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
2023-11-17docker/coreboot-sdk: Add perl modules for gcovMartin Roth
These perl modules are needed to run the coverage-report target for gcov. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: If32a42ce17edcbae94394f770c26d3300abebcbe Reviewed-on: https://review.coreboot.org/c/coreboot/+/79072 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-16util/docker: Switch back to root user in jenkins-nodeMartin Roth
Leaving the user as coreboot caused the entrypoint to run as coreboot, which means we couldn't mount directories or run sshd correctly. Switching to root at the end of the file fixes this. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ie10e1d7ad4def0faafe3bcd580a77e23c3bfe948 Reviewed-on: https://review.coreboot.org/c/coreboot/+/79067 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-16util/ifdtool/ifdtool.c: Add NULL check for fmapnameMaximilian Brune
Some boards (e.g. prodrive/hermes) that do not provide their own FMAP and therefore have been generated by the build system (+ ifdtool) experience a failure when trying to build with an IFD that contains regions which do not have equivalent fmap names (set to NULL). Therefore add a NULL check for the fmapname and ignore the region if we do not have an fmapname. Test: compile prodrive/hermes Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: Ib4589b7fdbd11d644214ca5601536e9aeb26882f Reviewed-on: https://review.coreboot.org/c/coreboot/+/79010 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2023-11-13util/lint/kconfig_lint: Ignore C preprocessor macros in codeMartin Roth
To see which Kconfig symbols are actually used, and to verify that they're used correctly, kconfig_lint scans the C code. It gives an error if it sees a CONFIG(symbol) where the symbol doesn't exist. This creates a problem when a C preprocessor macro is created to match multiple Kconfig symbols. The simple solution here is to just ignore those C preprocessor macro definitions as beyond the scope of this linter. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I5a20e8bb5a3e19e380802cba712d6dd3ff2f4dc0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78681 Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2023-11-12util/docker/jenkins-node: Install pip modules into virtual envMartin Roth
Instead of installing the pip modules system-wide, and possibly causing conflicts, install them into a virtual environment for the coreboot user. If we wanted to, in the future, we could install different versions of the modules into different virtual environment directories to allow for testing or anything else we needed. Change-Id: I49c749a13a698bfb7af29bf07e42ac14b67b2ae7 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79006 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-11-12util/docker: change main branch back to master for encapsulateMartin Roth
The branch for the encapsulate tool accidentally got caught up in the switch from master to main. The default branch for this tool has not changed, so still needs to be referenced as master. Change-Id: I0ff47308dcbf30888e4e88637bab63f20467307a Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79005 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-11-07util/abuild: Add all builds to junit.xml filesMartin Roth
The builds from the configs directory were not being saved in the junit.xml files that Jenkins uses to determine pass vs fail of the individual builds. This also fixes the path to a log file that I noticed while testing. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I37dbee676cc9e507e612ce66994a04aba062757a Reviewed-on: https://review.coreboot.org/c/coreboot/+/78863 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-02util/docker: Add libnss3-dev package to coreboot-sdk for vbootMartin Roth
The latest updates to Vboot use libnss, so add the library to the coreboot sdk. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Iee0c44296b189b5327ef8f950b1bba9eb668f298 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78867 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2023-11-02util/crossgcc/buildgcc: Fix detection of GNAT on recent versionsFelix Singer
gnatgcc is deprecated and in recent GCC releases its purpose is fulfilled by the gcc binary. In case of a deprecated gnatgcc version is installed, it doesn't provide the expected output and hostcc_has_gnat1() fails. In this case, just set the value of CC to gcc. It's still required to install GNAT in addition to GCC. Change-Id: I730bdfda81268d10bd2a41ef5cb4e3810b76a42c Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78215 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-01util/lint: Fix some mistakes in spelling.txtJulius Werner
Somehow two words slipped in here where the "bad" and "good" spellings are the same, which doesn't make sense. Remove them. Change-Id: I9b53ce8538616c164efb4eb25ff859975ddadfd2 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78822 Reviewed-by: Eric Lai <ericllai@google.com> 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-10-31util/kconfig: fix 0009-util-kconfig... patchRichard Marko
This was reverted via commit 9ab3a1fe4a1d and causes unapply to fail so we adjust the patch to preserve the original return value. Change-Id: I5ad2180854e0263d2d097b059cb16ec478b859c5 Signed-off-by: Richard Marko <srk@48.io> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78442 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-31util/kconfig: Fix README.md formattingRichard Marko
Change-Id: I0c47a603cc6e6174cd4895ff9f44b5bc242c653e Signed-off-by: Richard Marko <srk@48.io> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78441 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-31util/kconfig: add savedefconfig patch to quiltRichard Marko
Adds commit 48ad5c23680c util/kconfig: chmod +w before savedefconfig to quilt patch series. Change-Id: I381dce2fee995227efc60169fd90ab505c99b74b Signed-off-by: Richard Marko <srk@48.io> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78440 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-31util/kconfig: chmod +w before savedefconfigRichard Marko
This prevents a headscratcher when .config in root doesn't have a write permission bit set which causes a build failure of savedefconfig not able to write to copied file, for example *** Error while saving defconfig to: build/mainboard/emulation/qemu-i440fx/cbfs-file.eU5E0t.out.tmp2 Change-Id: I2e7d35c9f6e8add3e7438d163850bc5fda5a99b2 Signed-off-by: Richard Marko <srk@48.io> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78415 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-10-29cbfstool: Fix CBFS header buffer overflowJeremy Compostella
In the unlikely but possible event where the name of the CBFS file is longer than 232 characters, `cbfs_create_file_header()' would overflow the buffer it allocated when it copies the CBFS filename. Change-Id: If1825b5af21f7a20ce2a7ccb2d45b195c2fb67b0 Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78500 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <ericllai@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
2023-10-28util/cbfstool: Enable "ms-extensions" compiler flag on mingw onlyPatrick Georgi
The flag activates some Win32 compatibility quirks and on clang/openbsd it enables so many of them that the code doesn't compile anymore. Therefore move it into the "Win32 area" in that Makefile. Change-Id: Ic77c04941e40a568f1d74cec09eb3d22a66e69b0 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78724 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-23util/docker/coreboot-sdk: Add bash-completion to package listFelix Singer
Change-Id: I97756f603e304c6b50387ba2aaac416ae31db681 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78493 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-10-20cbfstool: Skip relocation entries pointing to undefined symbolJeremy Compostella
The linker can make relocation entries of a symbol which has a value of zero point to the undefined symbol entry. It is permitted since when the symbol value is zero as the documentation of the relocation entry `r_info' field states: "If the index is STN_UNDEF, the undefined symbol index, the relocation uses 0 as the symbol value." The ELF binary does not really have any missing symbols. It is an optimization as the symbol points to the undefined symbol because its value is zero. A typical way to hit this cbfstool limitation is to define an empty region using the REGION macro in the linker script. Here is an example if we assume `CONFIG_MY_REGION' is set to 0: .car.data { [...] REGION(my_region, CONFIG_MY_REGION_SIZE) [...] } A region is defined as follow: #define REGION_SIZE(name) ((size_t)_##name##_size) #define DECLARE_REGION(name) \ extern u8 _##name[]; \ extern u8 _e##name[]; \ extern u8 _##name##_size[]; So the size of the region is actually the address of the `_##name##_size' symbol. Therefore, the `_my_region_size' symbol address is zero and the linker can make the relocation entry of this symbol point to the undefined symbol index. In such a situation, cbfstool hits a segmentation fault when it attempts to relocate the symbol in `parse_elf_to_xip_stage()' function. We resolves this issue by making cbfstool skips relocation entries pointing to the undefined symbol similarly to the way it skips relocation relative to absolute symbols. A symbol which value is zero can be considered an absolute symbol and therefore should not be relocated. Of course, we could argue that we could just prevent the declaration of an empty region as illustrated in the following example: .car.data { [...] #if CONFIG_MY_REGION_SIZE > 0 REGION(my_region, CONFIG_MY_REGION_SIZE) #endif [...] } However, this is not a satisfying solution because: 1. It requires to add unnecessary code in the linker script as an empty region is a valid declaration. Such a workaround requires the code using it to mark the region symbols as weak symbols to handle the situation where the region is not defined. 2. There could be other situations which have yet to be uncovered which would lead the same cbfstool crash. 3. A binary with an empty region is a valid ELF file and cbfstool should not crash when it is asked to create an eXecute-In-Place stage out of it. Change-Id: I2803fd3e96e7ff7a0b22d72d50bfbce7acaeb941 Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77699 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-10-19util/liveiso/nixos: Drop XFS packageFelix Singer
XFS is barely used. In order to save some space, drop it from the package list. Change-Id: Ic1cc567eb3f555bdf5567f3d036c84ce58691128 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78400 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-19util/liveiso/nixos: Bump to 23.05Felix Singer
Bump to 23.05 and also rename settings in order to compliant with newest namespaces and names. Change-Id: I4a23466bef5c45ebb82d92038ec2595103c984d3 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78399 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-10-16util/scripts: Add a script to find new users' commits on gerritMartin Roth
This script lists all new commits from users with few merged commits. By default, it looks at the last week, and considers anyone with fewer than 5 commits merged to be a new user. Currently the only command line argument that's accepted is the gerrit username of the person running the query. To modify any of the other options, the values hard-coded into the script need to be updated. To keep down the number of repeated queries, the script saves lists of users considered to be experienced, as well as the commits from new users that it lists. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ic698798f3fddc77900c8c4e6f8427991bda3f2d1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78184 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2023-10-10util/amdfwtool: Check for pkg-config presenceKarthikeyan Ramasubramanian
Check for pkg-config presence and fail out with actionable message. BUG=b:302521446 TEST=Build successfully with working pkg-config and failed build with no pkg-config Change-Id: I5d604145c919e7f71680d1e095dc68cb21868319 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78191 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
2023-10-03util/docker: Fix setting SDK_VERSIONTim Crawford
The `SDK_VERSION` was incorrectly set to itself instead of keeping the `COREBOOT_IMAGE_TAG` variable, leaving it as an empty string. Test: Run `make coreboot-sdk` and see `SDK_VERSION` matches the tag. Fixes: d3a89cdb749a ("util/docker: Replace use of sed with build args") Change-Id: I4c8be7d0f7c1ac82da397e720d13a7075f22ec4d Signed-off-by: Tim Crawford <tcrawford@system76.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78141 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-10-03util/docker/coreboot-sdk: Remove superfluous NASM packageFelix Singer
Since commit 9b186e0ffef4 ("util/xcompile: Add NASM to xcompile") NASM from the coreboot toolchain is properly hooked up to the build system. So it's not needed to install the distro package. Remove it. Change-Id: I2ab0317531e25ae6d5baa8be8ac4d41dc145658f Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77728 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-10-02util/intelp2m: Support Jasper LakeJonathon Hall
Support generating Jasper Lake GPIO configuration from inteltool logs Change-Id: I519d27e0c91c8d9159224d9bc1c6e49c83270b7a Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78093 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maxim <max.senia.poliak@gmail.com>
2023-09-28util/cbfstool: Revise lex/yacc (bison) generationHung-Te Lin
Revise the Makefile.inc rules for generating FMD parser files. - lex: If --header-file is supported then the lex (usually flex) should also support '-o' so we don't need to do redirection (-t). - yacc: Bison is already required by bincfg and sconfig so we can change the default parser compiler to Bison. That also allows us to use -o and --defines to override the output files. - both: Line directives are only helpful when debugging the scanner and the parser, so we should remove them to get better git diff results (-L for lex, -l for bison). Also regenerated the shipped files with latest version of flex (2.6.4) and bison (3.8.2). Change-Id: I15b58ff65dcd9f3f3a6095aa004091ff733ffec3 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75851 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2023-09-26amdfwtool: Support firmware offsets of larger than 16MiBZheng Bao
The mapped windows is up to 16M. Even if the flash size is 32MB, it is not mapped at 0xFE000000. So using "0xFFFFFFFF - rom_size + 1" to get the "rom_base_address" can only explain well when rom_size is less or equal to 16MB. For larger size, it is not physically correct (Even though it can get expected result). If the flash size is larger than 16M, we assume the given addresses are already relative ones. So we don't need the physical base address any more. This commit is part of a series of patches to support 32/64M flash. BUG=b:255374782 Change-Id: I9eea45f0be45a959c4150030e7e213923510ad68 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/72959 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-09-26amdfwtool: Add APCB for new combo entryZheng Bao
Besides fw.cfg, each combo entry needs dedicated APCB files. If no new APCB is provided, the main APCB is used for all entries. The combo is fully supported after this. Change-Id: I21c2bf7d98ded43848ae8a8bb61d1ded1a277f88 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58620 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-25util: Drop flashrom -p host alias which equals to -p internalHsuan Ting Chen
There is a technical debt in ChromeOS flashrom, `cros_alias.c`, which is to work around ChromeOS calling flashrom with `-p host` instead of `-p internal`. Replace all `-p host` occurrences with `-p internal`. BUG=b:296978620 TEST=none Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org> Change-Id: I81674213b9a21598002f349ced1130f0844841ca Reviewed-on: https://review.coreboot.org/c/coreboot/+/77865 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-09-22coreboot.org-status: Make URLs branch agnosticPatrick Georgi
The primary branch changed names. To remain robust, just use HEAD, which will point to whatever is authoritative. Change-Id: I809ea748a5e51f4eea6bc227fa1fc5c8b07fe2ef Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78015 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-20util/superiotool: Tell compiler to use C99 instead of ANSI CNicholas Sudsgaard
Fails to build on musl libc as pci/types.h expects "POSIX types", which are not implemented, instead of stdint.h when using pre-C99 versions. Change-Id: Id1cf5bd72a0b4d76c87dc62c443d02df18ddd3fe Signed-off-by: Nicholas Sudsgaard <devel@nsudsgaard.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77791 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-14cbfstool: Make add-stage support multiple loadable segmentsJeremy Compostella
For x86 eXecute-In-Place (XIP) pre-memory `.data` section support, we have to use an extra segment as the VMA/LMA of the data is different than the VMA/LMA of the code. To support this requirement, this patch makes cbfstool: 1. Allow the load of an ELF with an extra segment 2. Makes add-stage for XIP (cf. parse_elf_to_xip_stage()) write its content to the output binary. To prevent the creation of unsuitable binaries, cbfstool verifies that the LMA addresses of the segments are consecutives. TEST=XIP pre-memory stages with a `.data` section have the `.data` section covered by a second segment properly included right after the code. Change-Id: I480b4b047546c8aa4e12dfb688e0299f80283234 Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77584 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-14cbfstool: Make add-stage support multiple ignore sectionsJeremy Compostella
For x86 eXecute-In-Place (XIP) .data section support, cbfstool need to to skip relocation of the .data section symbols in addition to .car.data section symbols. To support this requirement, this patch makes the `-S` option take a multiple section names separated by commas. TEST=With `-S ".car.data .data"`, XIP pre-memory stages with a `.data` section do not have any of the `.car.data` or `.data` section symbols relocated. Change-Id: Icf09ee5a318e37c5da94bba6c0a0f39485963d3a Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77560 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2023-09-13Switch scripts over to use main branchStefan Reinauer
This will be needed to switch over to main branch in coreboot Change-Id: I90fadf2352d56074ce8b58d559a73b0c53fac14b Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75782 Reviewed-by: Patrick Georgi <patrick@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-11Switch release scripts over to use main branchStefan Reinauer
In preparation for switching over coreboot. Change-Id: Id66f0def84b913fc8fdd4ee77fef996e45dbd4f5 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75780 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
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>