summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)Author
2018-11-18util: Fix shebang for python2 scriptsAngel Pons
Python 3 is the default Python interpreter on most modern systems. Python 2 scripts must specify they should be run with Python 2 in their shebang. Solves issue raised in CB:28953. Change-Id: I9ace4afd668539c05e7ace30e255af50c7a069c2 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/29666 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-11-17treewide: use /usr/bin/env where appropriateYegor Timoshenko
Some Unix systems (GuixSD, NixOS) do not install programs like Bash and Python to /usr/bin, and /usr/bin/env has to be used to locate these instead. Change-Id: I7546bcb881c532adc984577ecb0ee2ec4f2efe00 Signed-off-by: Yegor Timoshenko <yegortimoshenko@riseup.net> Reviewed-on: https://review.coreboot.org/28953 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-11-16util/cbsftool: allow enabling verbose make outputVadim Bendebury
Sometimes it is necessary to be able to see exact command lines used when compiling and linking. Use the same scheme as some other Makefile's - enable verbose output when variable V is set to 1. TEST=tried building cbfstool with V=1, observed verbose output. Change-Id: Iff25439aabff79e69d1d94a2c51c60bb0e0d7b80 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://review.coreboot.org/29431 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-11-16util/gitconfig/test: Add commit-msg hook testAlex Thiessen
Add a test that, after cloning the repository to a temporary directory, installs git hooks and attempts to do a good and a bad commit, expecting the former to succeed and the latter to fail, thus testing the `commit-msg` hook. Change-Id: Icdaf0109c60cb5b6952b1a2468ab050a742e4201 Signed-off-by: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com> Reviewed-on: https://review.coreboot.org/23281 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-11-16util/docker: Rename _CONTAINER_VERSION => _IMAGE_TAGNico Huber
This is so confusing, let's name it what it is ;) Change-Id: I6f87e2f6912d886e241e03998fb4136fb28bc7b1 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/29458 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-11-16util/docker: Use common .ccache for local buildsNico Huber
Bind a volume for .ccache to the `docker-run-local` targets. By default the current user's $(HOME)/.ccache will be used, it can be overridden via the DOCKER_CCACHE variable. Also rearrange some docker parameters to keep the target readable. Change-Id: I7d0bdb3861ac56361cacfa74aaf8b45c4f135e5c Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/29457 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-11-16cbfstool: add unprocessed flag for file exportingJoel Kitching
Add an unprocessed flag (-U) which modifies how files are exported. In the case of a compressed raw file, extract without decompressing. In the case of a stage or payload, extract without decompressing or converting to an ELF. This can be useful for verifying the integrity of a stage or payload, since converting to an ELF may not be a deterministic process on different platforms or coreboot versions. BUG=b:111577108 TEST=USE=cb_legacy_tianocore emerge-eve edk2 coreboot-utils chromeos-bootimage cd /build/eve/firmware /build/eve/usr/bin/cbfstool image.bin extract -r RW_LEGACY \ -n payload -f /tmp/payload_1 -U START=$((16#`xxd -s 20 -l 4 -p tianocore.cbfs`)) SIZE=$((16#`xxd -s 8 -l 4 -p tianocore.cbfs`)) dd if=tianocore.cbfs skip=$START count=$SIZE bs=1 > /tmp/payload_2 diff /tmp/payload_1 /tmp/payload_2 rm /tmp/payload_1 /tmp/payload_2 Change-Id: I351d471d699daedd51adf4a860661877f25607e6 Signed-off-by: Joel Kitching <kitching@chromium.org> Reviewed-on: https://review.coreboot.org/29616 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
2018-11-16util/docker: Unify local build targetsNico Huber
Add a `docker-run-local` target that is used as a template for the local build targets (`docker-build-coreboot`, `docker-abuild`, and `docker-what-jenkins-does`). Note this changes the user for `docker-what-jenkins-does` which has (ccache) issues if it's not `root`. Will be fixed in a follow-up. Change-Id: I9088fb9211726cddc37b17ddf70170c2c382679e Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/29456 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-11-16util/cbfstool/cbfs_image.c: Get rid of void pointer mathRichard Spiegel
Pointer math with void pointers is illegal in many compilers, though it works with GCC because it assumes size of void to be 1. Change the pointers or add parenthesis to force a proper order that will not cause compile errors if compiled with a different compiler, and more importantly, don't have unsuspected side effects. BUG=b:118484178 TEST=Build CBFS with original code, run objdump and saved output. Added modifications, build cbfs again, run objdump again, compared objdump outputs. Change-Id: I30187de8ea24adba41083f3bfbd24c0e363ee4b8 Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com> Reviewed-on: https://review.coreboot.org/29440 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2018-11-15util/gitconfig: Add timeout testAlex Thiessen
Add a `util/gitconfig/test` subdirectory which will contain tests to run as executable files, add a helper script. Add a timeout test that verifies that gitconfig completes in under two seconds (typical run time is ~30 ms). Add gitconfig tests to the `testing` Makefile under the `test-tools` target. Change-Id: Id46f905b9f782e67be97a65d10045c3345dc996b Signed-off-by: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com> Reviewed-on: https://review.coreboot.org/23280 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-11-13util/scripts/maintainers.go: Add Gerrit reviewers config emitterPatrick Georgi
The gerrit reviewers plugin has a certain configuration format. Teach maintainers to emit it when called with -print-gerrit-rules. Change-Id: I92cfc905e0c1b03b7cf793a4324c392140a22060 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/29607 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-11-13util/scripts/maintainers.go: Introduce command line argument handlingPatrick Georgi
First new option is -debug. Change-Id: Ia6e9b3675449a0b1e6f5d7526ee999f925eaadb2 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/29606 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-11-13util/scripts/maintainers.go: Provide delimiters between maintainersPatrick Georgi
Help automated tools make sense of the output. Instead of "[name 1 <email> name 2 <email>]", it now prints "name 1 <email>, name 2 <email>". As long as there are no commas in the maintainer names, they can be split easily. Change-Id: I4a254f566404b081a08923bc7ceb49f02039aa2a Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/29604 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-11-13util/scripts/maintainers.go: Use a full glob parserPatrick Georgi
Instead of checking only for three cases, just use a glob parser (that translates the glob to regex). After that, maintainers src/arch/x86/memlayout.h emits: src/arch/x86/memlayout.h is in subsystem X86 ARCHITECTURE Maintainers: [] src/arch/x86/memlayout.h is in subsystem MEMLAYOUT Maintainers: [Julius Werner <jwerner@chromium.org>] The latter entry was invisible to the maintainers tool because its path description wasn't in one of the supported formats. Change-Id: I7e5cf4269415269552e35f2c73952ce3dff487e1 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/29603 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-11-13util/scrips/maintainers.go: Allow file to appear in multiple componentsPatrick Georgi
Without this change, the tool only reports the first hit. We want to see all of them. Change-Id: Ib59b13c50b61c48e3cb200bf57e28c9453590819 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/29602 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-11-12util/scripts/maintainers.go: Stub support for website tagPatrick Georgi
ME Cleaner's component has an entry specifying its website, which this parser didn't know how to handle. Avoid the resulting warning. While at it, de-C the switch statement and make it work go-style. This also fixes "R" statements being ignored. Change-Id: Ifc23e28daba9d85bf690557a80134accea8bed21 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/29601 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-11-12util/intelvbttool: Cleanup and fixesPatrick Rudolph
* Clear remalloced memory * Fix check for invalid VBT offset in header * Fix VBIOS checksum generation * Fix VBIOS size field * Align VBIOS size to multiple of 512 * Reassign pointers after use of remalloc * Don't leak on error path Current version is enough to allow the proprietary Windows Intel GMA driver to find the VBT in the legacy VBIOS area and it doesn't BSOD any more. The LVDS screen remains black, due to an unknown issue with the proprietary driver, while the VGA works. Tested with libgfxinit and native graphics init. Change-Id: If07b1bb51d8fb3499d13102f70fedb36c020fb72 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/29099 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-11-07board-status.html: improve instructionsPatrick Georgi
The foreword mentioned that you need a gerrit account, but not how to have git push with the right credentials. To ease onboarding, point out where to get them. Change-Id: I0b022bc064e3bc89568617c1a3a3e0e5236ba520 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/29240 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-11-05coreboot-sdk: Build Clang first in a separate stepNico Huber
If we build one of the `all*` targets, build Clang first. Compiling Clang (just for the host arch, I assume) takes more than half of the time of the default build. When run as a separate step, we can make use of Docker's cache if any step after Clang fails. Change-Id: If67b458cde656f1dc6774215f6a575a48d12b797 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/29455 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
2018-11-05coreboot-sdk: Prefer gnat package over gnat-6Nico Huber
The choice of `gnat-6` was originally an optimization because the meta- package `gnat` installs not only the current GNAT version but also other unwanted (and hard to explain) dependencies. Later it was necessary because GCC 8 couldn't compile our older crossgcc. Now that we switched crossgcc to GCC 8.1, `gnat` should be fine. Change-Id: Ica8a1f9d6d71a74ffc4ec76aa0cfbe4b604cde1b Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/29454 Reviewed-by: Martin Roth <martinroth@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-11-05coreboot-sdk: Don't install libisl-devNico Huber
The current version in debian:sid is incompatible with our crossgcc version. But it turned out that we don't use the optimization features enabled by libisl at all: crossgcc builds with and without (a proper version of) libisl-dev installed generate the same coreboot binaries. Change-Id: I9f9115d8ab33cbe11aa77f16c98465e1c1dedeac Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/29453 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Martin Roth <martinroth@google.com>
2018-11-05coreboot-sdk: Don't install libelf-devNico Huber
As by afda56e1ad (buildgcc: Drop libelf/elfutils), it's not used (atm). Change-Id: I3124cb6db5975c21e635636babe700adb0f8cd8b Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/29452 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Martin Roth <martinroth@google.com>
2018-10-24util/bincfg: code cleanup: convert sym_table to a local variableDenis 'GNUtoo' Carikli
Global variables are considered a bad practice. Change-Id: I652a8da75498f871a53eb7509f6145c4842e3373 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Reviewed-on: https://review.coreboot.org/27810 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-10-18util/inteltool: Fix LynxPoint (non-LP) GPIO register mapFehér Roland Ádám
The GPIO register dumper code for the LynxPoint family PCH chips (Intel 8 Series and C220 Series) was incorrectly using a shortened version of the LynxPoint-LP GPIO register map. Switched to the correct register map for the affected chipsets. Change-Id: I394a198bbb6628915cb73cabc5c8ff808579a07f Signed-off-by: Fehér Roland Ádám <feherneoh@gmail.com> Reviewed-on: https://review.coreboot.org/29167 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-14cbfstool: make comments more consistentJoel Kitching
Fix a typo and make comments more consistent (start with capital letter). BUG=None TEST=None Change-Id: I97bff5e05596fc6973f0729e276a2e45b291120d Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://review.coreboot.org/29025 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2018-10-12util/abuild: When using blobs, enable 3rdparty/fsp by defaultPatrick Georgi
This is a no-op on non-FSP systems, but enables using it when supported. Change-Id: I66fe9b8587753ea017e13a752a7728e47287e9a0 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/28776 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-10-10util/superiotool/smsc.c: Add SCH5504 register dumpAngel Pons
There is no datasheet available for this SuperIO, but dumping all possible registers on a Dell Optiplex GX520 resulted in data that was similar to other supported chips. Data also matches what is set in the BIOS, e.g. the parallel and serial ports' addresses. Change-Id: I768e4b5ec1e73c53e1a2355e0a0657b7a5ccbb89 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/28958 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-10-09util/cbmem/Makefile: Remove .dependencies on `clean`Nico Huber
Change-Id: Ic122b3eaed54e29bbb3e11de84822169c81c04eb Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/28928 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2018-10-08util/superiotool/smsc.c: Add some register dumpsAngel Pons
The SCH3112, SCH3116 and SCH5127 were lacking a pin dump. Since their datasheets are available, add their pin dumps. The SCH3112, SCH3114 and SCH3116 are almost identical, they only differ in the number of serial ports. Some values in the SCH3114 dump were inaccurate, that has been fixed as well. Datasheets used: - SCH311X: DS00001872A - SCH5127: DS00002081A Change-Id: Ic985526be9b09e0452eaf883904dfaf709b7e907 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/28794 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-10-08Move compiler.h to commonlibNico Huber
Its spreading copies got out of sync. And as it is not a standard header but used in commonlib code, it belongs into commonlib. While we are at it, always include it via GCC's `-include` switch. Some Windows and BSD quirk handling went into the util copies. We always guard from redefinitions now to prevent further issues. Change-Id: I850414e6db1d799dce71ff2dc044e6a000ad2552 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/28927 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-10-08util/intelvbttool: Rewrite toolPatrick Rudolph
* Add Makefile dependency to source file * Add argument support * Add help support * Print usage on wrong arguments * Add support for parsing VBT binary file * Add support for parsing PCI Option ROM * Add support for writing VBT binary file * Add support for patching PCI Option ROM * Keep support for accessing legacy VGA area Option ROM * Keep support for dumping VBT contents to stdout Allows to extract VBT, analyse VBT and patch PCI Option ROMs as needed. The required arguments have been changed: ./intelvbttool --<SOURCECMD> [filename] --<DESTCMD> [filename] SOURCECMD set the VBT source. Supported: inlegacy : Legacy BIOS area at phys. memory 0xc0000 invbt : Read raw Intel VBT file inoprom : Read VBT from Intel Option ROM file DESTCMD set the VBT destination. Supported: outdump : Print VBT in human readable form outvbt : Write raw Intel VBT file patchoprom: Patch existing Intel Option ROM Any combination of SOURCECMD and DESTCMD is possible. Change-Id: I8cbde042c7f5632f36648419becd23e248ba6f76 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/18902 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-10-04util/autoport: Use romstage.c instead of early_southbridge.cAngel Pons
Until now, autoport used to create a dummy "romstage.c", then write romstage code to "early_southbridge.c". While it works, it makes more sense to write to "romstage.c" instead, as virtually all mainboards do. Change-Id: If9f9375f9a659e7e685de5f884163813261fa656 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/28851 Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-04cbfstool: Clear entry being removed in all casesDaisuke Nojiri
Currently, an entry being removed is cleared only if the next entry is also null or deleted. This patch ensures the entry being removed is cleared regardless of the next entry type. BUG=chromium:889716 BRANCH=none TEST=Run cbfstool bios.bin remove -n ecrw. Verify bios.bin has 0xFF in the space of the removed entry. TEST=Run cbfstool bios.bin remove -n fallback/payload (located at the end). Verify fallback/payload is removed. TEST=Run sign_official_build.sh on recovery_image.bin. Extract firmware contents from chromeos-firmwareupdate in the resigned image. Run 'futility vbutil_firmware --verify' for vblock_A's and FW_MAIN_A extracted from bios.bin. See the bug for details. Change-Id: I62540483da6cc35d0a604ec49b2f2b7b11ba9ce5 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://review.coreboot.org/28886 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-10-04util/abuild/abuild.1: Fix references to CBROOT parameterJonathan Neuschäfer
One occurence of this parameter was changed from LBROOT to CBROOT in f8ee1806ac ("Rename almost all occurences of LinuxBIOS to coreboot."). Change the others, too. Change-Id: Ic0da24c32cd6d2f0577de037b5463c800f455786 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/28828 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2018-09-30Documentation: add description for util/pmh7toolEvgeny Zinoviev
Change-Id: Iab5daf101a9ff27aa49b7849bf6bf39362b8db09 Signed-off-by: Evgeny Zinoviev <me@ch1p.com> Reviewed-on: https://review.coreboot.org/28368 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tom Hiller <thrilleratplay@gmail.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-09-26mb/lowrisc: Remove the Nexys4DDR portJonathan Neuschäfer
This board doesn't support the newest RISC-V Privileged Architecture spec (1.10), and it's based on an FPGA so it's a moving target. Now that there's actual RISC-V silicon out there (from SiFive), mb/lowrisc/nexys4ddr will only continue to bitrot. Change-Id: I4e3e715106a1a94381a563dc4a56781c35883c2d Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/28706 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Hug <philipp@hug.cx> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2018-09-18util/lint: Ignore "visible if" statement in Kconfig filesPatrick Georgi
They allow reducing the visible set of options to remove clutter. Change-Id: I18c953c7feae23c0752392a2bf8f49783c17310e Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/28635 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2018-09-17board-status: Only store CBMEM console from last bootPaul Menzel
Since CBMEM console became a ring buffer, logs from several boots can be stored. We are only interested in the current boot. > -c | --console: print cbmem console > -1 | --oneboot: print cbmem console for last boot only For CBMEM time stamps only the time stamps of the current boot are stored, so only the commands for the CBMEM console need to be adapted. Change-Id: I18caa4aeebbd5576b9e218d176a7db5a8e868b74 Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/28531 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-09-16sconfig: Allow setting device status in device treeHung-Te Lin
For devices supporting both Linux and Windows, we may find some ACPI devices that only need drivers in Linux and should not even be shown in Windows Device Manager UI. The new 'hidden' keyword in device tree 'device' statement allows devices sharing same driver to call acpi_gen_writeSTA with different values. BUG=b:72200466 BRANCH=eve TEST=Builds and boots properly on device eve Change-Id: Iae881a294b122d3a581b456285d2992ab637fb8e Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://review.coreboot.org/28566 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2018-09-14riscv: add trampoline in MBR block to support boot mode 1Philipp Hug
Add "j pc + 0x0800" at the beginning of the MBR to jump to bootblock. Tested on hardware: boot mode 15: works as before boot mode 1: jump to bootblock works, but bootblock needs to be modified to move the stack to L2LIM. This will be in a separate commit. Further changes are needed in the bootblock Change-Id: I16e762d9f027346b124412f1f7ee6ff37f431d86 Signed-off-by: Philipp Hug <philipp@hug.cx> Reviewed-on: https://review.coreboot.org/27397 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2018-09-14lint-000-license-headers: add SPDX-License-Identifier: GPL-2.0-or-laterRonald G. Minnich
Change-Id: Icbf21b02d3092815bbe876eceea72ebba8dd54da Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/28599 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-09-13util/superiotool: Add Winbond W83667HG register dumpAngel Pons
This SuperIO is supported by coreboot and used in two Asus boards. However, superiotool was lacking a register dump for this chip. Add the corresponding data from datasheet W83667HG-B revision 1.3 into superiotool. The SuperIO's datasheet was obtained by requesting it to Nuvoton. Change-Id: Ie51dc492c761d9c3d4b6100017bb730b1ae6d1e0 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/28099 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-09-07util/crossgcc: Tell gcc that it'll use gnu as and ldPatrick Georgi
Otherwise it reduces its expectations on what as and ld take in terms of arguments, which breaks some edk2 related builds because tons of -I$path_to_stuff arguments aren't passed along. Change-Id: I53f87442de03d5ead8a6632d3102d5502065b828 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/28534 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2018-09-04util/lint: update whitespace checking rulesMartin Roth
- Check payloads, the root Makefiles and toolchain.inc - 3rdparty is already not checked, so remove - The marks around COPYING, LICENSE, and README were not needed - Skip checking .ico files Change-Id: Ic4a1709224604b36362d82e249c2916fca0336a2 Signed-off-by: Martin Roth <martinr@coreboot.org> Reviewed-on: https://review.coreboot.org/28431 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2018-09-04util/lint: Update whitespace linter for FreeBSDMartin Roth
On FreeBSD, this test was failing with the error: "grep: Argument list too long" I found that changing this to other forms takes MUCH longer, so I left the original method mostly unchanged except for moving the include & exclude lists into variables. Currently, I'm setting all non-linux operating systems to use the second version. I'll update that if I find other that other OSes support the first. Change-Id: I1c9281440d051dea8a8b3a3ddc04676ccea77c7a Signed-off-by: Martin Roth <martinr@coreboot.org> Reviewed-on: https://review.coreboot.org/28429 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2018-09-02util/crossgcc: Add GCC 8.1 patch for missing backslashMartin Roth
When building the toolchain under BSDs, this missing backslash is needed. Change-Id: I40b0adaa73b241713493fd74f24c93f85e7aabbe Signed-off-by: Martin Roth <martinr@coreboot.org> Reviewed-on: https://review.coreboot.org/28362 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Idwer Vollering <vidwer@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-08-31util/pmh7tool: Add option to read specific bitEvgeny Zinoviev
Change-Id: I045383eedbcf438270e9c64329a8d910bb941ab8 Signed-off-by: Evgeny Zinoviev <me@ch1p.com> Reviewed-on: https://review.coreboot.org/28388 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-08-30util/abuild: Use env to find bashMartin Roth
FreeBSD doesn't have bash in /bin, so use env to find it. This is already done in many other scripts that are used in the actual build path. Change-Id: If6fb6bc3c55835e2144599fea1cdb2f7abefb0fc Signed-off-by: Martin Roth <martinr@coreboot.org> Reviewed-on: https://review.coreboot.org/28364 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com>
2018-08-28util/ipqheader: Fix typoElyes HAOUAS
Change-Id: Ibfcb870bb6e7ed747f8875520ab094def49e53cb Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/28329 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2018-08-28util/romcc: Fix typosElyes HAOUAS
Change-Id: Ia9f0f1f527476900e6c54c60508600e16bea786f Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/28293 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
2018-08-28util/cbfstool: Fix typosElyes HAOUAS
Change-Id: I6967a106ce1286d633ddeeb041f582e65f9ea78c Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/28208 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2018-08-28util/scripts: Fix typoElyes HAOUAS
Change-Id: If906e230c0cb71fc3cd283aeb85f8d1338c303c6 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/28291 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2018-08-28util/msrtool: Fix typosElyes HAOUAS
Change-Id: I36ed2c33f9bed3e640871283c2cb163d6800d1d5 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/28289 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-08-27util/nvramtool: Fix typos & remove unneeded whitespaceElyes HAOUAS
Change-Id: I0a704cba80d0439ae95db34a6b73df7be5b3b862 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/28290 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-08-26util/ifdtool: Fix typoElyes HAOUAS
Change-Id: I53ddff302681737006f40ca8b79ec0735f1e6e45 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/28287 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2018-08-26util/superiotool: Fix typoElyes HAOUAS
Change-Id: I62fed1084efc3224c9563619d57fbdc5040ddbbc Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/28292 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2018-08-26util/pmh7tool: Add tool to dump PMH7 registersEvgeny Zinoviev
Change-Id: I05ccb5a9a861fe44efec794aafe1805062543d53 Signed-off-by: Evgeny Zinoviev <me@ch1p.com> Reviewed-on: https://review.coreboot.org/27776 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-08-26superiotool: fix wpcd376iStefan Tauner
According to the datasheet (rev. 1.6) there is no SP2 (apart from some typos) and the IR is actually implemented as SP3 in LDN 0x16. Additionally, there is LDN 0x15 to set up CIR-specific options of the IR serial port, which was missing as well. Change-Id: I34d90d8c44f11a4f62ccc4b836409cc443fb7952 Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at> Reviewed-on: https://review.coreboot.org/27856 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-08-23util/ifdfake: Remove deprecated utilityAngel Pons
Since ifdfake has been deprecated in favor of better alternatives, there is no need to support it any further. Remove it from "util/", as well as any leftover references in other files. Change-Id: I45fe3d9fd606a61d5c3b9d0e6489a1df6d6510f0 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/28234 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-08-23util/docker/doc.coreboot.org/Dockerfile: Use alpine:3.8, Sphinx 1.7Tom Hiller
With Alpine base, use pip to install Sphinx 1.7 and Sphinx-autobuild Alpine, a 4.5MB base, is used over Debian Stable, 101MB, to cut down the total size of the docker image. Change-Id: I53f246206458b1de34cd7f3a42481b91ca285ff0 Signed-off-by: Tom Hiller <thrilleratplay@gmail.com> Reviewed-on: https://review.coreboot.org/28211 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-08-22util/crossgcc: update IASL to v20180810Martin Roth
Change-Id: Idce2587a87c5e0677a4571b59ef40e5486c22da9 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/27527 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2018-08-20util/lint: Exclude util/superiotool from checkpatchNico Huber
`superiotool` follows its own style (e.g. lot's of missing spaces and odd placement of braces in the register descriptions). Change-Id: Ifa33938a0fbac10577cbda10537f856f6f100233 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/28214 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-08-17coreboot-sdk: Add libjaylink-dev for future flashrom buildsNico Huber
Change-Id: I13c5464cd0b5bc9c21d7b4831a0b7fdd9fbc85c6 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/28165 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-08-14docker/coreboot.org-status: provide html/head/body framePatrick Georgi
This allows us to add encoding information. Change-Id: Ic9a12a13f11fd22eeec96fbcca6b706312876b07 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/27874 Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-08-14ifdtool: port the feature to set AltMeDisable/HAP bit hereBill XIE
Port the newest feature of me_cleaner to ifdtool (https://github.com/corna/me_cleaner/ , Discussed in https://github.com/corna/me_cleaner/issues/53 ) to set AltMeDisable (or HAP for skylake/ME11) bit to the IFD to disable ME. In this commit I use (ifd_version >= IFD_VERSION_2) to judge whether HAP instead AltMeDisable should be set, since this condition is only fulfilled on skylake or newer platforms. This feature needs to guess ich revision, which needs guess_ich_chipset() from flashrom to be ported here. Routines to dump those bits are also added. Change-Id: I9a2ecc60cfbb9ee9d96f15be3d53226cb428729a Signed-off-by: Bill XIE <persmule@gmail.com> Reviewed-on: https://review.coreboot.org/21437 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-08-14util/autoport: Adapt logmaker for newer ACPI versionsArthur Heymans
acpidump now creates dumps with 4 spaces instead of 2 in front of the hex dump, so be a bit smarter about the input with regexp. Tested with X220 autoport logs: Still creates the same coreboot code. Change-Id: I8d48c09cdff9432f394b350540ea9765fc942781 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/28054 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-08-14xgcc: fix grouping of conditions in buildgcc for AdaStefan Tauner
No idea where the escaped parentheses come from but they are no good. Without this patch I see errors with bash and dash: ./buildgcc: line 1198: (: command not found ./buildgcc: line 1199: (: command not found The patch uses curly brackets for grouping since they don't launch a subshell - unlike using unescaped parentheses which would work too. shellcheck is happy with either variant (and the original one(!)). Change-Id: I44fbc659f5b54515e43e85680b1ab0a824b781a7 Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at> Reviewed-on: https://review.coreboot.org/27771 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-08-13util/lint: Set "acknowledgement" correctElyes HAOUAS
"acknowledgement" is not commonly used but correct. Change-Id: I0aa469d77904d65288f5b7133bec10be3688a596 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/27953 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Tristan Corrick <tristan@corrick.kiwi> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-08-13util/lint: update checkpatch.pl to latest linux versionMartin Roth
Taken from Linux upstream commit ffe075132af8b7967089c361e506d4fa747efd14 Change-Id: I43d09a912fafe896c045df080c0f75fe6d908087 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/28046 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-08-13util/lint: Update spelling.txt to latest linux versionMartin Roth
Comment out 'sepc' and add a comment about it at the top so that it doesn't get added back in accidentally in a future update. Change-Id: Iaa909d97d0d97d7bf0799e48fc237a9673d549aa Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/28045 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-08-13utils: spkmodem: suggest to use parec instead of parecordDenis 'GNUtoo' Carikli
Using recent versions of parecord produces the following: Failed to open audio file. According to the manual: -r | --record Capture audio data and write it to the specified file or to STDOUT if none is specified. If the tool is called under the name parec this is the default. so we suggest parec instead. Change-Id: I8b821df67b10e9d6533c4cbe19c646c84d436c27 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Reviewed-on: https://review.coreboot.org/23863 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-13utils: spkmodem: Add Makefile and gitignoreDenis 'GNUtoo' Carikli
Change-Id: Ie3a6a777f5b667e881a4462bdd44a34dbace5520 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Reviewed-on: https://review.coreboot.org/23862 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-08-11util/lint: Remove register name identified as a misspelled wordXiang Wang
RISC-V has a register named 'sepc' but checkpatch identifies it as a misspelling of 'spec'. Remove it from the list. Change-Id: I7b092d6f04e28fba36095c607bc59346fb5c605d Signed-off-by: Xiang Wang <wxjstz@126.com> Reviewed-on: https://review.coreboot.org/28005 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2018-08-07ifdtool: reorder output of JID dumpsStefan Tauner
Change-Id: I109f620bb644c3979ae297bdf544d295cdbac57f Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at> Reviewed-on: https://review.coreboot.org/27859 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2018-08-07ifdtool: fix flumap handling in chipsets prior ibex peak/5 seriesStefan Tauner
The Upper Map section in the descriptor contains a database of flash chips (VSCC Table). Its offset is located at a fixed offset from the beginning of the image. ifdtool falsely calculates the offset from the descriptor signature which has moved by 16 bytes with step b of the Ibex Peak (5 series) chipset. This produces bogus output for all chipsets older than that. This patch corrects the behavior by calculating the offset of flumap by adding 4096 - 256 - 4 to the start of the image. Change-Id: I14f029fe702c129dfd8069a58fbd41113700f7ef Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at> Reviewed-on: https://review.coreboot.org/27858 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2018-08-05southbridge/intel/bd82x6x/Kconfig: Do not include any IFD by defaultAngel Pons
Since only a handful of boards have descriptor blobs in the tree, it makes no sense to have `HAVE_IFD_BIN` enabled by default then disabled on each mainboard. This patch flips the default value of said variable, rendering all current overrides unnecessary. The few boards which have an IFD in the blobs repo use `select HAVE_IFD_BIN` to enable adding the IFD by default. Since `HAVE_ME_BIN` depends on `HAVE_IFD_BIN`, the former has been removed alongside the latter, and has been added to the boards with a ME blob as `select HAVE_ME_BIN`. Both `HAVE_IFD_BIN` and `HAVE_ME_BIN` have been removed from autoport as well. Change-Id: I330c4886f8bea4b1a8ecad6505a0e5cc381654d1 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/27218 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-08-02util/ectool: Handle arguments more carefullyArthur Heymans
Check if an argument is given and if not print the usage. Check if all arguments are handled by getopt and if not print the usage. Change-Id: I40dbd2a51d018eb549e9b2fa4365b3e4f9355bff Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/27778 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-by: Evgeny Zinoviev <me@ch1p.com>
2018-08-02util/cbmem: Handle arguments more carefullyArthur Heymans
Check if all arguments are handled by getopt and if not print the usage. Change-Id: Iccbb65ca768a62791af54afd9b7903495bc690af Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/27777 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2018-08-01make: add clang-format prepare-commit-msg hookRonald G. Minnich
To install this hook, run make install-git-commit-clangfmt This will install a pre-commit-msg hook that runs clang-format on all .c and .h files that are staged. It will add a clang-formatted-by: <git username> line to the commit message to indicate that clang-format was run on the files and that further processing of them is not needed. Change-Id: I1773f55b5b4677dad8f4bea017b6328fd93df20c Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/27779 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-31Documentation: Add util.md summaryTom Hiller
Add short explanation of Utility list Change-Id: I5fc45ebe29cd42c1aa18c59dabc3ac3db3107bd7 Signed-off-by: Tom Hiller <thrilleratplay@gmail.com> Reviewed-on: https://review.coreboot.org/27656 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-07-31abuild: Fix shellcheck errorsMartin Roth
Fix 6 new errors found by shellcheck 0.4.6 SC2155: Declare and assign separately to avoid masking return values. 4 x SC2086: Double quote to prevent globbing and word splitting. SC2196: egrep is non-standard and deprecated. Use grep -E instead. One of the SC2086 errors is masked because it needs word splitting. Change-Id: I7f869e6d208f7247f739619c538be6075b802719 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/27597 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com>
2018-07-31abuild: Update failed boards handlingMartin Roth
- Use TARGET variable for location of passing/failing boards files. This should better handle the directory, wherever it is. - Don't save make.log location if make.log is being deleted. Change-Id: I28e55feef85c9b642ac5ff70ecef113cf7978707 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/27596 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-28util/cbmem: Add cbmem TCPA log supportPhilipp Deppenwiese
* Read and print the TCPA ACPI log. Change-Id: Ie2253d86cfc675d45b0a728794cc784215401f4a Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org> Reviewed-on: https://review.coreboot.org/26244 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-07-27cbfstool: fix implicit declaration of strcasecmpFelix Held
Change-Id: Iefeb47bca3676a1f807b7a66b74a07491e351362 Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/27632 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2018-07-26util: Add description.md to each utilTom Hiller
Descriptions are taken from the files themselves or READMEs. Description followed by a space with the language in marked up as code. Change-Id: I5f91e85d1034736289aedf27de00df00db3ff19c Signed-off-by: Tom Hiller <thrilleratplay@gmail.com> Reviewed-on: https://review.coreboot.org/27563 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2018-07-26util: Add util_readme scriptTom Hiller
Bash script to concatenate description.md files into ./util/README.md and Documention/Util.md Change-Id: I015ae6816ea74cacb7f0332fda2c3ebef205c1e2 Signed-off-by: Tom Hiller <thrilleratplay@gmail.com> Reviewed-on: https://review.coreboot.org/27564 Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-24cbfstool/extract: ignore compression field for some payload segmentsJoel Kitching
When extracting a payload from CBFS, ignore compression fields for these types of payload segments: - PAYLOAD_SEGMENT_ENTRY - PAYLOAD_SEGMENT_BSS - PAYLOAD_SEGMENT_PARAMS These types of payload segments cannot be compressed, and in certain cases are being erroneously labeled as compressed, causing errors when extracting the payload. For an example of this problem, see creation of PAYLOAD_SEGMENT_ENTRY segments in cbfs-mkpayload.c, where the only field that is written to is |load_addr|. Also, add a linebreak to an ERROR line. BUG=https://ticket.coreboot.org/issues/170 TEST=cbfstool tianocore.cbfs extract -m x86 -n payload -f /tmp/payload -v -v Change-Id: I8c5c40205d648799ea577ad0c5bee6ec2dd7d05f Signed-off-by: kitching@google.com Reviewed-on: https://review.coreboot.org/27520 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-24util/crosgcc: Fix most shellcheck errors in buildgccMartin Roth
This fixes most of the simpler shellcheck errors in shellcheck 0.4.6. There are still a few warnings left that weren't simple to fix or would have required more testing before I was confident in them. Change-Id: I79ab3614cc1d69d3dfe1e0374e930313f2011cbf Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/27598 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-24util/crosgcc/patches: update make-4.2.1 patchesMartin Roth
- Add the Do-not-assume-glibc-glob-internals patch to fix segfaults. - Update glob_interface_v2 patch to the patch directly from the make git repository instead of translating it. This gives better attributution to the original author. Change-Id: Ibc936fc00925a4ca2170a6f5dca7c2b8d8d62f02 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/27591 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-24Build system: Add fixes for scanbuildMartin Roth
- Exclude build flags that generate warnings when scanbuild is running - Add the SCANBUILD_ARGS variable to abuild so we can pass in arguments to scanbuild. - Set the default scanbuild argument to -k (--keep-going) so that even if an error occurs it continues with the scan. This is similar to what we do with coverity runs. Change-Id: I82e7c13d7fd7432b43c17a31834ec82fca158a07 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/27595 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-24util/docker: Update Makefile to improve shell accessMartin Roth
- Create a new target, docker-jenkins-attach, to access the running jenkins server - Update docker-shell target to set term & size. Change-Id: Ifa67afb62d4a216281ebece405e9b26fd4d14622 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/27494 Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-by: Marc Jones <marc@marcjonesconsulting.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-20util/cbfstool: fix build with clangPatrick Georgi
Without the second set of braces it fails (due to -Werror) with "suggest braces around initialization of subobject" Change-Id: I63cb01dd26412599551ee921c3215a4aa69f4e17 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/27551 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-19util/gitconfig: Make checkpatch non fatal in pre-commit hookMartin Roth
We don't block commits for failing checkpatch in gerrit, and we shouldn't block them here. This allows checkpatch to still run, so users can see the issues, but won't prevent the commit. Adds a delay if checkpatch fails so that the issues can be seen. Change-Id: Ibd4e8bb74e0b02825dcdf16e233a061c4bb43f50 Signed-off-by: Martin Roth <martin@coreboot.org> Reviewed-on: https://review.coreboot.org/27534 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2018-07-19cbfstool/add-payload: initialize segment headers to 0Joel Kitching
Some types of payload segment headers do not use all fields. If these unused fields are not initialized to 0, they can cause problems in other software which consumes payloads. For example, PAYLOAD_SEGMENT_ENTRY does not use the compression field. If it happens to be a non-existent compression type, the 'cbfstool extract' command fails. BUG=https://ticket.coreboot.org/issues/170 TEST=cbfstool tianocore.cbfs create -s 2097152 -m x86 cbfstool tianocore.cbfs add-payload -f UEFIPAYLOAD.fd -n payload -c lzma -v xxd tianocore.cbfs | head # visually inspect compression field for 0 Change-Id: I359ed117ab4154438bac7172aebf608f7a022552 Signed-off-by: kitching@google.com Reviewed-on: https://review.coreboot.org/27540 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-18linux_trampoline: use trampoline RAM for the GDTRonald G. Minnich
The linux trampoline was modifying the existing GDT to add the 0x10 and 0x18 descriptors for Linux. This will not work when the existing GDT is in ROM. Change the code to set up a new GDT in what we know to be RAM. Tested by booting a linux payload. The main reason this works is that Linux almost immediately loads its own GDT and then segment registers. This GDT is a very temporary bridge. Note that none of this change used to be necessary; the coreboot GDT was originally compatible with Linux (ca 2000); then Linux changed. Change-Id: I13990052fbfd6a500adab8a2db8f7aead1d24fa6 Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/27529 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-18what-jenkins-does: Pass V=1 through to abuildMartin Roth
Even though we were setting V=1 in the build, this wasn't getting passed to abuild, so the builds there didn't have additional debug information. That made it difficult to debug issues on the builder. This sets the verbose flag for abuild if V=1 is set. Change-Id: Id9ec50add9693a6c36ffdb5c78d148d0fc012549 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/27492 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-17util/docker: Update coreboot-jenkins-node dockerfileMartin Roth
Because earlier versions of debian set /dev as a standard tmpfs filesystem, that was a simple place to build. Now, this has been changed and /dev isn't a standard tmpfs that will grow to 50% of memory. It's a fixed, very small size, and can no longer even be resized. Because of this, create a new directory to build in and add it to /etc/fstab. Mount it when the container is started. As long as we're at it, make the other build directories (ccache and slave-root/workspace) tmpfs as well. The builders we're using now have plenty of memory, so don't write any of the files to disk. Update the Makefile to get rid of all references to ccache directory. Change-Id: I21fd2c4395d7ffb9428172f035991338658cd907 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/27470 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-13cbfstool: Show current FMAP region in printPatrick Rudolph
In case multiple FMAP regions are specified, print the FMAP name. Useful if VBOOT is enabled and multiple CBFS are printed. Change-Id: Id6f29ebeda8a9bde6dfe39362e0f2a5e33c86b26 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/26862 Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-09util/cavium: Add tool to convert devicetree blobsPatrick Rudolph
Convert Cavium's BDK devicetree blob to a static C file. The resulting file must be included in mainboard folder to provide board specific configuration values to BDK functions. Example call: python devicetree_convert.py --in sff8104.dtb --out bdk_devicetree.c Change-Id: I76a5588aefe4f680228eca46a0e4dba7e695931c Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/26228 Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-06util/lint: Update lint-stable-000-license-headers linterMartin Roth
- Update stable directories - Remove duplicated directories There are currently 220 files that still need to have headers added or be excluded from the lint-000-license-headers test. Change-Id: I40046a2fb7359262b130f6813eda1f2c30916b46 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/26573 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>