summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)Author
2017-10-17util/docker: Add bc to coreboot-sdkMartin Roth
bc is one of the standard posix utilities. I'm surprised that it's not in the debian docker image by default. Change-Id: I02f2d5296e7f87876b236af119965d1f4e6a0bc0 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/21889 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-10-16buildgcc: Update binutils to 2.29.1Iru Cai
Also change the tarball from .tar.bz2 to .tar.xz. Change-Id: I25134dbadf07a2f0cb356c8ac8f2c612a957d176 Signed-off-by: Iru Cai <mytbk920423@gmail.com> Reviewed-on: https://review.coreboot.org/20806 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
2017-10-16crossgcc: Build libelf from elfutils 0.170Paul Menzel
> Could you make in a separate, independent change a update from the > completely outdated LIBELF (from mr511.de/software/libelf ) to recent > libelf? Those highly outdated libelf from this unmaintained mr511.de > webpage should not be used any more since years. There are also a ton > of security issues like for example: CVE-2017-7607, CVE-2017-7608, ... > CVE-2017-7613. Recent version of this software is included in the > elfutils that are available here: https://sourceware.org/elfutils/ -> > download link: > https://sourceware.org/elfutils/ftp/0.170/elfutils-0.170.tar.bz2 Remove the obsolete patch, which doesn’t apply anymore, and only affected the build system, which is different now. Increment the buildgcc version string as a tool version is changed. TEST=Running `make crossgcc-i386` succeeds. Change-Id: Iadd320a18c5d9fe2a82a347e39f01d8b7f8806c2 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/21435 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-10-16util/docker: add nasm to fix tianocore payload compilationPiotr Król
This patch address problem with Tianocore compilation in coreboot-sdk container. Without it compilation fails asking for nasm installation. Change-Id: I546f9d42b380799d1cd80a70f33be2a768745080 Signed-off-by: Piotr Król <piotr.krol@3mdeb.com> Reviewed-on: https://review.coreboot.org/21924 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Martin Roth <martinroth@google.com>
2017-10-14util: Make TZ environment variable POSIX compatiblePaul Menzel
`TZ='UTC'` is not a portable setting for the TZ environment variable. POSIX says you’re supposed to use something like `TZ='UTC0'` instead. Although `TZ='UTC'` works when GLIBC is used, this is not necessarily true on other POSIX platforms. [1][2] [1] http://lists.alioth.debian.org/pipermail/reproducible-builds/Week-of-Mon-20170918/009289.html [2] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03 Change-Id: I1dca0b84de0ec0af3a103e2cbbf731512eb59497 Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/21721 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>
2017-10-13util/crossgcc: Add bootstrap-only modePatrick Georgi
buildgcc -B (--bootstrap-only) builds only a bootstrap compiler. That useful if you want to package the cross compilers: first build the bootstrap compiler, then all required cross compilers in a separate directory (using the bootstrap compiler through an adjusted PATH). Change-Id: I089b51d1b898d4cf530845ba51283997fd229451 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/21683 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-10-11util/gitconfig: remove cborg2cros.pyPatrick Georgi
util/scripts/gerrit-rebase and cross-repo-cherrypick serve the same purpose and we don't need two of everything. Change-Id: I66a71033a8a29249d214db4c31a67f8a0725163c Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/21926 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
2017-10-10util/cbfstool: Add "truncate" commandPatrick Georgi
It does the opposite to "expand", removing a trailing empty file from CBFS. It also returns the size of the CBFS post processing on stdout. BUG=b:65853903 BRANCH=none TEST=`cbfstool test.bin truncate -r FW_MAIN_A` removes the trailing empty file in FW_MAIN_A. Without a trailing empty file, the region is left alone (tested using COREBOOT which comes with a master header pointer). Change-Id: I0c747090813898539f3428936afa9d8459adee9c Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/21608 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-10-08Update URLs in buildgccDoug Gale
Change http to https on many URLs and update llvm.org URLs in buildgcc. The old URLs are deprecated and now switched to a http forwarder that can be attacked by MITM attacks. Change-Id: I68d4fe1a6236ed8540803e11cfc84e44a1d1ca35 Signed-off-by: Doug Gale <doug16k@gmail.com> Reviewed-on: https://review.coreboot.org/21729 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>
2017-10-06autoport: Add GPL boilerplate header to not empty .c filesArthur Heymans
The idea behind this not to enforce a license on autogenerated code but is simply out of convenience in the case one wants to make the result public (in which case it needs to have these license headers). Change-Id: I1d6b48762b1249bb0becb178a30e1396bf6978fc Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/19510 Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-10-06autoport/bd82x6x.go: Improve gpio.c generationArthur Heymans
This generates better gpio.c files where structs are initialised as static to be able to drop some entries since those would be initialised as 0. This makes these files less cluttered since only relevant things are shown: * GPIO direction, level, invert, blink depend on GPIO mode * GPIO level is read only on input * GPIO invert is only valid on input * only show when GPIO are inverted, blinking, reset by RSMRST# Change-Id: I83382d38a4a3b7ed11b8e7077cc5fbe154e261a7 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/19508 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-10-05util/amdfwtool: Add option for directory locationMartin Roth
The AMD firmware directory can go in a number of different locations. This patch allows amdfwtool to write the directory correctly for those different locations. If the --location switch is not added to the command line, the default location at ROM base address + 0x20000 is used as before. BUG=b:65484600 TEST=Set PSP firmware location, compare amdfw.rom to previously built version. Verify new location pointers. Change-Id: Ief32e5e37d56088946b623d305c6e93bfd6abeaf Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/21865 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-10-04buildgcc: Implement simple tarball hash verificationJonathan Neuschäfer
This patch implements a relatively simple hash-based verification scheme for downloaded files (tarballs): After buildgcc downloads a file or notices that it has already been downloaded, it hashes the file, and compares the hash against the known hash stored in util/crossgcc/sum/$filename.cksum. Two errors can occur: 1. The hash file is missing. In this case, crossgcc asks the user to verify the authenticity of the downloaded file. It also calculates its hash and stores it in util/crossgcc/sum/$filename.cksum.calc. If the file is authentic, the user may rename the calculated hash file to $filename.cksum, so that it can be found the next time buildgcc is started. 2. The known hash and the calculated hash differ. This is the case that this patch seeks to protect against, because it may imply that the downloaded file was unexpectedly changed, either in transit (Man-in-the-Middle attack) or on the file server that it was downloaded from. If buildgcc detects such a hash mismatch, it asks the user to delete the downloaded file and retry, because it can also be caused by a benign network error. If, however, the error persists, buildgcc can't continue without risking that the user runs malicious code, and it stops. Note: The hash algorithm may be changed in the future, but for now I left it at SHA-1, to avoid bloating this patch. Change-Id: I0d5d67b34684d02011a845d00f6f5b6769f43b4f Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/21592 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-10-02util/cbmem: fix feedback for 'be explicit about memory map sizes'Aaron Durbin
Julius made some suggestions to fix/improve commit 46300aa2. Implement those. BUG=b:66681446 Change-Id: I6becac9ffdcc65745e88734dfb80d12b581584a1 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/21757 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-09-28util/cbmem: be explicit about memory map sizesAaron Durbin
The cbmem utility has inherited some workarounds that originated from the default 1 MiB mapping always working. This 1 MiB mmap won't necessarily succeed if the 1 MiB encroaches on a subsequent memory range that has different cacheability. To fix this, map in only 4 KiB when the table size is not known which is the case for any forwarding entry or any low table entries on x86. That smaller mapping is then searched for a valid header. Once a valid header is found the full table is mapped and parsed allowing a forwarding entry to take precedence. Lastly, the lbtable is kept mapped in such that other operations can just operate on mapping that was previously parsed. In order to allow multiple in-flight mappings a struct mapping was added which caused the ripple within the code. However, there shouldn't be any more reasons for putting weird heuristics for when to fail. If the tables are bad then it's very much possible that mappings will fail. Retrying when the exact sizes are already known won't fix those issues. BUG=b:66681446 Change-Id: Ica0737aada8dc07311eae867e87ef2fd24eae98d Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/21718 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-09-28util/cbmem: make data structure accesses constAaron Durbin
Since the mapping is const just make all the data structure accesses const. BUG=b:66681446 Change-Id: I018cf2f2bfea2e736b097ecd1242af19c878ecb5 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/21719 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-09-27smbus: Fix a typo ("Set the device I'm talking too")Jonathan Neuschäfer
Change-Id: Ia14bbdfe973cec4b366879cd2ed5602b43754260 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/21653 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2017-09-20util/cbfstool: Add "expand" command to make CBFS span an fmap regionPatrick Georgi
vboot images come with multiple regions carrying CBFS file systems. To expedite hashing (from slow flash memory), the FW_MAIN_* regions are truncated since they typically have pretty large unused space at the end that is of no interest. For test purposes it can be useful to re-engage that space, so add a command that creates a new empty file entry covering that area (except for the last 4 bytes for the master header pointer, as usual). BUG=b:65853903 BRANCH=none TEST=`cbfstool test.bin expand -r FW_MAIN_A` creates a new empty file of the expected size on a Chrome OS firmware image. Change-Id: I160c8529ce4bfcc28685166b6d9035ade4f6f1d1 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/21598 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-09-20util/docker: Update coreboot-sdk dockerfileMartin Roth
- Fix typo in comment - Aphabetize package list and put each package on a single line - Add environment variables into coreboot user's .bashrc file - Add openssl, qemu, and shellcheck to installed packages Change-Id: I37771be5d3ecaa61d76d99e689b422144a6d7dc6 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/21582 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Chris Ching <chingcodes@chromium.org>
2017-09-20util/lint: update checkpatch & spelling.txt to upstream versionsMartin Roth
- Update checkpatch.pl to version 0547fa58 (checkpatch: add 6 missing types to --list-types) - Update spelling.txt to version d9f91f8 (scripts/spelling.txt: add a bunch more spelling mistakes) - Fix an additional unescaped left brace in a regex - causes warnings in new versions of perl. Change-Id: Ic443099e90a46280f18d58799afc72d00dc83793 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/21581 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Chris Ching <chingcodes@chromium.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-09-20board_status: Tell user where to find output when results are uploadedDavid Hendricks
If results are uploaded the temporary directory in which they are stored gets deleted, yet we currently point to the deleted directory in the output. This patch fixes it so that we point to the actual location in the local repository where uploaded results are found. Change-Id: I1f42c3296ec1d19fcfa4911307e07e67de289895 Signed-off-by: David Hendricks <david.hendricks@gmail.com> Reviewed-on: https://review.coreboot.org/21415 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
2017-09-17ifdtool: Refactor some codeBill XIE
Add find_fcba(), find_frba(), find_fmba(), find_fpsba() and find_fmsba() to replace those copy-pasted addressings. This commit is one separated from the original I6d05418c. Change-Id: I98965711e4cb9792e5cc86cc4c1035559e0274f5 Signed-off-by: Bill XIE <persmule@gmail.com> Reviewed-on: https://review.coreboot.org/21511 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-09-17ifdtool: redesign some structuresBill XIE
Redesign some array-like structures as true arrays, and rewrite functions to dump them as loops. This commit is one separated from the original I6d05418c. Change-Id: I161c9a2ae83d26e658d67d0804e943fff95fe076 Signed-off-by: Bill XIE <persmule@gmail.com> Reviewed-on: https://review.coreboot.org/21510 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-09-17ifdtool: merge region_filenames with region_name(s)Bill XIE
There is no reason to keep a separate region_filenames array, so I merge it into region_name(s). This commit is one separated from the original I6d05418c. Change-Id: I38489c6d3b3c161e9b0281188e6cdd0b62e38335 Signed-off-by: Bill XIE <persmule@gmail.com> Reviewed-on: https://review.coreboot.org/21509 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-09-17ifdtool: Const-correct and redesign some functionsBill XIE
Const-correct some functions which do not write back, and use pointers to access existing region_t variables. The last changeset is dismantled this time. This commit is only focused on const-correctness. Change-Id: I6d05418c8b32fa31dcd038a3e56f9aefe13fa9c4 Signed-off-by: Bill XIE <persmule@gmail.com> Reviewed-on: https://review.coreboot.org/21288 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-09-17board_status: Add option to set cbmem pathDavid Hendricks
This allows the user to specify a custom path for cbmem on the DUT. Change-Id: I2c28737d6efaae238fd6831cd3d00b2142b39a4c Signed-off-by: David Hendricks <david.hendricks@gmail.com> Reviewed-on: https://review.coreboot.org/21565 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
2017-09-15util/scripts/cross-repo-cherrypick: improve cros-side rewritePatrick Georgi
Sometimes the BUG/BRANCH/TEST metadata isn't separated by a newline from the later git/gerrit metadata, which messes up further processing. Add that newline to minimize the amount of human intervention required. Change-Id: I37171bf6764b64e0ab0e81297a03f4d8b7744256 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/21534 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
2017-09-13rmodtool: Increase limit on number of symbolsDamien Zammit
An internal index `i` was previously allocated as Elf64_Half which is uint16_t. Bumping to uint64_t increases the number of allowed symbols and prevents a segfault in processing a larger ramstage.debug file. Also introduce a separate counter for the number of sections. Change-Id: I9ad2f64c452cef2e7bf957f766600891cb5ae798 Signed-off-by: Damien Zammit <damien@zamaudio.com> Reviewed-on: https://review.coreboot.org/21360 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-09-13util/lint: Exclude external payloads from coreboot lowercase checkMartin Roth
Change-Id: I70bbf37fad67fd9bda5724811f4bbdcc53779a42 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/21321 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-09-06util/cbmem: Pretty print STAGEx_META and _CACHEKyösti Mälkki
Also align entries without name with additional indents. Change-Id: Ia6aa303daa11e6aec249232aadf4e346bad659d5 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/21383 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-09-06util/testing: Don't keep tegra lp0 build resultsPatrick Georgi
We don't actually care for them on our testers, just that the files can be built. Change-Id: Ib656a085d70e2aeb1601f1943ad8581af3133839 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/21420 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-09-06util/testing: Also test-build tegra's lp0 resume codePatrick Georgi
The regular build doesn't build it, so it fails every now and then due to changes in its dependencies. Make sure we notice these early. Change-Id: I0603b22887487d8871611d91e6f8ab0ec210bff1 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/21390 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-09-06intelmetool: Add support for Sunrise Point-HShawn Chang
Tested on P10S-M WS. Change-Id: I62f78fe5ca03bf70497939a12f0036bf247b2aa7 Signed-off-by: Shawn Chang <citypw@gmail.com> Reviewed-on: https://review.coreboot.org/21301 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2017-09-06abuild: Allow building with any toolchainDamien Zammit
Adds -A --any-toolchain option to abuild This is handy for those who want to test compiling all board configs with abuild using a non-coreboot toolchain Change-Id: Idd599b0d2c324ad88ba3c83cdf3b180eb6d1fc80 Signed-off-by: Damien Zammit <damien@zamaudio.com> Reviewed-on: https://review.coreboot.org/21352 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-09-04util/board_status: do a spell checkIdwer Vollering
Change-Id: Ie39be471851586076343b8e9454a9140d4664b8d Signed-off-by: Idwer Vollering <vidwer@gmail.com> Reviewed-on: https://review.coreboot.org/21322 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2017-09-02buildgcc: Fix up cross GCC buildingNico Huber
Add a missing line-break escape and, rather cosmetic, guard execution of $CXX which we allow but don't force to be set. Change-Id: Icf6d3b7de4b7999b8214489f28997964c490d1e9 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/21307 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-09-02clang: Enable integrated assembler on clang buildsDamien Zammit
Change-Id: I883bf7eb2ab52ba3d7a284c96d4aade8bc1ee4ae Signed-off-by: Damien Zammit <damien@zamaudio.com> Reviewed-on: https://review.coreboot.org/21221 Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-09-02util/lint/checkpatch: Untaint variables from env & command lineMartin Roth
Jenkins is giving warnings due tainted variables from the environment and command line: Insecure $ENV{PATH} while running setgid at util/lint/checkpatch.pl line 907, <$conststructs> line 39. Insecure dependency in piped open while running setgid at util/lint/checkpatch.pl line 907, <$conststructs> line 39. This should fix those warnings. Change-Id: I6a09915d13547bf9a86c011d44cbcd39c46f3fec Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/21293 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-09-01buildgcc: Integrate nds32 update from Andes TechnologyStefan Reinauer
This patch has been provided by Mentor Chih-Chyang Chang on behalf of Andes Technology. It fixes using the coreboot toolchain to compile the Chrome EC code base on the ITE8320 embedded controller. The new patch incorporates a fix for the issue previously fixed by patches/gcc-6.3.0_nds32.patch, so that patch can be removed. patches/gcc-6.3.0_riscv.patch needs to be slightly adjusted to still apply cleanly (configure scripts only). Change-Id: I0033888360f13ba951b692b3242aab6697ca61b3 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20901 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-08-22util/msrtool: Exit program after displaying the help messageMaciej Suminski
In case there is no mode selected, sys and cpu variables are not initialized, causing a segfault on exit (goto done). Change-Id: I4a183c267e306598627c1612f4633f1e19019f3c Signed-off-by: Maciej Suminski <maciej.suminski@cern.ch> Reviewed-on: https://review.coreboot.org/21026 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
2017-08-22util/inteltool: Remove duplicated error message, switch to snprintfMaciej Suminski
Passing a string containing output from strerror() to perror() causes double error message display. It is also causing segfaults when the error message is longer than temp_string capacity. To fix the problems, sterror() call has been removed so the error message is printed only once. This could be enough to avoid segfaults, but it is a good practice to limit output size with snprintf(). Change-Id: I5ccc37e404f278cafae0a451c5acaa27d7907cce Signed-off-by: Maciej Suminski <maciej.suminski@cern.ch> Reviewed-on: https://review.coreboot.org/21025 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-08-20util/inteltool: Fix a comparison between signed and unsigned integersMaciej Suminski
Change-Id: Ic6489c408a87213d3c39626c5379a44acea2c34d Signed-off-by: Maciej Suminski <maciej.suminski@cern.ch> Reviewed-on: https://review.coreboot.org/21024 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Idwer Vollering <vidwer@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-08-20util/me_cleaner: Pull the latest changes from upstreamNicola Corna
Relevant changes (commit 2e8761e): * Add an option to truncate the ME image file * Add full support for Skylake (ME 11) and following, including modules removal, truncation informations and partition relocation * Add two options to generate a shrinked ME image file and the corresponding descriptor with a modified flash layout * Update README.md * Bug fixes Also add a link to the usage guide in the Kconfig help. Change-Id: I690c5d558139f64f38babf3c0988b53834ba8b37 Signed-off-by: Nicola Corna <nicola@corna.info> Reviewed-on: https://review.coreboot.org/20915 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2017-08-18kbc1126_ec_dump: fix some errorsIru Cai
- fix the error caused by signed integer extension - fix fopen mode - one minor style fix Change-Id: Iacc4ea50515ea219bc1868dae0446d576e8dce0c Signed-off-by: Iru Cai <mytbk920423@gmail.com> Reviewed-on: https://review.coreboot.org/21013 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-17util/lint: Change final-newlines to lint-test from lint-extended-testMartin Roth
The final newline check is taking longer than we'd like to run. Since it runs on every commit as part of the pre-commit check, we want that to run faster than it currently does. Remove LINT_SKIP_NEWLINE_CHECK as it's no longer needed. Change-Id: Ie945dd6caba84e0d23af499d43367d70b1696089 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20872 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-08-17lint: update signed-off-by checkMartin Roth
The current signed-off-by check doesn't really work well as a lint stable test being run by the pre-commit git hook. This test looks at the PREVIOUS commit instead of the staged commit, which works well on the server. In looking for a way to check the staged commit message, I found the commit-msg hook, which is the correct way to check the staged message. - Update the commit message check from a lint-stable test to a lint-extended test. - Add the check for signed-off-by to the commit-msg hook Change-Id: I8be8aef25730d988c7cf1586ae66ecb839d5f756 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20920 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Chris Ching <chingcodes@chromium.org>
2017-08-16util/kbc1126: [cosmetic] change Makefile casingIdwer Vollering
Change-Id: Iac616fdb3de79f4f58c30a2eb674ed5152b6a6e4 Signed-off-by: Idwer Vollering <vidwer@gmail.com> Reviewed-on: https://review.coreboot.org/21050 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-08-15buildgcc: surround *.log with apostrophes when build failsIdwer Vollering
Apparently the script's output text is unclear. Emphasize the file name, keeping the dot to close the sentence. Change-Id: I1f214b71629eda5fc54e5671ce63e58948343656 Signed-off-by: Idwer Vollering <vidwer@gmail.com> Reviewed-on: https://review.coreboot.org/21012 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>
2017-08-14Makefile.inc: lint: Update to run lint-extended scriptsMartin Roth
- Add lint-extended as a valid option - Call lint-extend from what-jenkins-does and test-lint - When logging to a junit.xml file, name the file extended-junit.xml so it doesn't conflict with the stable junit.xml file. Change-Id: I7e4156844b8c60790e03a0e43564610bb0c8f386 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/16362 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Chris Ching <chingcodes@chromium.org>
2017-08-14util/lint: add extended stable checkpatch for testingMartin Roth
The checkpatch script takes a while to run, so don't add it to the lint-stable checks which run pre-commit. Change-Id: I907176c21c057564495b75133ba10b0761c9fe7b Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/16360 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Chris Ching <chingcodes@chromium.org>