summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)Author
2016-04-20crossgcc/Makefile.inc: Update jenkins-build-toolchainMartin Roth
Because the builders have the coreboot cross-compilers in their path, the XGCCPATH variable needs to be set after building the new toolchain before it will be used. - Add $DEST/bin to $PATH if $DEST is set, add the default location for toolchain builds otherwise. Because the jenkins build image puts the tools in the path, we ca - Add KEEP_SOURCES option to help speed up compilation (Slightly). - Log .xcompile for verification that the right toolchain was used. - Verify that test-toolchain passes. Change-Id: I7c270dab94be7e8f801d527169767018a24986e4 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14231 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-19kbuild: Allow drivers to fit src/drivers/[X]/[Y]/ schemeStefan Reinauer
Reorder drivers to fit src/drivers/[X]/[Y]/ scheme to make them pluggable. Also, fix up the following driver subdirectories by switching to the src/drivers/[X]/[Y]/ scheme as these are hard requirements for the main change: * drivers/intel * drivers/pc80 * drivers/dec Change-Id: I455d3089a317181d5b99bf658df759ec728a5f6b Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/14047 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-19crossgcc: Move temp file handling into cleanup functionStefan Reinauer
Move code to handle leaving temp files around into cleanup. Change-Id: Ief346d7973f693ec06c8bef6492cf1330858d9e1 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/14346 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-04-18crossgcc: Fix out of bounds array access for nds32leStefan Reinauer
Patch from Segher Boessenkool <segher@kernel.crashing.org> Change-Id: Ia91e0d6e50399da38afd8cdc0b92c82e4efa0a08 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/14380 Tested-by: build bot (Jenkins) Reviewed-by: Idwer Vollering <vidwer@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-18More compatible use of mktempStefan Reinauer
This is taken from FILO and slightly enhanced. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Change-Id: Ieadd9db3f1013ec1cd9f5a1dc44e17587617f1d1 Original-Change-Id: I961a7ddcd39657c9463806d7b82757eff0a4ac57 Original-Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Original-Reviewed-on: http://review.coreboot.org/190 Reviewed-on: https://review.coreboot.org/14386 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-16util/superiotool: Add initial support for Exar XR28V384.Derek Waldner
Datasheet https://www.exar.com/content/document.ashx?id=21368 Add support for Exar chip used on a custom board that was designed to connect to the Olive Hill Plus development platform. The register dump was verified on the Olive Hill Plus platform. Change-Id: Ibd3e13eefb706bd99b6e5b38634f6855b39848ab Signed-off-by: Derek Waldner <derek.waldner.os@gmail.com> Reviewed-on: https://review.coreboot.org/14367 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-15crossgcc: Add version number to script nameStefan Reinauer
Store both the version number and git hash in the file name when copying the buildgcc script to the destination directory. Also, fix the quoting in the lines touched anyways, and move the script to $TARGETDIR/share/ Change-Id: Ib37dc2be57ee7f0ae18a0b954f537f8b4c2db9d0 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/14347 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-14util/xcompile/xcompile: Remove -Wno-unused-but-set-variable from CFLAGSPaul Menzel
Do not disable warnings about unused but set variables to further improve the code quality. Change-Id: I25fa29ac42c9d09596d03f11fb01f31635a62a11 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: https://review.coreboot.org/3981 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
2016-04-14romcc: Remove old test infrastructure, rework MakefileJonathan Neuschäfer
Changes in visible behaviour: - The default make target doesn't run the tests anymore - All generated files are stored under util/romcc/build/ (or $BUILD_DIR) Change-Id: If003240742eb1902a6e9b337cdee299d7d66ee06 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/14341 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-14util/lint: Update lint-stable-000-license-headersMartin Roth
Add all currently clean directories. Change-Id: Ibfb6432b485adb7fdc930f57ea0af4ff35921d37 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14332 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-13util/lint: update lint-000-license-headersMartin Roth
- Add some additional filters for files that do not require license headers. - Add an alternative wording for the BSD license that is used in several files. - Add string for dummy files - Stop checking if there are no files left. - Remove 'local' keyword which is not posix compliant. Change-Id: I2ed1b0572b5fbe84ea86173b7ec2106454399547 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14324 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-13romcc: Rewrite the test systemJonathan Neuschäfer
Differences: - The test logic is now only implemented in one place (pending the deletion of the old parts), whereas it previously was implemented both as make rules and as a pair of shell scripts. - Tests don't need to be registered anymore. Just adding a new file with the correct name is enough to have it tested. - The code is hopefully more readable and maintainable. - The new test script supports colors (if the standard output is a terminal and --nocolor was not passed on the command line). Things to do in follow-up patches: - Remove the old test code - Test or remove fail_test*.c, hello_world*.c and raminit_test*.c - Fix regressions that have built up over the years, while making sure not to introduce new ones - Makefile integration - Jenkins integration There are tests in the makefile that specify -fno-always-inline, but this option doesn't exist anymore, so I didn't port them over. Change-Id: Idd6b89368c1e36555cb880c37bbe07035c938cd7 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/14291 Reviewed-by: Martin Roth <martinroth@google.com> Tested-by: build bot (Jenkins)
2016-04-13romcc: Use UNIX line endings in linux testsJonathan Neuschäfer
This makes it easier to check the output against a reference output. Change-Id: I9c7ae538b708399a5cadd18e498618d7480d240f Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/14276 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-13romcc: Increase base address in linux ld scriptJonathan Neuschäfer
Newer versions of Linux implement a sysctl variable called vm.mmap_min_addr that controls the minimum address a virtual memory mapping may have[1]. It is usually set to 64KiB. Map the start of the segment specified in util/romcc/tests/ldscript.ld to 128KiB, just to be sure. [1]: https://www.kernel.org/doc/Documentation/sysctl/vm.txt Change-Id: I72a5c65ca5e7d3a77d6ec897ae3287e3ea05cc2f Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/14277 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-13intelmetool: Fix detection logic of no MEI deviceDamien Zammit
Previously, on systems that are supposed to have ME but are librebooted, there was no message printed to tell the user that no MEI was detected. Fixed this bug. Change-Id: I59681c194ae5e76533dd777374e26d1aea727337 Signed-off-by: Damien Zammit <damien@zamaudio.com> Reviewed-on: https://review.coreboot.org/14334 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@googlemail.com>
2016-04-13lint/lint-stable-004-style-labels: Update scriptMartin Roth
- Look at entire tree instead of just the current commit. This was causing the test to overlook some issues that were already in the tree. - If git is on the system, and the code is in a git repo, use the 'git ls-files' command to find the files to examine. If those conditions aren't met, fall back to using the find command. - Wrap the command so it's easier to read. Change-Id: I3dce219a29ffb1ae56a31318b995e3ba8ea43e70 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14194 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-12crossgcc: skip TARGETARCH for tools that don't use itMartin Roth
Many of the tools and libraries don't use a target architecture, but they were still getting put in one. This change separates out the builds that need the target architecture from the ones that don't, and sets the build directory accordingly. This will help keep from rebuilding the libraries when building all of the tools if you keep the temporary files around (-t option). Change-Id: Id6c17719332f2244657f103f5f07ca7812d51af1 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14229 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-11util/nvramtool/cli/nvramtool.c: Add newline to error messagePaul Menzel
"CMOS parameter touchpad not found" string needs '\n' termination. Change-Id: Ied431dbc9f94d82e1f4716cfb89ea3d6cf513703 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: https://review.coreboot.org/6553 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-04-11util/crossgcc/buildgcc: correct clang testAaron Durbin
On certain versions of /bin/sh the following sequence causes problems. '$CC --version | grep clang &>/dev/null && ...' The above is a bashish for 2>&1 >/dev/null. However, buildgcc is interpeted by /bin/sh which doesn't necessarily mean bash. On dash it's effectively forking grep off into the background and always evaluating an empty statement to /dev/null while unconditionally running whatever follows the &&. Change-Id: Ie3a2ebb12226434d50a7b2a7e254c8b80ae4c46b Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/14281 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-10lint/check_lint_tests: Add script that will break all stable testsMartin Roth
Add a script to help us verify that our lint tests are working. This isn't finished, because it should test all of the failure modes. Some of the tests, 008-kconfig in particular have a lot of ways that they can fail. Currently the Kconfig test is triggered by removing the board name file in test 006. This removes the only place the config option for that board name is located. Change-Id: If01c6daf1c99d097a19995b4befae90a3b5db2d6 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14198 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-09crossgcc: Add workaround for libgcc's GNU sed dependencyStefan Reinauer
libgcc fails to compile on a number of platforms when a non-GNU sed is used. This patch has been verified by building the MIPS reference toolchain on OS X. Change-Id: Ia1c18ea4359de7707ac2e2640f1b8f107c47cd8c Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/14275 Tested-by: build bot (Jenkins) Reviewed-by: Idwer Vollering <vidwer@gmail.com>
2016-04-09util/crossgcc/buildgcc: quote parameters that may have spacesAaron Durbin
On certain versions of /bin/sh assigning variables with spaces unquoted leads to failures. Therefore, quote variables that are known to be passed in that have spaces. Change-Id: I007c56c3bfb8183bb4b16cf0591f6aa508fd105d Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/14280 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-07Revert "cbfstool: Add 'hashcbfs' command to compute hash of CBFS region."Aaron Durbin
This reverts commit 272a1f05b943d781acb8c04c01874bde9df3b774. In Chrome OS this command's usage was dropped in favor of another solution. As it's not used drop the support for it. Change-Id: I58b51446d3a8b5fed7fc391025225fbe38ffc007 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/14261 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-06buildgcc: enable interwork/multilib for binutilsStefan Reinauer
Otherwise, on OS X, some architectures will fail to build libgcc (verified for ARM toolchain). Change-Id: I8b58e0582596ad39cad92e9d478158c46a96a26e Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/14256 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-06crossgcc: Fix compilation on Clang systemsStefan Reinauer
Most cross compilers fail to compile on systems with Clang being the default compiler (OS X and some BSDs). Clang dislikes some of GCC's autogenerated code. We also missed switching CFLAGS to CXXFLAGS when GCC switched to C++ compilation per default. Change-Id: I87caa1a15982c431048aa79748ea7ef655a9a3a1 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/14232 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-05chromeos.fmd: Mark RW_LEGACY as CBFSPatrick Georgi
Change the existing chromeos.fmd files and the dts-to-fmd script to mark RW_LEGACY as CBFS, so it's properly "formatted". BUG=chromium:595715 BRANCH=none TEST=none Change-Id: I76de26032ea8da0c7755a76a01e7bea9cfaebe23 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 717a00c459906fa87f61314ea4541c31b50539f4 Original-Change-Id: I4b037b60d10be3da824c6baecabfd244eec2cdac Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/336403 Original-Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Original-Tested-by: Patrick Georgi <pgeorgi@chromium.org> Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/14240 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-05futility: don't pass toolchain flags into futility's buildPatrick Georgi
cros_sdk puts weird stuff into CFLAGS and LDFLAGS and we never care because we don't use CFLAGS. futility's Makefiles do. BUG=chromium:595715 BRANCH=none TEST=none Change-Id: I512d5adb55cad8b31dc29d9c076ecd5d9c701cf6 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 58739332ddba7ef759aac37f3a4410dd487f210f Original-Change-Id: I66898c7e66d808047b0326c7471c64eaae950b15 Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/336436 Original-Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Original-Tested-by: Patrick Georgi <pgeorgi@chromium.org> Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/14237 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-04crossgcc: Fix compiler detect for POWER8 big endian mode switch.Timothy Pearson
Change-Id: I7afb35fd5bc971a2c4d63e3a084ce7473f7a66fa Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Reviewed-on: https://review.coreboot.org/14018 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-03-30util/superiotool: Register fix for Fintek F81865F/F-IWilbert Duijvenvoorde
Datasheet: http://www.fintek.com.tw/files/productfiles/F81865_V028P.pdf There is a multi-function select register listed as 0x2a-1 and 0x2a-2. These are the original names in the datasheet, but superiotool will display register 0x29 and 0x28 and their values. This patch renames them both to 0x2a and shows both of the default values for them. They are both 0x00, so one of them could be dropped though. Change-Id: Iad91f9e4755d2d1a123e56ab0fa9257be7ea9978 Signed-off-by: Wilbert Duijvenvoorde <w.a.n.duijvenvoorde@gmail.com> Reviewed-on: https://review.coreboot.org/5404 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-29lint: Update board status script to look at the whole treeMartin Roth
The board status script wasn't checking the entire tree to make sure that all boards had board_info.txt files. Also it would only print out the first issue that was found. Change-Id: I5f2fa9e564c805c6dbee7a35cab80c1c342567a5 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14118 Tested-by: build bot (Jenkins) Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
2016-03-26Makefile: Update jenkins-build-toolchain to run build testsMartin Roth
Add coreboot build tests after running the toolchain build. This verifies that everything still builds with the new toolchain. Change-Id: Ifa51db897925c0b77791c83bbcbfd75045c907b5 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14156 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
2016-03-25util/intelmetool: Add intelmetool from Damien ZammitPhilipp Deppenwiese
The intelmetool shows information about the Intel Management Engine for different platforms. Original source code can be found under following link: https://github.com/zamaudio/intelmetool.git Change-Id: I0eb17833a21eb04cf9245a7312289a4102bec1a9 Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org> Reviewed-on: https://review.coreboot.org/14136 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-03-25buildgcc: Add check for missing libraries and test for zlibMartin Roth
- Add check_for_library routine to test for missing libraries. - Add a check for zlib. - Remove 'utility' text from please_install() routine since we can test for libraries or utilities now. - Remove incorrect 'solution' text from alternate install since I was updating that line. Change-Id: Id5ef28f8bde114cbf4e5a91fc119d42593ea6ab2 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14147 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-25buildgcc: support pigz and lbzip2 decpmpressors if installed.Martin Roth
These are multi-threaded decompressors for .gz and .bz2 compressed files. If they're installed, use them to decompress, if they're not, use the standard single-threaded decompressors. Change-Id: I397740817e6b234a43b62075899964bdab14f121 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14146 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-25buildgcc: Fix help text formattingMartin Roth
Add a newline after the supported version text. Move $TARGETDIR left so that longer paths print better. Change-Id: If520e1b8657a526dee27763aee62cb78777d020d Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14145 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-24crossgcc: Enable multiple targets for a platformPatrick Georgi
This is required on powerpc64 to build both little endian and big endian libgcc. Change-Id: I295c8ee5e8131d4108e98d1bfd53abb8bd8982b2 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/14163 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-24buildgcc: Update coreboot's IASL version to 20160318Martin Roth
Update IASL from 20150619 to 20160318 See release notes at acpica.org Change-Id: Ic7e7b3956378ad611069e984d5a59c78e4cb08b1 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/12817 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-24crossgcc: Switch POWER8 to big endian modeMartin Roth
Change-Id: If8c07fb3bee4bf0b531e52fae29890af99f924b4 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14161 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-03-16rockchip: update make_idb.pyhuang lin
make_idb.py only support RK3288 before, add chip parameter, so we can support RK3399 either. Change-Id: I6811acb7f0cdaf1930af9942a70db54765d544d5 Signed-off-by: huang lin <hl@rock-chips.com> Reviewed-on: https://review.coreboot.org/13913 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-03-16util/nvidia/cbootimage: update to latest masterPatrick Georgi
This includes a fix that allows using cbootimage with paths containing the "@" sign, which happens sometimes in jenkins configurations. Change-Id: I83154afa35b6d24449e713e57031b1a93d7ac748 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/14090 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-14genbuild_h: Fix numeric comparison to remove errorMartin Roth
Change the comparison of build_timeless from -eq to = This was generating an error if BUILD_TIMELESS wasn't set: util/genbuild_h/genbuild_h.sh: line 27: [: : integer expression expected This wasn't causing the script to fail, and won't even if 'set -e' is added to the script because the error happens inside an 'if' clause, which is specifically excluded from failue on 'set -e'. Change-Id: I6a4e147ece23e83ee682d72db35be9e5d4088c78 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14080 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-03-14util/cbmem: Scale time stamp values correctlyAaron Durbin
Commit c49014e (timestamp: add tick frequency to exported table) refactors the code, but forgets to correctly scale the frequency to megahertz, where the value is read from sysfs, so that printing time stamp information shows milliseconds instead of microseconds, as can be seen on the output `cbmem -t` for the ASRock E350M1 below. ``` 0:1st timestamp 515 10:start of ramstage 515 (0) 30:device enumeration 515 (0) 40:device configuration 610 (94) 50:device enable 614 (4) 60:device initialization 624 (9) 70:device setup done 639 (14) 75:cbmem post 844 (205) 80:write tables 844 (0) 90:load payload 849 (4) 15:starting LZMA decompress (ignore for x86) 849 (0) 16:finished LZMA decompress (ignore for x86) 869 (20) 99:selfboot jump 869 (0) Total Time: 350 ``` So scale the return value correctly to megahertz, by dividing it with 1000. ``` 0:1st timestamp 515,655 10:start of ramstage 515,655 (0) 30:device enumeration 515,663 (7) 40:device configuration 610,620 (94,957) 50:device enable 614,680 (4,059) 60:device initialization 624,618 (9,938) 70:device setup done 639,553 (14,934) 75:cbmem post 844,707 (205,154) 80:write tables 844,710 (2) 90:load payload 849,532 (4,821) 15:starting LZMA decompress (ignore for x86) 849,655 (123) 16:finished LZMA decompress (ignore for x86) 869,903 (20,247) 99:selfboot jump 869,922 (19) Total Time: 354,261 ``` Change-Id: Iea032c62487c7946b6194a90268755034c6350df Signed-off-by: Aaron Durbin <adurbin@chromium.org> Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: https://review.coreboot.org/14086 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
2016-03-13util/ifdtool: add option to change chip densityJan Tatje
Adds -D / --density option to change the chip density. This is only implemented for IFD version 1 as I do not have an IFD version 2 to test this. Density of both chips is changed by default, but a chip can be selected using -C / --chip. Change-Id: Iba7affbf6cbefa3147b7b0e019298d905e694716 Signed-off-by: Jan Tatje <jan@jnt.io> Reviewed-on: https://review.coreboot.org/14032 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-03-13abuild: Add option of starting with an existing defconfig fileMartin Roth
We want to start testing builds with additional Kconfig options to try to get more coverage. This will allow us to enable various options to test without having to add each individual option to the abuild script. Change-Id: I9bb2bb6f38589e3bcc1282dc4cad51cf6f5149aa Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14016 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-03-11crossgcc/buildgcc: Add missing quotation markJonathan Neuschäfer
Change-Id: I5c20fd7057751a912aa2b2118dc5610c1ef647dc Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/14039 Tested-by: build bot (Jenkins) Reviewed-by: Idwer Vollering <vidwer@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-03-11codebase: Change makefile $(shell pwd) commands to $(CURDIR)Martin Roth
- Change the makefile command $(shell pwd) to $(CURDIR) to find the current directory without going out to the shell. Change-Id: I4890eba6129630acd2883b92de77308d39949443 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13967 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-03-11crossgcc/buildgcc: Update for recent arch additionsMartin Roth
- Add powerpc64le-linux-gnu & nds32le-elf to the instructions as supported architectures - Add nds32le-elf as a supported architecture so it will stop warning when you build it. Change-Id: Ifcdbc3d082eae5b9b5f8828914e7d2b7ed1f13a4 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13961 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-03-11crossgcc/buildgcc: Add comment about URLs and jenkins builderMartin Roth
Add a comment to try to lower possible confusion later if the jenkins tool builder fails to build a new tool. The URLs for the packages that are downloaded are checked against known locations so that someone can't maliciously download a package from somewhere and run it on the build server. This provides a little bit of security, but could confuse someone if they don't realize it. Change-Id: I7858e3d86fc705b480f6792b6adf3d5349580e01 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13955 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-03-11crossgcc/Makefile.inc: Add target for jenkins toolchain test buildMartin Roth
We've recently added a jenkins test builder for the coreboot toolchain. This patch allows what it builds to be controlled from the makefiles checked into git instead of by a rule on the builder itself. Change-Id: I65f70bac5ab97ecb27aae93ee370b26a2ab1f9c0 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13954 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-03-09Add option for "timeless" buildsNico Huber
Builds with BUILD_TIMELESS=1 shall always give a bit identical output for stable inputs. This should help verifying that resulting rom files stay the same across commits that shouldn't change the outcome. To be useful for builds that rely on 3rdparty/arm-trusted-firmware, this needs a similar change there. Change-Id: Ia0a22e3e79fbd0abbd2a9071ecbeef6541787a08 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/13412 Tested-by: build bot (Jenkins) Reviewed-by: Damien Zammit <damien@zamaudio.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-03-08archive: build archive tool with HOSTCCDaisuke Nojiri
BUG=chromium:502066 BRANCH=tot TEST=Tested on Jerry Change-Id: Ic227287784bd0c76a0c4c20a40c581d37420b98c Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 1b4e818e91998135288978c6cb68a63288bb20e5 Original-Change-Id: I28f5decabcbaf1e61c9b4e549b11e568dace8c09 Original-Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/312902 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/12926 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-03-08util: add archive toolDaisuke Nojiri
'archive' concatenates files into a single binary blob. Files are indexed by the base names. See archive.h for the format description. BUG=chromium:502066 BRANCH=tot TEST=Tested on Glados Change-Id: Iea108160e65c8c7bd34c02af824a77cb075ee64b Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 21a9ba860f29599ac029f8d49d32399c4e3a73a8 Original-Change-Id: I46b4efb339e3a1e05772ae752f2861026ca09cfc Original-Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/311200 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://review.coreboot.org/12925 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-03-08crossgcc: Build make per defaultStefan Reinauer
Build make with the rest of the toolchain, since the targets using a Chromium EC need make 4.x Change-Id: I7efb0c25f605f16c2d9a1e7c4b203f3bcdae671b Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13923 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-03-05lint-kconfig: pipe stderr to stdout to catch script errorsMartin Roth
Because the perl error messages go to stderr, we were not catching these on the build server. If the script has an issue, we want to know immediately, so change the bash script that calls into the perl lint tool to pipe these to stdout. Change-Id: Ieeec9ccbd59177cfd1859a9738a4ee1fab803d28 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13877 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-05sandybridge/gma_lvds: support both Sandy&Ivy on one boardIru Cai
Sandy and Ivy Bridge processors use the same socket, and a mainboard with the socket can support both types of CPUs. However, they use different native graphics init code for LVDS and cause a crash if running the wrong code. This change detects the CPU type and then selects the right code to run. It will add some more code in ramstage. It also merges the {SANDY,IVY}BRIDGE_LVDS symbol to one SANDYBRIDGE_IVYBRIDGE_LVDS. Tested on a Lenovo T520 with i7-2630qm and i7-3720qm Signed-off-by: Iru Cai <mytbk920423@gmail.com> Change-Id: I4624759f9c92d56d547db1ab4b9a1d611a182a91 Reviewed-on: https://review.coreboot.org/12087 Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com> Tested-by: build bot (Jenkins)
2016-03-04util/futility: trivial - Add distclean targetMartin Roth
The what-jenkins-does build runs distclean when building the utilities. It doesn't fail the build if distclean fails, but it generates a scary warning. Change-Id: Iac90958951976ed326a89ef2b5f2d9f17f9f2d6b Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13888 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-03kconfig_lint: make sure if and endif statements are balancedMartin Roth
In Kconfig files, the 'if' and 'endif' statements need to match up. A file can't start an if statement that's completed in the next file. Add a check as the files are being parsed to make sure that they match up correctly. Change-Id: If51207ea037089ab84c768e5a868270468cf4c4f Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13876 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-03amdfwtool: Fix some PSP2 issueszbao
1. Change the function which integrated one firmware, to the function which pushes the whole group. Use fw_table as a parameter instead of using the global table name. 2. Let PSP2 and PSP1 not dependent on the other. It turns out PSP2 can exist without PSP1. For some APU, the PSP directory has to be put in PSP2 field (ROMSIG 0x14). 3. Reserve 32 more bytes in PSP2 header. It is defined by spec. It is tested, and it is true. These above changes are overlapping, hard to split them. Sorry. Change-Id: I834630d9596d7fb941e2cad5d00ac3af04a537b5 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/13808 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-03-03cbfstool: Use fixed width data types for e820entry struct.Werner Zeh
In e820entry struct, the members are defined using standard types. This can lead to different structure size when compiling on 32 bit vs. 64 bit environment. This in turn will affect the size of the struct linux_params. Using the fixed width types resolves this issue and ensures that the size of the structures will have the same length on both 32 and 64 bit systems. Change-Id: I1869ff2090365731e79b34950446f1791a083d0f Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/13875 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
2016-03-03cbfstool: Initialize contents of linux_params to 0Werner Zeh
When linux is used as payload, the parameters to the kernel are build when cbfstool includes bzImage into the image. Since not all parameters are used, the unused will stay uninitialized. There is a chance, that the uninitialized parameters contain random values. That in turn can lead to early kernel panic. To avoid it, initialize all parameters with 0 at the beginning. The ones that are used will be set up as needed and the rest will contain 0 for sure. This way, kernel can deal with the provided parameter list the right way. Change-Id: Id081c24351ec80375255508378b5e1eba2a92e48 Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/13874 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-03buildgcc: Bump version to 1.36Stefan Reinauer
Numerous changes have gone in since the last bump, let's increase the version. Change-Id: Ie3ae8c24b26bd22b70bc5ddf5c1125b5b1d3a021 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13873 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-03-02crossgcc: add 'urls' option to print urls of all packagesMartin Roth
This should allow the builder to download the packages securely. Change-Id: If5feeff85bd551cbe08849421197d11cc2432d1e Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13867 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-02buildgcc: Add 'nocolor' option to remove color codes from outputMartin Roth
When writing to a logfile, the color codes just make things confusing. The --nocolor option will allow these to not be printed. Change-Id: I67645aac20b420ac83b828e77e0e50aab88d3d47 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13866 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-03-02buildgcc: Use $(CURDIR) instead of $(PWD)Stefan Reinauer
coreboot's top level Makefile does the same, so let's stay consistent. Change-Id: I9e995f3ecadd05d6fbfda64b45dee3a9900d9189 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13869 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-03-02abuild: Use 12 lines of context for errorsStefan Reinauer
The current default of 6 lines leaves us with no context about the actual error: *** ERROR: 3 warnings encountered, and warnings are errors. coreboot-gerrit/util/kconfig/Makefile:38: recipe for target 'oldconfig' failed make[1]: *** [oldconfig] Error 1 make[1]: Leaving directory 'coreboot-gerrit' Change-Id: I67e7d740e7b3b1c66005dc1bf50557a20bc15428 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/12720 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-03-02buildgcc: Disable RISC-V GDBStefan Reinauer
Our GDB doesn't support RISC-V yet, so let's disable it for now to keep the build from breaking. Change-Id: Iecc6d97fb16d16410c56965abeea55c67800f220 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13872 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-03-01buildgcc: Allow specifying destination directoryStefan Reinauer
With this change you can say $ make DEST=/opt/cross-1.35 to get all of the cross toolchain built and installed to /opt/cross-1.35 Change-Id: Icc3e605c4824bfa2831d030e4ed9dd0331ff722f Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13847 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2016-03-01buildgcc: Fix building GDB for mipsel-elfStefan Reinauer
Change-Id: I31ed159b13c0da60383068832615c6e4a9608efe Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13849 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2016-03-01crosstool: add EXPAT as a dependency on the gdb build.Ronald G. Minnich
qemu-power8 wants to tell about itself with XML, and so we need to build gdb with EXPAT so it can understand XML. Change-Id: I460e27f883956ed5d54e6070916e2682ee0f7a1b Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/13846 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-29buildgcc: Add support for gdb on x86_64-elfStefan Reinauer
Change-Id: I99f5842d1dc03b3f2d747c5abae7170214313284 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13848 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-26nvramtool: Print computed and stored checksum in case of mismatch.Denis 'GNUtoo' Carikli
This is to make it easier to fix checksum issues. Example: # nvramtool -a [...] nvramtool: Warning: Coreboot CMOS checksum is bad. Computed checksum: 0xfa. Stored checksum: 0x0 # nvramtool -c 0xfa Change-Id: Ifacb68b5693afbdfcb521acd6937e270ead85186 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Reviewed-on: https://review.coreboot.org/13770 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-02-26util: Add a very simple utility to test POST cards.Denis 'GNUtoo' Carikli
It was tested with a mini-PCI POST card on a Toshiba Satellite 1410 laptop with the stock BIOS. Change-Id: Icdc0860e2c72b17862601c2cc59eaf0f3d8a0e54 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Reviewed-on: https://review.coreboot.org/13763 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-24Revert "cbfstool: Silence LZ4 -Wsign-compare warnings"Paul Menzel
This reverts commit 17cb0370a70ccfc2301b7974bf38d44c7271afea. It’s the wrong thing to do, to just disable the warning. The code is fixed for 32-bit user space now in Change-Id I85bee25a69c432ef8bb934add7fd2e2e31f03662 (commonlib/lz4_wrapper: Use correct casts to ensure valid calculations), so enable the warning again. Change-Id: I6d1c62c7b4875da8053c25e640c03cedf0ff2916 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: https://review.coreboot.org/13772 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
2016-02-24kconfig_lint: Fix checks when running in taint modeMartin Roth
The builders run perl scripts in taint mode, and some of the checks that the kconfig lint script were running were tainted, causing the script to terminate early when running on the servers. This checks to see if taint mode is enabled, and untaints the path if it is. All external tools (git & grep) must be in /bin, /usr/bin, or /usr/local/bin. This also removes the check for unused kconfig files if taint mode is enabled. Change-Id: I8d1e1c32275f759d085759fb5d8a6c85d4f99539 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13751 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
2016-02-23xcompile: Add parameter to aid in debuggingMartin Roth
There was a report that xcompile wasn't finding the compilers correctly, so to aid in future debugging, this adds a parameter to show what xcompile is doing as it runs. Run from the command line: ./util/xcompile/xcompile --debug Change-Id: I779cb3de7b4e3f62a2ef2a6245c3538be518870c Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13047 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-02-23cbfstool: Silence LZ4 -Wsign-compare warningsJulius Werner
It seems that the exact behavior of -Wsign-compare changes between GCC versions... some of them like the commonlib/lz4_wrapper.c code, and some don't. Since we don't have a well-defined HOSTCC toolchain this slipped through pre-commit testing. Explicitly silence the warning to ensure cbfstool still builds on all systems. Change-Id: I43f951301d3f14ce34dadbe58e885b82d21d6353 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/13769 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-02-23board_status.sh: Allow user to override coreboot image pathDavid Hendricks
Some users may wish to run this script using a coreboot image that does get built in the usual build/ directory, for example if abuild is used to generate the image. Change-Id: I7e98780f8b7b57ebbf3babd6a289f0e4fd4103d8 Signed-off-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: https://review.coreboot.org/12489 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-02-22util: Add scripts to download and extract blobsJoe Pillow
This turned out really handy when I tried to build coreboot for my Chromebox. These scripts can be used to extract System Agent reference code and other blobs (e.g. mrc.bin, refcode, VGA option roms) from a Chrome OS recovery image. crosfirmware.sh downloads a Chrome OS recovery image from the recovery image server, unpacks it, extracts the firmware update shell archive, extracts the firmware images from the shell archive. To download all Chrome OS firmware images, run $ ./crosfirmware.sh To download, e.g. the Panther firmware image, run $ ./crosfirmware.sh panther extract_blobs.sh extracts the blobs from a Chrome OS firmware image. Right now it will produce the ME firmware blob, IFD, VGA option rom, and mrc.bin Change-Id: I5fb7e14b10e03e18cd360bc35f1dc92e8ed34e63 Signed-off-by: Joe Pillow <joseph.a.pillow@gmail.com> Reviewed-on: https://review.coreboot.org/13752 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-22cbfs: Add LZ4 in-place decompression support for pre-RAM stagesJulius Werner
This patch ports the LZ4 decompression code that debuted in libpayload last year to coreboot for use in CBFS stages (upgrading the base algorithm to LZ4's dev branch to access the new in-place decompression checks). This is especially useful for pre-RAM stages in constrained SRAM-based systems, which previously could not be compressed due to the size requirements of the LZMA scratchpad and bounce buffer. The LZ4 algorithm offers a very lean decompressor function and in-place decompression support to achieve roughly the same boot speed gains (trading compression ratio for decompression time) with nearly no memory overhead. For now we only activate it for the stages that had previously not been compressed at all on non-XIP (read: non-x86) boards. In the future we may also consider replacing LZMA completely for certain boards, since which algorithm wins out on boot speed depends on board-specific parameters (architecture, processor speed, SPI transfer rate, etc.). BRANCH=None BUG=None TEST=Built and booted Oak, Jerry, Nyan and Falco. Measured boot time on Oak to be about ~20ms faster (cutting load times for affected stages almost in half). Change-Id: Iec256c0e6d585d1b69985461939884a54e3ab900 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/13638 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-02-22board-status: deal with sanitized pathsPatrick Georgi
Change I9dd8e4027be21363015cd8df9918610e206afce2 replaces colons with underscores in paths, to improve compatibility of paths. This breaks any attempt to interpret the timestamp part of the tree as a timestamp, so revert the change before doing so. Change-Id: I0e82e4045120700e9b4fcc8c6e54d761068eaea3 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: https://review.coreboot.org/13766 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-21Support arm-linux-gnueabi compilers.Vladimir Serbinenko
Change-Id: I0edbc93807028a091f0f1bcae81a4092538a3422 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: https://review.coreboot.org/13747 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-02-21optionslist: Don't add a timestampPatrick Georgi
The commit description is enough and this avoids hourly updates of the timestamp by a cron job. Change-Id: I30e9fcf28caf94edbb816c22bc8fbcb7ab09ae6d Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13744 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-21board-status: make push-to-wiki more flexiblePatrick Georgi
Change-Id: I952a694f645caf9d9726965e39afc09c6fdce0e3 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13741 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-21board-status: move wiki cookiejar elsewherePatrick Georgi
Change-Id: I1240c215f3d6c3934911c096e2ecbabff175d501 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13740 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-20amdfwtool: Postpone the usage of PSP combo directoryzbao
If we only need to "combo" two PSP directories into one image, we can put first address in romsig 0x10 and second one in romsig 0x14. If we really need to put three, the 0x14 is the combo directory which points to multiple level-2 PSP directories. I guess that two PSP can also use combo directory, with only one level-2 directory. But nobody seems to do that. Change-Id: Ic450a846bc04db90a75cd417b6d7104fe2a5b177 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/13739 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-20amdfwtool: Fix some fields in PSP level-2 directoryzbao
Change-Id: Ib2da7f2210a823fce7f05824e2a2b73d3c0490e9 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/13738 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-18board_status.sh: Be smarter about cbfstool usageDavid Hendricks
This changes how we build and use cbfstool: 1. If build/cbfstool exists, use it. 2. Otherwise, try util/cbfstool/cbfstool. 3. As a last resort, build it and clean it when we're done. Hopefully this will resolve issues people have had with permissions and reduce overhead of building cbfstool when not necessary. Change-Id: I5de6581ca765e5a8420b101a5865ddd633334b9c Signed-off-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: https://review.coreboot.org/12490 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-02-18board_status: Add script that will set up a ubuntu live imageMartin Roth
This is a pretty basic script that can be downloaded with wget to a ubuntu-based live image, and will set it up so that the board_status script can connect and run cbmem. 1) Verify that this is being run on a ubuntu-based live image by checking for the installer. 2) Install and configure the ssh server. 3) Set a root password 'coreboot' so that root can log in. 4) download and build cbmem. 5) find and print the IP(s) that should be used to connect. Change-Id: I068423c9f5501b156f25371d89559f4a206916b5 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13648 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-18Redo testbios utility to use all of YABELStefan Reinauer
Drop buggy duplicate implementation of intXX handlers and provide enough glue to use all of YABEL. Change-Id: I2db77a56a2a991cb84876456dcbb3a843a0d9754 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/12117 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
2016-02-18util/autoport: Use common gpio.c for bd82x6xStefan Reinauer
In accordance to change I8bd981c4696c174152cf41caefa6c083650d283a change autoport as well, as suggested by Vladimir. Change-Id: I7cdaa779c11fd3f791a3ad213c24d927b5da76b9 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13731 Tested-by: build bot (Jenkins) Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
2016-02-18crossgcc: Change 'tar balls' to 'tarballs'Martin Roth
Change-Id: I8665724c381c204af5bc8bb06117c8af9c32be8a Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13729 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-16lint: Make sure site-local isn't committed to coreboot repoMartin Roth
Change-Id: I1dc9469e3d001fe0d5b0517d45679b056586b5b3 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13556 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-02-15Fix a build problem with power 8: use --with-system-zlibRonald G. Minnich
Power 8 was once again having build issues. Adding --with-system-zlib fixes them. It seems the builtin one is only needed when you are going to build programs, and it falls apart in other cases. Searching --with-system-zlib reveals this to be a very popular topic. This has not broken other toolchain builds (for me); it should not for anyone else. Then again, this is gcc, about which I need say no more. Change-Id: Ica9d057d88982543b5dda471cc949c31fe15932f Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/13700 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-02-15kconfig: make oldconfig work "non-strict"Patrick Georgi
oldconfig is regularly used to clean up templates that sometimes contain duplicates or old symbols. Since it cleans up the config, it doesn't need to fail on issues. Change-Id: Ife0e9e3b9bfdde1eb6be0e2e38e81b9042cb7950 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13687 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-02-13crossgcc: Use acpica-unix2 over acpica-unixPatrick Georgi
Apparently acpica-unix is shipped under "A non-open source license (the 'Intel license')" while acpica-unix2 comes under GPLv2/BSD dual license. (see https://acpica.org/Licensing) So go with unix2. Change-Id: I412812187bbf488eb4ad6d7fb8d2840f2f5e06d4 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13686 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-12util/cbfstool: Improve heuristic for cbfs header pointer protectionPatrick Georgi
cbfstool has a routine to deal with old images that may encourage it to overwrite the master header. That routine is triggered for "cbfstool add-master-header" prepared images even though these are not at risk, and - worse - destroys the chain structure (through a negative file length), so avoid touching such images. Change-Id: I9d0bbe3e6300b9b9f3e50347737d1850f83ddad8 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13672 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-12Make MRC vs native a config rather than making a separate chipset for it.Vladimir Serbinenko
Tested by making lenovo x230 configurable despite pretty MRC bugs. Change-Id: Ia2a123f24334f5cd5f42473b7ce7f3d77c0e65b7 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: https://review.coreboot.org/13658 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-12util/kconfig: Ignore extra symbols in configs instead of failingMartin Roth
When updating an old .config file that has a symbol that has been removed from the current Kconfig tree, kconfig will generate a warning and fail to save the updated file. This is incredibly annoying, and not the goal when trying to eliminate Kconfig warnings. Instead of generating a warning, just print a message that it's being ignored. This will remove the offending symbol, while allowing the updated config file to be saved. Split the change from 1 line to 3 lines to keep it at 80 characters. Change-Id: I09d5775c9ed14bde80077b51b862a7f41bee098a Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13674 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-02-12bimgtool: Fix printf warning for off_tStefan Reinauer
off_t wants to be printed with %zd, not %d. Change-Id: I3f6e1988bb306f4a7738f1f3ccb2093518e4ceb3 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13655 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-02-12bimgtool: Match CRC code guardsStefan Reinauer
Make sure that the statically defined CRC functions are enabled by the same conditionals as the code using them. Change-Id: Ic24e2ed1a80b8e5f6623881b08d86f7b608a206e Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/13654 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>