summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)Author
2017-08-10util/lint: Update license header lint scriptsMartin Roth
- Check for original LinuxBIOS header from LANL - Check for the BSD style license used in x86emu - Add top level checks for src/cpu and src/vboot - Add drivers dir check for aspeed, emulation, and sil - Add mainboard dir check for digitallogic Change-Id: Ie1ef6a39fd1d184815d22235d43780caedb2ca95 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/19122 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Chris Ching <chingcodes@google.com> Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-08-10lint: Update lint-stable-021-coreboot-lowercaseMartin Roth
- Exclude .patch files from check - Exclude 'CorebootBdsLib' path in Tianocore. Change-Id: I82186f401d267d7594fe1cd88c818c4a7015ba91 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20905 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Evelyn Huang <evhuang@google.com>
2017-08-09util/lint: provide option to skip newline checkAaron Durbin
The newline lint check takes forever as it checks every file in the git repo -- not just the files changed. To add insult to injury these checks are performed on every commit. Allow one to skip this check by setting the LINT_SKIP_NEWLINE_CHECK environment variable. Change-Id: I1cd5c50627b73d68b0da2fcb2d9546eb874a7959 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/20903 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-08-08add __must_check to */compiler.hCaveh Jalali
the __must_check function attribute is pretty much straight from the linux kernel - used to encourage callers to consume function return values. Change-Id: I1812d957b745d6bebe2a8d34a9c4862316aa8530 Signed-off-by: Caveh Jalali <caveh@google.com> Reviewed-on: https://review.coreboot.org/20881 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-07buildgcc: Fix libelf 64bit detectionStefan Reinauer
Taken from crosstool-ng and and re-applied to 0.8.13 Change-Id: I43ad23b66ec10915cc68be8c395825f4f9161725 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20800 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-08-07buildgcc: Update to gdb 8.0 and expat 2.2.1Stefan Reinauer
Among other improvements, the new GDB has a new GDB/CLI command to erase flash memory and a few Python scripting enhancements. Change-Id: Ie3852d5bc74617d3e05509e19bbd1caa281da3e0 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20799 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2017-08-04util/scripts: Add script to update submodulesMartin Roth
Change-Id: I4e238b539f06ce4031e0e99d26943d226a3c2556 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20703 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-08-03util/kbc1126: Refactor kbc1126_ec_insertIru Cai
Add support for setting addresses of blobs only, and using address in memory when ROM is mapped Change-Id: I053c55253eee00558071d15923e3eb17b1e8410c Signed-off-by: Iru Cai <mytbk920423@gmail.com> Reviewed-on: https://review.coreboot.org/20474 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
2017-08-02util/cbfstool: Fix build with armv7-eabi cross compilerPatrick Georgi
We recently changed all PACKED, __PACKED, __attribute__((packed)) ... to __packed to gain some consistency. In cbfstool we use compiler.h to provide that where necessary. The cross compiler I use doesn't provide __packed by itself, but liblz4 doesn't compensate for that. Therefore include compiler.h, and to avoid adding dependencies to non-liblz4 code, do so through the command line. Change-Id: I581e45639ac3e103af7c16793e8effe2e632dec7 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/20836 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-31util/abuild: Set exit status on failureMartin Roth
Currently, the what-jenkins-does target doesn't stop if abuild fails. This change gives a command line parameter to abuild with tells it to exit with a non-zero exit status if any of the builds failed. This will be particularly useful for concourse which doesn't parse the junit.xml files, and only knows whether a build passed or failed by the exit status. Change-Id: Ic2be5deaedacd3f55db8e0b14a2b7b39cc44664e Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20656 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Chris Ching <chingcodes@google.com>
2017-07-31util/autoport: Remove copy-pasting of PMIR registerNico Huber
AFAIR from reviews, writing the PMIR (aka. ETR3) register never turned out to do anything useful. Change-Id: I119fb1212f360a59b695e2dfef68e19c330d01ca Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/20817 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-30intel/sandybridge: Clean VGA BIOS ids up a littleNico Huber
Sync map_oprom_vendev() and autoport with the list of PCI ids in the `gma.c` driver, remove one obsolete Kconfig default override. Change-Id: I12f24f415b695c516fbb947114e09c873af2e439 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/20814 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2017-07-30intel/sandybridge: Gather MMCONF_BASE_ADDRESS defaultsNico Huber
All affected boards did the same USE_NATIVE_RAMINIT distinction or actually selected USE_NATIVE_RAMINIT. Also update autoport. Change-Id: I924c43cec1e36e84db40e4b8e1dd0e05cad2b978 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/20813 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2017-07-29util/gitconfig: update pre-commit scriptMartin Roth
The previous pre-commit script generates an error when a commit doesn't actually generate a patch file. This happens in rare instances when the only change in a patch is to update file permissions. Update the pre-commit script to verify that there's actually a patch before calling checkpatch. Also print that we're running checkpatch so that it doesn't look like odd failures come from lint-stable. Fixes Bug #132 - Problem with `lint-stable` when changing mode of file Change-Id: I142610b6fc984b2b14fd6c634bc4e7f2880ba987 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20781 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-28util/inteltool: Clean up checkpatch.pl warningsPratik Prajapati
Remove braces around single statements. "WARNING: braces {} are not necessary for single statement blocks" Change-Id: Id5a7dc3a9672266b66d7f46db2ff087b98fd174d Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com> Reviewed-on: https://review.coreboot.org/20771 Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-28util/inteltool: Add support for SGX statusPratik Prajapati
Add support for dumping Intel Software Guard Extension (SGX) status. --sgx or -x is the command line switch to get SGX status. The code iterates through all cores and reads MSRs to check if SGX is supported, enabled and the feature is locked. Change-Id: I1f5046c1f6703f5429c8717053ffe9c981cedf6f Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com> Reviewed-on: https://review.coreboot.org/20758 Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-07-25abuild: Update file locationsMartin Roth
The full path to the passed/failed build lists needs to be specified. On the builders, the absolute path is passed in, which conflicted with the ${TOP} value, causing this to fail on the builders. When TOP was removed from the path, the builders worked correctly, but it failed when run locally. This fixes the path in either case. Change-Id: Ia4370f4a2b84991edccfc723a3136b88ca27db7d Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20660 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-07-24util/lint: Update final newline checkMartin Roth
- Exclude .png and .patch files. - Turn into a lint-stable test. Change-Id: I4a5c77d7856bc5017ba441d458378b4837c1c7d5 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20706 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-21util/lint: exclude patch files from asm syntax checkMartin Roth
This allows the paches to add cross-compile support for true x86 16-bit GCC (ia16) to go in. Change-Id: If9246b5fb2f3578afea601fd63b7d716ddf8597e Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/19714 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-07-21util/vgabios: Don't call redefined printk in printkStefan Reinauer
A few pieces of coreboot code (like the video bios emulator) are imported from other code bases, and hence might call printf. In order to see the output, we redefine printf to printk. However, when we are re-importing this code in a userspace utility, we might call printk instead of printf if we're not careful. A good fix for this would be to not call printf in coreboot ever. As a short term fix to keep testbios from segfaulting, we just don't call printf from printk, so we don't cause our own stack to overflow. Change-Id: I789075422dd8c5f8069d576fa7baf4176f6caf55 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20658 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2017-07-19crossgcc: Clean out ABI variable for GMPPatrick Georgi
This is sometimes set by packaging systems (eg Gentoo), so give it a sane preset. Change-Id: I651fad12128143e8ed5053e7e9871ea271bfc797 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/20632 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-19abuild: Update file locationsMartin Roth
The TARGET directory is independent of the TOP directory. Change-Id: I1a8b92eaaea138548712726b09a1b083d235892e Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20610 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-07-18util/lint: update kconfig_lintMartin Roth
* Add check for '#if defined' as well as #ifdef * Add check for IS_ENABLED() around bools in #if statements. * Fix an incomplete comment. Change-Id: I0787eab80ae64f59664fb53f395389bf5ac2a067 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20360 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: Werner Zeh <werner.zeh@siemens.com>
2017-07-18crossgcc: patch out uses of $(P) variable from gcc/ada buildPatrick Georgi
Gentoo likes to use that variable for itself and insists on keeping it. Meanwhile it doesn't seem to be set or used anywhere else in the gcc build, and it seems there was a big $(P)-pruning going on in 2000, so why is it even (still) there? Related upstream change can be found at https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01015.html Change-Id: I2c2bdf9cb215c489f760f43642a86592924e4e65 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/20612 Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-07-15inteltool: Add support for Skylake PMCNico Huber
Change-Id: Ia80f5269476ee1c70dcb157ba3ed5a861611ec7c Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/19592 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-13Rename __attribute__((packed)) --> __packedStefan Reinauer
Also unify __attribute__ ((..)) to __attribute__((..)) and handle ((__packed__)) like ((packed)) Change-Id: Ie60a51c3fa92b5009724a5b7c2932e361bf3490c Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/15921 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-11abuild: give --silent the silent treatmentPatrick Georgi
It's obsolete and without effect. Change-Id: I17c1f8bffc2048a79de58cdc2a70651796db6ba6 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/20390 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-07-11crossgcc: Prefer gnatgcc over gcc if availablePatrick Georgi
For distros that package and version gnat independently from gcc (such as Ubuntu), try to build with gnatgcc first. This fixes the issue of gcc -print-prog-name=gnat1 failing because gcc is of a different version. Change-Id: Icec6d1fba8855e88ac91d47842dcb7f6b9d35461 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/20517 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-07util/crossgcc: Fix typoPatrick Georgi
buildgcc was copied to $DEST/share/buildgcc-$VERSION-, missing the commit id description. Change-Id: I83d2074b6466b0d99507845dc714a11ab2c58271 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/20487 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-07util/cbfstool: demote FV handling errors to debugPatrick Georgi
It's rather normal that a few bytes are skipped. Change-Id: I9371afdbb3ad05de7645bfbf257e4f4bfa2feddb Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/20469 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-07util/cbfstool: demote not-ELF error to debugPatrick Georgi
It's irritating when adding tianocore payloads - those are not ELF, but that's deliberate. Change-Id: I76d9367b28545348f526e5f0b8216f9ff2a3d636 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/20468 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-29util/abuild: Update abuildMartin Roth
- Improve logging - Add location of logfiles to failed board log. - Log when the shared utilities fail to build. - Log passing configs and print count of tested configs that passed. - Disable a couple of shellcheck warnings. - Remove some unused code. Change-Id: Ic2cf1c0a5f123d759aac7ce55092ad71314a8c9d Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20359 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-06-29util/lint: Update checkpatch & files to upstream linuxMartin Roth
- Update checkpatch.pl to version 522b837 (checkpatch: warn when formats use %Z and suggest %z) - This update moves the const_struct definitions into an external file. coreboot will want to update this file, but for now I'm just pulling it in directly from the linux tree. - Update spelling.txt used by checkpatch.pl to version 505d308 (scripts/spelling.txt: add "overide" pattern and fix typo instances) - Add better notes where things have been changed for coreboot to make future merges easier. Change-Id: I0ef067874fe7b1d23276a10e63858895d6083f69 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/18810 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-06-28util/superiotool: Check for libpci before builingArthur Heymans
Check is adapted from inteltool's Makefile. Change-Id: Ife01ef20d9284cb0a68719757856f9a66a4de452 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/19074 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-27clang: Allow initializer overridesStefan Reinauer
In the code we do the following in a number of places to pre-initialize an array with a certain value before overwriting some of the array with other values: u8 mainboard_picr_data[FCH_INT_TABLE_SIZE] = { [0 ... FCH_INT_TABLE_SIZE-1] = 0x1F, } clang does not like that behavior unless we specify the option -Wno-initializer-overrides. Remove the check for gcc in those places, too, because 1) it would silently change array contents between compilers 2) the check isn't sufficient to determine compilation on clang vs gcc Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Change-Id: I93cc121b6fec099fcdbd5fd1114c2ff7cbc291dc Reviewed-on: https://review.coreboot.org/20384 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-06-27xcompile: silence clang when referencing packed structs' membersPatrick Georgi
clang complains that the access might be unaligned. Yes, we know. Yes, that's exactly what we want. You have _one_ job. Change-Id: I5400f50d8b5b462270c700f7ff90d9d517278e71 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/19659 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-06-27xcompile: Also try clang variants under the $triplet-clang schemePatrick Georgi
That seems to be the more reliable way to build clang cross compilers for now. Change-Id: I14fe767d20f91b64e96c909291760bddcd108e5c Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/19660 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-27util/lint: Add check to make sure 'coreboot' is lowercaseMartin Roth
- Excludes certain phrases which can't be changed. - Checks last commit message if code is in a repo. Change-Id: I6b52342488dacc56ef6083db5503507af35d41ac Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20032 Reviewed-by: Marc Jones <marc@marcjonesconsulting.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-06-27util: change coreboot to lowercaseMartin Roth
The word 'coreboot' should always be written in lowercase, even at the start of a sentence. Change-Id: I0a024d82d331c0794fe087e440b4e1924129a13c Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20030 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-06-27buildgcc: Adapt messages about GNAT and bootstrappingNico Huber
Don't ask for bootstrapping in case of a different host GCC major version. GCC's versioning scheme changed starting with the release of GCC 5. There are no big changes between the versions any more. Instead, show the message when the host GCC's version is below 4. In case GNAT can't be found, ask the user to abort and install it. Also give hints for Ubuntu where the package versions are a little messy (e.g. the meta packages gcc and gnat often point to different versions). In case GNAT is found but is too old (< 4.9), enable bootstrapping by default and tell the user that building will take longer. In all three cases show a timeout to draw the user's attention. v2: Update GNAT check to also look for `gnatbind`. It has to be somewhere in $PATH. Change-Id: I4d9de11d7469e137ede8ad138296d20c0f8ba78f Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/20332 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-27buildgcc: Rename quit() to exit_handler()Nico Huber
"quit" is a signal name. The FreeBSD `sh` interprets trap quit 1 2 3 15 as command to reset all the respective signal handlers, instead of setting quit() as handler. Change-Id: I69b813ab583f15a9dd89a115f7aea66d966f981b Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/20391 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-27util/blobtool: add spec files for DDR3 SPDsMartin Roth
Because of how blobtool works, we need different files for the 128 and 256 byte versions. Change-Id: I9a3a532515eaeeb65ae05ce4f7a37c88500c6193 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20094 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-06-27util/crossgcc: Fix building gcc 6.3.0 with clangPatrick Georgi
It assumes that __builtin_longjmp takes a void **, which is decidedly distinctive from void *. Change-Id: I1930bb01dd62bd6abf0688b118236db2a9299e40 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/20366 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-27crossgcc: Fix building with clang++ in the presence of gccPatrick Georgi
Some environments (<grumble>cros_sdk</grumble>) provide gcc as $CC and clang++ as $CXX. The latter needs the higher bracket-depth while the former has no idea what it means, so tell CC and CXX individually. Change-Id: I72b75fb9bb5df3a9b1561ee8821ec43ada29b24f Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/20365 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-26libpayload: Enable building libpayload with march=i586Lee Leahy
Add a Kconfig value to enable building libpayload with the 586 compiler. Update the cross compiler script to add the Kconfig value name that is used when libpayload builds. The Quark SOC does not support some of the instructions generated with the 686 compiler (e.g. CMOV). Success occurs when payloads/libpayload/build/config.h indicates that CONFIG_LP_USE_MARCH_586=1. TEST=Build and run on Galileo Gen2. Change-Id: I04907e9a38ee139bae2e8b227821f54614707c25 Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com> Reviewed-on: https://review.coreboot.org/20322 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Martin Roth <martinroth@google.com>
2017-06-26buildgcc: Allow environment to override $CC/$CXXNico Huber
Also check for the presence of the given commands or "gcc", "cc" in this order if $CC is empty. To untangle the given compilers from boostrapped ones, introduce hostcc() and hostcxx() functions that return the respec- tive compilers to be used. Change-Id: Ic947be53eec25331173ac82ed742017ca3fbf83c Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/20331 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-25crossgcc/buildgcc: update file location codeMartin Roth
- Change from 'which' to 'command -v'. 'which' is not a posix command. Change-Id: Icdf18e7e496447157554b8e61b1528f03456536d Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20230 Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-06-25xcompile: Fix clang compiler runtime detectionStefan Reinauer
clang, like gcc, needs a compiler runtime library. Unlike gcc, it can use either its own runtime library (compiler-rt), or gcc's version (libgcc). Also unlike gcc, the version of clang that is currently part of our reference toolchain does not provide the necessary versions of compiler-rt for all platforms we support. Hence, for now, use libgcc even on clang builds. This patch allows switching between the two, but switching to compiler-rt will break clang builds, unless someone fixes our reference toolchain to provide libclang_rt.builtins-${ARCH}.a for each of our supported platforms. Change-Id: I5001a4b62ed34df19312f980b927ced8cbaf07db Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20303 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
2017-06-22crossgcc: cosmetic overhaul of outputStefan Reinauer
Straighten up output from the buildgcc script Change-Id: Iee6775b97560063bbdff0d31ceab2dddc58783b3 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20302 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-06-22crossgcc: Rename print_stable to print_supportedStefan Reinauer
That's what the option is called in the help text. Not sure where the divergence came from, so let's fix it. Change-Id: I621aa203da2d314b93de665dbdadbe4a43725375 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20301 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: Nico Huber <nico.h@gmx.de>