Commit Graph

2986 Commits

Author SHA1 Message Date
Martin Roth 5cb2263004 util/scripts: Add script to update submodules
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-04 15:33:03 +00:00
Iru Cai 4225493159 util/kbc1126: Refactor kbc1126_ec_insert
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-03 18:54:41 +00:00
Patrick Georgi d42eb37be4 util/cbfstool: Fix build with armv7-eabi cross compiler
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-08-02 09:55:11 +00:00
Martin Roth ba973bd2de util/abuild: Set exit status on failure
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-31 20:52:07 +00:00
Nico Huber e48b3db519 util/autoport: Remove copy-pasting of PMIR register
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-31 15:00:43 +00:00
Nico Huber 23b93dd7d8 intel/sandybridge: Clean VGA BIOS ids up a little
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-30 00:07:01 +00:00
Nico Huber 2b5c021431 intel/sandybridge: Gather MMCONF_BASE_ADDRESS defaults
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-30 00:06:51 +00:00
Martin Roth ef869305cf util/gitconfig: update pre-commit script
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-29 21:36:38 +00:00
Pratik Prajapati 015082dff3 util/inteltool: Clean up checkpatch.pl warnings
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-28 16:21:40 +00:00
Pratik Prajapati 91664d4d6f util/inteltool: Add support for SGX status
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-28 16:21:32 +00:00
Martin Roth 6d2cbb9e58 abuild: Update file locations
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-25 15:11:24 +00:00
Martin Roth 43be77db31 util/lint: Update final newline check
- 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-24 16:28:24 +00:00
Martin Roth 4cfae2f574 util/lint: exclude patch files from asm syntax check
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-21 15:55:21 +00:00
Stefan Reinauer e2804c14a4 util/vgabios: Don't call redefined printk in printk
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-21 15:45:41 +00:00
Patrick Georgi e8253fea63 crossgcc: Clean out ABI variable for GMP
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-19 22:33:13 +00:00
Martin Roth 6228b9efb7 abuild: Update file locations
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-19 15:18:14 +00:00
Martin Roth 5b88301073 util/lint: update kconfig_lint
* 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-18 19:08:42 +00:00
Patrick Georgi 9f4864f499 crossgcc: patch out uses of $(P) variable from gcc/ada build
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-18 13:36:01 +00:00
Nico Huber 9fa8ebe1a4 inteltool: Add support for Skylake PMC
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-15 22:33:14 +00:00
Stefan Reinauer 6a00113de8 Rename __attribute__((packed)) --> __packed
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-13 19:45:59 +00:00
Patrick Georgi 55ea013842 abuild: give --silent the silent treatment
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-11 11:37:14 +00:00
Patrick Georgi 8f2cdad882 crossgcc: Prefer gnatgcc over gcc if available
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-11 06:08:16 +00:00
Patrick Georgi 4eb84cf878 util/crossgcc: Fix typo
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-07 19:05:44 +00:00
Patrick Georgi 50bda05e46 util/cbfstool: demote FV handling errors to debug
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-07 09:01:29 +00:00
Patrick Georgi 8320b9a997 util/cbfstool: demote not-ELF error to debug
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-07-07 09:01:28 +00:00
Martin Roth d16022bdd4 util/abuild: Update abuild
- 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-29 14:42:50 +00:00
Martin Roth edd591d8ca util/lint: Update checkpatch & files to upstream linux
- 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-29 14:42:26 +00:00
Arthur Heymans 4988af8ca8 util/superiotool: Check for libpci before builing
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-28 00:49:32 +00:00
Stefan Reinauer 42b37f537f clang: Allow initializer overrides
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-27 23:54:03 +00:00
Patrick Georgi 0b4d5648f2 xcompile: silence clang when referencing packed structs' members
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-27 23:53:47 +00:00
Patrick Georgi f138320f9e xcompile: Also try clang variants under the $triplet-clang scheme
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-27 20:57:34 +00:00
Martin Roth 037dbe42d7 util/lint: Add check to make sure 'coreboot' is lowercase
- 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-27 18:59:24 +00:00
Martin Roth a564811e71 util: change coreboot to lowercase
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-27 18:26:01 +00:00
Nico Huber cd87e1ba2d buildgcc: Adapt messages about GNAT and bootstrapping
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-27 18:24:29 +00:00
Nico Huber 18c74d69af buildgcc: Rename quit() to exit_handler()
"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-27 18:24:10 +00:00
Martin Roth 33906d2347 util/blobtool: add spec files for DDR3 SPDs
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-27 16:06:53 +00:00
Patrick Georgi df9a71443e util/crossgcc: Fix building gcc 6.3.0 with clang
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-27 05:27:56 +00:00
Patrick Georgi a7a5a56370 crossgcc: Fix building with clang++ in the presence of gcc
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-27 05:27:53 +00:00
Lee Leahy 6796d787c5 libpayload: Enable building libpayload with march=i586
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-26 23:14:05 +00:00
Nico Huber 08bb837268 buildgcc: Allow environment to override $CC/$CXX
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-26 20:28:27 +00:00
Martin Roth d55f5ebe44 crossgcc/buildgcc: update file location code
- 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-25 08:45:05 +00:00
Stefan Reinauer 72dc21cb7c xcompile: Fix clang compiler runtime detection
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-25 01:38:13 +00:00
Stefan Reinauer 81693d41b1 crossgcc: cosmetic overhaul of output
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-22 23:24:41 +00:00
Stefan Reinauer c66fd3c267 crossgcc: Rename print_stable to print_supported
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>
2017-06-22 23:24:29 +00:00
Stefan Reinauer ca117e7f49 crossgcc: Update to clang 4.0
Drop Edward's cfe patch because it has been implemented by
upstream clang differently. Instead of

 $ clang --print-librt-file-name

the right way to get ahold of the compiler-rt builtin library is

 $ clang -rtlib=compiler-rt --print-libgcc-file-name

Change-Id: I8aac5256da5bfb6f7bebeff0959f16b53867c581
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/20274
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-06-21 18:17:54 +00:00
Stefan Reinauer 3b5934936e Add CMake 3.9.0-rc3 to coreboot toolchain
Newer versions of clang will need newer versions of CMake (at least
3.4.3) to compile. This patch will enable us to switch to clang 4.0.

Change-Id: I6c91163ce0efd4eb2410cdb433de8be23d510ecd
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/20273
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-06-21 18:17:34 +00:00
Patrick Georgi 8f8668d87f util/scripts/gerrit-rebase: allow skipping old history
This might provide a minor speedup but more importantly it allows
skipping commits without Reviewed-on line (which we have a couple of
due to mistakes with git push).

To use, add a line starting with "Gerrit-Rebase-Ignore-CLs-Before:"
pointing out a match string (ie "something that comes after Reviewed-on")
prior to which no changes are considered on the originating branch. The
target branch is still fully considered to avoid issues with changes
that were retargetted out of order around the new cut and would then
make a reappearance (or be skipped).

Change-Id: I9f2679891e93f6d28a781315aebd2aa60a1e3b23
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/20185
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-06-19 18:44:13 +02:00
Philipp Deppenwiese 9a848dde8b util/crossgcc: Fix musl libc support
Disable NLS for libelf.

Change-Id: Ia4d01393771ccdff9e0498d7efd1bbdd11cff8db
Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org>
Reviewed-on: https://review.coreboot.org/20235
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-06-17 20:00:03 +02:00
Nico Huber cde2bdf496 inteltool/Makefile: Clean .dependencies too
Change-Id: Ib4fc326c6612f2d142c8a5220949fbb4b97c37a1
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20176
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-06-14 12:54:40 +02:00
Nico Huber cce508fed2 inteltool/Makefile: Separate CPPFLAGS from CFLAGS
Separate the required CPPFLAGS from environment overridable CFLAGS.

Change-Id: I0c1c0a1cebc7f7971634bf57d4a2370939c43fda
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20175
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Hannah Williams <hannah.williams@intel.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-06-14 12:54:36 +02:00