aboutsummaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)Author
2017-03-10ifdtool: Add SPI_FREQUENCY_50MHZ_30MHZ as a valid freqHannah Williams
Without this change, error "Unknown descriptor version: 4" will be returned if this frequency is selected (seen on GLKRVP) Change-Id: Ib5bfb996b85c7245d8f9c70988bfd5bbac882d74 Signed-off-by: Hannah Williams <hannah.williams@intel.com> Reviewed-on: https://review.coreboot.org/18688 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
2017-03-09toolchain: fix compilation of GMP on FreeBSDIdwer Vollering
Built on FreeBSD -CURRENT Obtained from FreeBSD: https://github.com/freebsd/freebsd-ports/commit/bbedec80e36fe22a4f55433c3e6c2a64828fd9da Change-Id: Ic6b6db8e3a9d86a30c50a09d58566846446031ea Signed-off-by: Idwer Vollering <vidwer@gmail.com> Reviewed-on: https://review.coreboot.org/18675 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-03-09uti/lint/checkpatch: Fix __attribute__ struct errors for OPEN_BRACEMartin Roth
The __attribute__((weak)) lines on structs were being read as functions, causing a warning that the brace should be on the next line. Add a check to see if it's a struct with an attribute, and ignore it for the OPEN_BRACE check if it is. Change-Id: Ieb0c96027e8df842f60ca7c9de7aac941eed1dc2 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/18570 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Lee Leahy <leroy.p.leahy@intel.com>
2017-03-09uti/lint/checkpatch: add --exclude to ignore specific directoriesMartin Roth
checkpatch: add option for excluding directories when importing code from external sources Using --exclude <dir> we should be able to exclude a list of well defined locations in the tree that carry sources from other projects with other styles. This comes from the 01org/zephyr project in github: Original-Change-Id: I7d321e85eed6bc37d5c6879ae88e21d20028a433 Original-Signed-off-by: Anas Nashif <anas.nashif@intel.com> Change-Id: Icc9e841e7d84026d6ab857ff90b0f093515ccaad Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/18568 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
2017-03-08util/intelmetool: Add support for Wildcat Point LPHuan Truong
This adds support for the Wildcat Point LP for intelmetool. When the tool detected a Wildcat Point LP, then the ME will be reported as difficult-to-remove. Change-Id: I35423db11cdc1e21e7f02ce90dace7fb4d236c45 Signed-off-by: Huan Truong <htruong@tnhh.net> Reviewed-on: https://review.coreboot.org/18575 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2017-03-08util/intelmetool: Fix segfault on edge casesHuan Truong
The intel ME checker tool would segfault if it reaches the end of the loop without having the dev pointer set. This happens when it gets to the end of the previous loop without knowing what to do with any of the devices it sees. This patch makes sure the pointer is not NULL before accessing it. Change-Id: Ia13191799d7e00185947f9df5188cb2666c43e2a Signed-off-by: Huan Truong <htruong@tnhh.net> Reviewed-on: https://review.coreboot.org/18573 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-03-07util/scripts/get_maintainer.pl: Remove linux tree checkMartin Roth
This was removed from the previous version, but we'd like it in a separate patch, so it's obvious and can easily be applied to the next version. Change-Id: I9396009e82e762aa0cc037dbe9e7133962af6354 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/18577 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-03-07util/scripts: Update get_maintainer.pl to latest from linux kernelMartin Roth
This is version 03aed21 from linux/scripts, updated on Dec 12, 2016. The version needs to be updated because Perl version 5.20 deprecated the /C regex expression. Perl version 5.24 removed it completely, so the old version fails to run on the coreboot builders. Change-Id: Ib97997237ca64c65d7f91d568ae4bec000804331 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/18571 Tested-by: build bot (Jenkins) Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-03-06util/docker: Update dockerfiles & build methodMartin Roth
All files: - Previously, various things were hardcoded into the docker containers that made it necessary to update the Dockerfile files for each new version of the sdk. Turn those into 'Variables" that are updated during the build step. Because the makefile is piping the dockerfile through the sed command and back into the docker build command, the normal docker "COPY" keyword doesn't work. coreboot-jenkins-node changes: - Run ssh-keygen -A to explicitly generate the ssh keys. This fixes an error: Could not load host key: /etc/ssh/ssh_host_dsa_key coreboot-sdk changes: - Remove apt-get upgrade command - The Dockerfile guide recommends not to run this. - Change libssl-dev to libssl1.0-dev. libssl-dev's header files won't build the Chrome-EC codebase. - Add libisl-dev, needed to build the riscv toolchain. - Build the toolchain using the -b option - Add environment variables containing the version and commit that the coreboot-sdk was built from. Makefile: - Update targets to use the version and commit variables Change-Id: I2c1376fe4b791da2a62fca11bc92c4774cbef1c8 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/18001 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2017-03-05buildgcc: Update GCC, Binutils, GMP, MPFR, GDB, IASL and LLVMIru Cai
- GCC gets updated from 5.2.0 to 6.3.0: gcc-6.3.0_riscv.patch is a diff between 5fcb8c4 and 173684b in riscv-gcc, and it needs gcc-6.3.0_memmodel.patch. - Binutils goes from 2.26.1 to 2.28: There is a build error for MIPS gold so I add patch for it. - GMP gets a bump from 6.1.0 to 6.1.2 - MPFR is updated from 3.1.4 to 3.1.5 - GDB is upgraded from 6.1.1 to 6.1.2 - IASL is changed from 20160831 to 20161222 - LLVM is changed from 3.8.0 to 3.9.1 Change-Id: I20fea838d798c430d8c4d2cc6b07614d967c60c5 Signed-off-by: Iru Cai <mytbk920423@gmail.com> Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17189 Tested-by: build bot (Jenkins)
2017-03-02util/me_cleaner: Pull the latest changes from upstreamNicola Corna
Relevant changes (commit 250b2ec): * Fix a bug for ME6 Ignition images. * Fix signature checking for ME11 and later. * Add command line arguments. * Add an option to relocate the FTPR partition to the top of the ME region, recovering most of the ME region space. * Print the image minimum size. * Add write boundary checks, to prevent writes on other regions in case of bugs. The new changes have been tested on multiple platforms by the me_cleaner users. They have been tested also on the author's X220T with coreboot, where the ME region has been shrinked up to 84 kB without any issue. Change-Id: I3bd6b4cba9f5eebc3cd4892dd9f188744a06c42b Signed-off-by: Nicola Corna <nicola@corna.info> Reviewed-on: https://review.coreboot.org/18473 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2017-03-02autoport: add "-d" option to ectool to dump registersIru Cai
Change-Id: I7de37a026a0899c2d07ea17c9377c8d2283450ab Signed-off-by: Iru Cai <mytbk920423@gmail.com> Reviewed-on: https://review.coreboot.org/18481 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-02-20board-status: Add READMEDenis 'GNUtoo' Carikli
It explains the prerequisites to run the script, some background on how to setup the computer running the script, and the board it gathers the information from. That information is too long to fit inside the script's help. Change-Id: Iecba7310ff1583149c02728e955716775bcbbdc4 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Reviewed-on: https://review.coreboot.org/6660 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-18boardstatus: wiki: Update XiVO's coreboot fork source addressDenis 'GNUtoo' Carikli
This company doesn't do custom hardware anymore and doesn't host the sources anymore. We therefore point to the archived sources instead. Change-Id: I5ce4f6a468b852fc1d0947fe2b28a5297f14c437 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Reviewed-on: https://review.coreboot.org/11889 Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Tested-by: build bot (Jenkins)
2017-02-16sconfig: Add a new "SPI" device typeFurquan Shaikh
Update sconfig lex and yacc files to add support for a new "SPI" device type in the devicetree. SPI device takes only parameter i.e. chip select number for the device on the SPI bus. Re-generate the shipped files for sconfig using flex 2.6.0 and bison 3.0.4 (make CONFIG_SCONFIG_GENPARSER=1). Clean up local paths that leak into generated files. BUG=chrome-os-partner:59832 BRANCH=None TEST=Compiles successfully. Change-Id: If0831e25b3e4ed87827ad92356d7bf47b6387884 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/18339 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-02-14util/lint: Don't check license text for files with under 5 linesMartin Roth
Change-Id: I7c1e3cf558d447838819b4d6a63d93d48d5f13e0 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/18316 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-02-10util/romcc: Don't reference a variable after checking it for NULLPatrick Georgi
Change-Id: Ic8e850bdf75d38fc061fb3a8c55d38bcf09c305a Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1129146 Reviewed-on: https://review.coreboot.org/17886 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-02-04util/blobtool: Add new tool for compiling/decompiling data blobsDamien Zammit
Given a specification of bitfields defined e.g. as follows: specfile: { "field1" : 8, "field2" : 4, "field3" : 4 } and a set of values for setting defaults: setterfile: { "field1" = 0xff, "field2" = 0xf, "field3" = 0xf } You can generate a binary packed blob as follows: ./blobtool specfile setterfile binaryoutput binaryoutput: ff ff The reverse is also possible, i.e. you can regenerate the setter: ./blobtool -d specfile binaryoutput setterorig setterorig: # AUTOGENERATED SETTER BY BLOBTOOL { "field1" = 0xff, "field2" = 0xf, "field3" = 0xf } This tool comes with spec/set files for X200 flash descriptor and ICH9M GbE region, and can be extended or used to decompile other data blobs with known specs. Change-Id: I744d6b421003feb4fc460133603af7e6bd80b1d6 Signed-off-by: Damien Zammit <damien@zamaudio.com> Reviewed-on: https://review.coreboot.org/17445 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-04util/ifdtool: Fix ICH Gbe unlockPatrick Rudolph
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> Change-Id: Ia4b5d1928e84bee42182fc83020e3a13fadc93c4 Reviewed-on: https://review.coreboot.org/18055 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-02-02ectool: Support OpenBSDSteven Dee
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: If6d92a9850c15cd9f8e287cc4f963d3ff881f72c Signed-off-by: Steven Dee <i@wholezero.org> Reviewed-on: https://review.coreboot.org/18260 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-01-31util/xcompile: parallelize compiler checksPatrick Georgi
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. Change-Id: I0532ea2178fbedb114a75cfd5ba39301e534e742 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/18262 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-29autoport: add missing parameter for pc_keyboard_init()Iru Cai
This fixes the build for the generated code for boards with PS/2 keyboard, since commit 448e386309c updated the pc_keyboard_init() function. Change-Id: I776b49b847985296eaca4af6d6e49ab5d6abbafe Signed-off-by: Iru Cai <mytbk920423@gmail.com> Reviewed-on: https://review.coreboot.org/18242 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-01-27board_status/towiki.sh: Add socket LGA775Arthur Heymans
Intel Core 2 is not further specified since not all chipsets support quad cores, which could confuse users. Change-Id: I86c0a41743fe784f432347fa639d3c26604e058e Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/18235 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-01-27util/docker: Update makefile target namesMartin Roth
- 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 Change-Id: I3b464ebf74653a8cc880e982316fd883757ec728 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/18000 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-01-27util/docker: Update makefile with command to kill docker imagesMartin Roth
Kill running docker containers before trying to remove images or containers. Change-Id: Id2de90edbe5d0dc6ecb906be7101ad9744dbd11e Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/17999 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-01-27board_status/to-wiki: Update bucketize scriptMartin Roth
- 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. Change-Id: I2864f09f5f1b1f5ec626d06e4849830400ef5814 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/18225 Tested-by: build bot (Jenkins) Reviewed-by: Timothy Pearson <tpearson@raptorengineering.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-01-25util: Add me_cleanerNicola Corna
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 Change-Id: I9013799e9adea0dea0775b9afe718de5fc4ca748 Signed-off-by: Nicola Corna <nicola@corna.info> Reviewed-on: https://review.coreboot.org/18203 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-01-24cbfs-compression-tool: catch compression failuresPatrick Georgi
If compression failed, just store the uncompressed data, which is what cbfstool does as well. Change-Id: I67f51982b332d6ec1bea7c9ba179024fc5344743 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/18201 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-20util/intelmetool: Try to activate the ME before scanning PCIe for itDan Elkouby
When the ME is hidden (most likely because it was disabled), it cannot be found until activate_me() is called. Change-Id: Ie1f65f61eb131577d7254af582e2709660f4da27 Signed-off-by: Dan Elkouby <streetwalrus@codewalr.us> Reviewed-on: https://review.coreboot.org/18149 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-18cbfstool: Don't use le32toh(), it's non-standardNico Huber
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`. Change-Id: Ia781b2258cafb0bcbe8408752a133cd28a888786 Reported-by: Werner Zeh <werner.zeh@siemens.com> Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/18157 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-01-17util/scripts: extend cross-repo-cherrypickPatrick Georgi
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. Change-Id: I81864ddca62fd99a9eb905d7075e5b53f58c4eb5 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/18135 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-13util/cbfstool: Enable adding precompressed files to cbfsPatrick Georgi
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. Change-Id: Iadd106672c505909528b55e2cd43c914b95b6c6d Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/18102 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-01-12util/cbfstool: Add cbfs-compression-toolPatrick Georgi
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 Change-Id: I40be087e85d09a895b1ed277270350ab65a4d6d4 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/18099 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-12util/cbfstool: compile with -O2 by defaultPatrick Georgi
This speeds up the lzma encoder approximately four-fold. Change-Id: Ibf896098799693ddd0f8a6c74bda2e518ecea869 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/18098 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-01-10buildgcc: try curl if wget is not presentPatrick Georgi
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. Change-Id: Idc2ce892fbb6629aebfe1ae2a95dcef4d5d93aca Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/18048 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-01-09util/abuild: Print list of failed boards at the end of the abuildMartin Roth
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. Change-Id: Icb40ed8083a57bbcde49297d2b0814f98dcbb6c8 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17890 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-01-09util/autoport: Fix gfx dump of log_makerSebastian 'Swift Geek' Grzywna
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. Change-Id: I0c48fb1e912261748ba9e2b91c291bac28b9e856 Signed-off-by: Sebastian 'Swift Geek' Grzywna <swiftgeek@gmail.com> Reviewed-on: https://review.coreboot.org/18050 Reviewed-by: Stefan Tauner <stefan.tauner@gmx.at> Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-01-09util/lint: Add check for the signed-off-by lineMartin Roth
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. Change-Id: I80161befa157266dd4e3209839a06ff398aab6bb Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17941 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-01-06util/romcc: avoid shifting more than the variable's widthPatrick Georgi
That's undefined behavior in C Change-Id: I671ed8abf02e57a7cc993d1a85354e905f51717d Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1229557 Reviewed-on: https://review.coreboot.org/18014 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-04util/crossgcc: update jenkins-build-toolchainMartin Roth
This allows the make jenkins-build-toolchain to use the BUILDGCC_OPTIONS variable. Previously, the options were hardcoded. Change-Id: I5f4c1d3fc8c714ec3640356ae3c86ae157f486d2 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>
2017-01-04buildgcc: Remove quotes around a $CC callNico Huber
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... Change-Id: I4e6e6324389354669a755f570083a40ff00b1bbf 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)
2017-01-04util/cbfstool: Fix to build with latest llvmManoj Gupta
cbfs-payload-linux.c:255:43: note: add parentheses around left hand side expression to silence this warning if ((hdr->protocol_version >= 0x200) && (!hdr->loadflags & 1)) { [pg: also fix the semantics. Thanks Nico for catching this] BUG=chromium:665657 TEST=coreboot-utils builds Change-Id: I025c784330885cce8ae43c44f9d938394af30ed5 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 35c4935f2a89c3d3b45213372bcf0474a60eda43 Original-Change-Id: I8758e7d158ca32e87107797f2a33b9d9a0e4676f Original-Reviewed-on: https://chromium-review.googlesource.com/411335 Original-Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Original-Tested-by: Manoj Gupta <manojgupta@chromium.org> Original-Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://review.coreboot.org/17568 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-01-03util/romcc: remove dead assignmentsPatrick Georgi
Change-Id: Iab6fe065faeacfca3b41eb5bae1075dcfb1a2b05 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>
2017-01-03util/romcc: Ensure that bit shift is validPatrick Georgi
Change-Id: Idbe147c1217f793b0360a752383203c658b0bdce 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>
2017-01-03util/romcc: avoid leaking a typePatrick Georgi
Only allocate ptr_type when it's actually used. Change-Id: Iea5f93601a42f02a1866bdff099f63935fdd5b8d 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>
2017-01-03util/romcc: avoid dereferencing NULL pointerPatrick Georgi
argv is only filled for macro->argc > 0. Change-Id: I5ff21098384afc823efa14be3d5565507fb2b3b2 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>
2017-01-03util/romcc: free variable after usePatrick Georgi
closure_type is copied then never used again. Close that leak. Change-Id: Idd4201f7fc6495fde5ad2e1feb7e499e38986e92 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>
2017-01-03util/abuild: Don't set XGCCPATH if it's in the environmentMartin Roth
Change-Id: I0fa231ca3d33300a671810e994c5be54ac10a18b 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>
2017-01-03util/inteltool: Add ICH6-10 to BIOS_CNTL listArthur Heymans
Without this change inteltool cannot read BIOS_CNTL values nor can it read the SPIBAR values. Change-Id: I9ff16e060aca66e3cb11c8315a6843ccecd1d3c2 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>
2017-01-03util/inteltool: Fix ICH SPIBAR registersArthur Heymans
The ICH7 SPIBAR offset and registers are different from later generation. ICH8 has a different offset from later generation. ICH6 has no SPI controller. Change-Id: I7691bce619089b15805114047bcb1fd121a5722b 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>
2017-01-03superiotool: Add support for HWM registers on W83627EHGArthur Heymans
Based on datasheet: "W83627EHF/EF W83627EHG/EG WINBOND LPC I/O, Revision : 1.0" Change-Id: Ia2e5ab8bc454a34a89fe2cf06bfba55261109785 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>
2017-01-03superiotool: Add support for HWM registers on W83627DHGArthur Heymans
Based on datasheet: "W83627DHG WINBOND LPC I/O, Version: 1.4" Change-Id: Id20dff7539d926ef6f68265efbfc7420539d9bca 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>
2017-01-02util/cbfstool: Don't print region information on stderr by defaultPatrick Georgi
It's usually not too interesting, so hide it behind -v. Change-Id: Icffb5ea4d70300ab06dfa0c9134d265433260368 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>
2016-12-28util/intelmetool: Fix warning building with 32-bitPaul Menzel
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. Change-Id: I4ede26127efcbd5668b978e6880a0535607e373d 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>
2016-12-28buildgcc: Indicate CXXFLAGS for binutilsNico Huber
CXXFLAGS seems to be used a lot and have to be specified independently from CFLAGS. Change-Id: Iff4c76e54a46e908299b532fd848165a3dc04d43 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>
2016-12-28buildgcc: Fix string comparison operatorNico Huber
Change-Id: I8ff8d51507dcf12cd554c8b4713074a99e47c11e 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>
2016-12-27buildgcc: Build GMP `--with-pic` if GCC defaults to `-pie`Nico Huber
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. Change-Id: I5f3185af9c8d599379a628e18724b217b88be974 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 Neuschäfer <j.neuschaefer@gmx.net>
2016-12-16util/romcc: Don't read 'member' if it might be NULLPatrick Georgi
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. Change-Id: I818c233d797d82fa819243c4626dd9c4b7de3ac6 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>
2016-12-16util/broadcom: Check for successful file accessPatrick Georgi
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>
2016-12-16util/romcc: remove self-assignmentPatrick Georgi
Change-Id: I0f78b55b28011cdefc90665bca2a7ea17647e955 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1129127 Reviewed-on: https://review.coreboot.org/17885 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-12-16util/romcc: Move access after NULL-checkPatrick Georgi
Change-Id: I7f9c38fd6e75b32fe1ed8a60c7054f4dd1fcd5c0 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1129104 Reviewed-on: https://review.coreboot.org/17884 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-12-16util/romcc: Fix resource leakPatrick Georgi
Change-Id: I0d260254bab714ec939fc199b3a133b0fc05b10d Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1129112 Reviewed-on: https://review.coreboot.org/17883 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-12-16util/broadcom: Add two more NULL checksPatrick Georgi
Change-Id: I088730fd87dd39fa2c36a06c5770fad05a5808b0 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1323511, #1323512 Reviewed-on: https://review.coreboot.org/17882 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-12-16util/broadcom: Check return value of stat()Patrick Georgi
Change-Id: Ib53408e8b186c07aa8e42c67131d39c4add05983 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1323515 Reviewed-on: https://review.coreboot.org/17881 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-12-16util/broadcom: Initialize variablePatrick Georgi
It's later tested for NULL, but never initialized to make that test work reliably. Change-Id: Iadee1af224507a6dd39956306f3eafa687895176 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1323515 Reviewed-on: https://review.coreboot.org/17880 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-12-16util/broadcom: Close file after usePatrick Georgi
Change-Id: Ieea7ac7fbc618cd12f843f1606f9ebab37cae67e Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1323508 Reviewed-on: https://review.coreboot.org/17879 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-12-16util/broadcom: Terminate stringPatrick Georgi
filebuffer is treated like a string, so it should be zero-terminated like a string. Change-Id: I078aa39906394be64023424731fe0c7ae2019899 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1323473 Reviewed-on: https://review.coreboot.org/17878 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-12-16util/broadcom: close file on errorPatrick Georgi
Change-Id: I5193c6a9f08398b881c971c7175654ba5775b34a Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1323509 Reviewed-on: https://review.coreboot.org/17876 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-12-15util/ifdfake: Add number of regionsNico Huber
To make the generated descriptor compatible with latest libflashrom. Change-Id: I005159dd24e72da9cc43119103c96c5dd5b90a55 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/17447 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-12-15util/cbfstool: Handle error condition more carefullyPatrick Georgi
Change-Id: I72a7776d530d1cf0b8fa39e558990df3dc7f7805 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1295494 Reviewed-on: https://review.coreboot.org/17861 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins)
2016-12-15util/cbfstool: check that buffer_create workedPatrick Georgi
We might not care much about this buffer, but we really use it later on... Change-Id: Ia16270f836d05d8b454e77de7b5babeb6bb05d6d Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1294797 Reviewed-on: https://review.coreboot.org/17860 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins)
2016-12-15util/cbfstool: Fix memory leakPatrick Georgi
Change-Id: I66cb1c88155ef58610bacfb899e0132e4143c7ac Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1325836 Reviewed-on: https://review.coreboot.org/17859 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-12-15util/cbfstool: Add NULL-ptr checkPatrick Georgi
Change-Id: I8b5caf5423135fe683a24db6700b895a2685cb98 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1323507 Reviewed-on: https://review.coreboot.org/17858 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-12-15util/abuild: Fix update_config functionMartin Roth
- Because $configoptions contains embedded newlines that we want to be interpreted when we pipe it out to the config file, change that back to a printf, and tell shellcheck that we want to do it. - 'make olddefconfig' & 'yes "" | make oldconfig' give us the same output for the config file, but olddefconfig doesn't generate the log the way oldconfig does. Go back to the previous behavior. - Don't overwrite the config log with make savedefconfig. Change-Id: I4966a3bb2541b452eeb4ca73ac3cd727f8525636 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17853 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-12-13util/cbfstool: Enable filling fmap regions with a given valuePatrick Georgi
So far, cbfstool write, when used with the -u/-d options (to "fill upwards/downwards") left the parts of the region alone for which there was no new data to write. When adding -i [0..255], these parts are overwritten with the given value. BUG=chromium:595715 BRANCH=none TEST=cbfstool write -u -i 0 ... does the right thing (fill the unused space with zeroes) Change-Id: I1b1c0eeed2862bc9fe5f66caae93b08fe21f465c Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: baf378c5f2afdae9946600ef6ff07408a3668fe0 Original-Change-Id: I3752f731f8e6592b1a390ab565aa56e6b7de6765 Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/417319 Original-Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Original-Tested-by: Patrick Georgi <pgeorgi@chromium.org> Original-Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Reviewed-on: https://review.coreboot.org/17787 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-12-13util/cbfstool: require -i argument for cbfstool add-intPatrick Georgi
We never specified what value add-int should write by default. Change-Id: I240be4842fc374690c4a718fc4d8f0a03d63003c Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/17796 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-12-12lint/kconfig_lint: Make sure all symbols have a type definedMartin Roth
Show an error if a symbol does not have a defined type. This caused a problem of an undefined symbol in check_defaults, so we just skip those symbols there as we can't verify the default pattern without knowing the type. Change-Id: I28711a77962e16f6fc89789400363edd0fdd0931 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17345 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@googlemail.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-12-12util/lint: add check for auto-included headersMartin Roth
Since we've removed them from the tree, add a check to keep them out. Change-Id: I2995da765fee8796a297963d54a1c34f56376efe Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17658 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-12-12Kconfig: Change symbol override from warning to noticeMartin Roth
Overriding symbols within a .config is pretty common when doing automated builds with various different options. The warning text makes it sound like this is an issue, so change it to say 'notice' instead. We could get rid of it completely, but it's not a bad thing to know that we have two copies of the same symbol in the .config. BUG=chrome-os-partner:54059 TEST=copy a disabled kconfig option to the end and set it to y. See notice text instead of warning. Change-Id: I9f575b2275233f638e42676263348c807e6515bd Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/16691 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-12-12util/docker: Add a makefile for common docker tasksMartin Roth
Commands for working with docker images: build-coreboot-sdk - Build coreboot-sdk container upload-coreboot-sdk - Upload coreboot-sdk to hub.docker.com build-coreboot-jenkins-node - Build coreboot-jenkins-node container upload-coreboot-jenkins-node - Upload coreboot-jenkins-node to hub.docker.com clean_coreboot_containers - remove all docker coreboot containers clean_coreboot_images - remove all docker coreboot images Commands for using docker images docker_build_coreboot <BUILD_CMD=target> - Build coreboot under coreboot-sdk docker_abuild <ABUILD_ARGS='-a -B'> - Run abuild under coreboot-sdk Change-Id: I3a75b0615747d32f593948f53eab076f303271bf Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/16388 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@googlemail.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-12-12util/abuild: Add more error handling for command line optionsMartin Roth
- Show an error if a directory is added after the command line options to catch scripts using the old parameters. - If an invalid parameter is specified, show the parameter. Change-Id: Ie8948361f1c51e89a99bdb13df8c554747cd521d Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17741 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-12-12util/abuild: Add argument -R to specify root directoryMartin Roth
cbroot was previously specified by just adding it to the end of the command line with no explicit identifier. This change allows it to go anywhere in the command line and adds the -R or --root identifier. This makes the command line more consistent. Most of the time, this argument isn't even needed, as the automatic detection finds cbroot. Change-Id: I1d6fd8f51765d0d8b29be8af1e8105e06dd44cc8 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17740 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-12-12util/abuild: Clean up usageMartin Roth
- Indent with spaces for consistency - Change lbroot to cbroot - Remove incomplete list of options from usage line - Capitalize first word of all option text - Alphabetize options other than version and help - Move version and help options to the end Change-Id: Id5bd4db8d7e3705cbbb93895a46a3608cd1b09e2 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17724 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-12-12util/abuild: Fix or disable shellcheck warningsMartin Roth
This cleans up the shellcheck warnings in abuild. Warning count: 1 Unexpected ==. 1 Use "${var:?}" to ensure this never expands to / . 1 VARIABLE appears unused. Verify it or export it. 1 Use "$@" (with quotes) to prevent whitespace problems. 2 Consider using { cmd1; cmd2; } >> file instead of individual redirects. 2 Expressions don't expand in single quotes, use double quotes for that. 3 Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. 4 $/${} is unnecessary on arithmetic variables. 5 Check exit code directly with 'if mycmd;', not indirectly with $?. 5 Use cd ... || exit in case cd fails. 11 Declare and assign separately to avoid masking return values. 13 Use $(..) instead of legacy `..`. 20 Don't use variables in the printf format string. 104 Double quote to prevent globbing. Change-Id: I9c77e122435ba87ce3a4aee76b5022f7265f9ef2 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17722 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-12-09abuild: Build saved config filesMartin Roth
Update abuild to allow for building saved miniconfig files. If one or more config files exist for a platform under coreboot/configs, they will be built instead of the automatically generated default config. The config filename needs to start with "config.$VENDOR_$BOARD" to be picked up by the abuild script. - Update to version 0.10.0 - Add -d parameter to specify the saved config file directory - Break 2nd half of create_config function into update_config to set the payload for saved config files. - Unset new payload Kconfig options that could be set in a saved config file. - Update a bunch of MAINBOARD variable names to BUILD_NAME since the build name isn't necessarily the same as the mainboard name. - Split build_target into two functions - build_target and build_config because one mainboard can now build multiple configurations. - Update remove target and call it directly from build_target() instead of from build_targets() Change-Id: I1a276d3e507b178f7dcd9dc125fa9c59f1ab47bd Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17590 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-12-09util/kconfig/conf.c: Fix newline in error printfMartin Roth
For some reason the \n in the defconfig save error was not escaped. Change-Id: I6a76b258f461a194fe17aae2b4fa04326b46d8d6 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17742 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@googlemail.com>
2016-12-09util/lint: Add check to verify saved configs are miniconfigsMartin Roth
Change-Id: Ifc5ec645dd27663c1b1fde9ff16d48534606a554 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17600 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins)
2016-12-07autoport: Fix romstage generatorKyösti Mälkki
Prototype changed here: e258b9a intel sandy/ivy: Improve DIMM replacement detection Change-Id: Id79238db2e497b9163f3bd1b1d5d4bc11fe4da9e Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/17711 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-12-06buildgcc: Be less restrictive when trying to build GNATNico Huber
It turned out that newer GNAT versions can build our current (5.3.0) GNAT without bootstrapping. So adapt the version enforcement. Change-Id: Ie7189e8bcadeee56cf5c2172e8c0ae7cd534685a Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/17706 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-12-06buildgcc: Fix function prototype in GCCNico Huber
With some newer versions of GCC (experienced with GCC 6.2.1 on Arch- Linux) the first stage of a boostrapping fails due to a mismatching function prototype. Also add a missing `static` to the signature. Change-Id: Ia927036ccd725550f1191890515578bc80c74f80 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/17704 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-12-04cbfstool: Fix off-by-one error in checking hash_typeFurquan Shaikh
Change-Id: Iaf208705d0cd450288af721d53053b2d3407a336 Found-by: Coverity Scan #1325836 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/17698 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-30util/lint: Add check for symbolic links in the coreboot treeMartin Roth
Because of the varied environments that coreboot is built under, we don't want to have symbolic links in the tree. Change-Id: I4cf9d95a437626cb52e3032a5e6cba83320a334b Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17633 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-11-30util/lint: Exclude devicetree files with custom name from license checkNaresh G Solanki
As devicetree files can have different name followed by extension cb Exclude all .cb file from the license header check. Change-Id: I37b651eedd77cbf3d3e65ff0f027f971b0a2d2ac Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com> Reviewed-on: https://review.coreboot.org/17186 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-28crossgcc/buildgcc: Show additional information while buildingMartin Roth
- Show number of threads being used to build. - Show the version number of each package when skipping it. - Show whether the tool is a host or target build. Change-Id: I1134c08b417a731859e6b25fe38aecf01a85927b Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17418 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-11-28kconfig_lint: More updates for excluded filesMartin Roth
- All of the symbols are in the .config, so if .config is include in the search all of the symbols are always found. - There are now some Kconfig symbols in the Documentation directory, so that needs to be excluded. - 3rdparty has lots of Kconfig symbols that are unrelated to what is being searched for. Change-Id: I0ff56d0a0916338a8b94f5210b8e0b3be5194f41 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17588 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-11-28kconfig_lint: exclude payloads from search, add back specific filesMartin Roth
Don't search for symbols in the payloads directory, except for specific files that are actively added back to the search. Change-Id: I6f28dc7dee040b8061fa5644066f3613367b6d84 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17443 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-11-28util/crossgcc: fix using -DPatrick Georgi
Otherwise errors similar to "touch: cannot touch '${TARGETDIR}/.GMP.6.1.0.success': No such file or directory" might occur. Change-Id: I4f24c93a25b7d567d3ce14a0415d20fd0778c9c8 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/17603 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-21util/inteltool: Fix bay trail ahci deviceMarshall Dawson
Use a unique bus/device/function if a bay trail LPC bridge was found. TEST=Run on MinnowBoard MAX Turbot and customer's LynxPoint-LP. Change-Id: Ib4b50aaf9817ac94f46c28925081540676226d84 Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-on: https://review.coreboot.org/17464 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-21util/amdfwtool: Wrap long lines, excluding commentsMartin Roth
Change-Id: I35c4340cf14ca1609ce3bfcac78cc4e286eff34a Signed-off-by: Martin Roth <martinroth@chromium.org> Reviewed-on: https://review.coreboot.org/17326 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc@marcjonesconsulting.com> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-21util/amdfwtool: Fix whitespaceMartin Roth
Change-Id: I33e41b745e7ec55ed39d7125fc74b1619d28bb54 Signed-off-by: Martin Roth <martinroth@chromium.org> Reviewed-on: https://review.coreboot.org/17325 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>