Commit Graph

251 Commits

Author SHA1 Message Date
Ben Gardner 48c232c1da Makefile.inc: 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.

Without this change, build.h will contain:
#define COREBOOT_VERSION "coreboot-unknown"

Change-Id: Ia141371cc892a0817d3566dc37ed0401675ad8d8
Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
Reviewed-on: https://review.coreboot.org/13061
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-01-21 16:42:23 +01:00
Patrick Georgi bdaa1b5a72 build system: Initialize all CBFS regions
Regions marked "(CBFS)" in the fmd weren't actually initialized with a
CBFS structure, just the default CBFS region (COREBOOT).
This made cbfstool add (etc) fail on those regions, so explicitly
initialize all those regions.

Change-Id: Ib321fa73cd2ecc8057b52408521fd214d6df7f2e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/13059
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-21 16:12:06 +01:00
Jimmy Huang b87bb29f4f Makefile: Add 3rdparty to CPPFLAGS_common
In some occasions, Coreboot may need to include the header file from
3rdparty directory. By adding 3rdparty directory to Coreboot include
path, we can include 3rdparty header file directly.

BRANCH=none
BUG=none
TEST=build pass

Change-Id: I8ed68bd330eae1211736a91b213c5dc0af2f7fa9
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: d6a86b3488ebbc9d8f5f46e922106b71034e7127
Original-Change-Id: Ib8e9f059f88a8c6767f872af8760e91186ae5ec3
Original-Signed-off-by: Jimmy Huang <jimmy.huang@mediatek.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/315021
Original-Commit-Ready: Yidi Lin <yidi.lin@mediatek.com>
Original-Tested-by: Yidi Lin <yidi.lin@mediatek.com>
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/12929
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-01-14 18:44:03 +01:00
Martin Roth aede3fc828 Makefile: Add toolchain version check
This is an initial check for the coreboot toolchain versions.  It
currently checks binutils, gcc, clang, and iasl.  The other components
are slightly more difficult to test, but should follow on shortly.

If the toolchain is not the correct version, make will halt with
an error.

Change-Id: I41daf6c4545c01dc21231d78fd081bbcf77c4726
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12846
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Tested-by: build bot (Jenkins)
2016-01-12 22:31:30 +01:00
Martin Roth 4fdd8030a4 Makefile.inc: update location of dsdt
The dsdt file moved from the mainboard directory to the top level of
the build directory.  Remove it from the new location when cleaning.

Change-Id: If9f72c78e5c03e0db384b3181c169aa2ecbb5c18
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12822
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-01-07 16:56:47 +01:00
Aaron Durbin cbb6c75061 commonlib: Add function to hash contents of a CBFS region.
Provide a common routine to hash the contents of a cbfs
region. The cbfs region is hashed in the following order:
1. potential cbfs header at offset 0
2. potential cbfs header retlative offset at cbfs size - 4
3. For each file the metadata of the file.
4. For each non-empty file the data of the file.

BUG=chrome-os-partner:48412
BUG=chromium:445938
BRANCH=None
TEST=Utilized in chromeos cros_bundle_firmware as well as at
      runtime during vboot verification on glados.

Change-Id: Ie1e5db5b8a80d9465e88d3f69f5367d887bdf73f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/12786
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2016-01-06 01:12:04 +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
Martin Roth acc94a73ba Makefile.inc: Fmaptool build fixes
- make sure CONFIG_CBFS_SIZE is lowercase for fmaptool.
- Regenerate the fmap.fmd file when config.h changes.
- Print the fmaptool step when doing the build.

Change-Id: Ib518ed469d9e39eb41c81f7b19480c7789067d2d
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/12806
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2015-12-30 02:57:11 +01:00
Martin Roth d4c2484cc8 Makefile.inc: Move addition of payload rev & config to payload makefile
These files need to be added to cbfs-files after PAYLOAD_CONFIG
and PAYLOAD_VERSION have been defined.  Where they were before,
they didn't get added to the final build.

Change-Id: Ib1b230f9eb72a8c1710ef473a9f24c0fb7ec6e17
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12751
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-20 02:42:38 +01:00
Martin Roth 92898b424b Makefile.inc: Include build/dsdt.d if it exists
The dsdt dependency file is created, but wasn't being used to determine
whether or not to update the dsdt file.  If it's present, include it
into the makefile so dsdt.aml gets rebuilt if any of the depencencies
change.

Change-Id: I76bc22541c6b9740841bda891a5b88030cb949cd
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12699
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-17 21:23:38 +01:00
Martin Roth fdaf9cca36 Makefile.inc: Document extract_nth and the fields it extracts
Change-Id: I0b5cffff95aca0ea0d6302b436797dada1850ba0
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12713
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-17 18:59:56 +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
Martin Roth 9c940aec36 Makefile.inc: Add AMDFWTOOL to tools so abuild will stop failing
Jenkins keeps failing trying to build AMDFWTOOL because it's being
built by multiple platforms at the same time.  Putting it into the tools
list and having it built ahead of time should fix this problem.

Change-Id: I2a8308036135729f0ed19502f3e039aca009b3f3
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12647
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-06 18:37:19 +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
Patrick Georgi ec90adb2e7 build system: Drop useless variable and dependency
We don't need COREBOOT_ROM_DEPENDENCIES anymore because the dependencies
are taken care of by the cbfs-files mechanism. REFCODE_BLOB also doesn't
need to be an explicit dependency.

Change-Id: I3f32cce79683e57a174724179bc2ac59a8cdda94
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12648
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2015-12-05 16:06:34 +01:00
Patrick Georgi a91402fc1e build system: actually provide revision information in defconfig
The config file added to CBFS is the short version created by defconfig.
The build system tried to add a header describing the version for quite
a while now, but failed because it wrote to the file, then had kconfig
overwrite it with the config data.

While at it, rely on build.h and its version information instead of
calling git manually.

Change-Id: I5e4d6c857594a55432c05bf1480973fc950f4d4a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12558
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-12-04 19:05:02 +01:00
Patrick Georgi 8cf590fb1b build system: Emit some build output while adding files to CBFS
Change-Id: I167f570957ca7eaf71fc31e1bd84b9bbad0683eb
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12551
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-02 17:30:49 +01:00
Patrick Georgi 708226e906 build system: drop one level of indirection
coreboot.pre1 was generated then copied into coreboot.pre, now without
any additional manipulation. Get rid of that extra step.

Change-Id: I138567cadbc2fa1a6b6c988e34bdaae0e92d5554
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12550
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-02 17:30:41 +01:00
Patrick Georgi 1cab0125cc build system: Add more files through cbfs-files instead of manual rules
verstage, romstage, and payload can be added through infrastructure now.

Change-Id: Ib9e612ae35fb8c0230175f5b8bca1b129f366f4b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12549
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-02 17:30:36 +01:00
Patrick Georgi 67cb6aa6a7 build system: make cbfs-files mechanism spaces-safe
Space is commonly used as separator in make variables, so escape them
as * (which should be reasonably uncommon in file names and cbfstool
options alike to not be a problem).

Change-Id: Ia77b5559841b5eae3aa1c0c0027f2e7fb882ea2f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12548
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-02 17:30:31 +01:00
Patrick Georgi 99ae578b43 build system: Allow giving additional cbfstool options to cbfs-files-y
This enables adding romstage, verstage, and payload, that may need
additional options (eg. for XIP or for linux initrd arguments) to be
added with the build system infrastructure instead of manual rules.

Change-Id: Ifde4ec3ca4ab436aca9b51a3c2cc478ed493fbfb
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12547
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-12-02 17:30:28 +01:00
Patrick Georgi 89b4abdf80 build system: replace files on UPDATE_IMAGE
So far the build system only added files starting with CBFS_PREFIX/ in
the UPDATE_IMAGE configuration, but there are a number of files that
exist in the global namespace (eg. config, revision, but also
cmos_layout.bin).

Now, existing files are removed if necessary.

Change-Id: I977ff85fe18115c84268103be72e91ca854e62a4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12581
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Tested-by: BSI firmware lab <coreboot-labor@bsi.bund.de>
2015-12-02 11:48:14 +01:00
Martin Roth 317b58234a Makefile.inc: make sure .xcompile is removed when building tools
Most of the toolchain build targets already ran clean-for-update, but
there were a few that didn't.  Add the clean to those targets.

Change-Id: I7faad32ac8bb1815e0c58e7d142ca2dbfc877896
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12571
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-12-01 16:27:32 +01:00
Patrick Georgi 6dc8570719 build system: strip quotes from CONFIG_CBFS_PREFIX in a single location
Instead of having to remember to strip the quotes everywhere so that
string comparisons (of which there are a few) match up, do it right at
the beginning.

Fixes building the image with a .config where CONFIG_CBFS_PREFIX
contains quotes.

Change-Id: I4d63341cd9f0bc5e313883ef7b5ca6486190c124
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12578
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
2015-12-01 09:05:07 +01:00
Patrick Georgi 551b3830c6 build system: move defconfig creation into a cbfs-files filter
That allows this special case to become a normal cbfs-files instance,
too.

Change-Id: I896ffebe4cec64c9c11605b4f09c7790e5419928
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12539
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-29 13:04:52 +01:00
Patrick Georgi 10420ccd54 build system: break overly long lines into logical units
Change-Id: I37b716acb305a79614cea184f57b8488111eab7a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12540
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-29 13:04:29 +01:00
Patrick Georgi c35bd54a5e build system: Move manual cbfstool add* invocations to cbfs-files
Use cbfs-files-y to deal with some of the manually added cbfs files,
providing more structure to that part of the build.

Change-Id: Iee1b8fec81dfa5e5f0e55637a62e5f69bd0257ad
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12538
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-29 13:04:23 +01:00
Patrick Georgi 1eee076269 build system: don't try to add cbfs-files with no backing file
Change-Id: Idd05a552762be92d0d93b357b96442b25a614757
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12537
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-29 13:04:18 +01:00
Patrick Georgi 9b5b536b18 build system: establish priority levels for CBFS file additions
Add files with fixed positions, then files with alignment requirements
and finally those that can reside everywhere to prevent the most obvious
collisions.
This isn't perfect yet (the "aligned" group may need some additional
sorting), but should avoid the worst instances ("free floating" files
allocating space required by fixed location files, for example).

Change-Id: I871e1a92ad90e63fc4e299fe1b228b4b00a35930
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12536
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-29 13:04:02 +01:00
Martin Roth 4eea174695 Makefile.inc: Add build targets for IASL & Clang
- Add specific build targets for IASL & CLANG and help for those targets
- Consolidate tool target .PHONY entries

Change-Id: If2960d75310495d9e486b3a08808463a2ff0c644
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/12541
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-27 18:09:55 +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
Martin Roth 77c67b3d30 IASL: Enable warnings as errors
We've actually got more warnings now than when I first tested IASL
warnings as errors.  Because of this, I'm adding it with the option
to have it disabled, in hopes that things won't get any worse as we
work on fixing the IASL warnings that are currently in the codebase.

- Enable IASL warnings as errors
- Disable warnings as errors in mainboards that currently have warnings.
- Print a really obnoxious message on those platforms when they build.
***** WARNING: IASL warnings as errors is disabled!  *****
*****          Please fix the ASL for this platform. *****

Change-Id: If0da0ac709bd8c0e8e2dbd3a498fe6ecb5500a81
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: http://review.coreboot.org/10663
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-23 18:48:58 +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
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
Paul Menzel 28a45d4c1b Makefile.inc: Build test intelvbttool
Add intelvbttool to list of utilities to be build tested by the build
servers.

Change-Id: Id75724726778fd939fb7497f5b33a3d5d58124fd
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/12085
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-11 21:06:12 +01:00
Aaron Durbin 8c8e2b7e4c arm64: remove secmon
It's been decided to only support ARM Trusted Firmware for
any EL3 monitor. That means any SoC that requires PSCI
needs to add its support for ATF otherwise multi-processor
bring up won't work.

Change-Id: Ic931dbf5eff8765f4964374910123a197148f0ff
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11897
Tested-by: build bot (Jenkins)
Reviewed-by: Julius Werner <jwerner@chromium.org>
2015-11-07 03:28:06 +01:00
Timothy Pearson 855fc1fcdb cpu/microcode: Remove EXTERNAL / ADDED_DURING_BUILD variables
There has been a concerted effort to clean up coreboot's microcode
handling that has included a move away from coreboot-specific
microcode file collections.  As a result, the ability to specify
a single microcode file to be added to the image is of less utility
than before.

NOTE: This patch remove the built-in external microcode feature,
however the user can still specify no microcode during build and
manually add the correct microcode file(s) to the CBFS image after
the build is complete.

Change-Id: Ifea94c21e531a74953f5a0e2f489378c20ef3b5c
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: http://review.coreboot.org/11903
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Tested-by: build bot (Jenkins)
2015-11-05 02:24:45 +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
Julius Werner c19f876e94 Makefile: Fix dependency tracking for linker scripts
When the memlayout framework was initially developed in the Chromium OS
tree, the accompanying build system changes unified handling for all
file types (including .ld and .asl) in a single template. This had the
advantage that compiler invocation options pertaining to the build
system itself could be centralized in a single place.

On upstreaming this was reverted for some reason, keeping the old
special handling for ASL files and writing a custom template for LD. The
duplicated compiler invocation code for the latter was missing the -MMD
flag required for dependency tracking. It was also missing at least one
$-sign which causes the $(<class>-ld-ccopts) variable to be evaluated at
the time it's parsing the template generator (before the subdirectory
pass). This should not cause any issues with current code, but all the
ccopts variables were meant to be evaluated after the subdirectory pass
(so things like archs and SoCs can manipulate them if needed), so this
patch fixes both issues.

BRANCH=None
BUG=None
TEST='make; touch src/soc/.../memlayout.ld; make' re-links all stages
and includes the changed symbol addresses from the new address map.

Change-Id: I4be458112908380268229b3220cfa0062add5c5d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: e8a36f994ef6a819ded7bf6b39b1e0fce8e52279
Original-Change-Id: If2310b46b53d888975cb2113edce20a896be39ef
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/303054
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12139
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
2015-10-27 09:26:06 +01:00
Konstantin Aladyshev 6544cb3f1b Separate bootsplash image menuconfig option from others
The possibility of adding a bootsplash image to ROM should be independent
from VGA_ROM_RUN and VESA menuconfig options.
For example, the stored image could be saved in CBFS not for coreboot
but for later use in SeaBIOS.

Change-Id: I3a0ed53489c40d4d44bd4ebc358ae6667e6c797f
Signed-off-by: Konstantin Aladyshev <aladyshev@nicevt.ru>
Reviewed-on: http://review.coreboot.org/12129
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-25 07:28:38 +01:00
Martin Roth 1fec04b47e util: add ectool, superiotool, and viatool to what-jenkins-does
Change-Id: Ib39ec8acee8de5678e06792323920d44a75e0ada
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/12122
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-24 10:56:02 +02:00
Martin Roth 917acb5656 util: update junit.xml target
- Display what's happening to the console as well as logging to the
junit.xml file.
- Log the clean in the junit.xml file so if it fails it doesn't just
appear to not have run the test.
- Run both clean and distclean (if distclean exists and runs clean,
this still only runs clean once) so that if distclean doesn't exist
the clean still happens.  Don't stop the build if the clean step
fails in case there's no distclean in the util makefile.
- Run the util builds multithreaded.  This saves a couple of seconds
and helps find dependency issues that might not be seen if building
single-threaded.

Change-Id: If895295c83faba98661b7c925b65fd436e06b834
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/12121
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-24 10:55:52 +02:00
Paul Menzel d98471ccb4 Makefile.inc: Put every tool in `TOOLLIST` on separate line
This way, commit differences will be easier to read. Also sort the list
lexicographically.

Change-Id: I4ce3ac9018a3fddf5e30d7c1ac0c57090fac1d3d
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/12084
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2015-10-18 16:39:08 +00:00
Martin Roth de9adebb10 Add junit.xml code to top Makefile.inc instead of utils
Instead of adding code to generate the junit.xml file for jenkins to
each of the util makefiles, add it once to the top level Makefile.inc.

Create a list of tools to run the test on.
Add nvramtool and inteltool to the list of utilities tested.

Note that the util builds depend on implicit rules, so MFLAGS and
MAKEFLAGS have to be cleared to get the builds to work.

Change-Id: Id7ee5ea41ce3bf4a40fb50942ae785bb838fa639
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/11910
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-17 06:45:01 +00:00
Martin Roth 8d226f2dbf enable lint-stable build on jenkins
This will run the lint-stable scripts on jenkins to block a commit with
obvious and known errors.

It runs in under a second on my system, so shouldn't contribute to any
real delay on jenkins.

Change-Id: I6ff3468ec29dc4ccd0c115f2c26e26b291c507df
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/11892
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-10-17 06:16:56 +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
Martin Roth 615f69e53d Update 'what-jenkins-does' makefile target for junit filename
Instead of renaming the junit filename, send abuild the desired
name on the command line.

Change-Id: I779bc180343bd549908750d7128bedbab7f36266
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/11879
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:23 +00:00
Aaron Durbin 75c51d9af1 x86: add standalone verstage support
To support x86 verstage one needs a working buffer for
vboot. That buffer resides in the cache-as-ram region
which persists across verstage and romstage. The current
assumption is that verstage brings cache-as-ram up
and romstage tears cache-as-ram down. The timestamp,
cbmem console, and the vboot work buffer are persistent
through in both romstage and verstage. The vboot
work buffer as well as the cbmem console are permanently
destroyed once cache-as-ram is torn down. The timestamp
region is migrated. When verstage is enabled the assumption
is that _start is the romstage entry point. It's currently
expected that the chipset provides the entry point to
romstage when verstage is employed. Also, the car_var_*()
APIs use direct access when in verstage since its expected
verstage does not tear down cache-as-ram. Lastly, supporting
files were added to verstage-y such that an x86 verstage
will build and link.

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

Change-Id: I097aa0b92f3bb95275205a3fd8b21362c67b97aa
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11822
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-14 17:07:52 +00:00
Aaron Durbin e3d2d6fd70 vboot: allow more flexibility when adding verstage
When a separate verstage is employed the verstage file
was just being added through the cbfs-files mechanism.
However, that doesn't allow one to specify other flags
that aren't supported that an architecture may require.
The x86 architecture is one of those entities in that
it needs its verstage to be XIP. To that end provide
a mechanism for adding verstage with options.

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

Change-Id: Iaba053a55a4d84d8455026e7d6fa548744edaa28
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11819
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2015-10-14 17:07:31 +00:00
Aaron Durbin e957832b2a vboot: remove remnants of VBOOT_STUB
For vboot1 there was an rmodule that was loaded and ran to
do the firmware verification. That's no longer used so remove
the last vestiges of VBOOT_STUB.

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

Change-Id: I6b41544874bef4d84d0f548640114285cad3474e
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11817
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-10-11 23:55:50 +00:00