Commit Graph

3178 Commits

Author SHA1 Message Date
Ronald G. Minnich aa9df0f0de RISCV: have the make-spike-elf.sh script use the riscv tools
We do this so that the riscv objdump can be used on the coreboot.elf file.

Change-Id: Ib8bf85a3299dd75b779e7fa3757f5b62c9c7170b
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://review.coreboot.org/16918
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2016-10-08 16:03:22 +02:00
Martin Roth 1a9035988a util/release/build-release: Update tar command
Between GNU Tar 1.28 & 1.29, the files excluded by --exclude-vcs was
updated.  This breaks the reproducibility.  Instead, just manually
exclude the files to match what was excluded in v 1.28 and earlier.

Change-Id: Ie0717891506f4a6d750ff264f9cc2494a296265b
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16900
Tested-by: build bot (Jenkins)
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@googlemail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-10-07 18:18:47 +02:00
Martin Roth dd78aa665a util/release/build-release: Update script
- Add more help text.
- Remove braces from variables where the variable is isolated.
- Remove --recurse-submodules from clone.  This breaks on old coreboot
versions.
- Add some whitespace between blocks.
- Fix all shellcheck warnings.
- Verify tar version and fail if it doesn't support --sort.

Change-Id: I4a49df99532d9a92a4a05bceff16f96a4fc3e205
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16883
Tested-by: build bot (Jenkins)
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@googlemail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-10-07 18:18:36 +02:00
Martin Roth fb190ed764 util/release: Update genrelnotes.script to the latest version
Internal changes:
- Fix shellcheck issues.
- Add some help text and update section header text.
- Reorder sections to try to get better estimates of what the commits
were mainly touching.
- Start making the script slightly less coreboot-centric.
- Don't print git errors.

Changes in output:
- Find new and deleted CPUs, SOCs, northbridges, southbridges, and SIOs.
- Show new users.
- Show before and after commit count for all authors.

Change-Id: I9858436f9458b2859a91273a525901df34796df4
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16848
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-10-04 19:10:52 +02:00
Martin Roth a7d0027083 Revert "util/lint/kconfig_lint: change warning levels and text"
This reverts commit dfdb0733a6a71b11d15006dafc13841e84fab7cd.

Change-Id: I91bf5e42f4ac241f544742ce161bae651f9f9947
Reviewed-on: https://review.coreboot.org/16868
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
2016-10-03 23:13:09 +02:00
Martin Roth 8bc8be4d0e util/lint/kconfig_lint: change warning levels and text
- Add an exception for MAINBOARD_POWER_ON_AFTER_POWER_FAIL when checking
- With those exceptions set, we don't have anymore #define or #ifdef
warnings, so turn them to errors so no more can be pushed.
- Change the definition of an unused symbol from a warning to a note.
There are times when unused symbols are expected.
- Upgrade the warning for loading Kconfig files multiple times from
a warning to an error.

Change-Id: I6dcb06d4f0b099d5ccaf7643e72dd790719bdf58
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16840
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-10-03 22:05:54 +02:00
Martin Roth fa95625867 util/lint/kconfig_lint: Check default types
The type of the default value wasn't being checked to make sure that it
matched the type of the Kconfig symbol.

This makes sure that the symbol is being set to either a reasonable
looking value or to another Kconfig symbol.

Change-Id: Ia01bd2d8b387f319d29f0a005d55cb8e20cd3853
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16839
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-10-03 22:05:37 +02:00
Ronald G. Minnich fa74e4705d cbfstool: set init_size for linux payloads.
We were not setting the init_size for linux payloads.
A proper value of init_size is required if the kernel
is x86_64.

This is tested in qemu and fixes the observed problem
that 974f221c84b05b1dc2f5ea50dc16d2a9d1e95eda and later would not
boot, and would in fact fail in head_64.S.

Change-Id: I254c13d16b1e014a6f1d4fd7c39b1cfe005cd9b0
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://review.coreboot.org/16781
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-09-28 23:05:00 +02:00
Patrick Georgi fe222005b8 crossgcc: Add Dockerfile
The dockerfile allows building an image with the current tree's
crossgcc code.

Change-Id: I59cd85b0acdf8776e3e090742d7f5d89d1c154e7
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: https://review.coreboot.org/16636
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-09-26 21:47:52 +02:00
Nico Huber 66c2c1a2d4 buildgcc: Build gnat by default if host compiler seems compatible
Change-Id: I2a13e188ddb0b7d64d3c0ec979a1a493bf160afc
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16678
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-21 22:10:30 +02:00
Nico Huber 04a1f6a3bc buildgcc: Ask the user to install gnat if it's missing
Change-Id: Ib840eac29fc8cedfaef4847fd9700bd4a70300ba
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16677
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-21 22:08:32 +02:00
Nico Huber 75797166ce buildgcc: Don't try to build gnat with a different version
Change-Id: I64a33d2cc4793e54a50fa439a4461c40d424b569
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16676
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-09-21 22:07:59 +02:00
Nico Huber 156d87c024 buildgcc: Warn when building GCC with a different major version
GCC build instruction recommend to bootstrap a native compiler first.
Not sure, when that is really necessary. A major version change seems
reasonable.

Change-Id: I80a9ec25739b7d33a1d1c7b4b2140d19d89a99ae
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16675
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-21 17:03:23 +02:00
Nico Huber aee7f46cd3 buildgcc: Add functions to test GCC versions
Just add some helpers that show parts (major, major.minor) of the GCC
version to be built (buildcc_*) and of the host compiler (hostcc_*).
They will be used in follow-up commits.

Change-Id: I37c12ad1a2d08645f40a9f0f0a479c8d7cc3e127
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16674
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-09-21 17:03:09 +02:00
Nico Huber bd74d561ad buildgcc: Show excessive arguments and bail out
Also remove a dead line that checks for unknown options: We already let
`getopt` check that.

Change-Id: I0e829b266e192757d6e455ee4cc608315bb4b7be
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16681
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-21 17:02:20 +02:00
Nico Huber 78df0bf46d buildgcc: Check exit status of `getopt`
We accidentally checked the status of `eval` instead.

Change-Id: I1ba258944184ed707ed1f176e528d8266656cb59
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16680
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-21 17:02:05 +02:00
Nico Huber cc414dd47f buildgcc: Fix GNU getopt usage
Looks like this never worked correctly: There are three argument formats
to GNU getopt and none of them matches what we fed it. The missing
double dash before the `set` arguments proves that we always called it
with parameters that `getopt` did NOT parse.

Change-Id: Ib8343976ef31774b18567a9fc9745a9f58dd287a
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16679
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-09-21 17:01:54 +02:00
Nico Huber 152e78e794 buildgcc: Fix option arguments
As we support `getopt` versions that don't know long options, every
option arguments needs a short option.

Also add the long options `--urls` and `--nocolor` to the `getopt`
string.

Change-Id: I11c393c3d90c7a16cdda119594221c85f902ed40
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16682
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-09-21 17:01:16 +02:00
Iru Cai 904538bcc1 inteltool: add --ahci for printing AHCI registers
According to datasheets for Intel ICH/PCH, it works for chipsets from
ICH7 to 9-series PCH, with PCI device address D31:F2.

Change-Id: If1ddd7208108bda949b5a94894a7bf9e8bfe1e5f
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/15106
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-21 14:16:55 +02:00
Martin Roth 2ab981b87e buildgcc: Update to acpica version 20160831
Change-Id: I3e3973e1c47505718cf73435156104ab73680441
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16387
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-20 22:20:38 +02:00
Martin Roth 57bfbb0508 checkpatch.pl: ignore '#define asmlinkage'
checkpatch warns that the asmlinkage storage class should be at the
beginning of the declaration when we define it to be an empty value.

Change-Id: I12292d5b42bf6da9130bb969ebe00fca8efcf049
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16358
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-20 21:44:11 +02:00
Martin Roth 1ce2ba6832 lint/lint-007-checkpatch: Update lint script
- Check Kconfig files as well.
- Accept a list of directories to check as a command line argument.
- Only look at src & util directories by default.
- Skip src/vendorcode.
- Remove bypass of payloads/coreinfo/util/kconfig directory, it no
longer exists.

Change-Id: Ia522d3ddc29914220bdaae36ea23ded7338c48fd
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16359
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-20 21:43:11 +02:00
Nico Huber be5492aec0 Add minimal GNAT run time system (RTS)
Add a stripped-down version of libgnat. This is somehow comparable to
libgcc but for Ada programs. It's licensed under GPLv3 but with the
runtime library exception. So it's totally fine to link it with our
GPLv2 code and keep it under GPLv2.

Change-Id: Ie6522abf093f0a516b9ae18ddc69131bd721dc0c
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/11836
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
2016-09-19 11:14:49 +02:00
Alexander Couzens 871da8e580 util/release: make release archives reproducible
tar doesn't sort by default and takes the order of the OS which is in
most cases the order of creation. Sort by name and set influencing
environment TZ and language to be reproducible.

Change-Id: I3d043952417000d12e81353677f1ea4aa2da4fc1
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://review.coreboot.org/16556
Tested-by: build bot (Jenkins)
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@googlemail.com>
2016-09-15 20:01:51 +02:00
Martin Roth 96a48f1489 checkpatch.pl: Force raw_line to return a defined value
Fixes the warning:
Use of uninitialized value in concatenation (.) or string at
util/lint/checkpatch.pl line 4739

Change-Id: Idc3c631735a595517d77cb8b8ec67e1ac00b6685
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16357
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-09-15 02:27:42 +02:00
Martin Roth ab9395f612 lint/checkpatch.pl: Pull in coreboot fixes
This pulls in two fixes that were added to coreboot's checkpatch.pl
script:

- commit 82ef8ada (src/commonlib/lz4_wrapper: Correct inline asm for
unaligned 64-bit copy):
modify checkpatch.pl to ignore spaces before opening brackets when
used in inline assembly.

- commit ebef00fa (lint/checkpatch.pl: escape \{ in perl regex to fix
warnings):
Unescaped left brace in regex is deprecated, passed through in regex;

Change-Id: Ia2c712c5b1bb5f67953a9098b5a076e31e3bd8d3
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16348
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-09-15 02:27:28 +02:00
Martin Roth 8448ac47d2 cbmem: Exit with an errorlevel of 0 after printing help
cbmem --help should not return an error to the OS.

Change-Id: Id00091c679dbb109bc352cf8a81d67c2ae5666ec
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16574
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-09-15 00:43:02 +02:00
Alexander Couzens 746b6abea5 ifdtool/Makefile: use static dependencies
The generated dependencies doesn't work when
used together with our main build system.

Change-Id: I93d26858e961d7e275d586a1b8a26b3d33f3bd41
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://review.coreboot.org/16572
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-09-12 20:03:28 +02:00
Alexander Couzens d12ea11c01 ifdtool: fix one whitespace format error
Change-Id: I5b1846eb3ef8253695066b315e8a105803390579
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://review.coreboot.org/16570
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-09-12 20:01:24 +02:00
Hakim Giydan 43e5b576b9 arch/arm: Add armv7-r configuration
This change adds armv7-r support for all stages.

armv7-r is an ARM processor based on the Cortex-R series.

Currently, there is support for armv7-a and armv7-m and
armv7-a files has been modfied to accommodate armv7-r by
adding ENV_ARMV7_A, ENV_ARMV7_R and ENV_ARMV7_M constants
to src/include/rules.h.

armv7-r exceptions support will added in a later time.

Change-Id: If94415d07fd6bd96c43d087374f609a2211f1885
Signed-off-by: Hakim Giydan <hgiydan@marvell.com>
Reviewed-on: https://review.coreboot.org/15335
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-09-12 19:58:43 +02:00
Idwer Vollering ba349ab12e buildgcc: Quote command substitution
There are shells where the result of a command substitution is subject
to word splitting (e.g. dash when assigning a value inside an export
statement).

Change-Id: I70a5bc124af7ee621da2bdb4777f3eaba8adafbb
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/15820
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
2016-09-11 14:27:42 +02:00
Philipp Deppenwiese 6e4204a0d1 util/release: Add support for signed tags and releases
* Add gpg key command-line parameter for signing.
* Add username command-line parameter for secure ssh clone.
* Tag and releases are signed.
* Generates ascii amored signature files.

Change-Id: I41347a85145dd0389e3b69939497fb8543db4996
Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org>
Reviewed-on: https://review.coreboot.org/16553
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-09-09 23:39:42 +02:00
Stefan Reinauer c6080c6bfc util/lint: Update to latest checkpatch.pl
Taken from upstream Linux kernel.

Change-Id: Id8c9d48b8ca3c7592dc4d78cfd092714bbbb2abf
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/15980
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-09-04 05:51:47 +02:00
zbao 5cf758d45b buildgcc: Search the cksum command without checking OS type
The checksum command might appear to be unpredictable only by
checking the OS. Just list the candidates, sorted by possibility.

Change-Id: Ia3f4f5f0f98ff47d322a4f70689cca0bd4fa79fa
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/11483
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-09-02 18:06:38 +02:00
Martin Roth 26d484a237 Fix newlines at the end of files
All but ga-g41m-es2l/cmos.default had multiple final newlines.
ga-g41m-es2l/cmos.default had no final newline.

Change-Id: Id350b513d5833bb14a2564eb789ab23b6278dcb5
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16361
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Antonello Dettori <dev@dettori.io>
2016-09-02 18:04:48 +02:00
Julius Werner f975e55dcd cbfs: Add "struct" file type and associated helpers
This patch adds functionality to compile a C data structure into a raw
binary file, add it to CBFS and allow coreboot to load it at runtime.
This is useful in all cases where we need to be able to have several
larger data sets available in an image, but will only require a small
subset of them at boot (a classic example would be DRAM parameters) or
only require it in certain boot modes. This allows us to load less data
from flash and increase boot speed compared to solutions that compile
all data sets into a stage.

Each structure has to be defined in a separate .c file which contains no
functions and only a single global variable. The data type must be
serialization safe (composed of only fixed-width types, paying attention
to padding). It must be added to CBFS in a Makefile with the 'struct'
file processor.

Change-Id: Iab65c0b6ebea235089f741eaa8098743e54d6ccc
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/16272
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-08-27 01:16:22 +02:00
Marshall Dawson 1bc2b0bed0 util/scripts: Support cygwin in ucode conversion tool
Check for the existence of TMPFILE with a .exe extension and if found
rename it with no extension.  This allows the program to be run and
removed properly.

Change-Id: I26928f9b8bf82d1c07fa456a88d624f7a8838bd3
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/15437
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-08-22 04:19:24 +02:00
Martin Roth 2e03fbced7 util/lint: Add a tool to verify a single newline at the end of files
This takes way too long to run - currently about 30 seconds to look
at the entire coreboot tree.

Change-Id: I403934014b422528715ea95ff652babe5e18c88b
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15976
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-19 18:08:25 +02:00
Martin Roth 2d97cb1be5 util/docker: Update docker files for coreboot-sdk & jenkins builders
- Check out the specific toolchain version we want before building
the toolchain (This version uses 1.42).
- Add additional libraries and tools needed to build coreboot related
packages.
- Move everything required to build any of the coreboot or related
packages into the coreboot-sdk from coreboot-jenkins-node Dockerfile.
- Separate the text of the commands in the Dockerfiles.
- Use nproc to get the number of processors for building the toolchain
- Add some additional comments about why things are done the way that
they are to the README
- Update the version of coreboot-sdk that coreboot-jenkins-node uses to
1.42. (This matches the toolchain version)
- Move ccache setup from jenkins-node to coreboot-sdk.
- Update the maintainer.

Change-Id: I293285ef72e3e70259355d924d425fea98ee773d
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16239
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-18 06:15:26 +02:00
Martin Roth f75d1dfad3 util/docker: Add docker files for coreboot-sdk & jenkins builders
Add the coreboot specific docker configuration files to the coreboot
repo.  These have been copied directly from Patrick's repo where they
had been being stored.

- coreboot-sdk: debian sid with the coreboot toolchain
- coreboot-jenkins-node: built on top of the coreboot-sdk, adds the
pieces required for building everything with the coreboot jenkins
builders.

Change-Id: I8628d4edb298264e814e02e124a8bfb4bc04e0c7
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/14830
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-18 06:14:40 +02:00
Iru Cai 9cc8cb2090 xcompile: add riscv64 name to riscv toolchain
In newer toolchain with binutils 2.26 and GCC 5.3.0, we build binutils
and GCC with machine type riscv32 and riscv64 instead of riscv. We can
see it in this riscv-gnu-toolchain commit:
https://github.com/riscv/riscv-gnu-toolchain/commit/dedbf07

Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Signed-off-by: Martin Roth <martinroth@google.com>
Change-Id: Id552859ec256d80108e073d25cd51dd1fc3fbfac
Reviewed-on: https://review.coreboot.org/14257
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-17 03:55:02 +02:00
Martin Roth 589ef9de8f crossgcc: Update make to latest version: 4.2.1
Change-Id: I4af90fd2fcfb2a823f9e6b1e975c71581f0b55e9
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16164
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-08-13 23:31:29 +02:00
Martin Roth 109a7db2bb crossgcc: Add gnumake target so that make can be built directly
Previously, make could be built as one of the crosgcc* targets, but
there was no way to just rebuild make, as there is for IASL.

- Add an independent target - gnumake.
- Add gnumake to the help text.
- Add gnumake to the list of NOCOMPILE targets (Not compiling coreboot)

Change-Id: I4df25f2e209ca14944d491dbfb8e9b085ff7aca3
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16163
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-08-13 23:31:19 +02:00
Martin Roth 34e4a1c01a util/gitconfig: add cborg2cros.py script
This is a python script that does basically the same thing as the
rebase.sh script, but in the other direction.  rebase.sh takes files
from the chromium tree (cros) and pulls them to the coreboot.org tree.
cborg2cros, as the name implies, updates patches to go into the cros
tree from coreboot.

It adds the 'UPSTREAM: ' identifier to the start of the commit message,
and uses the text '(cherry-picked from commit #####)' instead of
'Original-Commit-Id: #####'

It also adds the 'TEST=', 'BRANCH=', and 'BUG=' lines if they aren't
there.

Change-Id: Ibad9a5f0d0d2c713cf08e103c463e2e82768c436
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15323
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-08-13 23:30:06 +02:00
Zheng Bao bb003c8126 buildgcc: printf no-color before quiting
On some kind of terms (shell in emacs), the color-ctrl
letters don't work. The backspaces can not delete
correct number of letters. So we don't print color-ctrl
letters in loop.

Change-Id: I1f1729095e8968a9344ed9f1f278f7c78f7110e9
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/16066
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-08-11 15:14:53 +02:00
Jonathan Neuschäfer 5de5458c2c util/cbfstool: Initialize elf_writer pointer to avoid crash
If some error happens in cbfs_payload_make_elf, the code jumps to "out",
and elf_writer_destroy(ew) is called. This may happen before an elf
writer is allocated.
To avoid accessing an uninitialized pointer, initialize ew to NULL;
elf_writer_destroy will perform no action in this case.

Change-Id: I5f1f9c4d37f2bdeaaeeca7a15720c7b4c963d953
Reported-By: Coverity Scan (1361475)
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/16124
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-08-10 21:13:06 +02:00
Stefan Reinauer 1bf00079c1 flashmap: Allocate at least one entry in kv_pair_new()
Change-Id: I971fa85ed977884d050790560a5a8f2ce955eb7c
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14444
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-09 15:00:50 +02:00
Paul Kocialkowski 8f0b4f40bf buildgcc: Use upstream patch for aarch64 build issue
Upstream proposed and merged a patch fixing the ARM Trusted Firmware
build issue that occurs with recent version sof binutils. This includes
this patch instead of the previous one.

See binutils commit 7ea12e5c3ad54da440c08f32da09534e63e515ca:
"Fix the generation of alignment frags in code sections for AArch64."

The issue was reported at:
https://sourceware.org/bugzilla/show_bug.cgi?id=20364

Change-Id: I16a8043d3562107b8e84e93d3f3d768d26dac7e4
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/16110
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-09 10:37:20 +02:00
Martin Roth bec07535ac sconfig: Reformat C code
Change-Id: Idfd1bd8240413026b992ae1382a57bccf9d8ddb5
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16082
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-08 19:16:24 +02:00
Martin Roth c9c27bb14e sconfig: Remove mainboard chip.h support
The mainboard chip.h files were (mostly) removed long ago.

Change-Id: I1d5a9381945427c96868fa17756e6ecabb1048b2
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16080
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-08 19:16:02 +02:00
Martin Roth 824255ea28 sconfig: Remove bootblock and Kconfig modes
The command line parameters for these modes haven't worked in two
years and nobody noticed.  They're obviously not getting used, so
remove them.

TEST=Generate static.c before and after the change, verify they're
identical.

Change-Id: I1d746fb53a2f232155f663f4debc447d53d4cf6b
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16079
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-08 19:15:41 +02:00
Martin Roth 25f8a4f6d4 sconfig: Update command line parameters
Instead of having directories and file names hardcoded, pass in the full
path and filename of both the input and output files.

In the makefile, create variables for these values, and use them in
places that previously had the names and paths written out.

Change-Id: Icb6f536547ce3193980ec5d60c786a29755c2813
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16078
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-08 19:15:13 +02:00
Martin Roth 3205170a2e sconfig: pass in devicetree filename
Instead of forcing the hardcoded 'devicetree.cb' filename under the
mainboard directory, this allows mainboards to select a filename for
the devicetree file.

This allows mainboard variants that need to use different devicetree
files to live under the same directory.

Change-Id: I761e676ba5d5f70d1fb86656b528f63db169fcef
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12529
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-08 19:14:33 +02:00
Furquan Shaikh 9844d56993 cbfstool/cbfs_image: Fix resource leak for tbuff
Change-Id: I1f4626e1bda92af38e7967d7e05a4c7143942cf6
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/16074
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-08-08 13:02:50 +02:00
Furquan Shaikh 58644a0e0f cbfstool/cbfs_image: Check for return value of buffer_create
Free any buffers if required.

Change-Id: Iccd435dba51275d875a5fdb5649cdcd0541fd84c
Signed-off-by: Furquan Shaikh <furquan@google.com>
Found-by: Coverity Scan # 1361254
Reviewed-on: https://review.coreboot.org/16073
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-08-08 13:02:27 +02:00
Furquan Shaikh 7b405178f4 cbfstool/cbfs_image: Fix resource leak for segs
Free segs whenever returning from cbfs_payload_make_elf()

Change-Id: I0dd722dd488723cecffe1f5621244bb0344056a6
Signed-off-by: Furquan Shaikh <furquan@google.com>
Found-by: Coverity Scan # 1361268
Reviewed-on: https://review.coreboot.org/16072
Tested-by: build bot (Jenkins)
Reviewed-by: Antonello Dettori <dev@dettori.io>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-08-08 13:02:07 +02:00
Furquan Shaikh b927bec09a cbfstool/elfheaders: Make elf_writer_destroy NULL-safe
This relieves caller from having to check if the parameter being passed
in is NULL.

Change-Id: I3ea935c12d46c6fb5534e0f2077232b9e25240f1
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/16076
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2016-08-08 13:01:34 +02:00
Furquan Shaikh f3bba44a04 cbfstool/cbfs_image: Initialze empty_sz to 0
Change-Id: I8b9cfe56b5893ba11047fcc1a6727e7e12a15772
Signed-off-by: Furquan Shaikh <furquan@google.com>
Found-by: Coverity Scan # 1361276
Reviewed-on: https://review.coreboot.org/16071
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2016-08-08 13:01:16 +02:00
Paul Kocialkowski 61486b506d Use VBOOT_SOURCE instead of hardcoding vboot path
This replaces all occurrences of a hardcoded vboot path to the
VBOOT_SOURCE variable, that may be overridden from the command line,
witch fallback to the source from 3rdparty.

Change-Id: Ia57d498d38719cc71e17060b76b0162c4ab363ed
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/15825
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2016-08-08 12:17:00 +02:00
Lee Leahy 72fe7acbbb util/checklist: Place tables in proper boot order
during the boot, romstage occurs before postchar which is before
ramstage.  Place the tables in the proper boot order when generating
the final webpage.

TEST=Build and run on Galileo Gen2

Change-Id: I5df3ceb797aced58fe5ea3d10d78254a27341e47
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/16042
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-08-03 18:01:32 +02:00
Lee Leahy 3440db5827 util/checklist: Concatinate optional list to complete list
Don't require that the routines in the .optional file be listed in the
.complete data file.  Concatinate the two files when building the
complete symbol list.

TEST=Build and run on Galileo Gen2

Change-Id: I596134e1a19311d357aa0d93cfb33c7ca9801e2e
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/16037
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-08-03 18:00:57 +02:00
Lee Leahy 3741a0b225 util/checklist: Process .debug files before .elf files
Ensure that the output file is created by processing the .debug files
before the .elf files.

TEST=Build and run on Galileo Gen2

Change-Id: Ief8d774249c9d8eb313f3d10f04d7e4f2e3cf491
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/16041
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-08-03 18:00:29 +02:00
Lee Leahy ce8ff85fe5 util/checklist: Add usage instructions
Document how to use the checklist and how to generate the data files.

TEST=Build and run on Amenia

Change-Id: Idffc0683e916cbc5a984028886dc3d89a01d0595
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/16036
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-08-03 18:00:03 +02:00
Nico Huber 5407310e64 cbfstool: Check for excessive arguments
Change-Id: I66de6a33b43c284198c0a0a97c5c6a10f9b96e02
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/16019
Tested-by: build bot (Jenkins)
Reviewed-by: Omar Pakker
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-08-03 10:12:02 +02:00
Nico Huber 9ade717571 cbfstool: Check arguments to strtoul() where appropriate
The interface to strtoul() is a weird mess. It may or may not set errno
if no conversion is done. So check for empty strings and trailing
characters.

Change-Id: I82373d2a0102fc89144bd12376b5ea3b10c70153
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/16012
Tested-by: build bot (Jenkins)
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-03 09:42:11 +02:00
Martin Roth ae39fc45a8 util/lint: Add a lint tool to find non-ascii & unprintable chars
This examines characters in coreboot's sourcecode to look for values
that are not TAB, or in the range of space (0x20) to ~ (0x7F).

It specifically excludes copyright lines so that names with high-
ASCII characters are not flagged.

Change-Id: I40f7e61fd403cbad19cf0746e2017c53e7379bf8
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15979
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-02 18:56:14 +02:00
Martin Roth 0cd338e6e4 Remove non-ascii & unprintable characters
These non-ascii & unprintable characters aren't needed.

Change-Id: I129f729f66d6a692de729d76971f7deb7a19c254
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15977
Tested-by: build bot (Jenkins)
Reviewed-by: Omar Pakker
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-08-01 21:44:45 +02:00
Martin Roth bb9722bd77 Add newlines at the end of all coreboot files
Change-Id: I7930d5cded290f2605d0c92a9c465a3f0c1291a2
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15974
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2016-08-01 21:43:56 +02:00
Timothy Pearson c1dc9d725e util/cbfstool: Increase initrd offset to 64M
Newer Linux kernels fail to detect the initramfs using the old 16M
offset.  Increase the offset to the minimum working value, 64M.

Tested-on: qemu pc, 64-bit virtual CPU, linux 4.6 x86_64

Change-Id: I8678fc33eec23ca8f5e0d58723e04d434cd9d732
Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
Reviewed-on: https://review.coreboot.org/15999
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-08-01 18:20:35 +02:00
Patrick Georgi 1fcebe7fd9 intelvbttool: cope with errors in open()
Change-Id: I9fee87b7331ee05d4e984cb024f124abb2c97a69
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1347357
Reviewed-on: https://review.coreboot.org/15962
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-31 19:23:29 +02:00
Patrick Georgi 030c73031d util/inteltool: fix memory leak
A struct pci_dev was allocated but not freed.

Change-Id: I6a8bbef6a118fc1f0aa7037e72c4d0dda9208f4b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1353037
Reviewed-on: https://review.coreboot.org/15971
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-07-31 19:16:45 +02:00
Patrick Georgi be8f0fa2bb util/cbmem: Initialize variable
There can be cases where "found" wasn't initialized, do so.

Change-Id: Ifef8d61daa70e27ec39b7a8f3481d2316dfaa36e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1347334
Reviewed-on: https://review.coreboot.org/15969
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-07-31 19:15:34 +02:00
Patrick Georgi 8260650cde nvramtool: Don't consider reserved regions to be "out of range"
Reserved regions showed different behavior for debug and regular builds.
Debug output was unfriendly, regular was wrong.
Print a proper error message and exit instead.

Change-Id: I9842ff61f7d554800e2041e8c4c607f22b2df79f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1287076
Reviewed-on: https://review.coreboot.org/15968
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-31 19:07:43 +02:00
Omar Pakker 312e9f586a superiotool: Add Nuvoton NCT6791D
This adds support for the Nuvoton NCT6791D Super I/O chip to the
superiotool.
The implementation is based on the Datasheet supplied by Nuvoton:
Datasheet Version: January 8th, 2016 Revision 1.11

Datasheet deviation:
- Defaults for control registers 0x20 and 0x21 are invalid.
  Datasheet: 0xc562. Actual: 0xc803.

Change-Id: I8ced9738cd41960cbab7b5ea38ff19192d210672
Signed-off-by: Omar Pakker <omarpakker+coreboot@gmail.com>
Reviewed-on: https://review.coreboot.org/15252
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-07-31 18:35:59 +02:00
Martin Roth 4c72d3612b Remove extra newlines from the end of all coreboot files.
This removes the newlines from all files found by the new
int-015-final-newlines script.

Change-Id: I65b6d5b403fe3fa30b7ac11958cc0f9880704ed7
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15975
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-07-31 18:19:33 +02:00
Nico Huber 4b48ed8f38 buildgcc: Apply patches with -p1
Turned out that there are versions of the patch command that use the
left hand side path for new files created by a patch. This behavior is
incompatible with some of our patches. Stripping the topmost dir from
the path with -p1 helps.

While touching that line, I couldn't resist to drop a command
substituion (the `echo $patch`). It really shouldn't be necessary as the
path to the patch file is already expanded in the head of the for loop.

Change-Id: I95398605db6dd54a8b08d8bc84c6602edbea6e10
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/15908
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
Tested-by: build bot (Jenkins)
2016-07-31 17:37:41 +02:00
Stefan Reinauer 28434a9ca7 util/chromeos: Make scripts executable
crosfirmware.sh and extract_blobs.sh are not executable, change that.

Change-Id: Ib04df580a9acd4a422aedbdc15013b2ef505459a
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/15922
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Omar Pakker
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-07-30 19:34:20 +02:00
Paul Menzel aad4587c03 viatool/quirks: Add newline to end of file
Change-Id: If505021c6dd4bc1c98094dc6e4a3da1ea7753859
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/15916
Tested-by: build bot (Jenkins)
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2016-07-28 20:18:10 +02:00
Elyes HAOUAS e3e2bb0a89 util: Correct typo in MSR_EBC_SOFT_POWERON
Change-Id: Iba5fc92d8740d0bb7d41f8a83513ba7fb97be592
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/15900
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-07-28 01:09:37 +02:00
Elyes HAOUAS 7ab98fb790 util/msrtool: update register for Pentium4_later
Update MSR's registers regarding "Intel® 64 and IA-32
Architectures Software Developer’s Manual"- April 2015.
"64-ia-32-architectures-software-developer-manual-325462.pdf"

Change-Id: I71e399c4a6fef9de6a5581b64a6918660b2f8445
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/15798
Tested-by: build bot (Jenkins)
Reviewed-by: Anton Kochkov <anton.kochkov@gmail.com>
2016-07-28 01:09:02 +02:00
Elyes HAOUAS e5a5084b70 msrtool/README: Remove trailing spaces
Change-Id: I8b7d2263591608e0ab9504262bb06eac4cb52850
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/15779
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-07-28 01:08:47 +02:00
Paul Kocialkowski 46114517d7 Rename VB_SOURCE to VBOOT_SOURCE for increased clarity
This renames the VB_SOURCE variable to VBOOT_SOURCE in the build system,
providing increased clarity about what it represents.

Since the submodule itself is called "vboot", it makes sense to use that
name in full instead of a very shortened (and confusing) version of it.

Change-Id: Ib343b6642363665ec1205134832498a59b7c4a26
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/15824
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-07-27 17:26:05 +02:00
Paul Kocialkowski 7899db2355 buildgcc: Never set GMP CFLAGS manually in order to get the right flags
When no CFLAGS are explicitly provided to it, the GMP configure script
will figure out the best optimization flags to use on its own. In
particular, it will setup the march, mfpu and mtune flags based on
hardware detection.

However, when CFLAGS are provided, they are used as-is and such
detection doesn't happen. When the march, mfpu and mtune flags are not
provided (which happens when GMP wasn't built already), not only will
related optimizations be disabled, but some code might not build because
of missing support. This happens with NEON instructions on ARMv7 hosts.

Thus, it is better not to set CFLAGS and leave it up to the GMP
configure script to get them right and still reuse those later.

Change-Id: I6ffcbac1298523d1b8ddf29a8bca1b00298828a7
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/15452
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-07-21 11:49:25 +02:00
Antonello Dettori 613702b5dc cbmem: share additional time stamps IDs
Split the additional time stamps concerning depthcharge from
the cbmem utility sourcecode and move them into
commonlib/timestamp_serialized.h header.

Change-Id: Ic23c3bc12eac246336b2ba7c7c39eb2673897d5a
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/15725
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-07-20 22:09:24 +02:00
Martin Roth 6101dfbaf3 buildgcc: Update the revision to 1.41
The binutils patch went in without updating the revision,
so we need to update it now. This was done in commit bcfa7ccb
(buildgcc: Update to binutils-2.26.1 & Fix aarch64 build issue)

Change-Id: Ifad4a2e3973f1f60d0ea840945e2bd097e1b4474
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15712
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-07-16 00:03:30 +02:00
Martin Roth bcfa7ccb28 buildgcc: Update to binutils-2.26.1 & Fix aarch64 build issue
- Update to the latest version of GNU binutils
- Add a patch to undo the changes to binutils done by commit c1baaddf
so that arm-trusted-firmware builds correctly again.

Test: Build arm-trusted-firmware (ATF) with this patch.  Build ATF
with binutils 2.26.1 changing the '.align x,0' to '.align x', which
changes the padding bytes to NOP instructions.  Verify that everything
except the padding bytes is the same.

See https://sourceware.org/bugzilla/show_bug.cgi?id=20364 for more
information about this issue.

Change-Id: I559c863c307b4146f8be8ab44b15c9c606555544
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15711
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
2016-07-14 23:58:56 +02:00
Jonathan Neuschäfer 8660580567 util/riscvtools: Provide a tohost/fromhost symbols so Spike doesn't hang
See https://github.com/riscv/riscv-isa-sim/issues/54 for more
information.

Change-Id: I8cda8dc07866d395eb3ce5d94df8232840fa8b82
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/15288
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-07-14 18:23:05 +02:00
Martin Roth bfe6f6a72e kconfig: add olddefconfig target to help
olddefconfig is used to expand the miniconfig files with all the default
values removed by the 'savedefconfig' target.

Change-Id: Ic9c62f4c334919e8be478d30099819b90891670a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15319
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-07-12 19:23:36 +02:00
Nico Huber 234d246535 buildgcc: Add option to bootstrap a host gcc
Bootstrapping gcc is the recommended way if your host gcc's version
doesn't match the gcc version you're going to build. While a build
with an outdated host gcc usually succeeds, an outdated gnat seems
to be a bigger issue.

v3: Some library controversy: gcc likes the libraries it ships with
    most but we don't want to install shared libraries. So we build
    them static --disable-shared) and install only the minimum
    (libgcc, libada, libstdc++). However, as the code of these
    libraries might be used to build a shared library we have to
    compile them with `-fPIC`.

v4: o Updated getopt strings.
    o The workaround for clang (-fbracket-depth=1024) isn't needed
      for bootstrapping and also breaks the build, as clang is only
      used for the first stage in that case and gcc doesn't know
      that option.

So far build tested with `make BUILDGCC_OPTIONS="-b -l c,ada"` on
  o Ubuntu 14.04 "Trusty Tahr" (i386)
  o Debian 8 "Jessie" (x86_64) (building python (-S) works too)
  o current Arch Linux (x86_64)
  o FreeBSD 10.3 (x86_64) (with gcc-aux package)

and with clang host compiler, thus C only: `make BUILDGCC_OPTIONS="-b"`
on
  o Debian 8 "Jessie" (x86_64)
  o FreeBSD 10.3 (x86_64)

v5: Rebased after toolchain updates to GCC 5.3.0 etc.

Build tested with `make BUILDGCC_OPTIONS="-b -l c,ada"` on
  o Debian 8 "Jessie" (x86_64)

Change-Id: Icb47d3e9dbafc55737fbc3ce62a084fb9d5f359a
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/13473
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-07-05 11:52:57 +02:00
Nico Huber 11ea2b378b buildgcc: Make package build() function more versatile
Refactor build() to make things more flexible:

Add a parameter that tells if we build a package for the host or for a
target architecture. This is just passed to the build_$package()
function and can be used later to take different steps in each case
(e.g. for bootstrapping a host gcc).

Move .success files into the destination directory. That way we can tell
that a package has been built even if the package build directory has
been removed.

Change-Id: I52a7245714a040d11f6e1ac8bdbff8057bb7f0a1
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/13471
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-07-05 11:52:40 +02:00
Patrick Georgi 2b80734811 fmaptool: Accept hex values with uppercase letters
Due to a newer flex version with which the scanner was recreated, we
also have to make the compiler less strict on the generated code.

Change-Id: I3758c0dcb2f5661d072b54a30d6a4ebe094854e6
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/15482
Tested-by: build bot (Jenkins)
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-07-04 12:17:51 +02:00
Antonello Dettori 0b806285a7 cbfstool: Require "-m ARCH" to extract payloads and stages
Require the user to specify which architecture the payload/stage
was built for before extracting it.

Change-Id: I8ffe90a6af24e76739fd25456383a566edb0da7e
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/15438
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-07-02 03:27:33 +02:00
Jonathan Neuschäfer e1a022ade4 util/kconfig: Fix gconfig build
This linker error was the problem:

build/util/kconfig/zconf.tab.o: In function `conf_read_simple':
/home/jn/dev/coreboot/util/kconfig/confdata.c:413: undefined reference to `kconfig_warnings'
/home/jn/dev/coreboot/util/kconfig/confdata.c:413: undefined reference to `kconfig_warnings'
build/util/kconfig/zconf.tab.o: In function `sym_calc_value':
/home/jn/dev/coreboot/util/kconfig/symbol.c:388: undefined reference to `kconfig_warnings'
/home/jn/dev/coreboot/util/kconfig/symbol.c:388: undefined reference to `kconfig_warnings'
collect2: error: ld returned 1 exit status
/home/jn/dev/coreboot/util/kconfig/Makefile:339: recipe for target 'build/util/kconfig/gconf' failed
make: *** [build/util/kconfig/gconf] Error 1

Change-Id: I4a667c7c15b35618fb9ad536f2be5044b8031ab4
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/15505
Tested-by: build bot (Jenkins)
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-07-01 19:29:53 +02:00
Martin Roth deed18627d rebase.sh: Update to current cros branch
Change-Id: I04add4e6fc957cb9a0cdefe79ec9e97e3cebdf8e
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15322
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-06-29 16:48:18 +02:00
Werner Zeh 310580ea13 ifwitool: Fix gcc error due to shadowed global declaration
The name 'bpdt_size' is used for a function as well as ia local variable.
As ifwitool is compiled using HOSTCC, there can be an older gcc version
used for the compilation. With gcc version 4.4.7 I get the following
error: declaration of 'bpdt_size' shadows a global declaration
To fix it, rename the function to get_bpdt_size so that names are
unique now.

Change-Id: I47791c705ac4ab28307c52b86940a7a14a5cfef8
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/15343
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2016-06-26 10:49:06 +02:00
Benjamin Barenblat 82ef8ada82 src/commonlib/lz4_wrapper: Correct inline asm for unaligned 64-bit copy
Rewrite inline assembly for ARMv7+ to correctly annotate inputs and
outputs.  On ARM GCC 6.1.1, this causes assembly output to change from
the incorrect

	@ r0 is allocated to hold dst and x0
	@ r1 is allocated to hold src and x1
	ldr r0, [r1]		@ clobbers dst!
	ldr r1, [r1, #4]
	str r0, [r0]
	str r1, [r0, #4]

to the correct

	@ r0 is allocated to hold dst
	@ r1 is allocated to hold src and x1
	@ r3 is allocated to hold x0
	ldr r3, [r1]
	ldr r1, [r1, #4]
	str r3, [r0]
	str r1, [r0, #4]

Also modify checkpatch.pl to ignore spaces before opening brackets when
used in inline assembly.

Change-Id: I255995f5e0a7b1a95375258755a93972c51d79b8
Signed-off-by: Benjamin Barenblat <bbaren@google.com>
Reviewed-on: https://review.coreboot.org/15216
Tested-by: build bot (Jenkins)
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-06-24 19:10:05 +02:00
Alexander Couzens 2c68b1c732 cbfstool: Change CONFIG_FMD_GENPARSER if not set to n
When doing make in util/cbfstool it contaminates the tree because it generates
the fmd_parser.

Change-Id: Ida855d1e57560c76d3fcfcc8e2f7f75bcdfdd5d4
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://review.coreboot.org/15221
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-06-21 17:55:17 +02:00
Julius Werner 119dcee1dd fmaptool: Make base offsets absolute in fmap_config.h
fmaptool generates a header file used to hardcode certain values from
the FMAP in coreboot's binaries, to avoid having to find and parse the
FMAP manually for every access. For the offset of the FMAP itself this
has already been using the absolute offset from the base of the whole
ROM, but for individual CBFS sections it only used the offset from the
immediate parent FMAP region. Since the code using it intentionally has
no knowledge of the whole section tree, this causes problems as soon as
the CBFS is a child section of something not at absolute offset 0 (as is
the case for most x86 Chromebooks).

Change-Id: If0c516083949fe5ac8cdae85e00a4461dcbdf853
Reported-by: Rolf Evers-Fischer <embedded24@evers-fischer.de>
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/15273
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-06-21 17:14:27 +02:00
Jonathan Neuschäfer 2459f67731 util/riscvtools: Add script that turns coreboot.rom into an ELF
This is required because SPIKE doesn't support loading flat files yet.

Change-Id: If745d78712ca8108b5dcc21591201bc2d3f70b86
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/14964
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-06-21 00:10:14 +02:00
Antonello Dettori fda691ef53 cbfstool: Extract payload in ELF
Implement function that automatically converts a SELF payload,
extracted from the CBFS, into an ELF file.

The code has been tested on the following payloads:
Working: GRUB, FILO, SeaBIOS, nvramcui, coreinfo and tint
Currently not working: none

Change-Id: I51599e65419bfa4ada8fe24b119acb20c9936227
Signed-off-by: Antonello Dettori <dettori.an@gmail.com>
Reviewed-on: https://review.coreboot.org/15139
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-06-17 20:44:28 +02:00
Antonello Dettori 3bded7db7e elfwriter: Fix multi-phdrs ELFs parsing
Allow to write multiple phdrs, one for each non-consecutive section
of the ELF.
Previously it only worked for ELFs contaning a single
program header.

Change-Id: If6f95e999373a0cab4414b811e8ced4c93c67c30
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/15215
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-06-17 20:04:27 +02:00
Furquan Shaikh e51c20bf2c ifwitool: Calculate checksum for subpart_dir
Checksum is calculated by using 2s complement method. 8-bit sum of the
entire subpart directory from first byte of header to last byte of last
partition directory entry.

BUG=chrome-os-partner:53508

Change-Id: I991d79dfdb5331ab732bf0d71cf8223d63426fa8
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/15200
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-06-16 19:38:36 +02:00
Rolf Evers-Fischer eb8b7d6ef4 ifwitool: Fix calculation of dst_size
Change-Id: I07523252eacffb323e2bb54c306f5e9ac83e4cbd
Signed-off-by: Rolf Evers-Fischer <embedded24@evers-fischer.de>
Reviewed-on: https://review.coreboot.org/15162
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-06-15 17:37:17 +02:00
Furquan Shaikh e7f35cd292 ifwitool: Do not calculate checksum for subpart_dir
1. The checksum method that was documented is not correct. So, no use
filling in a value based on wrong calculations. This can be added back
once updated information is available.
2. Checksum does not seem to affect the booting up of SoC. So, fill in 0
for now.

Change-Id: I0e49ac8e0e04abb6d7c9be70323612bdef309975
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/15145
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-06-12 12:45:25 +02:00
Furquan Shaikh fe42b11cdf ifwitool: Correct pack order and header order
Update pack and header order and mark the entries as mandatory and
recommended w.r.t. ordering (mandatory = essential for booting,
recommended = okay to change, but this config is tested and known to work).

Change-Id: Ia089bdaa0703de830bb9553130caf91a3665d2c4
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/15144
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-06-12 12:44:23 +02:00
Chris Ching 5343b1fc27 autoport: Add prompt for enabling unsafe inteltool glx option
Change-Id: Ib674ab7ca8b6464de553a86536b1762fda98d94e
Signed-off-by: Chris Ching <chingcodes@google.com>
Reviewed-on: https://review.coreboot.org/14901
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-06-12 12:27:57 +02:00
Lee Leahy c9bf8bfabf util/checklist: Add bootblock support
Scan the boot block when building it with C_ENVIRONMENT_BOOTBLOCK
selected.

TEST=Build and run with Galileo Gen2

Change-Id: I922f761c31e95efde0975d8572c47084b91b2879
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/15130
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-06-09 23:10:40 +02:00
Stefan Tauner 37fcd58ba6 inteltool: handle unsafe dumping of graphics registers
The current implementation from Vladimir simply dumps 1 MB of memory
contents starting at the base address of the second PCI device (which
most likely is the VGA controller on Intel systems). This locks up a
number of different systems, e.g. my Ibex Peak-based T410s.

This patch documents the issue and stops dumping the graphics registers
for the -a/--all parameter.

Change-Id: I581bdc63db60afaf4792bc11fbeed73aab57f63a
Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at>
Reviewed-on: https://review.coreboot.org/14627
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2016-06-08 22:35:57 +02:00
Antonello Dettori 75c37058b3 cbfstool: Allow to easily build the individual tools
Adds a label for each tool included in the cbfstool package
in order to build them more easily through Make.

Change-Id: Id1e5164240cd12d22cba18d7cc4571fbadad38af
Signed-off-by: Antonello Dettori <dettori.an@gmail.com>
Reviewed-on: https://review.coreboot.org/15075
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-06-08 18:47:49 +02:00
Omar Pakker a03609b496 intelmetool: Add the X99 ISA Bridge device id
This adds the ISA bridge device id for the Intel C160/X99 series
chipset to the intelmetool.

Change-Id: I2e7db0fe1692985ebb167b9a44ab412a45a9f3bd
Signed-off-by: Omar Pakker <omarpakker+coreboot@gmail.com>
Reviewed-on: https://review.coreboot.org/15053
Tested-by: build bot (Jenkins)
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@googlemail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-06-04 23:41:22 +02:00
Lee Leahy fc3741f379 Add Board Checklist Support
Build the <board>_checklist.html file which contains a checklist table
for each stage of coreboot.  This processing builds a set of implemented
(done) routines which are marked green in the table.  The remaining
required routines (work-to-do) are marked red in the table and the
optional routines are marked yellow in the table.  The table heading
for each stage contains a completion percentage in terms of count of
routines (done .vs. required).

Add some Kconfig values:
*  CREATE_BOARD_CHECKLIST - When selected creates the checklist file
*  MAKE_CHECKLIST_PUBLIC - Copies the checklist file into the
   Documenation directory
*  CHECKLIST_DATA_FILE_LOCATION - Location of the checklist data files:
   *  <stage>_complete.dat - Lists all of the weak routines
   *  <stage>_optional.dat - Lists weak routines which may be optionally
      implemented

TEST=Build with Galileo Gen2.

Change-Id: Ie056f8bb6d45ff7f3bc6390b5630b5063f54c527
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/15011
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-06-03 17:29:13 +02:00
Furquan Shaikh 55d2e5398b ifwitool: Fix syntax issues with ifwitool
Change-Id: Ie7a12a39116ee08f5e24c81c97695201169a63f7
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/15022
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-06-01 21:16:45 +02:00
Furquan Shaikh 233f1b6a38 ifwitool: Add new tool for managing IFWI images
- Supports following operations:
 1. add raw/dir sub-partition
 2. extract raw/dir sub-partition
 3. print info
 4. delete raw sub-partition
 5. replace raw/dir sub-partition

Change-Id: I683a0ab13cc50eb60eecca34db4a8ffefc8dccbd
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/14896
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-30 23:51:42 +02:00
Furquan Shaikh 161d2334e8 util/cbfstool: Include commonlib/helpers.h in common.h
This avoids re-declaring common macros like ARRAY_SIZE, MIN, MAX and
ALIGN. Also removes the issues around including both files in any
tool.

Also, fix comparison error in various files by replacing int with
size_t.

Change-Id: I06c763e5dd1bec97e8335499468bbdb016eb28e5
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/14978
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-28 08:48:45 +02:00
Furquan Shaikh 1ac194e14a cbfstool: Move cbfs_file_get_header to fit.c
Since fit.c is the only caller of this function move it out of common.c
and into fit.c.

Change-Id: I64cc31a6d89ee425c5b07745ea5ca9437e2f3fcf
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/14949
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-05-26 23:51:08 +02:00
Roberto Muñoz Gómez 15a53c6329 superiotool: Add support for chip NCT6102D / NCT6106D
Add support for chip NCT6102D / NCT6106D in superiotool

Change-Id: I689ff8e796f43a5aac144e9898df750407588b1f
Signed-off-by: Roberto Muñoz Gómez <munoz.roberto@gmail.com>
Reviewed-on: https://review.coreboot.org/14206
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins)
2016-05-26 01:05:25 +02:00
Aaron Durbin 493ec92eb3 util/cbfstool: allow option to honor FSP modules' linked address
If '-b' isn't passed when adding an FSP file type to CBFS allow
the currently linked address to be used. i.e. don't relocate the
FSP module and just add it to CBFS.

Change-Id: I61fefd962ca9cf8aff7a4ca2bea52341ab41d67b
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/14839
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
2016-05-18 03:19:12 +02:00
Jonathan Neuschäfer 0e962eeb93 board_status: Abort early if the coreboot image doesn't exist
Change-Id: I274c990e69634ebcb9dd77470cbf1515281de312
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/14683
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-05-18 00:17:18 +02:00
Duncan Laurie 4650f5baff sconfig: Add a new generic device type
Add support for a basic generic device in the devicetree to bind to a
device that does not have a specific bus, but may need to be described
in tables for the operating system.  For instance some chips may have
various GPIO connections that need described but do not fall under any
other device.

In order to support this export the basic 'scan_static_bus()' that can
be used in a device_operations->scan_bus() method to scan for the generic
devices.

It has been possible to get a semi-generic device by using a fake PNP
device, but that isn't really appropriate for many devices.

Also Re-generate the shipped files for sconfig.  Use flex 2.6.0 to avoid
everything being rewritten.  Clean up the local paths that leak into the
generated configs.

Change-Id: If45a5b18825bdb2cf1e4ba4297ee426cbd1678e3
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/14789
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Leroy P Leahy <leroy.p.leahy@intel.com>
2016-05-16 19:49:59 +02:00
Duncan Laurie b7ce5fe311 sconfig: Add 10bit addressing mode to i2c device type
Use the second token for an i2c device entry in devicetree.cb to
indicate if it should use 10-bit addressing or 7-bit.  The default if
not provided is to use 7-bit addressing, but it can be changed to
10-bit addressing with the ".1" suffix.  For example:

chip drivers/i2c/generic
  device i2c 3a.1 on end
end

Change-Id: I1d81a7e154fbc040def4d99ad07966fac242a472
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/14788
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-16 19:49:46 +02:00
Duncan Laurie b1fb0152bf sconfig: Allow strings in devicetree.cb
Currently you cannot assign a string to a register in devicetree because
the quotes are removed when parsing and the literal is assigned directly.

Add a parse option for two double-quotation marks to indicate a string
and return a quoted literal that can be assigned to a register with a
'const char *' type.

Example:

chip drivers/i2c/generic
  register "hid" = ""INT343B""
  register "uid" = "1"
  device i2c 15 on end
end

Change-Id: I621cde1f7547494a8035fbbab771f29522da1687
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/14787
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-16 19:49:37 +02:00
David Hendricks b2aa5283e6 board_status: Add longopt equivalents for older options
Long options can be useful when writing examples and documentation
as they are more expressive and obvious to the reader.

Change-Id: I39496765ba1f15ccc2ffe1ad730f0f95702f82b8
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://review.coreboot.org/14736
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2016-05-16 19:19:54 +02:00
Jonathan Neuschäfer 4aef682819 board_status: Add an option to set the SSH port
If the option is not provided, ssh uses the default port for the host,
which is usually 22, but may be overridden in the user's SSH
configuration.

Change-Id: I303e9aeae16bd73a96c5e6d54f8e39482613db28
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/14522
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2016-05-13 17:30:58 +02:00
Jonathan Neuschäfer 478c889847 board_status: Use explicit branch name in "git push"
In some configurations, "git push <remote>" (without a branch name)
refuses to do anything.

Change-Id: I23a401b39dd851e9723676586c7f29afa111b49d
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/14539
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2016-05-13 17:29:35 +02:00
Stefan Tauner 572f074971 inteltool: update documentation
- manpage
 - usage message
 - new warning message if -S is used on an unsupported chipset

Change-Id: I1acaa5f4232b65244ec00fd22ec7460d9cc387f1
Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at>
Reviewed-on: https://review.coreboot.org/14624
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2016-05-13 16:58:56 +02:00
Furquan Shaikh b0c2fe0554 cbfstool/fsp: Rename fsp1_1_relocate
FSP 2.0 uses the same relocate logic as FSP 1.1. Thus, rename
fsp1_1_relocate to more generic fsp_component_relocate that can be
used by cbfstool to relocate either FSP 1.1 or FSP 2.0
components. Allow FSP1.1 driver to still call fsp1_1_relocate which
acts as a wrapper for fsp_component_relocate.

Change-Id: I14a6efde4d86a340663422aff5ee82175362d1b0
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/14749
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2016-05-11 18:38:28 +02:00
Furquan Shaikh 61c1a05c07 util/cbfstool: Allow xip/non-xip relocation for FSP component
Currently, convert_fsp assumes that the component is always XIP. This
is no longer true with FSP 2.0 and Apollolake platform. Thus, add the
option -y|--xip for FSP which will allow the caller to mention whether
the FSP component being added is XIP or not. Add this option to
Makefiles of current FSP drivers (fsp1_0 and fsp1_1).

Change-Id: I1e41d0902bb32afaf116bb457dd9265a5bcd8779
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/14748
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2016-05-11 18:38:13 +02:00
Pratik Prajapati de62e0f079 util/mma: changing BOOT_STUB to COREBOOT region and few more things
(1) Added following new function.

cbfs_locate_file_in_region - to locate (and mmap) a file in a flash
region
  This function is used to look for MMA blobs in "COREBOOT" cbfs region

(2) mma_setup_test.sh would write to "COREBOOT" region.

(3) changes in mma_automated_test.sh. Few MMA tests need system to
be COLD rebooted before test can start. mma_automated_test.sh would
do COLD reboot after each test, and so i would sync the filesystem
before doing COLD reboot.

BRANCH=none
BUG=chrome-os-partner:43731
TEST=Build and Boot kunimitsu (FAB4). Able to locate MMA files in CBFS
Not tested on Glados.

Change-Id: I8338a46d8591d16183e51917782f052fa78c4167
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 1e418dfffd8a7fe590f9db771d2f0b01a44afbb4
Original-Change-Id: I402f84f5c46720710704dfd32b9319c73c412e47
Original-Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/331682
Original-Commit-Ready: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Tested-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: https://review.coreboot.org/14125
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-05-10 22:59:36 +02:00
Pratik Prajapati 0175fb1b4f util/mma: Add tools to support (semi) automation test of mma
mma_automated_test.sh takes a config file (/usr/local/mma/tests) as
input and executes all tests mentioned in the config file.

format of the config file is one or more lines mentioned below.

	<MMA test name> <MMA test param> <#count>

e.g. consider following config file.

	Margin1D.efi Margin1DRxVrefConfig.bin 4
	RMT.efi RMTConfig.bin 1
	MarginMapper.efi ScoreTxVref-TxDqDelayConfigCh1.bin 2
	Margin2D.efi Margin2D_Cmd_Ch0_D1_R0_Config.bin 3

This will execute Margin1D.efi MMA test 4 times with
Margin1DRxVrefConfig.bin param and results will be stored
in DUT under /usr/local/mma/results_<date-time-stamp>
with Margin1D_Margin1DRxVrefConfig_1.bin to
Margin1D_Margin1DRxVrefConfig_4.bin name.  Subsequently all tests
will be executed and results will be stored.

/etc/init/mma.conf invokes mma_automated_test.sh when DUT
starts. And if valid test config is preset at /usr/local/mma/tests,
mma_automated_test.sh will continue executing the tests.  Each time
DUT will be rebooted and next test in sequence will be executed.

Overall follow these steps to start MMA.
(1) create /usr/local/mma/tests file with the syntax mentioned above.
(2) either reboot the DUT (mma.conf will be called at each boot time,
which would run the mma_automated_test.sh) or execute "start mma"
command (to save a reboot cycle.)
(3) all test results can be found under
/usr/local/mma/results_<date-time-stamp> where <date-time-stamp> is
YY_MM_DD_HH_mm format (YEAR_MONTH_DAY_HOUR_MINUTE) when you started
the mma tests.

BRANCH=none
BUG=chrome-os-partner:43731
TEST=Build and Boot kunimitsu (FAB3). MMA automation tests executes
and results get saved.

Change-Id: I6805fdb95b7ff919f9c8e967b748e4893a3f9889
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 68c0a531ba3fc335b92b17002e75412195b778c4
Original-Change-Id: I92db7ca47e1e3e581c3fbb413f11e2c3e6d19b6b
Original-Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Signed-off-by: Icarus Sparry <icarus.w.sparry@intel.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/313180
Original-Commit-Ready: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Tested-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: https://review.coreboot.org/12928
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-05-10 22:59:15 +02:00
Varadarajan Narayanan 2dfbd93ed6 util: ipq40xx: Scripts to combine SBL and Coreboot ELFs
The IPQ40xx Primary Boot Loader (PBL, i.e. Boot-ROM) expects an
ELF in the boot medium to load and boot. These scripts combine
the Secondary Boot Loader (SBL) and Coreboot ELF to an image as
expected by the PBL.

BUG=chrome-os-partner:49249
TEST=Able to boot and reach depthcharge
BRANCH=none

Change-Id: I5d02b7f1f58bb23d81a3e19fb9b78f3a999b89f3
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 819c7f2a810ca2880718ba14f2451f06eef4d98b
Original-Change-Id: I017207b2d4108de150853f421aa7bcfd0e12e9a4
Original-Signed-off-by: Varadarajan Narayanan <varada@codeaurora.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/340181
Original-Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Original-Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://review.coreboot.org/14680
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-05-09 09:36:27 +02:00
Stefan Reinauer 2e78aa5a78 util/sconfig: Fix warnings
and re-generate _shipped files

Change-Id: I7a18824d64d3f6212e8566695376bf97e2196ee2
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14733
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-05-08 21:37:36 +02:00
David Hendricks 292be87205 board_status: Allow for parsing longopts
This converts the argument parsing to allow us to add longopts
using GNU getopt(1).

Shortopts should be reserved for general parameters. Longopts can be
used to tweak specific behaviors. For example, we might wish to add
options to set SSH port, timeout, and authentication parameters
with "--ssh-port", "--ssh-timeout", "--ssh-identity", etc.

Change-Id: Idee5579079dbbb7296ad98f5d6025b01aab55452
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://review.coreboot.org/14523
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2016-05-07 03:15:12 +02:00
Aaron Durbin ab00d779ed util/cbfstool: fix x86 execute-in-place semantics for all fmd regions
A previous patch [1] to make top-aligned addresses work within per
fmap regions caused a significant regression in the semantics of
adding programs that need to be execute-in-place (XIP) on x86
systems. Correct the regression by providing new function,
convert_to_from_absolute_top_aligned(), which top aligns against
the entire boot media.

[1] 9731119b cbfstool: make top-aligned address work per-region

Change-Id: I3b685abadcfc76dab8846eec21e9114a23577578
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/14608
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@google.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2016-05-06 16:49:01 +02:00
Stefan Reinauer 3dc5d079fe buildgcc: Update Python to 3.5.1
Change-Id: I57f935b94ab0db2e9ff9434fb496d470bb4ec987
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14463
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-05-04 20:40:57 +02:00
Stefan Reinauer 498f3d0cd5 buildgcc: Update gdb and expat
Update gdb to 7.11 and expat to 2.1.1
riscv64-elf is still broken.

Change-Id: Id7605f4274fcb15f9c3e366f5c492328f70f7956
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14461
Tested-by: build bot (Jenkins)
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
2016-05-04 20:21:29 +02:00
Iru Cai ae8e3a0bbb crossgcc: Update toolchain
New tools:
* mpfr 3.1.4
* binutils 2.26
* gcc 5.3.0
* llvm/clang 3.8.0

Patch changes:
* binutils-2.25_fix-aarch64.patch: fixed in 2.26
* binutils-2.25_host-clang.patch: the positions of header file
  includes have been adjusted
* binutils-2.25_no-bfd-doc.patch: update to 2.26
* binutils-2.25_riscv.patch: update from riscv-gnu-toolchain
* gcc-5.2.0_elf_biarch.patch: update to 5.3.0
* gcc-5.2.0_gnat.patch: update to 5.3.0
* gcc-5.2.0_libgcc.patch: update to 5.3.0
* gcc-5.2.0_nds32.patch: update to 5.3.0
* gcc-5.2.0_riscv.patch: update from riscv-gnu-toolchain
* cfe-3.7.1.src_frontend.patch: update to 3.8.0

In the latest code of riscv-gnu-toolchain project, the patch for
{binutils,gcc}/config.sub has been removed, and the target is renamed
as riscv32 and riscv64. The `riscv' to `riscv64' change in xcompile is
in another commit.

Test results:
All GCC and LLVM/clang toolchain build successfully.

x86,arm: qemu boots
power8: firmware fails to boot
aarch64,mips: not tested
riscv: firmware fails to build with new binutils
clang: firmware fails to boot

Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Change-Id: I42ce89c29263d768d161c28199994f17d0389633
Reviewed-on: https://review.coreboot.org/14227
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-05-04 20:21:11 +02:00
Joseph Pillow d3fccfbc41 crosfirmware: Make script more silent
Remove debug output and parted messages.

Change-Id: I6416a88b5fdb4c92741439e9edb5f753f885cbe3
Signed-off-by: Joseph Pillow <joseph.a.pillow@gmail.com>
Reviewed-on: https://review.coreboot.org/14460
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-05-04 18:54:59 +02:00
Nico Huber 5f72f960df buildgcc: Always set HOSTCFLAGS
Always set HOSTCFLAGS to the flags GMP was built with, defaulting to
"-Os" if it isn't built yet. Previously, if GMP was already built or
not even in the list of packages to be built, this was silently skipped
and other packages were built with empty HOSTCFLAGS.

Change-Id: I29b2ea75283410a6cea60dc1c92b87573aebfb34
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/13550
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-05-04 13:39:14 +02:00
Stefan Reinauer d9d2102bec buildgcc: Use smaller xz archives
The xz archives are slightly smaller than the bz2 archives for gmp
and mpfr, so use them instead to speed up the download.

Change-Id: I3729455cdbc46e5a0cff119ecca97b0e00c3d402
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14462
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-05-04 07:20:49 +02:00
Stefan Reinauer a344b68936 buildgcc: Drop --target from python and expat
Both packages are not using the target architecture. Drop it,
and remove them from package_uses_targetarch

Change-Id: I58efde4cb7cc39e7e3c31527eb7682e318928100
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14464
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-05-04 07:20:17 +02:00
Patrick Georgi 919be612b8 fmaptool: Export some fmap knowledge to the build environment
By exporting base and offset of CBFS-formatted fmap regions, the code
can use these when it's not prudent to do a runtime lookup.

Change-Id: I20523b5cea68880af4cb1fcea4b37bb8ac2a23db
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/14571
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-03 11:42:45 +02:00
Stefan Tauner 98ab22711d xcompile: test if gcc is really available
Just because an 'as' with a certain prefix is available does not guarantee
that a 'gcc' with the same prefix is available as well.

Without a check detect_compiler_runtime() would try to execute an
unavailable binary and print something like this:
.../xcompile: line 218: arm-linux-gnueabi-gcc: command not found

Change-Id: Icbadfeb2860152f7cf7696a9122521d0d881f3aa
Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at>
Reviewed-on: https://review.coreboot.org/14563
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-05-03 04:16:24 +02:00
Jonathan Neuschäfer 2d67d12570 board_status/towiki: Link to CGit instead of Gitweb
Gitweb isn't online anymore, so fix a few broken links.

Change-Id: I7fdfcb60f83a718c9a5b6c7f7ef4df9206451d95
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/14559
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-05-03 04:13:35 +02:00
Jonathan Neuschäfer 2a8adac7f5 romcc.1: Point bug reporters to the coreboot ML / bug tracker
Change-Id: Ic0866a5183c64070ef35b21ba00586bc65dfcde8
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/14538
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-05-01 16:29:09 +02:00
Timothy Pearson c410b18337 board_status/to-wiki: Fix background color of very recent test results
Test results under 16 days old display with an incorrect background color
due to the leading zero not being preset in the associated HTML color code.

Add the leading zero where needed to generate a valid HTML color code.

Change-Id: I0dfe29ec1afc409a4908073922ac31a4091f0f1f
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/14514
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-26 20:50:07 +02:00
Timothy Pearson 7501b6c285 board_status/to-wiki: Indicate age of test results by background color
A major issue with the board-status Wiki page is that it shows all
test results equally regardless of age.  As a test result ages it
becomes more likely that the board no longer works peroperly under
coreboot due to code churn.

Visually indicate board-test status "at a glance" by smoothly fading
the background color of the test result from green to yellow as the
test result ages.  This patch sets the full yellow transition to 255
days after test for programming convenience, however the number of
days required to fully "stale" a test result could be modified
relatively easily.

Change-Id: I5a076a6cc17d53fda8e4681e38074fc1f46c0e12
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/14457
Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
Tested-by: build bot (Jenkins)
2016-04-25 17:17:31 +02:00
Huimin Zhang 2fb2483d44 Reject duplicate results in board-status.
This is in response to issue #28: board-status should reject duplicate 
uploads. 

Change-Id: Iff99be154b35e8c0f9f05f9470d1c2dcff8510b8
Signed-off-by: Huimin Zhang <thehobn@gmail.com>
Reviewed-on: https://review.coreboot.org/14187
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-24 04:19:13 +02:00
Stefan Reinauer 477a0d69e5 fmaptool: Make sure strings are not destroyed on hdestroy()
On Mac OS X hdestroy seems to overwrite node->name. Hence
duplicate the string before stuffing it into the hash search
table.

Change-Id: Ieac2025f5c960cdb8d509dde7e92ba0dd32644b0
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14443
Tested-by: build bot (Jenkins)
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-22 20:41:34 +02:00
Alexander Couzens ebef00faf6 lint/checkpatch.pl: escape \{ in perl regex to fix warnings
Fix warnings:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at util/lint/checkpatch.pl line 3261.
marked by <-- HERE in m/\(.*\){ <-- HERE / at util/lint/checkpatch.pl line 3750.
marked by <-- HERE in m/do{ <-- HERE / at util/lint/checkpatch.pl line 3751.
marked by <-- HERE in m/^\({ <-- HERE / at util/lint/checkpatch.pl line 4194.

Change-Id: If0c1f07a16df9e6cd1c1393a31af8b8ea6a66b01
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://review.coreboot.org/14310
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-04-22 17:24:17 +02:00
Martin Roth f790672f2d util/lint: Find unsigned variables with no length specified
The coding guidelines say that all objects should have fully
qualified types (unsigned int instead of unsigned).

This script finds violations of that rule.

Steps for the filter:
1) Find all lines in the coreboot tree that have the word 'unsigned'
followed by a space.
2) Exclude directories that aren't in the include list or
are specifically excluded.
3) Exclude files that aren't specifically included.
4) Filter out legimitate uses 'unsigned int' or 'unsigned long' for
example.
5) Filter out lines that begin with '/*' or '*'

Change-Id: I46213c6a168e6aafa29a50af814bf7e0fcd32eb6
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/14269
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-04-21 23:13:09 +02:00
Martin Roth 3a6374c454 lint: Add check for amd & apple mainboard license headers
Change-Id: Idda4b7179e3e7b3f5b70be810b428b0651c1cd67
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/14427
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-21 23:07:31 +02:00
Stefan Reinauer e0383d2ce8 xcompile: support being called from payloads/external/.../.../
Change-Id: Icc1361fdd3a8369c4b442ce5b8807c549519c93a
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14387
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-04-21 07:34:33 +02:00
Martin Roth a53958098e crossgcc/Makefile.inc: Update jenkins-build-toolchain
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-20 00:24:47 +02:00
Stefan Reinauer 86ddd732bd kbuild: Allow drivers to fit src/drivers/[X]/[Y]/ scheme
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-19 18:34:18 +02:00
Stefan Reinauer 88e83e580d crossgcc: Move temp file handling into cleanup function
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-19 01:38:06 +02:00
Stefan Reinauer 7844912f37 crossgcc: Fix out of bounds array access for nds32le
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-18 21:42:00 +02:00
Stefan Reinauer b194a43397 More compatible use of mktemp
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-18 15:59:22 +02:00
Derek Waldner 3b42119237 util/superiotool: Add initial support for Exar XR28V384.
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-16 02:00:38 +02:00
Stefan Reinauer 88352d7365 crossgcc: Add version number to script name
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-15 22:38:20 +02:00
Paul Menzel 534c5e1133 util/xcompile/xcompile: Remove -Wno-unused-but-set-variable from CFLAGS
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-14 19:15:21 +02:00
Jonathan Neuschäfer 0a20c08d0f romcc: Remove old test infrastructure, rework Makefile
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-14 19:13:07 +02:00
Martin Roth cd9aec6fb0 util/lint: Update lint-stable-000-license-headers
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-14 17:46:48 +02:00
Martin Roth 84129b8c68 util/lint: update lint-000-license-headers
- 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-13 17:37:53 +02:00
Jonathan Neuschäfer e69d6c2e7b romcc: Rewrite the test system
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-13 17:37:28 +02:00
Jonathan Neuschäfer 3cfbc4a608 romcc: Use UNIX line endings in linux tests
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-13 17:37:03 +02:00
Jonathan Neuschäfer 9551cf4709 romcc: Increase base address in linux ld script
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-13 17:36:39 +02:00
Damien Zammit 711a478c05 intelmetool: Fix detection logic of no MEI device
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-13 17:20:36 +02:00
Martin Roth e03305358f lint/lint-stable-004-style-labels: Update script
- 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-13 02:11:28 +02:00
Martin Roth 444ece2a38 crossgcc: skip TARGETARCH for tools that don't use it
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-12 06:33:25 +02:00
Paul Menzel 7fbe6ae900 util/nvramtool/cli/nvramtool.c: Add newline to error message
"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-11 16:26:58 +02:00
Aaron Durbin b2229dc199 util/crossgcc/buildgcc: correct clang test
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-11 16:10:43 +02:00
Martin Roth ef5a238cb9 lint/check_lint_tests: Add script that will break all stable tests
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-10 18:13:01 +02:00
Stefan Reinauer ba3a69f9c7 crossgcc: Add workaround for libgcc's GNU sed dependency
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-09 03:41:15 +02:00
Aaron Durbin 0ac4e5a7f8 util/crossgcc/buildgcc: quote parameters that may have spaces
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-09 01:02:21 +02:00
Aaron Durbin 62c8dbe970 Revert "cbfstool: Add 'hashcbfs' command to compute hash of CBFS region."
This reverts commit 272a1f05b9.

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-07 22:24:48 +02:00
Stefan Reinauer 2fe2d3d775 buildgcc: enable interwork/multilib for binutils
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-06 21:05:25 +02:00
Stefan Reinauer 45f77b81a4 crossgcc: Fix compilation on Clang systems
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-06 19:27:16 +02:00
Patrick Georgi 1000a5561d chromeos.fmd: Mark RW_LEGACY as CBFS
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-05 13:37:31 +02:00
Patrick Georgi b88d57c2d4 futility: don't pass toolchain flags into futility's build
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-05 13:36:32 +02:00
Timothy Pearson 82657cad24 crossgcc: Fix compiler detect for POWER8 big endian mode switch.
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-04-04 20:16:37 +02:00
Wilbert Duijvenvoorde 3b55602b25 util/superiotool: Register fix for Fintek F81865F/F-I
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-30 23:12:44 +02:00
Martin Roth 92658db3ca lint: Update board status script to look at the whole tree
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-29 23:30:47 +02:00
Martin Roth 4c3b156a26 Makefile: Update jenkins-build-toolchain to run build tests
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-26 22:35:01 +01:00
Philipp Deppenwiese d8fe4431ec util/intelmetool: Add intelmetool from Damien Zammit
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-25 18:28:03 +01:00
Martin Roth 591790fca5 buildgcc: Add check for missing libraries and test for zlib
- 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-25 18:15:04 +01:00
Martin Roth 95f7b22dc4 buildgcc: support pigz and lbzip2 decpmpressors if installed.
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-25 18:14:31 +01:00
Martin Roth 588c79ddde buildgcc: Fix help text formatting
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-25 18:11:43 +01:00
Patrick Georgi 1fc02d1d34 crossgcc: Enable multiple targets for a platform
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-24 21:49:20 +01:00
Martin Roth 64b35f341b buildgcc: Update coreboot's IASL version to 20160318
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-24 21:22:27 +01:00
Martin Roth a45a0b70a5 crossgcc: Switch POWER8 to big endian mode
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-24 18:32:23 +01:00
huang lin 1129f7f636 rockchip: update make_idb.py
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-16 15:24:10 +01:00
Patrick Georgi d7f6bd5860 util/nvidia/cbootimage: update to latest master
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-16 15:02:50 +01:00
Martin Roth 8ba235e2ac genbuild_h: Fix numeric comparison to remove error
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-14 23:37:12 +01:00
Aaron Durbin 08e920e50d util/cbmem: Scale time stamp values correctly
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-14 21:30:01 +01:00
Jan Tatje fa31751fc7 util/ifdtool: add option to change chip density
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-13 04:42:40 +01:00
Martin Roth 10008107b7 abuild: Add option of starting with an existing defconfig file
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-13 03:05:43 +01:00
Jonathan Neuschäfer f14f640168 crossgcc/buildgcc: Add missing quotation mark
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-11 22:00:04 +01:00
Martin Roth 6116f369e9 codebase: Change makefile $(shell pwd) commands to $(CURDIR)
- 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-11 18:48:06 +01:00
Martin Roth 3e0f74d6b5 crossgcc/buildgcc: Update for recent arch additions
- 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-11 18:25:28 +01:00
Martin Roth 1484c03916 crossgcc/buildgcc: Add comment about URLs and jenkins builder
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-11 17:55:38 +01:00
Martin Roth 2114880f66 crossgcc/Makefile.inc: Add target for jenkins toolchain test build
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-11 17:01:11 +01:00
Nico Huber 566dd35768 Add option for "timeless" builds
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-09 15:25:05 +01:00
Daisuke Nojiri a1bb091d00 archive: build archive tool with HOSTCC
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-08 17:40:05 +01:00
Daisuke Nojiri a5ae62e9d2 util: add archive tool
'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-08 17:39:38 +01:00
Stefan Reinauer f466ea97bf crossgcc: Build make per default
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-08 16:33:27 +01:00
Martin Roth b1bca88a04 lint-kconfig: pipe stderr to stdout to catch script errors
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-05 15:40:31 +01:00
Iru Cai 8e7928a6fe sandybridge/gma_lvds: support both Sandy&Ivy on one board
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-05 09:39:41 +01:00
Martin Roth ca55f0a0ea util/futility: trivial - Add distclean target
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-04 16:17:10 +01:00
Martin Roth 0e6c0e18e3 kconfig_lint: make sure if and endif statements are balanced
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-03 20:42:49 +01:00
zbao c3a08a9d5e amdfwtool: Fix some PSP2 issues
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-03 12:03:03 +01:00
Werner Zeh ebf732b4a5 cbfstool: Use fixed width data types for e820entry struct.
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-03 06:19:25 +01:00
Werner Zeh bbf508914d cbfstool: Initialize contents of linux_params to 0
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-03 06:18:23 +01:00
Stefan Reinauer 266b5171a3 buildgcc: Bump version to 1.36
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-03 04:23:25 +01:00
Martin Roth 58c68d56de crossgcc: add 'urls' option to print urls of all packages
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-02 19:11:01 +01:00
Martin Roth 4a53db06ec buildgcc: Add 'nocolor' option to remove color codes from output
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-02 18:57:10 +01:00
Stefan Reinauer 9b1936dc82 buildgcc: Use $(CURDIR) instead of $(PWD)
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-02 18:53:19 +01:00
Stefan Reinauer ed5642234a abuild: Use 12 lines of context for errors
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-02 18:38:32 +01:00
Stefan Reinauer c77e041909 buildgcc: Disable RISC-V GDB
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-02 18:33:37 +01:00
Stefan Reinauer 163506a8f6 buildgcc: Allow specifying destination directory
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-01 21:48:20 +01:00
Stefan Reinauer b7c40630d9 buildgcc: Fix building GDB for mipsel-elf
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-01 21:26:34 +01:00
Ronald G. Minnich fb944f4270 crosstool: add EXPAT as a dependency on the gdb build.
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-03-01 21:25:25 +01:00
Stefan Reinauer 9b64dc4226 buildgcc: Add support for gdb on x86_64-elf
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-29 18:06:39 +01:00
Denis 'GNUtoo' Carikli 9c44b25645 nvramtool: Print computed and stored checksum in case of mismatch.
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-26 07:02:01 +01:00
Denis 'GNUtoo' Carikli bfe07899e3 util: Add a very simple utility to test POST cards.
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-26 07:00:33 +01:00
Paul Menzel 8b831da586 Revert "cbfstool: Silence LZ4 -Wsign-compare warnings"
This reverts commit 17cb0370a7.

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-24 19:27:13 +01:00
Martin Roth abf7d4d7e8 kconfig_lint: Fix checks when running in taint mode
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-24 19:24:03 +01:00
Martin Roth d08eb062df xcompile: Add parameter to aid in debugging
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-23 18:03:09 +01:00
Julius Werner 17cb0370a7 cbfstool: Silence LZ4 -Wsign-compare warnings
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-23 04:52:44 +01:00
David Hendricks 1173bf30fa board_status.sh: Allow user to override coreboot image path
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-23 00:49:16 +01:00
Joe Pillow 9a4881a783 util: Add scripts to download and extract blobs
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-22 22:50:19 +01:00
Julius Werner 09f2921b5d cbfs: Add LZ4 in-place decompression support for pre-RAM stages
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-22 21:38:37 +01:00
Patrick Georgi a05d033226 board-status: deal with sanitized paths
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-22 19:14:37 +01:00
Vladimir Serbinenko 63cf7cd258 Support arm-linux-gnueabi compilers.
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-21 13:04:58 +01:00
Patrick Georgi f92c3fb260 optionslist: Don't add a timestamp
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-21 01:46:15 +01:00
Patrick Georgi 2d5d552fa5 board-status: make push-to-wiki more flexible
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-21 01:42:59 +01:00
Patrick Georgi 8a0dae628f board-status: move wiki cookiejar elsewhere
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-21 01:42:44 +01:00
zbao c3b0b72813 amdfwtool: Postpone the usage of PSP combo directory
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-20 04:57:42 +01:00
zbao 6e2f3d1df4 amdfwtool: Fix some fields in PSP level-2 directory
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-20 04:57:20 +01:00
David Hendricks 9f54297fab board_status.sh: Be smarter about cbfstool usage
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-18 04:46:24 +01:00
Martin Roth f43e51d444 board_status: Add script that will set up a ubuntu live image
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-18 04:21:26 +01:00
Stefan Reinauer 05082737a9 Redo testbios utility to use all of YABEL
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-18 01:47:04 +01:00
Stefan Reinauer eb960f1af9 util/autoport: Use common gpio.c for bd82x6x
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-18 01:45:56 +01:00
Martin Roth 0362517d1c crossgcc: Change 'tar balls' to 'tarballs'
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-18 01:21:21 +01:00
Martin Roth 44ef167d21 lint: Make sure site-local isn't committed to coreboot repo
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-16 22:47:39 +01:00
Ronald G. Minnich 7ee16b7348 Fix a build problem with power 8: use --with-system-zlib
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-15 21:35:18 +01:00
Patrick Georgi 4ed5cb3fb3 kconfig: make oldconfig work "non-strict"
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-15 08:03:56 +01:00
Patrick Georgi 85bb946362 crossgcc: Use acpica-unix2 over acpica-unix
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-13 16:59:59 +01:00
Patrick Georgi 343ea08388 util/cbfstool: Improve heuristic for cbfs header pointer protection
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-12 19:23:08 +01:00
Vladimir Serbinenko 144eea0697 Make MRC vs native a config rather than making a separate chipset for it.
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-12 17:09:05 +01:00
Martin Roth c37c7c8b1f util/kconfig: Ignore extra symbols in configs instead of failing
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-12 17:03:36 +01:00
Stefan Reinauer 0544b31a49 bimgtool: Fix printf warning for off_t
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-12 04:47:37 +01:00
Stefan Reinauer f0d0d91868 bimgtool: Match CRC code guards
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>
2016-02-12 04:47:20 +01:00
Stefan Reinauer 3740d77020 bimgtool: Drop unused targets and variables from Makefile
dep has not been defined (and will hence break the build)
LDFLAGS is not used.

Change-Id: I4f91e1e7a176367aa4e1a1c63a2afc0b3186767e
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13653
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-02-12 04:47:04 +01:00
Vladimir Serbinenko ffbb3c0b8a Merge sandy/ivybridge romstage flow for MRC and non-MRC.
Change-Id: I11e09804ed1d8a7ae8b8d4502bd18f6be933f9fa
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: https://review.coreboot.org/13656
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-12 04:20:57 +01:00
Ruilin Hao c52d4f5745 util/marvell: Add Marvell doimage utility and dependency in relevant Makefile
- Add the doimage sources in util/marvell
- Add dependency in root makefile
- Add dependency in makefile for armada38x soc

BUG=chrome-os-partner:47462
TEST=emerge-cyclone coreboot
BRANCH=tot

Change-Id: I81b30e0865cbd619a41659c3f2819ad3bafc5f24
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 4b2a990150580e0b879a346ed8b71b3765b66bab
Original-Change-Id: I7e89b5e96206fde97ce69c296850122fd6c858f9
Original-Signed-off-by: Kefei Yao <kfyao@marvell.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/318046
Original-Commit-Ready: Kan Yan <kyan@google.com>
Original-Tested-by: Kan Yan <kyan@google.com>
Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-by: Kan Yan <kyan@google.com>
Original-Reviewed-by: Yuji Sasaki <sasakiy@chromium.org>
Reviewed-on: https://review.coreboot.org/13137
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-11 14:16:08 +01:00
Martin Roth 5a70d6bdf2 kconfig_lint: update kconfig lint shell scripts
- Add lint-stable script with just error checking
- Enable warnings in addition to errors in non-stable test.
- Use git grep if the code is in a git repo now that exclusions are
working.
- Check for perl, and ask the user to install it if it isn't
available.

Change-Id: Ie60d21f4ef8a61d879f116eb2056eb805b0a55f2
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13542
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
2016-02-10 17:17:56 +01:00
Patrick Georgi 8e68aff51c buildgcc: enable multilib for gcc
Make the gcc build system create multiple libgcc.a instances for
different ABIs.

Change-Id: I1c888bf751bf43566da8927ed0aedb53857363bf
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13625
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-10 09:45:58 +01:00
Vladimir Serbinenko b2eea81992 sandybridge: Set all native gfx-related options in northbridge code.
In the same time remove few native gfx options which were improperly set
and only added dead code to the binary.

Change-Id: I4ed3fec03a1655ae0a779c3aa3845de273cb12e1
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: https://review.coreboot.org/13649
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)
2016-02-09 22:35:09 +01:00
Martin Roth 15f4d8c1bb kconfig_lint: demote 'always defined' errors to warnings
To be able to run this as a lint-stable test, demote these to warnings
for now.  After the current CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL
issues get fixed, these can be promoted again.

Change-Id: I1432980eb0c871fc61c12dcc351f8d46513a7965
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13541
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-09 21:52:45 +01:00
Martin Roth 662237614b kconfig_lint: Check for IS_ENABLED used on symbols without CONFIG_
This looks at the coreboot codebase for the IS_ENABLED macro, and
gives an error if there is a symbol used without the CONFIG_ prefix.
This only works for symbols of type bool.

A future check will be added for all symbols, but that will take
a significant amount of time to run, because each symbol will need
to be searched for individually.

Change-Id: I92f2de2d231610d1a788da965f21966d89c2f25c
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13538
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-09 21:51:46 +01:00
Vladimir Serbinenko 609bd9445e ivy: Add a possiblity for mainboard early init.
This is needed for stout EC init.

Change-Id: I5c73499c17763229840152a473a2d820802ee2f6
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: https://review.coreboot.org/13535
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-09 20:35:40 +01:00
Patrick Georgi 35852b9037 lint: test for assembler dialect switches
We prefer the default AT&T dialect on x86

Change-Id: I7a5778c82ab5df6e971dfc73e98373893cfeeb92
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13135
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
2016-02-07 00:36:46 +01:00
Julius Werner f55e7ddbd6 util/cbmem: Add new depthcharge timestamps
This patch adds strings for the timestamp changes and additions in the
Chrome OS bootloader (depthcharge). See http://crosreview.com/323783
for details and justification.

BRANCH=none
BUG=None
TEST=Booted Oak, confirmed that cbmem output includes new timestamps.

Change-Id: I9ad68edca660f4e4286e680316b4e14f1259d1bc
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: c1b1f6d669f62217ed701cd3561b9d14973d890a
Original-Change-Id: I7256ca62c69f2ab7279fd2656fbbfa610e04fc44
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/323871
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/13576
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-04 17:34:30 +01:00
Stefan Reinauer a357ece751 crossgcc: Add checksum for make
I forgot to add that when I added support to buildgcc.

Change-Id: I586d64805e72f9512057a4e0698bdee19cc53146
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13568
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-02-04 01:09:21 +01:00
Stefan Reinauer 0ca5f33e5f crossgcc: Rename x86 to x64
Idee4eb5d112e3f6bffced0681e9112101bed6763 has renamed
the architecture by accident. Rename it back.

Change-Id: I5509d2aa09df513789325bc24d9b696a09cb898f
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13567
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-04 01:09:04 +01:00
Patrick Georgi 3df9262b09 crossgcc: Bring back the old iasl building scheme
This makes the cross{gcc,tools}-* targets build iasl again, without
building it many times for cross{gcc,tools}

Change-Id: I7546c2af5f7cce3a4f1a08f593fb5cbc675d69ad
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13564
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-03 19:46:13 +01:00
zbao 11a262c86c util/kconfig:xconf(QT): Update QT version of xconf
Update the qconf.cc and qconf.h to upstream code, which added support
of QT5 and removed the support of QT3.

All code is ported from kernel.org, with only one line added to qconf.cc.
int kconfig_warnings = 0;

Change-Id: Ice77cddcc00e43375039379978e55f42acf867f7
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/13130
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-03 03:46:18 +01:00
Martin Roth 0cd9ff8987 xcompile: Add a way to specify -march=i586
Instead of instructing users to edit xcompile when they want to build
a quark platform, give the build a way to set -march=586 so that
the quark code will build correctly.  The Quark processor does not
support the instructions introduced with the Pentium 6 architecture.

Change-Id: I0ed69aadc515f86f76800180e0e33bcd75feac5a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13552
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Leroy P Leahy <leroy.p.leahy@intel.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: FEI WANG <wangfei.jimei@gmail.com>
2016-02-03 02:58:10 +01:00
Patrick Georgi a9fa0c897c crossgcc: Also add the nds32le architecture to the coreboot Makefile
Change-Id: Ibf3346586d188dbd5b7ab10bedfc1609b2bb1499
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13565
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-03 02:50:33 +01:00
Patrick Georgi 6c0ccfb10d crossgcc/Makefile.inc: deduplicate cross*-$arch rules
Change-Id: Idee4eb5d112e3f6bffced0681e9112101bed6763
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13524
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-03 02:40:11 +01:00
Stefan Reinauer d5779c15eb buildgcc: Move all toolchain build targets to util/crossgcc
There is a lot of potential to completely get rid of Makefile
and keep everything in Makefile.inc, but for now this declutters
the main Makefile.inc.

Change-Id: I653313c74207f955514c036c81efcbfd988827c9
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13518
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-03 02:22:27 +01:00
Stefan Reinauer 22009a3a58 buildgcc: Reorganize when IASL is built
Instead of passing a variable around and painstakingly making sure that
one target builds with it, and the others without, make IASL a
dependency of the "catch all" targets.

This also drops iasl as dependency from individual architecture targets,
but things are more orthogonal that way.

Note: instead of `make crossgcc-i386`, use `make crossgcc-i386 iasl`

Change-Id: I8cd2e89acdd0f795836571470bad28fbf8797f58
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13563
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-03 02:21:48 +01:00
Stefan Reinauer 8adbcc2430 buildgcc: add nds32le compiler
Some Chrome ECs are based on that architecture

Change-Id: Ib5d0c2f6f518fafc1ceb02c5f71c0935d16c66bb
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13562
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-03 02:21:09 +01:00
Stefan Reinauer 2cc2ff6f3f buildgcc: Rename ARM target from armv7a to arm
The ARM target can compile for much more than just v7a.

Change-Id: Ia4f67abcffdfe9c56c5d1848c75dfea83755e755
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13517
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-02-03 02:20:51 +01:00
Patrick Georgi bda8a04b01 build system: add Chrome OS futility to tools
Change-Id: I08925d110c6faa9e37107d63bfa75d0ab677d379
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13545
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-02-02 14:35:38 +01:00
Martin Roth f8db028a32 lint: Check license headers for both paragraphs of the GPL
If the GPLv2 or GPLv2+ license header is being used on a
coreboot file, make sure it has two paragraphs as specified by
the Common License Header section in the developer guidelines
in the coreboot wiki.

Change-Id: Ifffa0fa7272f5a4b129d4b7b8a515f8795bc2401
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13119
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-02 03:24:57 +01:00
Patrick Georgi 68e3f6dd37 util/release: extend release script
Add the ability to release a given commit id, and normalize the tarballs
to use coreboot/1000 for owner and group, and the last commit date as
mtime for all files.

Change-Id: Ia349f429090fe9804f7f14c226812646e2f712be
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13514
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-02-01 08:58:37 +01:00
Stefan Reinauer a851bbb40a buildgcc: Add GNU make to reference toolchain
Change-Id: I8a41065880c3fd1f95ee8877031bf1738aaae859
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13519
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-31 22:41:21 +01:00
Stefan Reinauer ea1a5fef4d buildgcc: Update LLVM to 3.7.1
Not much testing, update mostly so we can test with the
latest scan-build.

Change-Id: I50d28b7e0dfd31f9ae565c8515d5ab1760ca4c62
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13516
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-31 22:37:51 +01:00
Stefan Reinauer 27522ad375 buildgcc: Rename armv7-a-eabi compiler to arm-eabi
The compiler really supports a whole line of ARM CPUs, not just
ARMv7a:
arm-eabi-gcc: note: valid arguments to '-march=' are: armv2 armv2a
   armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m
   armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m
   armv7-r armv7e-m armv7ve armv8-a armv8-a+crc iwmmxt iwmmxt2 native
So let's reflect this in the cross compiler name.

Change-Id: I717760d80954655b2de9ae019b813d81e9a75762
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/13515
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-31 22:37:35 +01:00
Martin Roth b5400ad412 kconfig_lint: Add readme document
The readme describes the operation and usage of kconfig_lint.
It also lists all the notes, warnings, and errors that kconfig_lint
looks for.

Change-Id: I873f394ff93fce42cd9638cbbad6134f1aef3a6a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13464
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-30 17:29:40 +01:00
Martin Roth 08cf90f860 kconfig_lint: add comments and whitespace fixes.
No functional changes.

Change-Id: I40284b68ddda7e19741c5306a8c74761c00e4b35
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13463
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-30 17:29:26 +01:00
Martin Roth ab2d777360 kconfig_lint: Skip temp files when looking for unused Kconfig files.
Don't warn on Kconfig.orig and Kconfig~ files when trying to verify
that all the Kconfig files in the coreboot source tree are being loaded.

Change-Id: Ie7babe60b29735e5ccc5f93f4e42ad82dfb47044
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13462
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-30 17:29:04 +01:00
Martin Roth b58d349ca9 kconfig_lint: Update prompt structure
- The prompts were not getting incremented, so each prompt for a symbol
would overwrite the previous.
- Record the menu each prompt is in.

Change-Id: Ia282a30344d5e135f4f2027be9aff0e49a4e5edb
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13461
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-30 17:28:44 +01:00
Martin Roth 08ee1cfafc kconfig_lint: Add warning if tristate type is used in coreboot
Although there's no reason we COULDN'T use tristate types, we haven't
up to this point.  If there's a good reason to use them in the future,
this check can be removed.

Change-Id: I5f1903341f522bc957e394bc0fd288ba1adab431
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13460
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-30 17:28:19 +01:00
Martin Roth 819e67242f kconfig_lint: merge 'git grep' and 'grep' exclude dir and files
The code had originally been using standard grep to look through the
coreboot tree for Kconfig symbols.  When this was switched to git grep,
the --exclude-dir options didn't work, and nothing was added to exclude
the directories that shouldn't be searched for symbols.  This resulted
in invalid warnings as it searched directories that had Kconfig symbols
for other projects.

This merges the exclusion list for both the regular and git versions
of grep for consistent behavior.

Change-Id: I7fed8b9fa827cb14f7373e7b774acc56e43cb6ff
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13459
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-30 17:27:30 +01:00
Martin Roth 572a856b97 kconfig_lint: Don't look at IS_ENABLED() text in comments.
This fixes at least one kconfig_lint warning.

Change-Id: I35edf57e90315a8372aaf3b41e923cd8dad7386a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13458
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-30 17:27:07 +01:00
Martin Roth 6bfbf1c66f kconfig_lint: Exclude some Kconfig symbols from unused symbol checks
The configuration that coreboot uses for setting selected symbols
typically involves a structure like this:
config BLEH_SPECIFIC_OPTIONS
def_bool y
select SYMBOL

This leads to an an extra kconfig symbol BLEH_SPECIFIC_OPTIONS
that is never referenced by anything else, generating a warning.

Since this is currently the construct that coreboot uses, filter it
out of the warnings for now.

Change-Id: I85a95e4c4e8469870c7f219f2a92955819845573
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13457
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-30 17:26:34 +01:00
Martin Roth 63ea4930e4 kconfig_lint: merge 'git grep' and 'grep' exclude dir and files
The code had originally been using standard grep to look through the
coreboot tree for Kconfig symbols.  When this was switched to git grep,
the --exclude-dir options didn't work, and nothing was added to exclude
the directories that shouldn't be searched for symbols.  This resulted
in invalid warnings as it searched directories that had Kconfig symbols
for other projects.

This merges the exclusion list for both the regular and git versions
of grep for consistent behavior.

Change-Id: I69a1e0b30fecca152e02a511c82248b6091b3d8b
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13456
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-30 17:26:03 +01:00
Martin Roth 721ee01bb0 lint: Add a check for the executable bit being set on source code
Change-Id: Ia51bd0fa742b2cb17f638c15d669ad1a7f65fefd
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13433
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-01-30 03:23:44 +01:00
Martin Roth b2cc1299af board_status/getrevision.sh: get rid of colons in dir names
Gnu make won't build in directories that have a colon in their name.

When the makefile expands a variable containing a dirctory name that
has colons in it, it seems to interpret that as a makefile target, and
fails the build.

Many other characters also confuse the makefiles, including spaces,
ampersand symbols, dollar signs, etc.

I've started including scripts into the board-status directories to
do the build of the rom that was tested, and this is preventing them
from working without renaming the directory before doing the build.

Change-Id: I9dd8e4027be21363015cd8df9918610e206afce2
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13490
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-29 16:56:31 +01:00
Aaron Durbin 71c60ca482 util/cbfstool: add 'compact' command
While assembling CBFS images within the RW slots on Chrome OS
machines the current approach is to 'cbfstool copy' from the
RO CBFS to each RW CBFS. Additional fixups are required such
as removing unneeded files from the RW CBFS (e.g. verstage)
as well as removing and adding back files with the proper
arguments (FSP relocation as well as romstage XIP relocation).
This ends up leaving holes in the RW CBFS. To speed up RW
CBFS slot hashing it's beneficial to pack all non-empty files
together at the beginning of the CBFS. Therefore, provide
the 'compact' command which bubbles all the empty entries to
the end of the CBFS.

Change-Id: I8311172d71a2ccfccab384f8286cf9f21a17dec9
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/13479
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-28 19:25:57 +01:00
Aaron Durbin 5dc628a2ef util/cbfstool: add machine parseable print
In order to more easily process the output of 'cbfstool print'
with other tools provide a -k option which spits out the
tab-separated header and fields:

Name Offset Type Metadata Size Data Size Total Size

ALIGN_UP(Offset + Total Size, 64) would be the start
of the next entry. Also, one can analzye the overhead
and offsets of each file more easily.

Example output (note: tabs aren't in here):

$ ./coreboot-builds/sharedutils/cbfstool/cbfstool test.serial.bin print
-r FW_MAIN_A  -k
Performing operation on 'FW_MAIN_A' region...
Name	Offset	Type	Metadata Size	Data Size	Total Size
cmos_layout.bin	0x0	cmos_layout	0x38	0x48c	0x4c4
dmic-2ch-48khz-16b.bin	0x500	raw	0x48	0xb68	0xbb0
dmic-2ch-48khz-32b.bin	0x10c0	raw	0x48	0xb68	0xbb0
nau88l25-2ch-48khz-24b.bin	0x1c80	raw	0x48	0x54	0x9c
ssm4567-render-2ch-48khz-24b.bin	0x1d40	raw	0x58	0x54	0xac
ssm4567-capture-4ch-48khz-32b.bin	0x1e00	raw	0x58	0x54	0xac
vbt.bin	0x1ec0	optionrom	0x38	0x1000	0x1038
spd.bin	0x2f00	spd	0x38	0x600	0x638
config	0x3540	raw	0x38	0x1ab7	0x1aef
revision	0x5040	raw	0x38	0x25e	0x296
font.bin	0x5300	raw	0x38	0x77f	0x7b7
vbgfx.bin	0x5ac0	raw	0x38	0x32f8	0x3330
locales	0x8e00	raw	0x28	0x2	0x2a
locale_en.bin	0x8e40	raw	0x38	0x29f6	0x2a2e
u-boot.dtb	0xb880	mrc_cache	0x38	0xff1	0x1029
(empty)	0xc8c0	null	0x64	0xadf4	0xae58
fallback/ramstage	0x17740	stage	0x38	0x15238	0x15270
(empty)	0x2c9c0	null	0x64	0xd2c4	0xd328
fallback/payload	0x39d00	payload	0x38	0x12245	0x1227d
cpu_microcode_blob.bin	0x4bf80	microcode	0x60	0x17000	0x17060
(empty)	0x63000	null	0x28	0x37cf98	0x37cfc0

Change-Id: I1c5f8c1b5f2f980033d6c954c9840299c6268431
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/13475
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-28 19:25:48 +01:00
Andrey Korolyov 393d9322ba ectool: fix NetBSD compilation
Since NetBSD does not support uname -o, push check for CygWin
inside separate non-failing condition in Makefile.

Change-Id: Ibd264384f49b33412f0ef8554bd9c9fb8f60a892
Signed-off-by: Andrey Korolyov <andrey@xdel.ru>
Reviewed-on: https://review.coreboot.org/12831
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-27 17:15:56 +01:00
Julius Werner 4f7a3614cd chromeos: Add timestamps to measure VPD read times
This patch adds three timestamps to coreboot and the cbmem utility that
track the time required to read in the Chrome OS Vital Product Data
(VPD) blocks (RO and RW). It's useful to account for these like all
other large flash accesses, since their size is variable.

BRANCH=None
BUG=None
TEST=Booted Oak, found my weird 100ms gap at the start of ramstage
properly accounted for.

Change-Id: I2024ed4f7d5e5ae81df9ab5293547cb5a10ff5e0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b97288b5ac67ada56e2ee7b181b28341d54b7234
Original-Change-Id: Ie69c1a4ddb6bd3f1094b3880201d53f1b5373aef
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/322831
Original-Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://review.coreboot.org/13139
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-27 16:27:18 +01:00
Werner Zeh 95bfcaecf9 cbfstool: Fix broken alignment because of flashmap
With the introduction of flashmap cbfs alignment of files gets
broken because flashmap is located at the beginning of the flash
and cbfstool didn't take care about that offset.
This commit fixes the alignment in cbfs.

Change-Id: Idebb86d4c691b49a351a402ef79c62d31622c773
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/13417
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-27 07:05:41 +01:00
Patrick Georgi d6577e1cb8 xcompile: fill in power8 64bit LE
Change-Id: Id0316042f665ec9c095887cf6a37a7949ed8e861
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13421
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins)
2016-01-26 18:10:34 +01:00
Patrick Georgi a1a6f7535b xcompile: also look for *-linux compiler triplet
Not just *-linux-gnu.

Change-Id: Ib817c6d207d3b69ce7595505f2b45f3be35b7d2f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13420
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins)
2016-01-26 18:10:21 +01:00
Patrick Georgi 74c86456af xcompile: document all the variables!
What's the exact difference between TARCH, TSUPP and TBFDARCHS? Fear no
more, it's documented.

Change-Id: I18717eb1e20b1c0a82a485d391de2794a77c59ae
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13419
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins)
2016-01-26 18:09:52 +01:00
Aaron Durbin 2dd5f4cce6 cbfstool: provide buffer_offset()
Instead of people open coding the offset field access within a
struct buffer provide buffer_offset() so that the implementation
can change if needed without high touch in the code base.

Change-Id: I751c7145687a8529ab549d87e412b7f2d1fb90ed
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/13468
Tested-by: build bot (Jenkins)
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2016-01-26 17:28:21 +01:00
Patrick Georgi 0a97d7eeba crossgcc: Enable powerpc64-linux target without ppc64-linux headers
It may still fail on non-Linux, and the compiler may do fancy things,
but it builds.

Change-Id: If3456f5fef8d01082a49978dc7cda5450f96f5cc
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13416
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
2016-01-26 15:35:07 +01:00
Werner Zeh 998671c125 cbfstool: Fix compile issue for older gcc versions
gcc 4.4.7 fails to compile due to the missing initializers
for all struct members. Add initializers for all fields.

Change-Id: If1ad4fff0f965ccd7e821820c0703853c1e5c590
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/13418
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-26 06:48:15 +01:00
Andrey Korolyov decefea272 superiotool: fix out-of-box NetBSD Makefile support
Add NetBSD-specific locations under pkg/ and missing linker flag
for libpciutils.

Change-Id: I812817a374aaba561b28d8a22f20d238c9dca32b
Signed-off-by: Andrey Korolyov <andrey@xdel.ru>
Reviewed-on: https://review.coreboot.org/12830
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-26 04:47:25 +01:00
Nico Huber de45c59080 buildgcc: Help GMP build with 32-bit NetBSD
GMP's configure tries to build for 64-bit with a 32-bit userspace on
NetBSD too. Help it by forcing ABI=32.

Change-Id: I290ea0ef1626fdd88dc3ff74fadb9578ef6a1c9c
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/13067
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-26 04:45:57 +01:00
Nico Huber ca41a6ab0a util: Look for python2 binary instead of python
Make the requirement of python2 explicit in scripts that are incompatible
with python3.

Change-Id: I77f150bdb3aab316fc3c3a21b911db397fa0106f
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/13286
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-26 00:25:19 +01:00
Nico Huber 32c4a06a43 Revert "util/crossgcc: Build Ada frontend by default"
This reverts commit 89798bcb0c.

Disable building gnat again as it turned out that many distros don't
ship with a sufficient recent version of gnat. We'll have to find a
reliable way to check for the installed gnat version and query the
user or bootstrap gcc in that case.

Change-Id: Ife7cf7c9d1567aca898ce308b120a7b9e146e5f5
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/13422
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Tested-by: build bot (Jenkins)
2016-01-25 21:24:34 +01:00
Nico Huber 7224e87d10 util: Use /usr/bin/env as wrapper to look up python
This way users are not constrained to have it installed as
/usr/bin/python.

Change-Id: I822b6c402004aad8f2353e71afbd8ee3f9d26d45
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/13285
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-25 01:28:52 +01:00
Werner Zeh c7b2b7c67d cbfstool: Fix potential error when using hash attribute
There can be an error when a cbfs file is added aligned or as
xip-stage and hashing of this file is enabled. This commit
resolves this error. Though adding a file to a fixed position
while hashing is used can still lead to errors.

Change-Id: Icd98d970891410538909db2830666bf159553133
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/13136
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-23 11:49:10 +01:00
Nico Huber 4408409d05 util/xcompile: Add gnatbind tool
Change-Id: I79c94a1a951fe7e3493b839364a79fa2edb57ff3
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/13043
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-23 01:41:49 +01:00
Nico Huber 89798bcb0c util/crossgcc: Build Ada frontend by default
Change-Id: I4889219f055aeefd449f9a9fcc4dc716b8c439d4
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/13042
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-01-23 01:41:31 +01:00
Yidi Lin 8e76f34bf4 mediatek/mt8173: Add gen-bl-img.py for mt8173 bootblock code
The mt8173 boot rom expects the bootblock to be in a certain format.
gen-bl-img wraps our bootblock appropriately.

BUG=none
TEST=emerge-oak coreboot
BRANCH=none

Change-Id: I7486e548d356c5bd27261851f1f1bed620715e91
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: fbcd7959e0fda595de91899ace7236037ac833d3
Original-Change-Id: Ib9df440bfa95cf06e8041491ecdb34c357047acd
Original-Signed-off-by: Yidi Lin <yidi.lin@mediatek.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/292664
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/12613
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-22 19:32:07 +01:00
Ben Gardner 5d7cbc272e util/get_maintainer.pl: Fix top_of_kernel_tree check
The script checks for a folder called documentation, while the folder
name is Documentation.

Without this change, I get this when running the script:
util/scripts/get_maintainer.pl: The current directory does not appear to be
 a coreboot source tree.

Change-Id: Ied7ead7dfec33e9324f06d0ef60dcd6d7ba40104
Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
Reviewed-on: https://review.coreboot.org/13062
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-22 19:25:07 +01:00
Nico Huber 420b2a513e util/crossgcc: Don't build gnattools
I thought we'd be using gnatmake but it's deprecated. Who needs it
anyway?

Change-Id: Ic08add72e771fa346c8a736ea901863ea5737d91
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/13041
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-22 17:01:47 +01:00
Werner Zeh e9995f1469 cbfstool: Add attributes for position and alignment constraints.
Add functionality to cbfstool to generate file attributes
for position and alignment constraints. This new feature
can be activated with the -g option and will generate,
once the option has been enabled, additional attributes
for the files where position, xip or alignment was specified.

Change-Id: I3db9bd2c20d26b168bc7f320362ed41be349ae3a
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/12967
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2016-01-22 06:26:15 +01:00
Patrick Georgi 5d7ab39024 chromeos: import Chrome OS fmaps
These are generated from depthcharge's board/*/fmap.dts using the
dts-to-fmd.sh script.

One special case is google/veyron's chromeos.fmd, which is used for a
larger set of boards - no problem since the converted fmd was the same
for all of them.

Set aside 128K for the bootblock on non-x86 systems (where the COREBOOT
region ends up at the beginning of flash). This becomes necessary
because we're working without a real cbfs master header (exists for
transition only), which carved out the space for the offset.

Change-Id: Ieeb33702d3e58e07e958523533f83da97237ecf1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12715
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-21 19:40:57 +01:00
Patrick Georgi 9a17d04e40 cbfstool: don't rewrite param.baseaddress in cbfs_add
cbfs_add calculated a base address out of the alignment specification
and stored it in param.baseaddress.
This worked when every cbfstool invocation only added a single file, but
with -r REGION1,REGION2,... multiple additions can happen.
In that case, the second (and later) additions would have both alignment
and baseaddress set, which isn't allowed, aborting the process.

Change-Id: I8c5a512dbe3c97e08c5bcd92b5541b58f65c63b3
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13063
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-21 18:47:58 +01:00
Patrick Georgi c3771b0f8f fmaptool: emit list of CBFS regions on request
The CBFS flag in fmd files isn't stored in the fmap, so allow storing it
out of band using the -R option.

Change-Id: I342772878d7f8ce350de1a32dc7b2a5b07d6617d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13058
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-21 16:11:44 +01:00
Martin Roth 6966759edb util/lint: Fix linter for old license headers
Somehow I lost a $ on headerlist between when I tested the script
and when I submitted it, turning headerlist into plain text instead
of a variable name.  This makes the test always pass.
- Fix variable bug.
- exclude this script from the check.
- update test for empty HEADER_DIRS variable.

Change-Id: I6080c520bc741e9d689f7c66ee97879afc8ba38c
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13057
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-21 12:31:53 +01:00
zbao fb456e61a9 cbfstool: Add header file for ntohl & htonl on Apple
On Apple OS X, the ntohl and htonl need including header,
 #include <arpa/inet.h>

Please refer the manpage for these command on OS X,
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/htonl.3.html

Change-Id: Ia942c58f34637c18222fbf985b93c48abf63c5b8
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/11672
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-20 16:10:20 +01:00
Vadim Bendebury 7559946896 cbfstool: accept read-only files when possible
cbfstool tries opening the input file for write access even if the
command does not require modifying the file.

Let's not request write access unless it is necessary, this way one
can examine write protected files without sudo.

BRANCH=none
BUG=none
TEST=running

   cbfstool /build/<board>/firmware/image.bin print

   in chroot does not require root access any more.

Change-Id: Ic4e4cc389b160da190e44a676808f5c4e6625567
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: ef6a8e25d9e257d7de4cc6b94e510234fe20a56d
Original-Change-Id: I871f32f0662221ffbdb13bf0482cb285ec184d07
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/317300
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/12931
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-19 18:14:44 +01:00
Martin Roth c4511e2b73 util/lint: Update license linter, make stable version
- Split the script up to make it easier to update and read.
- Check for multiple different license strings. Not all files are GPL
licensed.
- Don't validate 0 length files
- Update list of files to exclude from the license header check.
- Add command line option to set directories to check

- Add stable version to check a few directories that are fixed.  This
just calls the non-stable version with the directories to check.

Change-Id: I90d4e93a20b4e1638ce4f43f8acbee72dc588625
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12909
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-18 04:15:53 +01:00
Martin Roth b7c39b2bc1 util/lint/kconfig_lint: Add 3 new checks
- Check that selected symbols are type bool
- Check that selected symbols aren't created inside a choice
- Check that symbols created inside a choice aren't created
outside of a choice as well.

Change-Id: I08963d637f8bdfb2413cfe831eafdc974d7674ab
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12969
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-18 01:50:09 +01:00
Martin Roth 517d4a6a61 xcompile: Add core count to .xcompile
I think these four methods should cover most operating systems,
with many supporting several of the methods.

If we don't find anything, we're not any worse off than we were before.
The big issue would be if we get an incorrect value.

Change-Id: I4a612d39e93173e9d6e0de892f5bebf716912b1a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12937
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-15 22:27:30 +01:00
Martin Roth da1a70ea03 util/lint: Add linter for files with the old license header
Help prevent additional files coming in to the tree with the old
license header.

Change-Id: Idbafc2d8c05f87075083293d27900304c53e13dc
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12920
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-15 04:58:16 +01:00
Martin Roth a6e7702787 xcompile: More updates on ARM64 Erratum flags
I tried to handle the checking for the config flag internal to xcompile,
but the config flags don't appear to have been loaded into the
environment by make at that point.

This does update the if to check if the flag is even set before putting
anything into .xcompile though.  If the LDFLAG isn't set, there's no
point in appending anything.

Also removes the LP version of the erratum config flag, which was a
copy/paste mistake from $(CONFIG_LP_COMPILER_GCC).

Change-Id: I3d8b0328c85310393a120741a498bc18867a6f54
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12858
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-14 19:14:57 +01:00
Stefan Reinauer 924f0a6421 cbfstool: Change FMAP granularity to 16 bytes
Instead of looking for an FMAP at every byte,  only search down
to a granularity of 16 bytes, reducing the time for a cbfstool
call by 0.3s when no FMAP is found.

Signed-off-by: Stefan Reinauner <reinauer@chromium.org>
BUG=none
BRANCH=none
TEST=time ./cbfstool coreboot.rom add -f locale_de.bin -n locale_de.bin -t 0x50 -c lzma
     is 0.3s faster than before.

Change-Id: Icb4937330e920ae09928ceda7c1af6a3c5130ac7
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bc92d838ba9db7733870ea6e8423fa4fa41bf8fe
Original-Change-Id: Idbaec58a199df93bdc10e883c56675b419ab5b8e
Original-Reviewed-on: https://chromium-review.googlesource.com/317321
Original-Commit-Ready: Stefan Reinauer <reinauer@chromium.org>
Original-Tested-by: Stefan Reinauer <reinauer@chromium.org>
Original-Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://review.coreboot.org/12932
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-14 18:44:41 +01:00
HC Yen 14ec199bd1 cbfstool: fix address truncated problem
In parse_elf_to_stage(), it uses 32-bit variable to handle address.
The correct address type is Elf64_Addr. Use uint64_t to prevent address
to be truncated.

BUG=none
TEST=emerge-oak coreboot
BRANCH=none

Change-Id: I1abcd16899a69b18dd10e9678e767b0564b2846e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: ebc1aae0ae4ca30802a80a4a4e2ae0c0dad4d88a
Original-Change-Id: I21f8057ddf13e442f1cf55da6702c3449ba0cc35
Original-Reviewed-on: https://chromium-review.googlesource.com/292553
Original-Commit-Ready: Yidi Lin <yidi.lin@mediatek.com>
Original-Tested-by: Yidi Lin <yidi.lin@mediatek.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/12927
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-14 18:43:54 +01:00
Patrick Georgi 485225e0a3 cbfstool: reorder help text
hashcbfs was spliced in a line early, mixing up 'extract' and 'cbfshash'
help texts.

Change-Id: I86d4edb9eec0685a290b2dd4c2dc45d3611eba9a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12922
Tested-by: build bot (Jenkins)
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-01-14 10:34:17 +01:00
Martin Roth eb20e60c9c utils: Remove old license text from help & disclaimer file
The license text that we decided to remove was removed from the headers
of these files, but was still left in the help text.  Remove it from
those locations as well.

Change-Id: I0e1b3b79f1afa35e632c4a4dd09a8bf2b02eaa6d
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12913
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-13 22:53:29 +01:00
Martin Roth a20ac2f7b3 tree: drop last paragraph of GPL copyright header from new files
This continues what was done in commit a73b93157f
(tree: drop last paragraph of GPL copyright header)

Change-Id: Ifb8d2d13f7787657445817bdde8dc15df375e173
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12914
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-13 20:35:40 +01:00
Werner Zeh d274c99ad7 cbfstool: Remove duplicate code line
Remove duplicate line which sets baseaddress parameter.

Change-Id: Idfbb0297e413344be892fa1ecc676a64d20352bf
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/12904
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-01-13 06:07:29 +01:00
Martin Roth daa9e12bc5 util/lint: Add lint script to run kconfig_lint
The lint target in the makefile relies there being a script using
this particular naming format, so add a shell script front end to
run the kconfig linter.

Change-Id: I029c1cd3bbf3837c9f1d86c391ae5cabfa53685d
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12903
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-12 22:33:12 +01:00
Martin Roth 1b44f7e390 util/lint/kconfig_lint: Run through perltidy to fix whitespace
Change-Id: I7f04156fff0b65ea262b12961ce76ef329d358ab
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12902
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-12 22:32:45 +01:00
Martin Roth 0ecbdde285 lint: rename lint-006-checkpatch because board name is lint-006
Checkpatch should be 007.

Change-Id: Ib71c50ad1a63a3a743391cd8fea9f79cd08ef6f3
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12901
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-12 22:32:16 +01:00
Vladimir Serbinenko 6b2d83c352 autoport: Add missing casts
Change-Id: I04abdd48f5e2440756f9b03041d46c773f200368
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: https://review.coreboot.org/12890
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-01-11 20:51:12 +01:00
Martin Roth 8846382cbb buildgcc: Print out all missing tools then halt
Instead of printing out a single tool that needs to be installed
each time buildgcc is run, print out the entire list of tools
to be installed, then halt.

Change-Id: I7761760eef3c45ba371f882a4f987408945bb3e5
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12856
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-09 22:18:59 +01:00
Martin Roth e396317244 buildgcc: Don't request that optional tools be installed
Previously, when we tested for g++ and two different versions of clang,
if the earlier versions were not found, buildgcc would still request
that they be installed.  This obviously isn't needed, and isn't the
desired outcome.
Now, if one of the first tests fails, nothing gets printed.  If all
the tests fail, it tells you to install either g++ or clang.

Change-Id: I71359f59c4c6bee3c3c55e4e6105f11e6ca51527
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12852
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 22:59:02 +01:00
Martin Roth 2ba837d8c7 xcompile: Quote variables to prevent globbing and splitting.
Quoting variables prevents word splitting and glob expansion, and
prevents the script from breaking when input contains spaces, line
feeds, glob characters and such.

See shellcheck warning SC2086

Change-Id: Ib6ca46b64a621c4bea5c33ac312f2824b0386235
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12845
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 17:28:44 +01:00
Martin Roth 7051dea5f4 xcompile: Use local variables in the test functions
Using the local variables instead of positional parameters helps
readability.
- Add and use the local variables in testcc.
- Use the existing local variables in testld.

Change-Id: Ice13288b830a7aa043b360eaee8e36f060589a18
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12844
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 17:24:50 +01:00
Martin Roth 033abe5e69 xcompile: use $() instead of backticks
While the backtick syntax isn't actually deprecated, the $() syntax
is preferred.  Since both styles were being used in this script, settle
on the new standard for all cases.

Change-Id: I33770d666781b4fa34c909411e0d220c2540dbb4
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12843
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 17:23:50 +01:00
Martin Roth af0216f1b8 xcompile: Only include arm64 erratum check in arm64 section
Clean up the output file a bit by only including the erratum
for arm64 into the that architecture section instead of
every architecture.

Change-Id: Ib6276f12aee5deb92a03e1c4fa2ad57db46bdc8f
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12842
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 17:23:02 +01:00
Martin Roth c4b684ebee xcompile: Put compiler variables outside of 'if' to allow checking
In order to be able to check the compiler versions, we need to be
able to access the compiler variables.  Move the original assignments
outside of the GCC check, and assign either the GCC or CLANG compiler
to the actual CC_ environment variable later.  This ends up with the
same value set, while allowing the compiler versions to be checked.

Change-Id: Iffad02d526420ebbdfb15ed45eb51187caaa94fb
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12841
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 17:17:09 +01:00
Martin Roth f3e60d0d69 xcompile: Separate flags from clang executable
We already have a CFLAGS variable - Use it for all of the flags.

Change-Id: I22b4c5cf24b8743e85ffab29ddcccdc6c732ea3b
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12840
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 17:15:03 +01:00
Martin Roth 51d4de818d xcompile: Add XGCCPATH to clang compiler
The XGCCPATH prefix is on all the other tools and compilers,
so add it to clang as well, so it can be found correctly.

Change-Id: Ibc250a81433f37bbb0555d32605aebe3a68aaf40
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12839
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 17:10:58 +01:00
Martin Roth 03f7a49f5a xcompile: Add separation for architectures to improve readability
- Add bar at the top of each architecture
- Make the architecture name and the TARCH_SEARCH to two lines
- Add a second line at the bottom of each architecture
- Add a comment about the two blank lines so they don't get
accidentally removed.

Change-Id: Ib4326bd94fe39b979244816ce54b752d083f6b16
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12838
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 17:08:12 +01:00
Martin Roth c2054f3212 xcompile: Use tabs for indentation
Change-Id: I96a5048050f8016c3c569f20318b4d421a4470a7
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12837
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 17:07:21 +01:00
Andrey Korolyov 046d217420 inteltool: add NetBSD compatibility
Tested on NetBSD-7.0/i386

Change-Id: I6a693633d3a80ea07ade233b1b4fd1c5a1412032
Signed-off-by: Andrey Korolyov <andrey@xdel.ru>
Reviewed-on: https://review.coreboot.org/12835
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 15:33:13 +01:00
Andrey Korolyov 0ff8f9048b viatool: add NetBSD support
Change-Id: I033044e4b781475d6d60a49a61313a720103ce38
Signed-off-by: Andrey Korolyov <andrey@xdel.ru>
Reviewed-on: https://review.coreboot.org/12836
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2016-01-07 15:31:35 +01:00
Timothy Pearson 4ba946c1e1 Revert "util/crossgcc: Regenerate MPFR autotools files before build"
This reverts commit 68d0e4a5a1.

Special handling of MPFR is no longer needed with the latest
MPFR release.

Change-Id: I96d9ea92cfb74eed6af2ba62254f0678081e2b4f
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/12833
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 15:16:17 +01:00
Timothy Pearson 74432e1b61 util/crossgcc: Bump MPFR version to 3.1.3
The current MPFR version contains a stale config.guess file
that requires special handling on ppc64el systems.  Bump
the MPFR version to the latest release.

Change-Id: I5e86c732c09f8a6a43f9812452124d64d337ea3f
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/12832
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-07 15:16:13 +01:00
Andrey Korolyov b47dc52f30 viatool: Add VIA C3 MSRs
Tested on C3/EPIA board and Linux x86

Change-Id: I8df551f4b385ee8702af78df00169bdc8e180925
Signed-off-by: Andrey Korolyov <andrey@xdel.ru>
Reviewed-on: https://review.coreboot.org/12851
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-06 22:04:04 +01:00
Aaron Durbin bb826ef661 cbfstool: correct add-master-header logic to match runtime expectations
The cbfs master header's offset and romsize fields are absolute values
within the boot media proper. Therefore, when adding a master header
provide the offset of the CBFS region one is operating on as well as
the absolute end offset (romsize) to match expectations.

Built with and without CBFS_SIZE != ROM_SIZE on x86 and ARM device. Manually
inspected the master headers within the images to confirm proper caclulations.

Change-Id: Id0623fd713ee7a481ce3326f4770c81beda20f64
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/12825
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
2016-01-06 17:45:15 +01:00
Aaron Durbin 272a1f05b9 cbfstool: Add 'hashcbfs' command to compute hash of CBFS region.
For the purposes of maintaining integrity of a CBFS allow one to
hash a CBFS over a given region. The hash consists of all file
metadata and non-empty file data. The resulting digest is saved
to the requested destination region.

BUG=chrome-os-partner:48412
BUG=chromium:445938
BRANCH=None
TEST=Integrated with glados chrome os build. vboot verification
     works using the same code to generate the hash in the tooling
     as well as at runtime on the board in question.

Change-Id: Ib0d6bf668ffd6618f5f73e1217bdef404074dbfc
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/12790
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-06 01:12:38 +01:00
Patrick Georgi 29a04d9ed1 cbfstool: keep cbfs master header pointer
Adding new files overwrote the header with the empty file (ie 0xff),
so carve out some space.

BUG=chromium:445938
BRANCH=none
TEST=none

Change-Id: I91c292df381c2bac41c6cb9dda74dae99defd81d
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/12789
Tested-by: build bot (Jenkins)
2016-01-06 01:12:30 +01:00
Patrick Georgi bd0bb23838 cbfstool: Adapt "cbfstool copy" to only use fmap regions.
These need to go together, so the commit became a bit larger than
typial.

- Add an option -R for the copy source fmap region.
  Use: cbfstool copy -r target-region -R source-region.
- Don't generate a CBFS master header because for fmap regions, we
  assume that the region starts with a file header.
  Use cbfstool add-master-header to add it afterwards, if necessary.
- Don't copy files of type "cbfs master header" (which are what cbfstool
  add-master-header creates)
- Leave room for the master header pointer
- Remove -D command line option as it's no longer used.

BUG=chromium:445938
BRANCH=none
TEST=Manual test on image and integration test w/ bundle_firmware
     changes.
CQ-DEPEND=CL:313770,CL:313771

Change-Id: I2a11cda42caee96aa763f162b5f3bc11bb7992f9
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/12788
Tested-by: build bot (Jenkins)
2016-01-06 01:12:21 +01:00
Patrick Georgi 214e4af102 cbfstool: Use buffer over offset/size pair for cbfs_copy_instance
This allows adding support for FMAP based cbfstool copy more easily.

BUG=chromium:445938

Change-Id: I72e7bc4da7d27853e324400f76f86136e3d8726e
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/12787
Tested-by: build bot (Jenkins)
2016-01-06 01:12:12 +01:00
Martin Roth 31c4b64ab4 xcompile: Remove warnings about missing tools & architectures
Let toolchain.inc error out when the architecture or tool is missing.

Change-Id: I39a51e5a2c778d6bbc50354807e5e2b717fa9e52
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12682
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-05 22:08:47 +01:00
Timothy Pearson a9f62359e2 util/crossgcc: Add ppc64el support
Change-Id: I619f7c3cef7f0aaa6fccb3d52f2ac1f6ace6d0d6
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/12818
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-01-04 21:54:38 +01:00
Timothy Pearson 68d0e4a5a1 util/crossgcc: Regenerate MPFR autotools files before build
The config.guess file included with MPFR is completely obsolete,
leading to build failures on ppc64el due to the system architecture
not being detected.  Regenerate the files from the host system via
automake before attempting to build MPFR.

Change-Id: I00fc16003906e373d112c25978197ac907adccfd
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/12816
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-01-04 21:54:13 +01:00
Timothy Pearson 9631016660 util/crossgcc: Bump GMP version to 6.1.0
The previous official GMP release (6.0.0) contains a bug that
prevents compilation on ppc64el systems.  Increase version
to the latest version (6.1.0).

Bug details:

gcc build on ppc64el fails with:
(.text+0x4c): undefined reference to `BMOD_1_TO_MOD_1_THRESHOLD'

While I don't have an exact commit hash due to Hg use upstream,
a missing BMOD_1_TO_MOD_1_THRESHOLD define on ppc64el was quietly
fixed in Hg before the 6.1.0 release.

Change-Id: I1c05a1c194141db5f8522148c2e20e7558d34714
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/12811
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-01-04 21:53:52 +01:00
Ben Gardner 2ab652f606 genbuild_h.sh: allow coreboot to be a git submodule
When coreboot is pulled in as a submodule, the .git "folder" is a file,
not a folder.  Use the '-e' test instead of '-d' to allow for that.

Change-Id: I0dd8866b0016f7ba099cdaf4d7db442ff22612b5
Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
Reviewed-on: https://review.coreboot.org/12819
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-01-04 16:41:40 +01:00
Vladimir Serbinenko 42d55e0caf sb/intel/bd82x6x: Add missing PCIIDs for variants .
Change-Id: I917b8167a028aa9412b0cc6dedf8f09a1d1fae7f
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: https://review.coreboot.org/12820
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-01-03 21:22:41 +01:00
Denis 'GNUtoo' Carikli c2b51085ca cbmem: Makefile: Add install target
Change-Id: Ib20481e43e6ca5b56c630cdc0eb7b1b01311cbb6
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Reviewed-on: https://review.coreboot.org/12404
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-29 18:00:28 +01:00
Martin Roth 4af3655622 genbuild_h.sh: Get current rev for git revision, not origin/master
Using origin/master as the git revision breaks reproducibility, giving
different values depending on when the code was pulled from the
repo at coreboot.org.  By using the current revision instead, we get
identical builds.

Change-Id: If4be6e048d6c8e417b8c074199745900ccd82b49
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12807
Tested-by: build bot (Jenkins)
Reviewed-by: Zheng Bao <zheng.bao@amd.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2015-12-28 04:16:54 +01:00
Martin Roth fb5647a60b buildgcc: Add coreboot toolchain string to clang version
clang version now returns:
coreboot toolchain v1.33 November 25th, 2015 clang version 3.6.1
(tags/RELEASE_361/final) (based on LLVM 3.6.1)

Change-Id: I948d7f4d06c244987342cfc7d5c7e728cbed93bd
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12777
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-20 02:43:13 +01:00
Martin Roth 9f25da1f49 board_status.sh: Double quote variables to prevent globbing and word splitting.
Quoting variables prevents word splitting and glob expansion, and
prevents the script from breaking when input contains spaces, line
feeds, glob characters and such.

See shellcheck warning SC2086.

Change-Id: I7256d2fc2a22bce7723950a534fef6d57cbd097f
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12761
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-20 01:18:08 +01:00
Martin Roth 072b5aa5c5 board_status.sh: checksum the rom and save it for later verification
This allows users who build the rom from the board-status repo to
verify that their rom matches the original.

Change-Id: I4e8564e389495909219f92ccdafb8e9568f8f0d0
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12760
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-20 01:17:25 +01:00
Martin Roth 574d165592 board_status.sh: Clean up output, show what the script is doing
- Print what the script is doing so when it asks for the ssh password
several times in a row, it's obvious that it's actually doing different
things, not that the password failed.
- Don't print the output from cbfstool - it's not useful.

Change-Id: I785283475e14f242117682800c26db6b4f9f1e2c
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12759
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-20 01:16:42 +01:00
Martin Roth 2e44ea2d94 board_status.sh: Extract payload config & version files
If the payload_config and payload_version files are in coreboot.rom,
extract and save them.

Change-Id: I36b17ed189f94e2d4e873b0e219e5a9a2abe77a1
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12758
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-20 01:15:36 +01:00
Martin Roth d0128df777 board_status.sh: Update to fix serial port reads
The old serial port read method lost characters from the boot log. This
method works better for me.

- Put get_serial_bootlog arguments into variable names for clarity.
- Fully configure the serial port with stty: disable parity and flow control.
- Change serial port read from reading with 'cat' to reading with 'read'.
- Update help to show current default speed from the variable.

tested under dash, bash, and zsh on several platfoms.

Change-Id: I91ae63a3c226e61019dbdf69c405c3f20ba7db54
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12757
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-20 01:14:41 +01:00
Martin Roth 6f656138a6 buildgcc: Add coreboot toolchain version to iasl
Add the coreboot toolchain version to iasl's version output.

% ./xgcc/bin/iasl -v
Intel ACPI Component Architecture
ASL+ Optimizing Compiler version 20150619-64
Copyright (c) 2000 - 2015 Intel Corporation

coreboot toolchain v1.33 November 25th, 2015

This won't actually be checked until the next version of
iasl so that we don't have to rebuild again for no reason.

The buildgcc version was intentionally not incremented for
this minor change.

Change-Id: I03a1a777fdb84e34bfceb7b1eb43fffbc1f3a2fc
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12688
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-16 01:19:14 +01:00
Iru Cai 69bbfacd25 msrtool/configure: change svn to git
Change-Id: I212e44fc7edfd1458b04fb42a8e964a3367dd72d
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/12710
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-12-14 22:52:49 +01:00
Ronald G. Minnich ed4aa043c6 cbfstool: add ppc64 support
The constant for ppc64 is 'hotstuff'. For many reasons.

Note that line 2894 of elf.h is not indented. This is because in the
original the line begins with a space. Checkpatch rejects that.
Checkpatch also rejects changing the space to a tab because that makes
it more than 80 chars. I rejected breaking the line because it makes it
even less readable. All the changes forced by checkpatch make the code
less readable.

Herman Hollerith would be proud.

Change-Id: I21f049fe8c655a30f17dff694b8f42789ad9efb7
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://review.coreboot.org/12711
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Tested-by: build bot (Jenkins)
2015-12-12 01:36:51 +01:00
Patrick Georgi 8a3592eec3 build system: Switch to fmap based firmware layout
We still add a master header for compatibility purposes, and the default
layouts don't cover anything non-coreboot (eg. IFD regions) yet.

The default layouts can be overridden by specifying an fmd file, from
which the fmap is generated.

Future work:
- map IFD regions to fmap regions
- non-x86: build minimalistic trampolines that jump into the first cbfs
  file, so the bootblock can be part of CBFS instead of reserving a
  whole 64K for it.
- teach coreboot's cbfs code to work without the master header
- teach coreboot's cbfs code to work on different fmap regions

Change-Id: Id1085dcd5107cf0e02e8dc1e77dc0dd9497a819c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/11692
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2015-12-11 11:40:18 +01:00
Patrick Georgi 9731119b32 cbfstool: make top-aligned address work per-region
The former interpretation sprung from the x86 way of doing things
(assuming top-alignment to 4GB). Extend the mechanism to work with CBFS
regions residing elsewhere.

It's compatible with x86 because the default region there resides at the
old location, so things fall in place. It also makes more complex
layouts and non-x86 layouts work with negative base addresses.

Change-Id: Ibcde973d85bad5d1195d657559f527695478f46c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12683
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2015-12-09 00:21:56 +01:00
zbao 85f362e9b6 amdfwtool: Fill the first 3 romsig entries as 0
I didn't go back through the development guide for this.
But based on test, if the empty entry is filled as 0xFFFFFFFF,
instead of 0, the USB3 port can not be used.

Leave the entries of PSP and PSP2 as 0xFFFFFFFF to be compliant
with the case before the amdfwtool is used.

Change-Id: Icd5f9891e541279dbd551bbceaf091488d22bfef
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/12665
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-12-08 03:45:11 +01:00
Martin Roth 359737d897 xcompile: Don't warn on missing power8 compiler
Until there's a reason to, don't print a warning about the missing
power8 compiler.

Change-Id: I47c60e0a16892f0fa228e1439e0424926bca00a4
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12634
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2015-12-07 20:59:38 +01:00
Timothy Pearson 4f8ff240dd util/board_status: Fix a couple of ugly wiki lines
Examples from the KGPE-D16 entry:
AMD SR5650
AMD SB700 AMD SB700 DISABLE ISA DMA AMD SUBTYPE SP5100

AMD_SOCKET_G34_NON_AGESA

Should be:
AMD SR5650
AMD SB700 AMD SUBTYPE SP5100

AMD Opteron™ Magny-Cours/Interlagos

Change-Id: I3881a27060c0cd66a7228d201f477e89f364daca
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/12631
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-06 22:29:25 +01:00
Martin Roth 0eae36486a cbfstool: Re-align help text
The help text had gotten kind of sloppy. There was a missing newline
in the add-stage command, some of the lines were too long, etc.

Change-Id: If7bdc519ae062fb4ac6fc67e6b55af1e80eabe33
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12646
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2015-12-06 22:20:20 +01:00
Martin Roth c24f3d615a Makefile: Individualize help targets & set as non-compile targets
- Including the help targets in the list of NOCOMPILE targets means they
can run even if the toolchain is mucked up.  Since they contain info on
building the toolchin, this is useful.
- Separate the three current parts of the help target into individual
components: help_coreboot, help_toolchain, and help_kconfig.  This is
mostly for the help_toolchin target which will be printed out by
toolchain.inc.

Change-Id: I365d95fd63e22bddd122fb1fede6f04270e03d63
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12542
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-06 18:35:23 +01:00
Ronald G. Minnich b135baa0db add support for power8 to xcompile script
power8 is set up by ibm as a powerpc subset, so we follow
that rule here: we call it a powerpc but require -mcpu=power8

Change-Id: Ib5212be22db9584b0dc0eeed5c06ec1924347067
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://review.coreboot.org/12624
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-03 18:35:35 +01:00
Stefan Reinauer 16c7e0f56c cbfstool: Fix checkpatch error
ERROR: code indent should use tabs where possible
+^I                trampoline_len);$

Change-Id: If46f977e2e07d73e6cfd3038912a172236a7e571
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/12620
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-12-02 18:43:47 +01:00
Stefan Reinauer 5dda4df424 cbfstool: remove trampoline_start and trampoline_size
It's not needed, so we can remove some extra file mangling, too.

Change-Id: I80d707708e70c07a29653258b4cb6e9cd88d3de3
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/12508
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-12-02 18:43:23 +01:00
Stefan Reinauer 0316e1a69f cbfstool: autocreate trampoline
Add the code necessary to create the linux trampoline blob.
Don't enforce this for the in-coreboot build or use objcopy
to produce linux_trampoline.o as it is a bit trickier to get
all the details right than I had hoped:
 - you have to know the elf architecture of the host machine
 - you might have to have more tools (xxd, perl, etc) installed

Change-Id: I9b7877c58d90f9fb21d16e0061a31e19fffa2470
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/12505
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-12-02 18:43:01 +01:00
Timothy Pearson 347234c1ef util/nvramtool: Use correct virtual address when mapping tables
The existing code used a stale pointer from a previously unmapped
region of memory when parsing the coreboot tables.  Use the correct
pointer from the currently mapped memory region when parsing.

Change-Id: Id9a1c70655fe25bc079e5bee55f15adf674694f8
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/12619
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-02 17:32:07 +01:00
Martin Roth b6acc3071f kconfig_lint: Fix check_is_enabled for 2 symbols on the same line
The previous code would miss the first of two IS_ENABLED(CONFIG_symbol)
sequences on a line.  This patch saves the rest of the line and loops
to check any other entries on the same line of text.

Change-Id: If4e66d5b393cc5703a502887e18f0ac11adff012
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12562
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-02 16:09:34 +01:00
Martin Roth 7aa3ceaf24 kconfig_lint: Change from '$file at line $line' to $file:$line
Combine the file and line number into a combination that editors
understand when opening files.  This makes it easier to edit the
errors.

Change-Id: Id2fae6a0a2ca8d726b95e252d80ac918f4edbe23
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12561
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-02 16:09:06 +01:00
Martin Roth d808017760 kconfig_lint: Separate errors from warnings
- Create subroutines for printing warnings and errors
- Change all the existing warning and error routines to use subroutines
- Add new command line options to suppress errors and to print notes

Change-Id: I04893faffca21c5bb7b51be920cca4620dc283c3
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12555
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-02 16:08:39 +01:00
Martin Roth edf965a01e crossgcc/buildgcc: add parameter to show version number of tool
By adding the version number of tools, we can help people keep up to
date with their tool versions.  This will be used now to determine
whether the IASL version being used is the version supported by
coreboot.

Change-Id: I24a68b01c819871f90403869570125e71b96bd70
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12545
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-27 18:23:56 +01:00
zbao d38b22f8ec util/kconfig: Remove utsname for mingw
Mingw doesn't have that this function.

Change-Id: I640ea61ff24fba812e3f10771dd7e468dcfc63dd
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/11724
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-26 23:59:50 +01:00
Stefan Reinauer 30ff36249c cbfstool: Add .SILENT: to Makefile
This makes the make process look like the one inside
of coreboot's build system.

Change-Id: I48be2df39cad47644e16ce583b27c33a1da81fc3
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/12509
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-26 23:20:52 +01:00
Zheng Bao 4fcc9f2e54 amdfwtool: Correct the PSP2 directory layout
PSP2 is for Combo BIOS, which is the idea that one image supports 2
kinds of APU.

The PSP2 feature is for the future, not for current products.
The newest document about PSP2 is not available. I made it from the
draft code I made when I was in AMD.

Change-Id: I65328db197c02ee67f3e99faf4ab8acabd339657
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/12474
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-26 07:11:22 +01:00
Martin Roth 76f14b2b60 Makefiles: Add / Update help for makefile targets
Currently running 'make help' just gives help for the kconfig targets.

This adds help for common coreboot and toolchain targets.  It stops
printing some of the less common kconfig targets, but still leaves
them in the makefile as documentation.

Change-Id: I2a00fcbc06f05dc4029a91f3dff830c19e4d1329
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12458
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-24 22:35:00 +01:00
Pratik Prajapati 21deb06b32 util/mma: Add MMA scripts for setup and getting results
mma_setup_test.sh is used to set MMA test name and MMA test config
name. After executing this script user needs to reboot the system and
FSP/coreboot would execute the selected MMA test. FSP and coreboot needs
to be built with MMA support.

mma_get_result.sh will get the raw MMA results from cbtable and save it
to bin file.

BRANCH=none
BUG=chrome-os-partner:43731
TEST=Build and Boot kunimitsu (FAB3).

CQ-DEPEND=CL:299476,CL:299475,CL:299474,CL:299509,CL:299508,CL:299507,CL:*230478,CL:*230479

Change-Id: Ie330151535809676167f0b22c504a71975841414
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 35469218fe53c1ac211f55bd26a206a05a827453
Original-Change-Id: I7d20aca63982e13edc41be2726f3cc7e41d95bae
Original-Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/299473
Original-Commit-Ready: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Tested-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: http://review.coreboot.org/12483
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-20 18:21:34 +01:00
Pratik Prajapati c29e57d88c util/cbmem: Add --rawdump <cbtable ID> and extend -l output
Changed following things,

(1) cbmem -l would give both ID and Name for coreboot table along with
START and LENGTH of each entry

e.g.
localhost ~ # cbmem -l
CBMEM table of contents:
    NAME          ID           START      LENGTH
<.....>
 3. TIME STAMP  54494d45  77ddd000   000002e0
 4. MRC DATA    4d524344  77ddb000   00001880
 5. ROMSTG STCK 90357ac4  77dd6000   00005000
 6. VBOOT WORK  78007343  77dd2000   00004000
 7. VBOOT       780074f0  77dd1000   00000c3c
 8. RAMSTAGE    9a357a9e  77d13000   000be000
 9. REFCODE     04efc0de  77c01000   00112000
10. ACPI GNVS   474e5653  77c00000   00001000
11. SMM BACKUP  07e9acee  77bf0000   00010000
<..etc..>

(2) With this patch, new command line arg "rawdump" or "-r" will be
added to cbmem

user can grab the ID with "cbmem -l" and execute "cbmem -r <ID>" to get
raw dump of cbtable for the <ID> in interest.

This change is needed to get MMA results data from cbtable. Coreboot
stores the MMA results in cbmem. Separate post processing scripts uses
cbmem utility to get the these data.

This feature in the cbmem tool can also help debugging some issues where
some specific ID of cbtable needs examination.

BRANCH=none
BUG=chrome-os-partner:43731
TEST=Build and Boot kunimitsu (FAB3). Cbmem -r and -l works as described.
Not tested on Glados

CQ-DEPEND=CL:299476,CL:299475,CL:299473,CL:299509,CL:299508,CL:299507,CL:*230478,CL:*230479

Change-Id: I70ba148113b4e918646b99997a9074300a9c7876
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f60c79d845d4d4afca480b6884c564a0d5e5caf8
Original-Change-Id: I1dde50856f0aa8d4cdd3ecf013bd58d37d76eb72
Original-Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Signed-off-by: Icarus Sparry <icarus.w.sparry@intel.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/299474
Original-Commit-Ready: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Tested-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: http://review.coreboot.org/12482
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-20 18:21:30 +01:00
Pratik Prajapati fb128734ec cbfstool: Add EFI and MMA file types
Add efi and mma file types.

BRANCH=none
BUG=chrome-os-partner:43731
TEST=Build and Boot kunimitsu (FAB3). cbfstool shows mma and efi file types.
Not tested on Glados

CQ-DEPEND=CL:299476,CL:299474,CL:299473,CL:299509,CL:299508,CL:299507,CL:*230478,CL:*230479

Change-Id: I4f24a8426028428d613eb875c11cca70d9461dd6
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 3c625ad2aeca3a9358fba1eb7434c66ff991131a
Original-Change-Id: I611819d213d87fbbb20816fdfb9e4b1401b3b89b
Original-Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/299475
Original-Commit-Ready: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Tested-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: http://review.coreboot.org/12480
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-20 18:21:19 +01:00
Aaron Durbin e740f4845d util/cbmem: Fix out of bounds access
Building cbmem with ASan

	$ CC=gcc-5 CFLAGS="-O1 -g -fsanitize=address -fno-omit-frame-pointer" LDFLAGS="-fsanitize=address" make

it sometimes finds a heap-buffer-overflow, while dumping the CBMEM
console.

$ sudo ./cbmem -c
=================================================================
==11208==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xb5d5782b at pc 0x0804a4d7 bp 0xbfe23bc8 sp 0xbfe23bbc
WRITE of size 1 at 0xb5d5782b thread T0
    #0 0x804a4d6 in dump_console /home/joey/src/coreboot/util/cbmem/cbmem.c:553
    #1 0x804a4d6 in main /home/joey/src/coreboot/util/cbmem/cbmem.c:1134
    #2 0xb70a3a62 in __libc_start_main (/lib/i386-linux-gnu/i686/cmov/libc.so.6+0x19a62)
    #3 0x8048cf0  (/home/joey/src/coreboot/util/cbmem/cbmem+0x8048cf0)

0xb5d5782b is located 50 bytes to the right of 131065-byte region [0xb5d37800,0xb5d577f9)
allocated by thread T0 here:
    #0 0xb72c64ce in __interceptor_malloc (/usr/lib/i386-linux-gnu/libasan.so.2+0x924ce)
    #1 0x804a407 in dump_console /home/joey/src/coreboot/util/cbmem/cbmem.c:542
    #2 0x804a407 in main /home/joey/src/coreboot/util/cbmem/cbmem.c:1134
    #3 0xb70a3a62 in __libc_start_main (/lib/i386-linux-gnu/i686/cmov/libc.so.6+0x19a62)

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/joey/src/coreboot/util/cbmem/cbmem.c:553 dump_console
Shadow bytes around the buggy address:
  0x36baaeb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x36baaec0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x36baaed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x36baaee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x36baaef0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01
=>0x36baaf00: fa fa fa fa fa[fa]fa fa fa fa fa fa fa fa fa fa
  0x36baaf10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x36baaf20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x36baaf30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x36baaf40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x36baaf50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
==11208==ABORTING

Fix up commit 06b13a37 (cbmem: Terminate the cbmem console at the cursor
position.) by reverting setting the cursor to 0.

Change-Id: Id614a8e0f1a202671dd091f825d826a17176bfcc
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/10572
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-20 16:36:59 +01:00
Patrick Georgi 6dda31d287 build system: tighten down .xcompile handling some more
Bail out if .xcompile is incomplete or can't be regenerated.

Change-Id: I74adeded7a3e849b25bf65c5b02f67820f29c7e2
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12477
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-20 10:33:07 +01:00
zbao 669807682e xcompile: Redirect the objdump stderr to /dev/null
On system with clang, "as" is available but "objdump" is not by default.
So if ${gccprefix} is empty, "as" can run successfully and the "objdump"
below might report error. Mask that output.

Change-Id: I9940f069f66e097973ed6138cf3c696087fa5531
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11681
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-20 05:38:06 +01:00
zbao 2f3fd2640f util/kconfig: Set parameter of mkdir to only one for mingw.
The second parameter is to set file permissions for the directory, which
is not needed in mingw.

Change-Id: I88e317f075e8a39f0a280b3dd6e597d119f0f741
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11723
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-20 05:37:20 +01:00
zbao 37450ff534 cbfstool: Fix build error with clang when comparing enum
If HOSTCC=clang, the -Wtautological-constant-out-of-range-compare is
set automaticaaly. That assume the value of type enum is in the defined
range. Then testing if a type enum is out of range causes build error.

Error:
coreboot/util/cbfstool/cbfs_image.c:1387:16: error:
 comparison of constant 4 with expression of type 'enum vb2_hash_algorithm'
 is always false [-Werror,-Wtautological-constant-out-of-range-compare]
 if (hash_type >= CBFS_NUM_SUPPORTED_HASHES)
    ~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

clang version:
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.2
Thread model: posix

Change-Id: I3e1722bf6f9553793a9f0c7f4e790706b6938522
Signed-off-by: zbao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/12330
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-20 05:36:48 +01:00
Stefan Reinauer 3d0ba1c47f romcc: Allow adding non-existent paths to include path
This models gcc's (and other compilers') behavior to not bail
out with an error when one of the include paths does not exist.

Change-Id: Ic93a55cea6b32516fd76da9b49abe7b990829889
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/12469
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2015-11-19 21:20:29 +01:00
Martin Roth 8fe681872b crossgcc: Update makefile builds
- Only build IASL once for the 'all' targets instead of once for each.
- Change the control of what gets built from different targets to
variables on the build line.
- Clean up and correct the list of phony targets
- Don't keep the temporary files around while building all.  This
takes up a lot of space.  If it's desired behavior, add
BUILDGCC_OPTIONS=-t on the make command line.
- Add comments about CPU= and BUILDGCC_OPTIONS= variables
- Add KEEP_SOURCES option

Change-Id: I7752974e249f25717b42be25a841c69af84d5c69
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/12300
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-19 16:50:00 +01:00
Patrick Georgi a791fbb0fa lint: properly terminate junit report on error
Otherwise </testsuite> is missing and jenkins can't make sense of
things.

Change-Id: If11a6d2506efc9d7c915f50896b2714bc66e3b65
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12478
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-19 16:13:50 +01:00
Zheng Bao 362dbea2c9 fletcher: Remove fletcher.
The function fletcher is moved to amdfwtool.

Change-Id: I39eb05a184d8878a96f8de46caf4b5c6c433dc3a
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/12455
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-19 04:12:50 +01:00
Zheng Bao 9c7ff7bc15 amdfwtool: Add amdfwtool to combine AMD firmwares
Combine all needed AMD firmware into one single firmware, which going to
be added as one single CBFS module.

Change-Id: Ib044098c1837592b8f7e9c6a7da4ba3a32117e25
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/12419
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-19 04:11:59 +01:00
Denis 'GNUtoo' Carikli 46f7b0494f ifdtool: Makefile: fix install target
ifdtool doesn't have a manual yet, so don't install
an unexisting manual file.

Change-Id: I290435de7de7177d803cf6cde4f4f42955cbcf5c
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Reviewed-on: http://review.coreboot.org/12406
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-17 05:18:28 +01:00
Patrick Georgi 92bcaa2226 sconfig: remove warning about root_complex
It's not deprecated if it's still in active use. The code layout is just
"funny" (and could warrant a chipset-side cleanup, but not today)

Change-Id: I5f7776ceba0134f20364a0c4a1ca51382e9877e2
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12429
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-14 18:43:06 +01:00
Patrick Georgi 7db2b6cacc cbfstool: Allows mixed-state fmap regions to work
When using FMAP regions (with option -r) that were generated with a
master header (as done by cbfstool copy, eg. in Chrome OS' build
system), there were differences in interpretation of the master header's
fields.

Normalize for that by not sanity-checking the master header's size field
(there are enough other tests) and by dealing with region offsets
properly.

BUG=chromium:445938
BRANCH=tot
TEST=`cbfstool /build/veyron_minnie/firmware/image.dev.bin print -r
FW_MAIN_A` shows that region's directory (instead of claiming that
there's no CBFS at all, or showing an empty directory).

Change-Id: Ia840c823739d4ca144a7f861573d6d1b4113d799
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 0e5364d291f45e4705e83c0331e128e35ab226d3
Original-Change-Id: Ie28edbf55ec56b7c78160000290ef3c57fda0f0e
Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/312210
Original-Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Original-Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/12416
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-13 00:53:14 +01:00
Patrick Georgi 9b24f7ca9a cbfstool: Add way to access entire backing data for a buffer
This is required to handle certain relative-to-flash-start offsets.

BUG=none
BRANCH=tot
TEST=none

Change-Id: I8b30c7b532e330af5db4b8ed65b21774c6cbbd25
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 596ba1aaa62aedb2b214ca55444e3068b9cb1044
Original-Change-Id: Idc9a5279f16951befec4d84aab35117988f7edb7
Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/312220
Original-Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Original-Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/12415
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-13 00:53:11 +01:00
Martin Roth bec1108cbc util/release: Add release notes generator script
This script generates the rough format for the release notes, and will
add new commits to the top of an existing release notes text file. At
that point, a lot still needs to be done by hand - deciding which
commits deserve to be in the release notes, and which don't.

When updating the existing release notes, The updates are just added
to the top of the file, and need to be placed manually.  This just
helps prevent missed commits.

When editing the release notes, don't delete or modify the commit id
lines after they've been classified - Just move them to the bottom of
the file until the notes are ready to publish.  This keeps those commits
from re-appearing at the top of the file the next time the script is run
to update the notes.

Change-Id: I0a699c528117f0347a65a3bed4402f3a57309e3c
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/12318
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2015-11-11 20:42:00 +01:00
Martin Roth 295358454a utils/scripts: Add microcode conversion tool
This is an update to the script in the blobs repo that converts
individual or multiple files into a microcode binary.

Change-Id: I66fb650bbfa334d1f07e8e3914ef6deb8e72bbb4
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/12332
Tested-by: build bot (Jenkins)
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2015-11-10 18:46:04 +01:00
zbao 91ba80dd79 util/kconfig: fill glob_t with 0 before calling glob
On mingw, the function glob has some default options
which are not compliant with man page.

If gl_offs is not set as 0, there may be some slots which
is reserved.
If gl_pathc or gl_pathv is not set as 0, the result might
be appended to the list instead of being added as new ones.

Change-Id: I03110c4cdda70578828d6499262a085a81d26313
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11711
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2015-11-05 02:16:02 +01:00
Martin Roth 11bee4019a buildgcc: change -j variable name from BUILDJOBS to CPUS
The buildgcc makefile was using the variable 'BUILDJOBS' to pass the
number of cores to use for the build into buildgcc.  This is changed
to 'CPUS' to match the variable name for the what-jenkins-does target.

Change-Id: I373c4988e9f096ca2e142afdd5e94d7d806891e3
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/12299
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-04 21:40:06 +01:00
Aaron Durbin 09c0c114e6 util/cbmem: remove duplicated cbmem data structure logic.
The cbmem utility shouldn't be using the intra coreboot
data structures for obtaining the produced data/information.
Instead use the newly added cbmem records in the coreboot
tables for pulling out the data one wants by using the
generic indexing of coreboot table entries.

BUG=chrome-os-partner:43731
BRANCH=None
TEST=Interrogated cbmem table of contents with updated code.

Change-Id: I51bca7d34baf3b3a856cd5e585c8d5e3d8af1d1c
Reviewed-on: http://review.coreboot.org/11758
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-04 00:04:17 +01:00
Patrick Georgi 2a4f58ac12 board-status: Reorder the table categories
Show laptops and servers before desktop boards since that's where both
the market and coreboot are the most active these days.

Change-Id: I7de63975f3f2ff5e983b19e07558175a58870a1b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12292
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-03 21:29:16 +01:00
Patrick Georgi e0e7bba2de board-status: Update the foreword
There's the sentiment that the Supported_Motherboards wiki page is
outdated. Point out that the list is current (and drop the table of
contents that became a distraction).

Change-Id: Ib2363fad0b7f6951b07b2ad0c85148d9bc729b55
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12291
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-03 21:27:03 +01:00
Patrick Georgi f6dc544318 abuild: allow specifying multiple targets by mainboard descriptor
abuild -t EMULATION_QEMU_UCB_RISCV,EMULATION_SPIKE_UCB_RISCV works now

Change-Id: I49d8cd86e21ede724d8daa441b728efa1f6ea1fa
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12281
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-01 14:27:02 +01:00
Patrick Georgi 5ab5a39d2e abuild: Don't keep around old junit reports
junit reports were kept around (and appended to) in some cases, leading
to duplicate reports on jenkins.
Drop old per-mainboard reports before building said boards, and do the
same for the tools (reported thrice).

Change-Id: I74a035587bbf917dca85ba6fc74621c583efe9a2
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12280
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-01 14:26:56 +01:00
Patrick Georgi 0c65dccd3f abuild: allow users to specify multiple boards
Specifying a directory with multiple boards (eg abuild -t google/veyron)
makes abuild run through all of them.

Change-Id: Ifb60f3a1f0c4a727dc43c48671ea90711ffe5585
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12278
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-01 14:26:50 +01:00
Patrick Georgi c2050f014d abuild: change board identifier to a variant of CONFIG_BOARD_*
Since we now have multiple boards in a single mainboard directory (eg
google/veyron), we need some other identifier from which to create
output directories and filenames in abuild than the directory name.
Use the wildcard part of CONFIG_BOARD_* instead.

This changes the semantics of payload.sh handling: it's passed the
single new identifier instead of two arguments "vendor" and "board" that
constitute the mainboard directory's path.

Change-Id: I0dc59c6a1ad1ee51d393fa06b98944a6da342cdf
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12277
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-01 14:26:41 +01:00
Patrick Georgi df7cee23c8 abuild: change compile_target interface
It only takes a single argument now, which is the directory below the
coreboot-builds directory. Preparation for future work.

The only visible change is in console output.

Change-Id: I4b0fe268ccfb69a0403fa5f8b23444c07843386f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12276
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-01 14:26:35 +01:00
Patrick Georgi 35261c0d47 abuild: change remove_board interface
It's passed the mainboard's directory name (below $TARGET) directly
in preparation of more rework in that area.

Change-Id: I3a82b8673fdea07bc5c957f76f4685c34a805334
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12275
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2015-11-01 14:26:27 +01:00
Patrick Georgi 85f4b3c9b3 abuild: remove ancient, unused test submission feature
Its hardcoded HTTP endpoint is gone since 2007.

Change-Id: Ib76814d31b571456d950d45f45912036b6fa82d1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12274
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2015-11-01 14:26:22 +01:00
Patrick Georgi e6adabdf3a abuild: drop the ability to specify a configuration
If you already have a configuration, there's no need to run it through
abuild.

Change-Id: I4dde9a7b96bb0c08ec5c91426a4dd3aa15e74edf
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12273
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2015-11-01 14:26:17 +01:00
Patrick Georgi ee0028da3b util/scripts/no-fsf-addresses.sh: Strip last paragraph
checkpatch.pl that we inherited from Linux checks for its absence, so it
may be easiest to follow their style of not caring for the FSF's address
anymore.

TEST=visual check that `git diff` and `git diff |grep "^[+-]" | \
grep -v "^--- " |grep -v "^+++ " |sort | uniq -c  |sort -n` look
reasonable (matching number of removed and added comment terminators */,
etc.).
Also, `git grep -A3 "You should have received a copy"` only
returns license texts, imported files, patches and help strings in
applications as remaining copies of that paragraph

Change-Id: I7c43860b6fd7ec526983c24b608994539128cfb9
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11887
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2015-10-31 21:38:15 +01:00
Patrick Georgi a73b93157f tree: drop last paragraph of GPL copyright header
It encourages users from writing to the FSF without giving an address.
Linux also prefers to drop that and their checkpatch.pl (that we
imported) looks out for that.

This is the result of util/scripts/no-fsf-addresses.sh with no further
editing.

Change-Id: Ie96faea295fe001911d77dbc51e9a6789558fbd6
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11888
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2015-10-31 21:37:39 +01:00
Patrick Georgi 172a14de8e cbfstool: avoid naming variables "index"
Those may collide with strings.h's index(), included transitively
through system headers.

Change-Id: I6b03236844509ea85cfcdc0a37acf1df97d4c5f3
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12279
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-10-31 08:31:23 +01:00
Shawn Nematbakhsh 5ece96a00f util/cbmem: Handle EC_VBOOT_DONE timestamp
This timestamp marks that EC verification has completed.

BUG=chromium:537269
TEST=Run cbmem on glados, verify "1030:finished EC verification" is
seen.
BRANCH=None

Change-Id: I0114febae689584ec8b12c169e70f2d3995d8d4d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: deeb2ab8085e5ea0a180633eb8fb1c86aadffe94
Original-Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Original-Change-Id: I4f09e970ffedc967c82e6283973cbbcb2fbe037f
Original-Reviewed-on: https://chromium-review.googlesource.com/309280
Original-Commit-Ready: Shawn N <shawnn@chromium.org>
Original-Tested-by: Shawn N <shawnn@chromium.org>
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: http://review.coreboot.org/12230
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: build bot (Jenkins)
2015-10-29 21:07:08 +01:00
Patrick Georgi 8f5053c626 util/fuzz-tests: Add fuzzer for jpeg decoder
Mostly a proof of concept for adding fuzzing to our tree.

Change-Id: I10e5ef3a426b9c74c288d7232a6d11a1ca59833b
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/12183
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-10-29 19:00:42 +01:00
Martin Roth bcaaad1c55 lint: Add Kconfig / Kconfig symbol lint tool
This is a tool to help identify issues in coreboot's Kconfig structure
and in how the Kconfig symbols are used in the coreboot codebase.

It identifies a number of issues:
- #ifdef used on Kconfig symbol of type bool, hex, or int.  These are
always defined.
- #define CONFIG_ in the coreboot code - these should be reserved
for Kconfig symbols.
- Redefinition of Kconfig symbols in the code.
- Use of IS_ENABLED() on non-bool kconfig symbols.
- Use of IS_ENABLED() on values that are not kconfig symbols.
- Attempts to find default values that will not set anything
because of earlier default settings.  This needs to be expanded
significantly.
- Kconfig expressions using symbols which are not defined.
- Kconfig symbols that are defined but not used anywhere in the
Kconfig structure or coreboot code.
- Kconfig keywords used incorrectly.
- Whitespace issues
- Kconfig 'source' keyword issues
-- sourcing non-existant directories
-- sourcing Kconfig files multiple times
-- sourcing non-existent files
-- Kconfig files in the codebase that are never sourced

Additionally, it can be used to help debug the Kconfig tree
by putting all the files together into a single file with
their source locations listed.

Run from the coreboot directory:
util/lint/kconfig_lint

Change-Id: Ia53b366461698d949f17502e99265c1f3f3b1443
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/12088
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-10-29 17:05:08 +01:00
Aaron Durbin 694fd13390 cbfstool: extract rmodules as ELFs properly
With the previous ELF stage extract support the resulting
ELF files wouldn't handle rmodules correctly in that the
rmodule header as well as the relocations were a part of
the program proper. Instead, try an initial pass at
converting the stage as if it was an rmodule first. If it
doesn't work fall back on the normal ELF extraction.

TEST=Pulled an rmodule out of Chrome OS shellball. Manually
     matched up the metadata and relocations.

Change-Id: Iaf222f92d145116ca4dfaa955fb7278e583161f2
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/12222
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-10-29 17:01:03 +01:00
Aaron Durbin cedcb882c1 cbfstool: add ELF symbol, relocation, and string table support
In order to convert rmodules back into ELF files one needs
to add in the relocations so they can be converted back to
rmodules. Because of that requirement symbol tables need
to be present because the relocations reference the symbols.
Additionally, symbol tables reference a string table for the
symbol names. Provide the necessary support for adding all
of those things to an ELF writer.

TEST=Extracted rmodule from a cbfs and compared with the
     source ELF file. Confirmed relocations and code sizes
     are correct.

Change-Id: I07e87a30b3371ddedabcfc682046e3db8c956ff2
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/12221
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-10-29 17:00:47 +01:00
Aaron Durbin 8e982eabfa cbfstool: merge consecutive elf sections in program segments
Instead of creating a loadable segment for each section with
SHF_ALLOC flag merge those sections into a single program
segment. This makes  more tidy readelf, but it also allows
one to extract an rmodule into an ELF and turn it back into
an rmodule.

TEST=Extracted both regular stages and rmodule stages. Compared
     against original ELF files prior to cbfs insert.

Change-Id: I0a600d2e9db5ee6c11278d8ad673caab1af6c759
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/12220
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-10-29 17:00:38 +01:00
Aaron Durbin 5a1e85c405 cbfstool: create ELF files when extracting stages
Instead of dumping the raw stage data when cbfstool
extract is used on stage create an equivalent ELF file.
Because there isn't a lot of information within a stage
file only a rudimentary ELF can be created.

Note: this will break Chrome OS' current usage of extract
since the file is no longer a cbfs_stage. It's an ELF file.

TEST=Extracted romstage from rom.

Change-Id: I8d24a7fa4c5717e4bbba5963139d0d9af4ef8f52
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/12219
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-10-29 17:00:24 +01:00
Aaron Durbin 4f930c9649 cbfstool: add ELF header initialization helper
In order for one to extract ELF files from cbfs it's
helpful to have common code which creates a default
executable ELF header for the provided constraints.

BUG=None
TEST=With follow up patch am able to extract out romstage
     as an ELF file.

Change-Id: Ib8f2456f41b79c6c0430861e33e8b909725013f1
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/12218
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-10-29 17:00:12 +01:00
Aaron Durbin 1762502929 cbfstool: add optional -m ARCH to extract
In order to prepare allowing for one to extract a stage
into an ELF file provide an optional -m ARCH option. This
allows one to indicate to cbfstool what architecture type
the ELF file should be in.

Longer term each stage and payload will have an attribute
associated with it which indicates the attributes of
the executable.

Change-Id: Id190c9719908afa85d5a3b2404ff818009eabb4c
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/12217
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-10-29 16:59:54 +01:00
Patrick Georgi 64d04806f9 lint: don't check for whitespace in jpeg images
Change-Id: I0e1bbb198be6512e9f696c3dddca7f65436e6f5b
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/12182
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
2015-10-28 19:15:25 +01:00
Aaron Durbin 539aed0646 cbfstool: decompress stage files on extraction
In order to actually do something useful with the
resulting file after being extracted decompress stage
files' content. That way one can interrogate the
resulting file w/o having to decompress on the fly.

Note: This change will cause an unexpected change to
Chrome OS devices which package up individual stage
files in the RW slots w/o using cbfs. The result will
be that compressed stages are now decompressed.

Longer term is to turn these files into proper ELF
files on the way out.

Change-Id: I373ecc7b924ea21af8d891a8cb8f01fd64467360
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/12174
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-10-27 17:52:57 +01:00
Stefan Reinauer 850e7d4884 vgabios: fix compilation after x86emu changes
This utility links in coreboot code, and has been broken for a while
again after removing some hacks from coreboot. I hadn't realized how
bad it was broken last time, and since most of this stuff is still
in a pretty bad shape, I decided to throw all of the changes together.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>

Change-Id: If3e4399b1b0e947433b97caa29962ef66ea2993d
Reviewed-on: http://review.coreboot.org/11736
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-25 21:33:32 +01:00
Aaron Durbin 5213c53f6f cbfstool: have decompress functions provide ouput data size
Currently cbfs stage files that are compressed do not have
the decompressed size readily available. Therefore there's
no good way to know actual size of data after it is
decompressed. Optionally return the decompressed data size
if requested.

Change-Id: If371753d28d0ff512118d8bc06fdd48f4a0aeae7
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/12173
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-25 13:23:15 +01:00
Aaron Durbin cd9ba8ac03 cbfstool: initialize offset field in buffer_init()
If one wants to use buffer_init() for initializing a
struct buffer all the fields should be initialized.

Change-Id: I791c90a406301d662fd333c5b65b2e35c934d0f7
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/12172
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-25 13:22:21 +01:00
Martin Roth 0be83c09a0 util: Update makefiles for junit testing
- Have clean remove junit.xml files.
- Remove junit.xml target from cbmem makefile - this is in the top
level Makefile.inc now.
- add distclean targets to makefiles.
- Make sure all makefiles have .PHONY set up.
- rm commands need -f or they will fail if the file they're trying
to remove doesn't exist, causing the build to fail.

Change-Id: I2f0635f2c0a9417e3377a90c8d67103323c4a72f
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/12120
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-24 10:55:45 +02:00
Paul Menzel ccc2af14c1 intelvbttool: Add Makefile
Add minimal Makefile based on cbmem’s Makefile.

The make target `junit.xml` is removed as this is handled differently
since commit de9adebb (Add junit.xml code to top Makefile.inc instead of
utils).

Also the `junit.xml` is removed in the make target `clean`.

Additionally, the make target `distclean` is added, as the current
junit.xml code in the top `Makefile.inc` requires that.

Change-Id: I164b1f7733505bca6248d0711d7ad71d635fa926
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/11876
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2015-10-24 00:27:18 +02:00
Stefan Reinauer 354c11d10e cbfstool: Make sure fileno is available on Cygwin
This patch fixes compilation of cbfstool on Cygwin.

As reported in http://review.coreboot.org/#/c/10027
cbfstool on Cygwin likes to be compiled with -D_GNU_SOURCE.
That patch was abandoned because it would unwantedly turn on
more GNU extensions. Instead of doing that, only enable the
define on Cygwin, switch to -std=gnu99 instead of -std=c99 to
make fileno and strdup actually available.
A MINGW32 check that was forgotten in Makefile was copied over
from Makefile.inc to keep the two files in sync.

This patch has no impact on non-Windows builds.

Change-Id: I068b181d67daf9c7280110e64aefb634aa20c69b
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/11667
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins)
2015-10-23 20:44:35 +02:00
Stefan Reinauer 1ecf252c38 MAINTAINERS: Add script to test database and find maintainers
This utility should make it easier to complete and maintain
the database of coreboot subsystem maintainers (MAINTAINERS
file)

This will need a bit of tender love and care to print information
in an easily machine readable output for the build system, but its
a first start to query the maintainers database.

Build with:
   $ go build util/scripts/maintainers.go

Find a maintainer for a set of files with:
   $ ./maintainers Makefile Makefile.inc
   Makefile is in subsystem BUILD SYSTEM
   Maintainers:  [Patrick Georgi <patrick@georgi-clan.de>]
   Makefile.inc is in subsystem BUILD SYSTEM
   Maintainers:  [Patrick Georgi <patrick@georgi-clan.de>]

Check the maintainer database with:
   $ ./maintainers
   .gitignore has no subsystem defined in MAINTAINERS
   .gitmodules has no subsystem defined in MAINTAINERS
   .gitreview has no subsystem defined in MAINTAINERS
   3rdparty/arm-trusted-firmware has no subsystem defined in MAINTAINERS
   3rdparty/blobs has no subsystem defined in MAINTAINERS
   3rdparty/vboot has no subsystem defined in MAINTAINERS
   COPYING has no subsystem defined in MAINTAINERS
   Documentation/AMD-S3.txt has no subsystem defined in MAINTAINERS
   Documentation/CorebootBuildingGuide.tex has no subsystem defined in MAINTAINERS
   Documentation/Doxyfile.coreboot has no subsystem defined in MAINTAINERS
   [..]

Change-Id: I49c43911971152b0e4d626ccdeb33c088e362695
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/12119
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2015-10-23 01:47:39 +02:00
Stefan Reinauer 3a043c47a9 cbfstool: Fix tolower() calls on Cygwin
Cygwin complains:

cbfstool.c: 1075:5 error: array subscript has type 'char' [-Werror=char-subscripts]

so add an explicit cast.

Change-Id: Ie89153518d6af2bacce3f48fc7952fee17a688dd
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/11666
Tested-by: build bot (Jenkins)
Reviewed-by: Zheng Bao <zheng.bao@amd.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2015-10-23 01:07:01 +02:00
Nico Huber 37743a913f cbfstool/Makefile: Also rm fmd_(parser|scanner).[ch] in clean
Change-Id: I783aa4b2319aaedd57ce9a67ca935392a611298f
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/12127
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-10-22 23:02:40 +02:00
Nico Huber 5e731a7cfc cbfstool/Makefile: Drop unused, irritating definition of `obj`
Change-Id: Id8dda8a973dcf991ac494c2d50258d1b51e43c6a
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/12126
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-10-22 23:02:01 +02:00
Nico Huber 954a55b950 gma ACPI: Make brightness levels a per board setting
Those are actually board specific. Keep the old value as defaults,
though. The defaults are included by all affected boards.

Change-Id: Ib865c7b4274f2ea3181a89fc52701b740f9bab7d
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/11705
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
2015-10-22 23:01:36 +02:00
Martin Roth bf6b83abe0 Revert "Remove sandybridge and ivybridge FSP code path"
Please don't remove chipsets and mainboards without discussion and input
from the owners. Someone was asking about cougar canyon 2 just a couple
of weeks ago - there's obviously still interest.

This reverts commit fb50124d22.

Change-Id: Icd7dcea21fa4a7808b25bb8727020701aeebffc9
Signed-off-by: Martin Roth <martinroth@google.com>
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: http://review.coreboot.org/12128
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-10-22 21:51:01 +02:00
Patrick Georgi 821bcd6456 cbfstool: Fix typo in error message
Change-Id: Iaee7e2c74fe9f63d4d4878278bd445af393942f4
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: http://review.coreboot.org/11920
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-10-19 21:09:35 +02:00
Aaron Durbin 285111f822 cbfstool: Fix removing and adding file with same name
Currently, cbfstool regressed that removing a file from CBFS the space
is marked as empty but the filename is still shown, preventing adding a
file with the same name again. [1]

```
$ echo a > a
$ echo b > b
$ ./util/cbfstool/cbfstool  test.rom create -m x86 -s 1024
Created CBFS (capacity = 920 bytes)
$ ./util/cbfstool/cbfstool test.rom add -f a -n a -t raw
$ ./util/cbfstool/cbfstool test.rom add -f b -n b -t raw
$ cp test.rom test.rom.original
$ ./util/cbfstool/cbfstool test.rom remove  -n
$ diff -up <(hexdump -C test.rom.original) <(hexdump -C test.rom)
--- /dev/fd/63  2015-08-07 08:43:42.118430961 -0500
+++ /dev/fd/62  2015-08-07 08:43:42.114430961 -0500
@@ -1,4 +1,4 @@
-00000000  4c 41 52 43 48 49 56 45  00 00 00 02 00 00 00 50  |LARCHIVE.......P|
+00000000  4c 41 52 43 48 49 56 45  00 00 00 02 ff ff ff ff  |LARCHIVE........|
 00000010  00 00 00 00 00 00 00 28  61 00 00 00 00 00 00 00  |.......(a.......|
 00000020  00 00 00 00 00 00 00 00  61 0a ff ff ff ff ff ff  |........a.......|
 00000030  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
$ ./util/cbfstool/cbfstool test.rom add -f c -n c -t raw

$ ./util/cbfstool/cbfstool test.rom print
test.rom: 1 kB, bootblocksize 0, romsize 1024, offset 0x0
alignment: 64 bytes, architecture: x86

Name                           Offset     Type         Size
c                              0x0        raw          2
b                              0x40       raw          2
(empty)                        0x80       null         792
```

So it is “deteled” as the type changed. But the name was not changed to
match the *(empty)* heuristic.

So also adapt the name when removing a file by writing a null byte to
the beginning of the name, so that the heuristic works. (Though remove
doesn't really clear contents.)

```
$ ./util/cbfstool/cbfstool test.rom remove  -n c
$ ./util/cbfstool/cbfstool test.rom print
test.rom: 1 kB, bootblocksize 0, romsize 1024, offset 0x0
alignment: 64 bytes, architecture: x86

Name                           Offset     Type         Size
(empty)                        0x0        null         2
b                              0x40       raw          2
(empty)                        0x80       null         792
```

[1] http://www.coreboot.org/pipermail/coreboot/2015-August/080201.html

Change-Id: I033456ab10e3e1b402ac2374f3a887cefd3e5abf
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/11632
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
2015-10-17 06:57:50 +00:00
Paul Menzel 831bbe8446 cbfstool/cbfs_image.c: Just use one space before `=`
Change-Id: Id31c889d1e83e7ddfb0f0f98b78601f37b71cfa2
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/11631
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-17 06:57:42 +00:00
Martin Roth 606ca51530 lint: Fix shellcheck warnings, add comments
When the script was pulled out of the makefile, it was left as it was
written in the makefile to show the continuity with the original.  This
patch cleans up issues identified by shellcheck and adds comments.

Change-Id: I5e6573a4fdfbb397e15db38e2e3dfadeb3430573
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/11931
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-17 06:16:49 +00:00
Martin Roth b6d739d449 lint: Add junit.xml output for jenkins
To add lint to jenkins testing, we need junit.xml output.  This adds an
optional --junit command line parameter to enable output to an xml file
in the lint directory.

Change-Id: I5588190cb050b9dbe99458cb18a71a147769f50e
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/11891
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-17 06:16:40 +00:00
Martin Roth e4fc407e3f lint: Move the lint script out of Makefile.inc
In preparation for adding junit xml to the lint tests, move the
script out of Makefile.inc and into its own file.

Add a copyright, usage, and error checking that was not needed
inside the Makefile.

Change-Id: I32bebc6a5f1f6fa652812c8a014d84006e2e6c8a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/11890
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-17 06:16:05 +00:00
Timothy Pearson bea714088b util/cbmem: Fix failure with certain cbmem base alignments
Change-Id: Icd28af388c49ad36d7a8e414b3c82e18e1f8f523
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: http://review.coreboot.org/11932
Tested-by: build bot (Jenkins)
Reviewed-by: Peter Stuge <peter@stuge.se>
2015-10-16 20:23:33 +00:00
Martin Roth 21ca9beda4 abuild: add a command line parameter for junit filename
The 'what-jenkins-does' makefile target was renaming the junit filename
after abuild finished.  Instead, just add a command line parameter to
send it to a different filename.

Change-Id: I66f7d80d621573d77a5154f36f2db49d7b2e948a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/11878
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-15 12:21:19 +00:00
Martin Roth 58562405c8 Revert "Remove FSP Rangeley SOC and mohonpeak board support"
This chip is still being used and should not have been deleted.  It's
a current intel chip, and doesn't even require an ME binary.

This reverts commit 959478a763.

Change-Id: I78594871f87af6e882a245077b59727e15f8021a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/11860
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-10-14 22:49:03 +00:00
Vladimir Serbinenko fb69a69fce inteltool: Add function to generate SPD dump.
E.g. on my MacbookAir to generate spd.bin to be used
with coreboot I do:

./inteltool -S spd.bin

Change-Id: If165475ed3e1f3262a8926ef619128d25b1e2896
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/11847
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2015-10-11 15:01:05 +00:00
Vladimir Serbinenko 6286e3512a autoport: Fix ectool arguments.
Change-Id: I207fa981370d72c26e6fb1f07f3cd2d1f9d44d04
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/11855
Tested-by: build bot (Jenkins)
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2015-10-11 10:25:17 +00:00
Vladimir Serbinenko c48f5ef3cc Kill lvds_num_lanes
Only one value would work with corresponding gma code currently (which one
depends on board). Going forward, it's possible to compute which number can
be used, so there is no need to keep this info around.

Change-Id: Iadc77ef94b02f892860e3ae8d70a0a792758565d
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/11862
Tested-by: build bot (Jenkins)
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2015-10-11 10:07:17 +00:00
Vladimir Serbinenko 551cff08d5 Derive lvds_dual_channel from EDID timings.
Based on the info by Felix Held.

Change-Id: Iab84dd8a0e3c942da20a6e21db5510e4ad16cadd
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/11857
Tested-by: build bot (Jenkins)
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2015-10-11 10:07:12 +00:00
Andrey Petrov a2bed346a1 cbfstool: allow printable characters in image name
Currently cbfstool would reject non-alpanumeric characters in
image names. Underscore is not alphanumeric and is used in some
default fmaps. This change allows image names to contain all
"printable" characters except spaces.

Change-Id: I6ba2b581d5623f5b028149ece0169892ea63fd04
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: http://review.coreboot.org/11807
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-08 22:39:36 +00:00
zbao f35f5ff3cd buildgcc: Fix the binutils-no-doc patch with 2.25
The binutils-2.25 has added some new line, making the hunk
move downward a little. The utility patch can fix the offset
with "fuzz" message. So, recreate the patch to avoid that
message.

Change-Id: Ie659a8faf923465f6d47f7c0c0bf903c5eb903ab
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11639
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-05 17:22:41 +00:00
zbao 05d39ffbf4 buildgcc: Add patch for building binutils by clang 6.0
Clang is the default compiler on BSD and OS X. With this
change, we don't have to install gcc any more. Clang can
act as host cc.
This is a known issue on GNU mail list. Please refer
the link below.
https://sourceware.org/bugzilla/show_bug.cgi?id=17473

Change-Id: I0f014b776e86e6d0cbebd560cb17f469f31e1dfb
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11638
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-05 17:22:15 +00:00
zbao 282dd95143 buildgcc: Show the progress when downloading
Grep the output of wget, showing only the percentage.
Leave the final "100%" unerased.
Checking return code of wget is removed.

Change-Id: I4559e88d541738a594dce92e23589992f234cb9b
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11520
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-05 17:21:55 +00:00
Alexandru Gagniuc 959478a763 Remove FSP Rangeley SOC and mohonpeak board support
mohonpeak is the reference board for Rangeley. I doubt anyone uses it
or cares about it. We jokingly refer to it as "Moron Peak". It's code
with no known users, so we shouldn't be hauling it around for the
eventuality that someone might use it in the future.

Change-Id: Id3c9fc39e1b98707d96a95f2a914de6bbb31c615
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-on: http://review.coreboot.org/11790
Tested-by: build bot (Jenkins)
Reviewed-by: Philipp Deppenwiese <zaolin@das-labor.org>
2015-10-03 22:23:54 +00:00
Alexandru Gagniuc fb50124d22 Remove sandybridge and ivybridge FSP code path
We already have two other code paths for this silicon. Maintaining the
FSP path as well doesn't make much sense. There was only one board to
use this code, and it's a reference board that I doubt anyone still
owns or uses.

Change-Id: I4fcfa6c56448416624fd26418df19b354eb72f39
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-on: http://review.coreboot.org/11789
Tested-by: build bot (Jenkins)
Reviewed-by: Philipp Deppenwiese <zaolin@das-labor.org>
2015-10-03 22:23:24 +00:00
Alexandru Gagniuc ecf2eb463f sandybridge ivybridge: Treat native init as first class citizen
This is a sad story. We have three different code paths for
sandybridge and ivybridge: proper native path, google MRC path, and,
everyone's favorite: Intel FSP path. For the purpose of this patch,
the FSP path lives in its own little world, and doesn't concern us.

Since MRC was first, when native files and variables were added, they
were suffixed with "_native" to separate them from the existing code.
This can cause confusion, as the suffix might make the native files
seem parasitical.

This has been bothering me for many months. MRC should be the
parasitical path, especially since we fully support native init, and
it works more reliably, on a wider range of hardware. There have been
a few board ports that never made it to coreboot.org because MRC would
hang.

gigabyte/ga-b75m-d3h is a prime example: it did not work with MRC, so
the effort was abandoned at first. Once the native path became
available, the effort was restarted and the board is now supported.

In honor of the hackers and pioneers who made the native code
possible, rename things so that their effort is the first class
citizen.

Change-Id: Ic86cee5e00bf7f598716d3d15d1ea81ca673932f
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-on: http://review.coreboot.org/11788
Tested-by: build bot (Jenkins)
Reviewed-by: Philipp Deppenwiese <zaolin@das-labor.org>
2015-10-03 22:22:54 +00:00
Aaron Durbin 8a414a0943 cbfstool: relocate FSP blobs on cbfstool add
When adding an FSP blob relocate it to its final
destination. This allows FSP to not be hard coded in
the cbfs. In order for the include paths to work
correctly w/ the edk 2 headers we need to supply
a neutered ProcessorBind.h to match up with the
tool environment such that one can get the UEFI
Platform Initialization type definitions.

BUG=chrome-os-partner:44827
BRANCH=None
TEST=Built glados and booted. Also added FSP with -b and manually
     adjusted location in fsp cache-as-ram. Booted as well.

Change-Id: I830d93578fdf745a51195109cf18d94a83ee8cd3
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11778
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-02 12:17:21 +00:00
Aaron Durbin d38e3de68c cbfstool: provide printk() to cbfstool code
For shared compilation units between coreboot proper
and cbfstool that means one needs to provide printk
logging. Therefore, provide printk() at <console/console.h>
to mimic coreboot's environment.

BUG=chrome-os-partner:44827
BRANCH=None
TEST=Built cbfstool with code that includes and uses
     <console/console.h>.

Change-Id: I8e54d403526a397e4fd117738a367a0a7bb71637
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11774
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-02 12:16:09 +00:00
Werner Zeh 8c3780a142 cbfstool: Allow anonymous structs/unions for older gcc versions
Older gcc versions throws a warning when a struct or union is
declared without a valid name (anonymous). This patch enables the
feature for older gcc versions so that no warning will be issued.

Change-Id: Idc5481f4d5723c5090a6f7d7dbb0686a737e11fc
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: http://review.coreboot.org/11779
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-02 08:54:51 +00:00
Patrick Georgi 89f20340d5 cbfstool: Add support for hashes as file metadata
They allow optimizing a verification of a whole CBFS image by only
dealing with the headers (assuming you choose to trust the hash
algorithm(s)).

The format allows for multiple hashes for a single file, and cbfstool
can handle them, but right now it can't generate such headers.

Loosely based on Sol's work in http://review.coreboot.org/#/c/10147/,
but using the compatible file attribute format. vboot is now a hard
dependency of the build process, but we import it into the tree for
quite a while now.

Change-Id: I9f14f30537d676ce209ad612e7327c6f4810b313
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/11767
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2015-10-01 20:14:26 +00:00
Patrick Georgi 44853371f1 kconfig: fix build for xconfig, too
Change-Id: I1c5e3424cb56f1f10e75bb07db084c3500f3ba07
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/11768
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2015-10-01 20:14:13 +00:00
Patrick Georgi ca97fa7ac3 cbfstool: Add bintohex function
We need to emit some hex strings.

Change-Id: I9e7e184282f6ad0470f2e269f5dc874e78f8b697
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/11766
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2015-10-01 14:43:43 +00:00
Patrick Georgi 9595ed4731 kconfig: kconfig_warnings needs to be defined for all frontends
Change-Id: Iecefdd1e827e4eb8b4da573e4291850d6c47767f
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/11754
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2015-09-30 10:48:21 +00:00
Stefan Reinauer 57a31317a2 kconfig: Allow KCONFIG_STRICT outside of confdata.c
To catch dependency errors in symbol.c (such as the ones
fixed by I51b4ee326f082c6a656a813ee5772e9c34f5c343) we need
to check for global kconfig warnings before saving config
files.

This patch will produce errors for wrong dependencies and
add catching of errors to conf, nconf and mconf. Sorry,
gconf users, you will have to wait.

Change-Id: Idf7ee406ce3869941af319219aea16fab826df84
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/11291
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-09-30 06:58:57 +00:00
Patrick Georgi 2f953d304e cbfstool: prefer fmap data over cbfs master header if it exists
Up to now, if both fmap and a master header existed, the master header
was used. Now, use the master header only if no fmap is found.

Change-Id: Iafbf2c9dc325597e23a9780b495549b5d912e9ad
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11629
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2015-09-28 10:13:33 +00:00
Patrick Georgi 6dd99fcafe cbfstool: have update-fit always work from CBFS
On x86, the bootblock can (and will) become part of the regular file
system, so there's no distinct fixed-size region for the bootblock
there.

Change-Id: Ie139215b73e01027bc0586701361e9a0afa9150e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11691
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2015-09-28 10:13:22 +00:00
Paul Kocialkowski 34ce438e6f cbfstool: Proper commonlib include path with no dependency on $(src)
$(src) is not defined when building directly from the cbfs directory (that is,
when building cbfs as standalone, running make in the cbfs directory), so we
need to define the path to the commonlib include path relative to $(top).

Change-Id: I72e80b030d4a156ec653ded5ab1457b16f612526
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: http://review.coreboot.org/11706
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Tested-by: build bot (Jenkins)
2015-09-24 17:08:20 +00:00
Aaron Durbin dc9f5cd546 coreboot: introduce commonlib
Instead of reaching into src/include and re-writing code
allow for cleaner code sharing within coreboot and its
utilities. The additional thing needed at this point is
for the utilities to provide a printk() declaration within
a <console/console.h> file. That way code which uses printk()
can than be mapped properly to verbosity of utility parameters.

Change-Id: I9e46a279569733336bc0a018aed96bc924c07cdd
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11592
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2015-09-22 21:21:34 +00:00
Aaron Durbin 4b93a4f47a cbfstool: don't use endian to fix BSD hosts
endian.h lives in under sys on the BSDs. Replace htole32() with
swab32(htonl(..)) as a proxy for little endian operations.

Change-Id: I84a88f6882b6c8f14fb089e4b629e916386afe4d
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11695
Tested-by: build bot (Jenkins)
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
2015-09-21 19:10:26 +00:00
Patrick Georgi b946f12ed0 cbfstool: make fmap search more strict
Since fmap doesn't come with a checksum, we resort to a number of
heuristics to determine if a given location hosts an fmap (instead of
another data structure that happens to store the fmap magic string at
the right location).

The version test is particularly effective against strings containing
the magic (which either terminate with 0, or have some other ASCII data,
but rarely a '\001' byte inside the string).

Change-Id: Ic66eb0015c7ffdfe25e0054b7838445b8ba098e9
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11690
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2015-09-21 16:04:22 +00:00
Patrick Georgi 59e52b975e cbfstool: add new add-master-header command
The command adds a new cbfs file, fills in the CBFS meta data in cbfs
master header format, then points the master header pointer (which
resides at the last 4 bytes of the CBFS region) to the data area of the
new file.

This can leak some space in CBFS if an old-style CBFS with native master
header gets the treatment, because a new header is created and pointed
at. flashmap based images have no such header, and the attempt to create
a second file with the (hardcoded) name will fail.

Change-Id: I5bc7fbcb5962b35a95261f30f0c93008e760680d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11628
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2015-09-21 16:03:48 +00:00
Patrick Georgi a9992d3da5 ifdfake: allow "base+size" description of regions
This is more in line with how fmd/fmap specify ranges.

Change-Id: Iecf8250e84d6eb267711ded446909b21147f1a9c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11623
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2015-09-21 13:01:22 +00:00
Patrick Georgi 239c74231b cbfstool: introduce new file types
Let's move x86 style bootblocks (and later the others) and the master header
into the CBFS structure. Prepare for this by adding file types.

Change-Id: I1b4149c7f3b8564ee358a2c18ba91e6a7a6797da
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11627
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-09-19 12:07:10 +00:00
Stefan Reinauer 1bb487c474 cbfstool: Don't use fileno() to get file size
fileno() is a mess on some operating systems. Don't
deliberately convert between FILE * and file handles.

Change-Id: I5be62a731f928333ea2e5843d81f541453fdb396
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/11636
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2015-09-17 19:17:06 +00:00
Shawn Nematbakhsh d2cb11811c ifdtool: Properly set + decode flmstr regs for IFD v2
flmstr register bits have slightly different meaning for IFD v2.

BUG=chrome-os-partner:45091, chrome-os-partner:43461
TEST=Run `ifdtool -d image.bin` on IFD v1 locked squawks image:

Found Master Section
FLMSTR1:   0x0a0b0000 (Host CPU/BIOS)
  Platform Data Region Write Access: disabled
  GbE Region Write Access:           enabled
  Intel ME Region Write Access:      disabled
  Host CPU/BIOS Region Write Access: enabled
  Flash Descriptor Write Access:     disabled
  Platform Data Region Read Access:  disabled
  GbE Region Read Access:            enabled
  Intel ME Region Read Access:       disabled
  Host CPU/BIOS Region Read Access:  enabled
  Flash Descriptor Read Access:      enabled
  Requester ID:                      0x0000

FLMSTR2:   0x0c0d0000 (Intel ME)
  Platform Data Region Write Access: disabled
  GbE Region Write Access:           enabled
  Intel ME Region Write Access:      enabled
  Host CPU/BIOS Region Write Access: disabled
  Flash Descriptor Write Access:     disabled
  Platform Data Region Read Access:  disabled
  GbE Region Read Access:            enabled
  Intel ME Region Read Access:       enabled
  Host CPU/BIOS Region Read Access:  disabled
  Flash Descriptor Read Access:      enabled
  Requester ID:                      0x0000

FLMSTR3:   0x08080118 (GbE)
  Platform Data Region Write Access: disabled
  GbE Region Write Access:           enabled
  Intel ME Region Write Access:      disabled
  Host CPU/BIOS Region Write Access: disabled
  Flash Descriptor Write Access:     disabled
  Platform Data Region Read Access:  disabled
  GbE Region Read Access:            enabled
  Intel ME Region Read Access:       disabled
  Host CPU/BIOS Region Read Access:  disabled
  Flash Descriptor Read Access:      disabled
  Requester ID:                      0x0118

Then, run `ifdtool -l image.bin` and verify newly locked image is identical.
Next, run `ifdtool -l image.bin` on unlocked glados image. Verify that locked
and unlocked regions are identical to above.
Finally, burn glados image, run `flashrom -V`, and verify ME regions is
locked and descriptor region is RO.
BRANCH=None

Change-Id: I8a65bdc5edd0d888138b88c1189f8badd1404b64
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 11c434835a66a50ab2c0c01a084edc96cbe052da
Original-Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Original-Change-Id: I875dfce6f5cf57831714702872bfe636f8f953f4
Original-Reviewed-on: https://chromium-review.googlesource.com/298968
Original-Commit-Ready: Shawn N <shawnn@chromium.org>
Original-Tested-by: Shawn N <shawnn@chromium.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11658
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-09-17 14:17:31 +00:00
Patrick Georgi ae570d5cee cbfstool: deduplicate Makefiles
There's no need to maintain two lists of dependencies that need to be
changed every. single. time.

Change-Id: I26bb8c884e98afe74fd9df11464bcf88e130cd92
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11674
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2015-09-17 07:41:02 +00:00
Patrick Georgi cdeb1c4f61 cbfstool: actually use no-ms-bitfields flag on mingw
It was added to an unused variable.

Change-Id: I869ffdda7e04b5c615931473c760d66b803fb98b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11673
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2015-09-17 07:40:44 +00:00
Aaron Durbin 9b9d4b3a47 cbfstool: remove locate command
The locate command was previously being used for x86 romstage
linking as well as alignment handling of files. The add command
already supports alignment so there's no more users of the
locate command. Remove the command as well as the '-T' (top-aligned)
option.

BUG=chrome-os-partner:44827
BRANCH=None
TEST=Built rambi. Noted microcode being directly added.

Change-Id: I3b6647bd4cac04a113ab3592f345281fbcd681af
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11671
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-09-16 14:11:25 +00:00
Aaron Durbin 4be1674d32 cbfstool: add --xip support to add-stage for x86
Instead of going through the locate then add-stage
dance while linking romstage twice allow for adding romstage
with --xip flags to perform the relocation while adding it
into CBFS. The -P (page-size) and -a (alignment) parameters
were added as well so one could specify the necessary
parameters for x86 romstage.

BUG=chrome-os-partner:44827
BRANCH=None
TEST=Built and booted on glados.

Change-Id: I585619886f257e35f00961a1574009a51c28ff2b
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11669
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-09-16 14:11:10 +00:00
Aaron Durbin d7339411a9 cbfstool: provide metadata size to cbfs_locate_entry()
The cbfs_locate_entry() function had a hack in there which
assumed a struct cbfs_stage data was being added in addition
to the struct cbfs_file and name. Move that logic out to the
callers while still maintaining the logic for consistency.
The only impacted commands cbfs_add and cbfs_locate, but
those are using the default 'always adding struct cbfs_stage'
in addition to cbfs_file + name. Eventually those should be
removed when cbfs_locate is removed as cbfs_add has no smarts
related to the cbfs file type provided.

BUG=chrome-os-partner:44827
BRANCH=None
TEST=Built rambi.

Change-Id: I2771116ea1ff439ea53b8886e1f33e0e637a79d4
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11668
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-09-16 14:11:03 +00:00
Aaron Durbin b39a974d75 cbfstool: expose rmodule logic
In order to allow cbfstool to add XIP romstage on x86 without
doing the 'cbfstool locate', relink, then 'cbfstool add' dance
expose the core logic and of rmodule including proving an optional
filter. The filter will be used for ignoring relocations to the
.car.global region.

BUG=chrome-os-partner:44827
BRANCH=None
TEST=Built rambi.

Change-Id: I192ae2e2f2e727d3183d32fd3eef8b64aacd92f4
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11598
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-09-16 14:10:51 +00:00
Aaron Durbin 051a181f0c cbfstool: prepare for exposing rmodule logic
The core logic of the rmodule parser is ideal for
processing romstage ELF files for XIP. To that
end start the work of exposing the logic from
rmodule so cbfstool can take advantage of it.

The properties that both need require:
- Single program segment
- Relocation information
- Filter relocation processing

BUG=chrome-os-partner:44827
BRANCH=None
TEST=Built rambi.

Change-Id: I176d0ae0ae1933cdf6adac67d393ba676198861a
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11595
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-09-16 14:10:42 +00:00
Patrick Georgi a0e7738463 abuild: don't complain about missing junit reports for skipped boards
There's no need to whine about missing files, so test for them first.

Change-Id: I906fd04a315de70340ce76d7c38eaaf88cc6580a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11642
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-09-16 07:43:55 +00:00
Patrick Georgi 053322f891 abuild: log bulding tools
We build the coreboot utilities in a separate step as a minor
optimization. When logging in junit format (for jenkins), we want to
have a report on those as well (instead of an xml error).

Change-Id: Ibcd3b02bce9a314c30b5f7414e9e4cf0149ffd6a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11641
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2015-09-16 07:43:43 +00:00
Patrick Georgi 098c4a8096 abuild: don't create junit tests with empty testclass field
Variable expansion made abuild create board..foo/bar, which are annoying
on jenkins' web UI because it doesn't cope properly with the empty
namespace between the dots. make it create board.foo/bar or
board.$class.foo/bar.

Change-Id: Ifa79cbfd1f263e11a458b3cc320baeed6a3fbc98
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11640
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2015-09-16 07:43:34 +00:00