Commit Graph

3177 Commits

Author SHA1 Message Date
Paul Menzel ceac787a4f inteltool: Add hint for compiler to avoid fall-through warning
Falling through is intended here, so add a comment that GCC will notice
and stop warning about this.

Change-Id: I12637b6bc18844a3bc47f06208df7fee7a4feb3b
Found-by: gcc-7 (Debian 7-20170316-1) 7.0.1 20170316 (experimental) [trunk revision 246203]
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/18906
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Omar Pakker
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2017-12-22 16:54:16 +00:00
Patrick Rudolph 2d26a36910 util/inteltool: Add GPU device IDs
Add PCI device IDs for several Intel GPUs.

Change-Id: I7d6ba16b2b115187fd57a31716f23a610b520d3e
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/22431
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2017-12-20 16:41:46 +00:00
Martin Roth f183a85932 util/cbfstool: Check for NULL before dereference
Fixed coverity issue: 1302455 - Dereference null return value

Change-Id: I59b908adc4d35f08fda8e4ad3f806714f2caeb65
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22900
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-12-20 16:35:13 +00:00
Aaron Durbin facf14996c util/cbfstool: calculate cbfs file size for xip stages
The initial lookup for cbfs location for xip stages is implicitly
using the ELF size assuming it's relatively equivalent. However,
if the ELF that is being converted contains debug information or
other metadata then the location lookup can fail because the ELF is
considerably bigger than the real footprint.

BUG=b:70801221

Change-Id: I47024dcd8205a09885d3a3f76e255eb5e3c55d9e
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/22936
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-12-19 22:28:20 +00:00
Marc Jones 9ab8ae6a55 util/gitconfig: Make gitconfig a bash script
The gitconfig target has a few bashisms and would fail
silently on systems that use a POSIX standard sh (like Ubuntu dash).

Remove the code from the makefile and put it in a bash script that
is called by the gitconfig target.

Change-Id: I3bc8cf688a3ad211b57c8ca0e6b1e86c82dc6a37
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/22857
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-12-15 23:02:11 +00:00
Martin Roth ac9d6b8c73 util/cbmem: Print timestamp frequency in verbose mode
The code flow is changed slightly to print the timestamp frequency from
either method of determining it.

BUG=b:70432544
TEST=Build and test cbmem -t -V

Change-Id: I02286fa67919e70a3592cdbcc1c9ca2991b7f385
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22821
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-12-12 22:27:05 +00:00
Paul Kocialkowski 826713ff61 nvramtool: Add dummy cmos-hw-unix accessor implementation for non-x86
The default implementation uses inb/outb, that is not available on ARM
platforms and others. A dummy implementation allows building nvramtool
on these platforms.

Change-Id: I75e4a1a0cbd35ca40f7b108658686839ccf9784a
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/22562
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-09 16:56:09 +00:00
Daisuke Nojiri ff906fb95b cbfstool: Add '-p' option for padding
This patch adds '-p' to the 'add' command. It allows the add
command to specify the size of the padding added with the file
being added. This is useful to reserve an extra space in case
the file is too big to be relocated.

BUG=b:68660966
BRANCH=none
TEST=emerge-fizz coreboot &&
cbfstool image.bin add -n ecrw -f EC_RW.bin -p 0x10 ...
Verify image.bin has extra space in the file header.

Change-Id: I64bc54fd10a453b4da467bc69d9590e61b0f7ead
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://review.coreboot.org/22239
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-12-08 16:05:52 +00:00
Nico Huber 27e8412b4a buildgcc: Hide stderr output of getopt test
Change-Id: I03c38de3a3b88d569d629be7483eb53164cf136a
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/22738
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-07 21:56:44 +00:00
Patrick Georgi 55d26875b3 lint-stable: Only check files tracked by git (ie source files) for +x
Change-Id: I99cbcba7a086ef950f248888a83cf24a4db4aee9
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/21419
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-12-05 15:04:11 +00:00
Patrick Rudolph 3df9dbe886 util/intelmetool: Fix some platforms
Bootguard:
* Fix Mac support (ME_version can't be detected)
* Skip MSR read on older platforms (as it would fail anyway)
* Refactor MSR error handling
* Print Bootguard state "Unknown" on MSR read error

Change-Id: Iafe3f5c22c6caeedc556933405b9f6d83ec876a1
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/22598
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2017-11-30 17:19:08 +00:00
Patrick Georgi 214dde058c crossgcc: fix edk2 tools_def template
Forgot the /bin/ part of the executable paths

Change-Id: I87d63ec18338e376787d02bb771471e746a17b62
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/22640
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-11-30 16:51:16 +00:00
Patrick Georgi 0c2df6f027 util/crossgcc: Install a template for the edk2 build system
Add a CBSDK tool set template that can be used in edk2 simply by
appending $prefix/share/edk2config/tools_def.txt to Conf/tools_def.txt.
After that, build -t CBSDK uses the coreboot compilers, providing a more
predictable compiler choice.

Change-Id: I76b38c928b831ee6f31450aa0ad59b4f906f394d
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/22570
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-11-28 10:48:01 +00:00
Philipp Deppenwiese 73add175cd util/intelmetool: Add bootguard information dump support
With this implementation it's possible to detect the state
of bootguard in intel based systems. Currently it's WIP and
in a testphase. Handle it with care!

Changes done:
* Add support for reading msr
* Read ME firmware version
* Print bootguard state for ME > 9.1
* Make argument -s legacy
* Add argument -b for bootguard (and ME) dumping
* Add argument -m for ME dumping
* Opt out early if CPU is non Intel

Change-Id: Ifeec8e20fa8efc35d7db4c6a84be1f118dccfc4a
Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/16328
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2017-11-25 12:59:54 +00:00
Patrick Rudolph 5e9dc37818 util/intelmetool: Fix lint errors and warnings
Clean the code to fix all errors and warnings.

No functional change.

Changes:
* Fix lines over 80chars
* Fix typos
* Restructure code to reduce indent level
* Move RCBA handling into own files
* Introduce helper functions for RCBA access
* Move GPL string into header
* Fix whitespace in macros

Change-Id: Ib8e3617ebb34c47959d6619dfbc7189045e6b8f7
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/22521
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2017-11-25 12:55:56 +00:00
Maximilian Schander ae848f8719 util/inteltool: Add Skylake definition to MCHBAR reading
Taken from
   * 6th Generation Intel Processor Families for S-Platform 
       Volume 2 of 2
   * Page 56
   * 332688-003EN

Change-Id: I46c8dd77823870b55cc040f7f6c557cb5a2562a1
Signed-off-by: Maximilian Schander <coreboot@mimoja.de>
Reviewed-on: https://review.coreboot.org/22351
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-11-08 11:42:45 +00:00
Maximilian Schander 798564333d util/inteltool: Add PCIEXBAR and PXPEPBAR reading for Skylake
Both registers behave the same as on the previous generation

Taken from
 * 6th Generation Intel Processor Families for S-Platform
     Volume 2 of 2
 * Page 55 and 62
 * 332688-003EN

Change-Id: Id02a38a7ab51003c9d0f16ebb2300a16b66a15f9
Signed-off-by: Maximilian Schander <coreboot@mimoja.de>
Reviewed-on: https://review.coreboot.org/22350
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-11-08 11:42:26 +00:00
Maximilian Schander 98c11ddc9e util/inteltool: Add Skylake DMIBAR register dumping
Register definitions were taken from
 * 6th Generation Intel Processor Families for S-Platform Volume 2 of 2
 * Page 117
 * 332688-003EN
As well as
 * 6th Generation Intel Processor Families for H-Platform Volume 2 of 2
 * Page 117
 * 332987-002EN

Tested on a 6th gen skylake mobile cpu and capability registers do match up
with the default values.

Change-Id: I636f6c3d045e297f1439d3e88e43f41e03db4c8e
Signed-off-by: Maximilian Schander <coreboot@mimoja.de>
Reviewed-on: https://review.coreboot.org/22345
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-11-08 11:42:20 +00:00
Maximilian Schander bf94292522 util/autoport: Fix VGA register warning
The warning is printed using Printf syntax but actually Println is used
resulting in printing the format string first and the arguments second:
"%s. (%s) Default:%s WARNING: [...]"

Change-Id: I411fc47832dd7a82752f233c4909b98190340ccb
Signed-off-by: Maximilian Schander <coreboot@mimoja.de>
Reviewed-on: https://review.coreboot.org/22352
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2017-11-08 11:42:00 +00:00
Martin Roth 3ce678367c util/release: Update genrelnotes script for 4.7 release
- Fix initial tool check.
- Admit that the script is coreboot specfic.  Remove coreboot check.
- Fix some whitespace issues.
- Get rid of pushd/popd.
- Add keywords for section logging.
- Move code for getting SLOC into a subroutine.
- Find submodules to get patch count instead of having them hardcoded.
- Update specific change areas for 4.7 release

Change-Id: I115659a75604c24780c09605d7643e83e481f6a1
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/22343
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-11-07 12:43:32 +00:00
Maximilian Schander 12217f2878 autoport: Fix nil pointer deref when run without bd82x6x
When autoport is run on a system without supported southbridge
it won't populate the coresponding data structure. By sanitiy
checking after PCI detection autoport can exit cleanly and
provide a sufficient error message.

Error was:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x4be595]
goroutine 1 [running]:
main.FIXMEEC(0xc42014af80, 0x14, 0xc42014afe0, 0x1a, 0xc4200a914f,
	0x4, 0xc4200a916f, 0xf, 0xc420149e60, 0x28, ...)
/coreboot/util/autoport/ec_fixme.go:14 +0x105

Change-Id: I6b0fcda76d33b0d3a0379c279f492160ce5add84
Signed-off-by: Maximilian Schander <maxschander@googlemail.com>
Reviewed-on: https://review.coreboot.org/22203
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2017-11-07 12:31:21 +00:00
Piotr Król 64f87f3541 util/docker: add support for crossgcc building params
In some cases users may want to build just one toolchain not all. This
patch introduces COREBOOT_CROSSGCC_PARAM, which by default is set to
all_without_gdb so previous behavior is not changed. Users can pass
different parameter eg. COREBOOT_CROSSGCC_PARAM=build-x64 to build just
x64 SDK.

Change-Id: I858ba09644b5b86a4b0e828e4f342aee5083be93
Signed-off-by: Piotr Król <piotr.krol@3mdeb.com>
Reviewed-on: https://review.coreboot.org/22276
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-11-05 02:31:16 +00:00
Maximilian Schander 17034d6f63 intelmetool: Print colored capabilities
In general more ME capabilities are considered harmfull, useless or
unwanted. Therefore an easy overview can be obtained by coloring in red
and green.

Taken from Change with id:
Ifeec8e20fa8efc35d7db4c6a84be1f118dccfc4a
Add bootguard information dump support
https://review.coreboot.org/#/c/16328/

Change-Id: Ia911cc935d512174399aaf93bba982e071942212
Signed-off-by: Maximilian Schander <maxschander@googlemail.com>
Reviewed-on: https://review.coreboot.org/22217
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2017-11-03 23:58:41 +00:00
Maximilian Schander df5b83fe2b intelmetool: Do small cosmetic changes
Refining some of the code indentations and cosmetics to
build upon and import some in-review changes.

Change-Id: I0038a146bd899f150518c4832258a42792abaabb
Signed-off-by: Maximilian Schander <maxschander@googlemail.com>
Reviewed-on: https://review.coreboot.org/22216
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2017-11-03 23:58:08 +00:00
Maximilian Schander cb2d21d24d inteltool: Add southbridge and CPU definitions for Skylake
Change-Id: Id9501f11a79cb314bc407760b22006a3375e669d
Signed-off-by: Maximilian Schander <maxschander@googlemail.com>
Reviewed-on: https://review.coreboot.org/22211
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-11-03 16:18:53 +00:00
Iru Cai 68c7118266 autoport: move spi_uvscc and spi_lvscc to devicetree.cb
Change-Id: I36866cc793b3ddf9a78fed2e2840958d08327e7d
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/20486
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-11-01 15:27:20 +00:00
Patrick Georgi cf24226ed9 util/*: don't strip executables
Users can do it if they need it, but we shouldn't force it on them.

Change-Id: I08007d68a79c302d8f3ca4ed0837ee96d8d3eb1e
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/22213
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-10-29 08:48:56 +00:00
Daisuke Nojiri 0c2f0c1d31 cbfstool: Print compression algorithm
This patch adds a column to the print command to show the compression
algorithm used for the file.

Name                           Offset     Type           Size   Comp
fallback/romstage              0x0        stage           56236 none
ecrw                           0xf2380    raw             62162 LZMA (131072 decompressed)

BUG=b:66956286
BRANCH=none
TEST=Run 'cbfstool image.bin print'

Change-Id: I4bbb60ab467adac4ae5486ddafec86ad9682a40e
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://review.coreboot.org/22196
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-28 09:39:59 +00:00
Youness Alaoui f68e3bab9f util/ifdtool: Fix region limitation check
Using ifdtool to change layout on a 'ifd v2' file causes an error
about region type 5 not being valid.
The limit to check against is dynamic depending on ifd version, not
static.

Change-Id: Id4cdce4eac18fb0d171d1bdfa2044340bf93056a
Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm>
Reviewed-on: https://review.coreboot.org/21962
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-10-22 01:51:17 +00:00
Youness Alaoui 5b8f2c7823 intelmetool: Add support for Sunrise Point LP
This was tested on Librem 13 v2.

Change-Id: I4b56ed8a8a394da2ac5e4bfde6916aa1d39b2654
Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm>
Reviewed-on: https://review.coreboot.org/21961
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-10-22 01:49:04 +00:00
Patrick Georgi 44aaf6137d util/genbuild_h: improve robustness against corrupt .git directories
The new test lets git check if $top is actually a git repo, instead of
just looking for clues.

BUG=chromium:776174
BRANCH=none
TEST=`mv .git .foo; mkdir .git; util/genbuild_h/genbuild_h.sh` provides
a valid build.h instead of failing because git is unhappy about the
.git directory.

Change-Id: I7fcc64d66e0b59fca1479b4c142fd0559aa984f4
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/22107
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-10-20 09:40:09 +00:00
Jonathan Neuschäfer fe84292eeb board_status/towiki: Fix link to last report for "clone" boards
I noticed that the "last known good" field for the ThinkPad R400 pointed
nowhere. Instead of

	https://www.coreboot.org/Supported_Motherboards#lenovo.2Ft400

it pointed to

	https://www.coreboot.org/Supported_Motherboards#lenovo.2Fr400

which does not exist because if a board is marked as a "Clone of"
another one in board_info.txt, towiki uses the original board's reports
to derive the "last known good" date and color.

Change-Id: Ie235ca8e8691f49d041de7c5770eae77cdd444a7
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/21906
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-20 02:22:23 +00:00
Martin Roth e7d9248d9f util/docker: Add bc to coreboot-sdk
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-17 03:48:29 +00:00
Iru Cai 776b5ba017 buildgcc: Update binutils to 2.29.1
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-16 13:57:37 +00:00
Paul Menzel 4cde9a752a crossgcc: Build libelf from elfutils 0.170
> 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-16 02:43:01 +00:00
Piotr Król f57f1310c5 util/docker: add nasm to fix tianocore payload compilation
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-16 00:20:27 +00:00
Paul Menzel 38a906b0e1 util: Make TZ environment variable POSIX compatible
`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-14 11:28:14 +00:00
Patrick Georgi 9681cdc1b4 util/crossgcc: Add bootstrap-only mode
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-13 14:51:41 +00:00
Patrick Georgi 5b9a7f5217 util/gitconfig: remove cborg2cros.py
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-11 09:17:30 +00:00
Patrick Georgi 12631a4d1d util/cbfstool: Add "truncate" command
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-10 15:16:17 +00:00
Doug Gale 43ae4336b2 Update URLs in buildgcc
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-08 21:44:17 +00:00
Arthur Heymans 5930285206 autoport: Add GPL boilerplate header to not empty .c files
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-06 13:48:32 +00:00
Arthur Heymans 128205fd08 autoport/bd82x6x.go: Improve gpio.c generation
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-06 13:48:12 +00:00
Martin Roth 0d3b11898b util/amdfwtool: Add option for directory location
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-05 02:49:09 +00:00
Jonathan Neuschäfer 92d483a892 buildgcc: Implement simple tarball hash verification
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-04 02:43:02 +00:00
Aaron Durbin cf20c90430 util/cbmem: fix feedback for 'be explicit about memory map sizes'
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-10-02 17:16:14 +00:00
Aaron Durbin 46300aa2ce util/cbmem: be explicit about memory map sizes
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-28 04:48:52 +00:00
Aaron Durbin f2a3822488 util/cbmem: make data structure accesses const
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-28 04:48:45 +00:00
Jonathan Neuschäfer 7090377a87 smbus: Fix a typo ("Set the device I'm talking too")
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-27 16:38:18 +00:00
Patrick Georgi 5d982d72be util/cbfstool: Add "expand" command to make CBFS span an fmap region
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-20 13:45:00 +00:00
Martin Roth bea2d75f31 util/docker: Update coreboot-sdk dockerfile
- 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-20 01:29:55 +00:00
Martin Roth 387dec815c util/lint: update checkpatch & spelling.txt to upstream versions
- 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-20 01:28:13 +00:00
David Hendricks 588a72210d board_status: Tell user where to find output when results are uploaded
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-20 01:22:41 +00:00
Bill XIE 612ec0ed0a ifdtool: Refactor some code
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-17 21:31:22 +00:00
Bill XIE 4651d4501c ifdtool: redesign some structures
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-17 21:29:57 +00:00
Bill XIE 1bf6506e97 ifdtool: merge region_filenames with region_name(s)
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-17 21:27:55 +00:00
Bill XIE fa5f99430d ifdtool: Const-correct and redesign some functions
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-17 21:27:05 +00:00
David Hendricks c863be7ba4 board_status: Add option to set cbmem path
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-17 01:13:23 +00:00
Patrick Georgi 77343fd668 util/scripts/cross-repo-cherrypick: improve cros-side rewrite
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-15 20:57:57 +00:00
Damien Zammit 0025247171 rmodtool: Increase limit on number of symbols
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-13 19:25:14 +00:00
Martin Roth 7e464dcb85 util/lint: Exclude external payloads from coreboot lowercase check
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-13 18:54:10 +00:00
Kyösti Mälkki eab5c12ee0 util/cbmem: Pretty print STAGEx_META and _CACHE
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-06 17:25:23 +00:00
Patrick Georgi e41b0d09ba util/testing: Don't keep tegra lp0 build results
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-06 11:36:27 +00:00
Patrick Georgi cdd3a4327b util/testing: Also test-build tegra's lp0 resume code
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-06 08:23:41 +00:00
Shawn Chang 027af74999 intelmetool: Add support for Sunrise Point-H
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-06 04:35:02 +00:00
Damien Zammit b40c72ae18 abuild: Allow building with any toolchain
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-06 04:31:30 +00:00
Idwer Vollering 1918c81d65 util/board_status: do a spell check
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-04 08:27:27 +00:00
Nico Huber 3f12d9321a buildgcc: Fix up cross GCC building
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-02 15:30:52 +00:00
Damien Zammit adb026f76a clang: Enable integrated assembler on clang builds
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-02 15:21:35 +00:00
Martin Roth 1f3daeab41 util/lint/checkpatch: Untaint variables from env & command line
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-02 15:17:58 +00:00
Stefan Reinauer f3e23a3135 buildgcc: Integrate nds32 update from Andes Technology
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-09-01 12:32:36 +00:00
Maciej Suminski 3a44b6a34c util/msrtool: Exit program after displaying the help message
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-22 10:10:49 +00:00
Maciej Suminski d5fb99eab6 util/inteltool: Remove duplicated error message, switch to snprintf
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-22 10:10:34 +00:00
Maciej Suminski 3455672797 util/inteltool: Fix a comparison between signed and unsigned integers
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-20 21:45:10 +00:00
Nicola Corna 98f30340cf util/me_cleaner: Pull the latest changes from upstream
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-20 21:19:47 +00:00
Iru Cai 457fba6be5 kbc1126_ec_dump: fix some errors
- 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-18 15:32:08 +00:00
Martin Roth 992d8a7711 util/lint: Change final-newlines to lint-test from lint-extended-test
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-17 11:27:02 +00:00
Martin Roth 0bb936da9a lint: update signed-off-by check
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-17 11:26:31 +00:00
Idwer Vollering b2b1d66826 util/kbc1126: [cosmetic] change Makefile casing
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-16 18:23:09 +00:00
Idwer Vollering e2ef3cf8e3 buildgcc: surround *.log with apostrophes when build fails
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-15 20:05:21 +00:00
Martin Roth ea383676cf Makefile.inc: lint: Update to run lint-extended scripts
- 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-14 18:05:41 +00:00
Martin Roth 35bfb9d9be util/lint: add extended stable checkpatch for testing
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>
2017-08-14 18:05:02 +00:00
Idwer Vollering 6dc3492355 util/cbmem, util/cbfstool: resolve macro errors on FreeBSD
Using sys/cdefs.h would come to mind,
however this include would not solve the build error.

Built and runtime tested on FreeBSD 12.0-CURRENT, r322031

Change-Id: I6ec9bc7fea72aa69a41439e002f381bd5e5b6bc6
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-on: https://review.coreboot.org/20924
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-08-11 18:54:23 +00:00
Martin Roth 6c9c196f1c copy & update test routines from what-jenkins-does
Currently the only testing we had was 'what-jenkins-does' and
'make lint'. While the lint testing is suitable for developers,
the 'what-jenkins-does' target really isn't, as it was designed
specifically for testing on jenkins.

This adds the infrastructure for basic tests that are more suitable
for the developer. Extended tests and improvements will follow.

Add the coreboot-builds directories to .gitignore.

TODO:
- Save/restore .config
- Update test-abuild to use existing COREBOOT_BUILD_DIR variable

Change-Id: I19e1256d79531112ff84e47a307f55791533806f
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20874
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chris Ching <chingcodes@google.com>
2017-08-11 15:24:56 +00:00
Martin Roth e624e270e6 Make: Move testing into a subdirectory
In preparation for expanding the testing, move the test targets
out of the top level Makefile.inc and into a separate
subdirectory.

Change-Id: Ie252c7555223f9ce76b54e6f7b66d03f3cf60500
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20873
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chris Ching <chingcodes@google.com>
2017-08-11 15:24:49 +00:00
Martin Roth ed0ee0a83d util/lint: Update license header lint scripts
- 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-10 15:53:17 +00:00
Martin Roth 7eab2889d1 lint: Update lint-stable-021-coreboot-lowercase
- 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-10 15:50:49 +00:00
Aaron Durbin 8304d6fcbe util/lint: provide option to skip newline check
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-09 17:47:23 +00:00
Caveh Jalali 0068a9f579 add __must_check to */compiler.h
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-08 18:18:03 +00:00
Stefan Reinauer 2f0d4efa20 buildgcc: Fix libelf 64bit detection
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-07 21:47:23 +00:00
Stefan Reinauer dcce8bef0e buildgcc: Update to gdb 8.0 and expat 2.2.1
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-07 21:47:17 +00:00
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
Julius Werner be3aa04f21 cbmem: Escape literal asterisks in log banner regex
I had a stupid. :( Asterisks have a special meaning in regexes, but I
just wanted to match three literal ones. This kills the regex parser.

Change-Id: Ia6149e72715d651c914583ed3235680ce5b7a2e0
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/20171
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
2017-06-14 02:17:14 +02:00
Paul Menzel 459d2198eb msrtool: Remove `no-pic` from `CFLAGS`
Commit 7c634ae8 (msrtool: added support for Intel CPUs) adds `no-pic` to
the compiler flags.

GCC 7.0.1 20170316 fails to built with the error below.

```
/usr/bin/ld: msrtool.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: msrutils.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: sys.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: linux.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: freebsd.o: relocation R_X86_64_32S against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
```

Removing the flag causes the build to succeed with GCC 7, 6.3, and clang
4.0.

Change-Id: I3d7aed27ce7f84aa27305c68e2d5f14607c58ec8
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/18907
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Tauner <stefan.tauner@gmx.at>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-09 16:32:54 +02:00
Nico Huber 21e7424fc9 inteltool: Add Skylake PCI id in memory.c
Change-Id: I751e887bd90a258a69d13ea4ee9a409c8c86a3c3
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/19591
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-09 16:25:20 +02:00
Paul Kocialkowki 37afb270b4 crossgcc: Resolve pointer and integer comparison in GCC
GCC version 7 is being a bit picky about pointer and integer comparison
by default, which triggers a crossgcc build error.

This backports a patch from upstream GCC to fix the issue.

Change-Id: I8b1e806c10604c0df080ac5edc667bf1141e2c17
Signed-off-by: Paul Kocialkowki <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/20103
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: Patrick Georgi <pgeorgi@google.com>
2017-06-08 23:29:15 +02:00
Martin Roth 811d93af39 util/lint: Give better warning for help spacing issue
Because the help block uses significant whitespace to determine whether
or not text is inside the help block, a mixture of spaces and tabs
confuses the parser.
If there's an unrecognized line, and the previous line was inside a help
block, it's likely that this line is too.

Additionally, this was found with a line that started '  configuration',
and threw a perl warning about an uninitialized value because the parser
thought this was the start of a new config line, but couldn't find the
symbol.  Now we make sure that config statements have whitespace after
the 'config' statement.

Change-Id: I46375738a18903b266ea9fff3102a1a91235e609
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/19155
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-07 23:13:38 +02:00
Martin Roth 8849f3be4a util/lint/kconfig_lint: update help checking
- Turn the check for help text with no indentation from a warning to
an error.
- Show an error if the help text is at the same indentation level as
the 'help' keyword.

Change-Id: Ibf868c83e2a128ceb6c4d3da7f2cf7dc237054e6
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/19851
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2017-06-07 23:12:40 +02:00
Paul Menzel d2bbaffe40 abuild: Remove space before tab
Fix up commit 26174c97 (abuild: Build saved config files)
unintentionally adding a space before a tabulator.

Change-Id: Ic51dee6ed9d640335c2bde5bd5dfad3691c505e0
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/17778
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-07 20:37:35 +02:00
Paul Menzel 59e2113670 Use www.coreboot.org over coreboot.org
<https://coreboot.org> is redirected to <https://www.coreboot.org>.

```
$ curl -I https://coreboot.org
HTTP/1.1 301 Moved Permanently
Server: nginx/1.8.1
Date: Mon, 05 Jun 2017 10:41:33 GMT
Content-Type: text/html
Content-Length: 184
Connection: keep-alive
Location: https://www.coreboot.org/

```

So use the command below to use the final location to save a redirect.

```
$ git grep -l https://coreboot.org \
| xargs sed -i 's,https://coreboot.org,https://www.coreboot.org,g'
```

Change-Id: I4176c20ef31399f0063b41e3a0029cca0c1b0ff3
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/20035
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-06-07 12:05:44 +02:00
Paul Menzel a8843dee58 Use more secure HTTPS URLs for coreboot sites
The coreboot sites support HTTPS, and requests over HTTP with SSL are
also redirected. So use the more secure URLs, which also saves a
request most of the times, as nothing needs to be redirected.

Run the command below to replace all occurences.

```
$ git grep -l -E 'http://(www.|review.|)coreboot.org'
| xargs sed -i 's,http://\(.*\)coreboot.org,https://\1coreboot.org,g'
```

Change-Id: If53f8b66f1ac72fb1a38fa392b26eade9963c369
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/20034
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-06-07 12:04:50 +02:00