Commit graph

2939 commits

Author SHA1 Message Date
Patrick Rudolph
5c11f09758 UPSTREAM: util/ifdtool: Fix ICH Gbe unlock
With coreboot 4.4 switched to "Descriptor mode" for Lenovo T500
it automatically unlocks all flash regions. For Gbe region
the "Requester ID" was hardcoded resulting in *dead* Gbe.

Keep board specific "Requester ID" while unlocking Gbe region.

Allows Lenovo T500 to boot with IFD "Descriptor mode" with unlocked
flash regions.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>

BUG=none
BRANCH=none
TEST=none

Change-Id: I13431250395e34578baca957eb714191a9e0d2fe
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 8a06cc7ec8
Original-Change-Id: Ia4b5d1928e84bee42182fc83020e3a13fadc93c4
Original-Reviewed-on: https://review.coreboot.org/18055
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/438052
2017-02-06 10:37:40 -08:00
Patrick Georgi
ae20cc56cc various cleanups from upstream
These were done during upstreaming (ie. to the commits directly), so
there's no correspondence as individual CLs for these.
The "Reviewed-on" list below is a catch-all to help gerrit-rebase ignore
changes that were handled one way or another but aren't tracked.

BUG=none
BRANCH=none
TEST=with various up/downstreaming CLs merged,
$ git diff --stat cros/chromeos-2016.05 origin/master # has only a very
small set of remaining changes (COMMIT-QUEUE.ini etc, git submodules)

Change-Id: I9c2cee7fbadbc1393ca0fb1c3b4f7a1ddb48341b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Ignore-CL-Reviewed-on: https://review.coreboot.org/15122
Ignore-CL-Reviewed-on: https://review.coreboot.org/15604
Ignore-CL-Reviewed-on: https://review.coreboot.org/15919
Ignore-CL-Reviewed-on: https://review.coreboot.org/16021
Ignore-CL-Reviewed-on: https://review.coreboot.org/16055
Ignore-CL-Reviewed-on: https://review.coreboot.org/16253
Ignore-CL-Reviewed-on: https://review.coreboot.org/17061
Ignore-CL-Reviewed-on: https://review.coreboot.org/17179
Ignore-CL-Reviewed-on: https://review.coreboot.org/17185
Ignore-CL-Reviewed-on: https://review.coreboot.org/17340
Ignore-CL-Reviewed-on: https://review.coreboot.org/17366
Ignore-CL-Reviewed-on: https://review.coreboot.org/17775
Ignore-CL-Reviewed-on: https://review.coreboot.org/17872
Ignore-CL-Reviewed-on: https://review.coreboot.org/17875
Ignore-CL-Reviewed-on: https://review.coreboot.org/17962
Ignore-CL-Reviewed-on: https://review.coreboot.org/18023
Ignore-CL-Reviewed-on: https://review.coreboot.org/18158
Ignore-CL-Reviewed-on: https://review.coreboot.org/18170
Ignore-CL-Reviewed-on: https://review.coreboot.org/18171
Ignore-CL-Reviewed-on: https://review.coreboot.org/18172
Ignore-CL-Reviewed-on: https://review.coreboot.org/18205
Reviewed-on: https://chromium-review.googlesource.com/427824
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2017-02-06 05:03:19 -08:00
Steven Dee
3f05b0ec99 UPSTREAM: ectool: Support OpenBSD
Adds checks for OpenBSD in all the places that were already checking for
NetBSD. This fixes e.g.:

    ec.c:21:20: error: sys/io.h: No such file or directory

which was caused by defaulting to Linux.

Also, OpenBSD calls its amd64 iopl amd64_iopl instead of x86_64_iopl.
This change just defines iopl appropriately depending on the
OS and architecture.

TEST=Build on OpenBSD 6.0 or -current from 2017-01-25.

Change-Id: I71f8793f5145bd8b8f58c765e91a31913ee143ac
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 3236f7be09
Original-Change-Id: If6d92a9850c15cd9f8e287cc4f963d3ff881f72c
Original-Signed-off-by: Steven Dee <i@wholezero.org>
Original-Reviewed-on: https://review.coreboot.org/18260
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/435812
2017-02-03 09:08:55 -08:00
Patrick Georgi
54fea2b927 UPSTREAM: util/xcompile: parallelize compiler checks
Speed up the execution of this script from ~6 seconds to ~1 on my
system.

There are some changes to its output, but they're actually _more_
correct: so far, architectures without compiler support kept compiler
options for architectures that ran successfully earlier.

BUG=none
BRANCH=none
TEST=none

Change-Id: I9944c810f432266e99a70a3c3cd9f1fc0fd5ef35
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: be182ad380
Original-Change-Id: I0532ea2178fbedb114a75cfd5ba39301e534e742
Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-on: https://review.coreboot.org/18262
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/435402
2017-01-31 17:07:38 -08:00
Iru Cai
d89d0caea2 UPSTREAM: autoport: add missing parameter for pc_keyboard_init()
This fixes the build for the generated code for boards with PS/2
keyboard, since commit 448e386309 updated the pc_keyboard_init()
function.

BUG=none
BRANCH=none
TEST=none

Change-Id: I02c1eaa937c3a3f3be0ca912091d132577f8e351
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 8bf53a9f4e
Original-Change-Id: I776b49b847985296eaca4af6d6e49ab5d6abbafe
Original-Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18242
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/434482
2017-01-30 10:20:31 -08:00
Arthur Heymans
0b12698f41 UPSTREAM: board_status/towiki.sh: Add socket LGA775
Intel Core 2 is not further specified since not all chipsets support
quad cores, which could confuse users.

BUG=none
BRANCH=none
TEST=none

Change-Id: I307abdaa1a3947a2fba21623aab6e40aadeff446
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 017b56558f
Original-Change-Id: I86c0a41743fe784f432347fa639d3c26604e058e
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18235
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/433981
2017-01-28 04:11:06 -08:00
Martin Roth
394a5c128b UPSTREAM: util/docker: Update makefile target names
- Use dashes instead of underscores for consistency and to match other
coreboot targets
- Fix a couple of places where old target names were referenced
- Remove double 'help' target from .PHONEY target list

BUG=none
BRANCH=none
TEST=none

Change-Id: I7299b7aba9316f14dc963d3edaf313ce4c70cb11
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 9ee70ce587
Original-Change-Id: I3b464ebf74653a8cc880e982316fd883757ec728
Original-Signed-off-by: Martin Roth <gaumless@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18000
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/433980
2017-01-28 04:11:05 -08:00
Martin Roth
84bca287b5 UPSTREAM: util/docker: Update makefile with command to kill docker images
Kill running docker containers before trying to remove images or
containers.

BUG=none
BRANCH=none
TEST=none

Change-Id: I6768e6f931e62ca9e079f4a13728581484d3b4f0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: af25fd78e8
Original-Change-Id: Id2de90edbe5d0dc6ecb906be7101ad9744dbd11e
Original-Signed-off-by: Martin Roth <gaumless@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/17999
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/433979
2017-01-28 04:11:05 -08:00
Martin Roth
e90bc42dff UPSTREAM: board_status/to-wiki: Update bucketize script
- Fix TODO: restrict $1 to allowed values.
- Specifically exclude 'oem' board status directories.
- Exclude any directory that doesn't follow the date format to keep
the script from breaking again in the future if something it doesn't
recognize is pushed.  Just ignore it for the wiki.
- Fix shellcheck warnings.

BUG=none
BRANCH=none
TEST=none

Change-Id: I55cee2d8a6fc1a605d77f6cc6d9eb9e2defa4872
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 27f3ce6337
Original-Change-Id: I2864f09f5f1b1f5ec626d06e4849830400ef5814
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/18225
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Timothy Pearson <tpearson@raptorengineering.com>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/433884
2017-01-28 04:11:04 -08:00
Nicola Corna
e3c2e05353 UPSTREAM: util: Add me_cleaner
me_cleaner is a tool to strip down Intel ME/TXE images by removing all
the non-fundamental code, while keeping the ME/TXE image valid and
suitable for booting the system. The remaining code (ROMP and BUP
modules) is the one responsible for the very basic initialization of
the ME/TXE subsystem and can't be removed.

This tool exploits the fact that:
 * Each ME/TXE partition is signed individually and it is possible to
    remove both the partition and the signature.
 * The ME/TXE modules are not signed directly, instead they are hashed
    and the list of their hashes is hashed again and signed: this
    means that modifying a module doesn't invalidate the signature,
    but only the hash of that single module.
 * The modules hashes are checked only when the corresponding module
    needs to be executed.
 * The system can boot after the execution of the first module (BUP,
    inside the FTPR partition), even if the subsequent stages fail.

Currently me_cleaner works on every Intel platform with Intel ME or
Intel TXE with the following limitations:
 * Doesn't work when Intel Boot Guard is set in Verified Boot mode.
 * Doesn't fully work on Nehalem yet.
 * On Skylake and later generations, since the partitions' internal
    structure has changed, me_cleaner leaves intact the FTPR
    partition, removing all the the other partitions.

This tool has been tested on multiple platforms and architectures by
different users, and seems to be stable. The reports are available
here:
https://github.com/corna/me_cleaner/issues/3

A more in-depth description of me_cleaner is available here:
https://github.com/corna/me_cleaner/wiki/How-does-it-work%3F

BUG=none
BRANCH=none
TEST=none

Change-Id: I4d697041a6d9df503d17a0e30fef4713120dddb7
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 9bcc002f1e
Original-Change-Id: I9013799e9adea0dea0775b9afe718de5fc4ca748
Original-Signed-off-by: Nicola Corna <nicola@corna.info>
Original-Reviewed-on: https://review.coreboot.org/18203
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://chromium-review.googlesource.com/432759
2017-01-27 07:48:59 -08:00
Patrick Georgi
484e33c460 UPSTREAM: cbfs-compression-tool: catch compression failures
If compression failed, just store the uncompressed data, which is what
cbfstool does as well.

BUG=chrome-os-partner:62235
BRANCH=none
TEST=none

Change-Id: I41f911169f376be3dab1335d93e1b3ff68ad7377
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b46c4ecaba
Original-Change-Id: I67f51982b332d6ec1bea7c9ba179024fc5344743
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18201
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/430741
2017-01-24 07:14:50 -08:00
Dan Elkouby
16f8968695 UPSTREAM: util/intelmetool: Try to activate the ME before scanning PCIe for it
When the ME is hidden (most likely because it was disabled), it cannot
be found until activate_me() is called.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ifef2392e067c2075fafe6c83a3560dcedb2bf75d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: e8ad3c7b95
Original-Change-Id: Ie1f65f61eb131577d7254af582e2709660f4da27
Original-Signed-off-by: Dan Elkouby <streetwalrus@codewalr.us>
Original-Reviewed-on: https://review.coreboot.org/18149
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/430616
Commit-Ready: Aaron Durbin <adurbin@chromium.org>
Tested-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-22 05:03:18 -08:00
Martin Roth
639a030e9d UPSTREAM: util/lint: Add a tool to verify a single newline at the end of files
This takes way too long to run - currently about 30 seconds to look
at the entire coreboot tree.

Change-Id: I5edc77bc808665ef9832970f5a6458ffe8c04ee1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 2e03fbced7
Original-Change-Id: I403934014b422528715ea95ff652babe5e18c88b
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/15976
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/430716
2017-01-20 08:47:59 -08:00
Nico Huber
f46162070a UPSTREAM: cbfstool: Don't use le32toh(), it's non-standard
It's a BSD function, also, we missed to include `endian.h`.

Just including `endian.h` doesn't fix the problem for everyone.
Instead of digging deeper, just use our own endian-conversion from
`commonlib`.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ideec790c2ef2f5a97908a589908d8666e61bab65
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 607796a4ff
Original-Change-Id: Ia781b2258cafb0bcbe8408752a133cd28a888786
Original-Reported-by: Werner Zeh <werner.zeh@siemens.com>
Original-Signed-off-by: Nico Huber <nico.huber@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/18157
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://chromium-review.googlesource.com/430181
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2017-01-19 06:11:14 -08:00
Patrick Georgi
3c1f742a08 UPSTREAM: util/scripts: extend cross-repo-cherrypick
The script now automatically discovers the original branch (if known)
and configures itself appropriately.
Additionally, commit messages for changes coming _from_ upstream will
be prefixed with "UPSTREAM: ".
With the optional --cros argument, it also adds a BUG/BRANCH/TEST block
at the right place in the commit message (right above the metadata) if
one doesn't already exist.

BUG=none
BRANCH=none
TEST=none

Change-Id: I7ad3fb5317d9e3090f43ea983fcfb2ab099c43a4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6f27edd377
Original-Change-Id: I81864ddca62fd99a9eb905d7075e5b53f58c4eb5
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18135
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/430179
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2017-01-19 06:11:09 -08:00
Patrick Georgi
59e999ed71 UPSTREAM: util/cbfstool: Enable adding precompressed files to cbfs
cbfstool ... add ... -c precompression assumes the input file to be
created by cbfs-compression-tool's compress command and uses that to add
the file with correct metadata.

When adding the locale_*.bin files to Chrome OS images, this provides a
nice speedup (since we can parallelize the precompression and avoid
compressing everything twice) while creating a bit-identical file.

BUG=chromium:630451
BRANCH=none
TEST=with the necessary tweaks to the build system,
emerge-kevin chromeos-bootimage takes 0:25 instead of 3:10 before on the
z620 I work on, about a magnitude faster.

Change-Id: Ib99b8c4960e174ea5b9a5077ca49992a93d7bd41
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Change-Id: Iadd106672c505909528b55e2cd43c914b95b6c6d
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18102
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/427703
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2017-01-13 18:42:07 -08:00
Patrick Georgi
f905d67b49 UPSTREAM: util/cbfstool: Add cbfs-compression-tool
cbfs-compression-tool provides a way to benchmark the compression
algorithms as used by cbfstool (and coreboot) and allows to
pre-compress data for later consumption by cbfstool (once it supports
the format).

For an impression, the benchmark's results on my machine:

measuring 'none'
compressing 10485760 bytes to 10485760 took 0 seconds
measuring 'LZMA'
compressing 10485760 bytes to 1736 took 2 seconds
measuring 'LZ4'
compressing 10485760 bytes to 41880 took 0 seconds

And a possible use for external compression, parallel and non-parallel
(60MB in 53 files compressed to 650KB on a machine with 40 threads):

$ time (ls -1 *.* |xargs -n 1 -P $(nproc) -I '{}' cbfs-compression-tool compress '{}' out/'{}' LZMA)

real	0m0.786s
user	0m11.440s
sys	0m0.044s

$ time (ls -1 *.* |xargs -n 1 -P 1 -I '{}' cbfs-compression-tool compress '{}' out/'{}' LZMA)

real	0m10.444s
user	0m10.280s
sys	0m0.064s

BUG=chromium:630451
BRANCH=none
TEST=manual execution of the tool works

Change-Id: If2ac452dae4180b5df516a99808008ce41922621
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Change-Id: I40be087e85d09a895b1ed277270350ab65a4d6d4
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18099
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/427702
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2017-01-13 18:42:05 -08:00
Patrick Georgi
bc3460aa65 UPSTREAM: util/cbfstool: compile with -O2 by default
This speeds up the lzma encoder approximately four-fold.

BUG=chromium:630451
BRANCH=none
TEST=emerge-$board chromeos-bootimage's set of adding static assets it
noticeably faster

Change-Id: Ie8cc9b6106ac72c0b0e96bcd76bb7d13d48b2025
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Change-Id: Ibf896098799693ddd0f8a6c74bda2e518ecea869
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18098
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/427701
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2017-01-13 18:42:03 -08:00
Patrick Georgi
f53459ab14 UPSTREAM: buildgcc: try curl if wget is not present
There are systems that come with curl but not wget (eg macOS) and they
now have to install one less additional dependency.

Also fix some cosmetic issues in console output and require valid
certificates on https downloads.

BUG=none
BRANCH=none
TEST=none

Change-Id: I1005b5f46fd2d79cf7f506c1e83280ff50fafa78
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: df1ff231e4
Original-Change-Id: Idc2ce892fbb6629aebfe1ae2a95dcef4d5d93aca
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18048
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/427470
2017-01-13 15:22:02 -08:00
Martin Roth
4ce8f1b641 UPSTREAM: util/abuild: Print list of failed boards at the end of the abuild
When running abuild outside of jenkins, because all of the builds are
printed intermixed, it's easy to miss when a board has failed the build
by looking at the output.  This saves a list of failed builds and prints
the list at the end of the run.

- Add a command line option to mark when abuild is being called
recursively.
- Add all failed builds to a list.
- Print the list when a non-recursive abuild run exits.

BUG=none
BRANCH=none
TEST=none

Change-Id: I9d84e4d85427ad39d9ed6607b9665ba8ed37f667
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 047c2f44b0
Original-Change-Id: Icb40ed8083a57bbcde49297d2b0814f98dcbb6c8
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/17890
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/427467
2017-01-13 15:21:55 -08:00
Sebastian 'Swift Geek' Grzywna
82f66c4087 UPSTREAM: util/autoport: Fix gfx dump of log_maker
Variable name of inteltoolArgs was fixed.

The way of passing arguments to inteltool was changed from "-a -f"
to "-af" which is better as the string seems to be parsed
as a single argument.

BUG=none
BRANCH=none
TEST=none

Change-Id: I48729ca606b86f2a73b9c1dd2be686ba482906cc
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: e6bd18f6b5
Original-Change-Id: I0c48fb1e912261748ba9e2b91c291bac28b9e856
Original-Signed-off-by: Sebastian 'Swift Geek' Grzywna <swiftgeek@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18050
Original-Reviewed-by: Stefan Tauner <stefan.tauner@gmx.at>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/427466
2017-01-13 15:21:53 -08:00
Martin Roth
4a5cc9cb44 UPSTREAM: util/lint: Add check for the signed-off-by line
Gerrit will let you push a patch without a signed-off-by line,
although I believe it can't actually be merged.  Instead of catching
it either manually, or when the patch is attempting to be merged,
catch this in the jenkins builder.

BUG=none
BRANCH=none
TEST=none

Change-Id: I5964d9b029ddbc72e39ca9c9db0def8d9f8d61b8
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 23ceb7d240
Original-Change-Id: I80161befa157266dd4e3209839a06ff398aab6bb
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/17941
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/427464
2017-01-13 15:21:48 -08:00
Patrick Georgi
c1e1da8f10 UPSTREAM: util/romcc: avoid shifting more than the variable's width
That's undefined behavior in C

Change-Id: I671ed8abf02e57a7cc993d1a85354e905f51717d
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Found-by: Coverity Scan #1229557
Original-Reviewed-on: https://review.coreboot.org/18014
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/425983
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-01-09 23:46:53 -08:00
Martin Roth
ca15229e16 UPSTREAM: util/crossgcc: update jenkins-build-toolchain
This allows the make jenkins-build-toolchain to use the
BUILDGCC_OPTIONS variable.  Previously, the options were hardcoded.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17766
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>

Change-Id: I5f4c1d3fc8c714ec3640356ae3c86ae157f486d2
Reviewed-on: https://chromium-review.googlesource.com/425295
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:01:48 -08:00
Nico Huber
f69d14a570 UPSTREAM: buildgcc: Remove quotes around a $CC call
If we use ccache we have to interpret spaces in $CC as separation
characters. The downside is that we can't support spaces in the
compiler's path. But, well...

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/18018
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)

Change-Id: I4e6e6324389354669a755f570083a40ff00b1bbf
Reviewed-on: https://chromium-review.googlesource.com/425294
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:01:45 -08:00
Patrick Georgi
d2ff5f7d3b UPSTREAM: util/romcc: remove dead assignments
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: scan-build (clang 3.8)
Reviewed-on: https://review.coreboot.org/18021
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: Iab6fe065faeacfca3b41eb5bae1075dcfb1a2b05
Reviewed-on: https://chromium-review.googlesource.com/425288
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:01:33 -08:00
Patrick Georgi
88a9311bae UPSTREAM: util/romcc: Ensure that bit shift is valid
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1287090
Reviewed-on: https://review.coreboot.org/18020
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: Idbe147c1217f793b0360a752383203c658b0bdce
Reviewed-on: https://chromium-review.googlesource.com/425287
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:01:30 -08:00
Patrick Georgi
707db62c59 UPSTREAM: util/romcc: avoid leaking a type
Only allocate ptr_type when it's actually used.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1129117
Reviewed-on: https://review.coreboot.org/18017
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: Iea5f93601a42f02a1866bdff099f63935fdd5b8d
Reviewed-on: https://chromium-review.googlesource.com/425286
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:01:28 -08:00
Patrick Georgi
a722342286 UPSTREAM: util/romcc: avoid dereferencing NULL pointer
argv is only filled for macro->argc > 0.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1287089
Reviewed-on: https://review.coreboot.org/18016
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I5ff21098384afc823efa14be3d5565507fb2b3b2
Reviewed-on: https://chromium-review.googlesource.com/425285
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:01:25 -08:00
Patrick Georgi
1cb1fca53b UPSTREAM: util/romcc: free variable after use
closure_type is copied then never used again. Close that leak.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1287073
Reviewed-on: https://review.coreboot.org/18015
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: Idd4201f7fc6495fde5ad2e1feb7e499e38986e92
Reviewed-on: https://chromium-review.googlesource.com/425284
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:01:23 -08:00
Martin Roth
05b346bbc3 UPSTREAM: util/abuild: Don't set XGCCPATH if it's in the environment
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17723
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>

Change-Id: I0fa231ca3d33300a671810e994c5be54ac10a18b
Reviewed-on: https://chromium-review.googlesource.com/425280
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:01:13 -08:00
Arthur Heymans
cc393085fb UPSTREAM: util/inteltool: Add ICH6-10 to BIOS_CNTL list
Without this change inteltool cannot read BIOS_CNTL values nor can it
read the SPIBAR values.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17979
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I9ff16e060aca66e3cb11c8315a6843ccecd1d3c2
Reviewed-on: https://chromium-review.googlesource.com/425277
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:01:06 -08:00
Arthur Heymans
dff619441a UPSTREAM: util/inteltool: Fix ICH SPIBAR registers
The ICH7 SPIBAR offset and registers are different from later
generation.
ICH8 has a different offset from later generation.
ICH6 has no SPI controller.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17978
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I7691bce619089b15805114047bcb1fd121a5722b
Reviewed-on: https://chromium-review.googlesource.com/425276
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:01:04 -08:00
Arthur Heymans
8e5d02d266 UPSTREAM: superiotool: Add support for HWM registers on W83627EHG
Based on datasheet: "W83627EHF/EF W83627EHG/EG WINBOND LPC I/O,
Revision : 1.0"

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17457
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: Ia2e5ab8bc454a34a89fe2cf06bfba55261109785
Reviewed-on: https://chromium-review.googlesource.com/425273
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:00:56 -08:00
Arthur Heymans
a27b4f24cc UPSTREAM: superiotool: Add support for HWM registers on W83627DHG
Based on datasheet: "W83627DHG WINBOND LPC I/O, Version: 1.4"

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17964
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: Id20dff7539d926ef6f68265efbfc7420539d9bca
Reviewed-on: https://chromium-review.googlesource.com/425272
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:00:54 -08:00
Patrick Georgi
04f16d5a2e UPSTREAM: util/cbfstool: Don't print region information on stderr by default
It's usually not too interesting, so hide it behind -v.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/17899
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: Icffb5ea4d70300ab06dfa0c9134d265433260368
Reviewed-on: https://chromium-review.googlesource.com/425268
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:00:44 -08:00
Paul Menzel
82651df8e2 UPSTREAM: util/intelmetool: Fix warning building with 32-bit
On a 32-bit system, pointers are 32-bit wide, and not 64-bit, resulting
in the warning below.

```
mmap.c: In function map_physical_exact:
mmap.c:26:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   virt_addr = mmap((void*)mapto, len, PROT_WRITE | PROT_READ,
                    ^
```

Fix this by using compatible types.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/17970
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I4ede26127efcbd5668b978e6880a0535607e373d
Reviewed-on: https://chromium-review.googlesource.com/425262
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:00:30 -08:00
Nico Huber
e4adc5c60e UPSTREAM: buildgcc: Indicate CXXFLAGS for binutils
CXXFLAGS seems to be used a lot and have to be specified independently
from CFLAGS.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/17937
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: Iff4c76e54a46e908299b532fd848165a3dc04d43
Reviewed-on: https://chromium-review.googlesource.com/425261
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:00:28 -08:00
Nico Huber
f5a0ee7a42 UPSTREAM: buildgcc: Fix string comparison operator
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/17942
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I8ff8d51507dcf12cd554c8b4713074a99e47c11e
Reviewed-on: https://chromium-review.googlesource.com/425260
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:00:25 -08:00
Nico Huber
5e43c61461 UPSTREAM: buildgcc: Build GMP --with-pic if GCC defaults to -pie
GCC 6 can optionally default to building all binaries as position
independent executables (PIE). This breaks linking against static
libraries that are compiled without position independent code (PIC).

Building GMP `--with-pic` in this case seems to be the least fragile
solution.

TEST=Run `make all` and `make BUILDGCC_OPTIONS=-b build-i386` in
     util/crossgcc on Debian Stretch.

BUG=None
BRANCH=None

Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/17936
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>

Change-Id: I5f3185af9c8d599379a628e18724b217b88be974
Reviewed-on: https://chromium-review.googlesource.com/425258
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-05 11:00:21 -08:00
Patrick Georgi
fcb772c2f2 UPSTREAM: util/romcc: Don't read 'member' if it might be NULL
The earlier loop exits gracefully iff i == index. In other cases, member
might be NULL, so check that the scan was successful before using its
results.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1129147
Reviewed-on: https://review.coreboot.org/17887
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I818c233d797d82fa819243c4626dd9c4b7de3ac6
Reviewed-on: https://chromium-review.googlesource.com/422219
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-12-19 09:54:37 -08:00
Patrick Georgi
9597841a3b UPSTREAM: util/broadcom: Check for successful file access
Change-Id: I5c77b3c5ea3fbc249a8c564a521c2c3c45e1c560
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1323510
Reviewed-on: https://review.coreboot.org/17877
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/421284
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-12-19 09:54:20 -08:00
Patrick Georgi
bd3c7e71f8 UPSTREAM: util/romcc: remove self-assignment
Change-Id: I0f78b55b28011cdefc90665bca2a7ea17647e955
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Found-by: Coverity Scan #1129127
Original-Reviewed-on: https://review.coreboot.org/17885
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/421219
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2016-12-16 15:42:09 -08:00
Patrick Georgi
7cd937c15c UPSTREAM: util/romcc: Move access after NULL-check
Change-Id: I7f9c38fd6e75b32fe1ed8a60c7054f4dd1fcd5c0
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Found-by: Coverity Scan #1129104
Original-Reviewed-on: https://review.coreboot.org/17884
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/421218
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2016-12-16 15:42:06 -08:00
Patrick Georgi
7c655b3316 UPSTREAM: util/romcc: Fix resource leak
Change-Id: I0d260254bab714ec939fc199b3a133b0fc05b10d
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Found-by: Coverity Scan #1129112
Original-Reviewed-on: https://review.coreboot.org/17883
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/421217
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2016-12-16 15:42:04 -08:00
Patrick Georgi
02ba75a7c6 UPSTREAM: util/broadcom: Add two more NULL checks
Change-Id: I088730fd87dd39fa2c36a06c5770fad05a5808b0
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Found-by: Coverity Scan #1323511, #1323512
Original-Reviewed-on: https://review.coreboot.org/17882
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/421216
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2016-12-16 15:42:01 -08:00
Patrick Georgi
07f561c2cb UPSTREAM: util/broadcom: Check return value of stat()
Change-Id: Ib53408e8b186c07aa8e42c67131d39c4add05983
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Found-by: Coverity Scan #1323515
Original-Reviewed-on: https://review.coreboot.org/17881
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/421215
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2016-12-16 15:41:59 -08:00
Patrick Georgi
33b86a139c UPSTREAM: util/broadcom: Initialize variable
It's later tested for NULL, but never initialized to make that test work
reliably.

Change-Id: Iadee1af224507a6dd39956306f3eafa687895176
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Found-by: Coverity Scan #1323515
Original-Reviewed-on: https://review.coreboot.org/17880
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/421214
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2016-12-16 15:41:57 -08:00
Patrick Georgi
066676b4da UPSTREAM: util/broadcom: Close file after use
Change-Id: Ieea7ac7fbc618cd12f843f1606f9ebab37cae67e
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Found-by: Coverity Scan #1323508
Original-Reviewed-on: https://review.coreboot.org/17879
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/421213
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2016-12-16 15:41:54 -08:00
Patrick Georgi
bcefbf84ce UPSTREAM: util/broadcom: Terminate string
filebuffer is treated like a string, so it should be zero-terminated
like a string.

Change-Id: I078aa39906394be64023424731fe0c7ae2019899
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Found-by: Coverity Scan #1323473
Original-Reviewed-on: https://review.coreboot.org/17878
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/421212
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2016-12-16 15:41:52 -08:00