Commit Graph

369 Commits

Author SHA1 Message Date
Subrata Banik 5f1da55b49 device: Include devicetree in SMM stage
Allow bootblock to get access to the entire static device tree
as other stages can access independently.

TEST=SMM code now can access devicetree.cb variables.

Change-Id: I59537c16f0a459e48d8b1efb5c1b196302f13381
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/23823
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-02-22 09:55:19 +00:00
Paul Menzel db9709d67d Makefile.inc: Also print layout at end of build
Currently, at the end of a build `CBFSPRINT` prints the content of all
CBFS regions. This is confusing, as they are identical. To avoid
confusion print the layout beforehand.

> layout [-w] – List mutable (or, with -w, readable) image regions

Change-Id: Ibf03b125ef6dae41c58b8ae867430047778cfff3
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/22143
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-02-15 21:40:31 +00:00
Arthur Heymans 47dd96db97 payloads: Add an option to compress secondary payloads
Both GRUB and SeaBIOS can chainload lzma compressed payloads.
Therefore it is beneficial to compress secondary payloads
like Memtest86+, coreinfo, nvramcui,... for both size reasons and
often also speed reasons since the limiting factor is generally the
IO of the boot device.

Tested with SeaBIOS and memtest86+ master on Thinkpad X220.

Change-Id: Iddfd6fcf4112d255cc7b2b49b99bf5ea4d6f8db4
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/23639
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-02-10 23:57:06 +00:00
Alex Thiessen 7bcd6ecea6 util/gitconfig: Use `make` in git hooks
As the code was moved from the Makefile.inc to a separate file in
commit 9ab8ae6a (util/gitconfig: Make gitconfig a bash script),`$(MAKE)`
was replaced by `remake`, introducing dependency on this tool which is
basically a `make` with debugging capabilities. Many developers don't
have `remake` installed, leading to pre-commit hooks being not executed
properly. Apparently this was an unintentional change.

Furthermore, special treatment of `make` tool via the `%MAKE%`
substitution performed during hooks' deployment is still desired. Use
case is calling `remake gitconfig` to set `remake` as the `make` tool in
the hooks. To accomplish this, add a parameter that is passed from the
Makefile.inc to gitconfig.sh.

Change-Id: Ia78e06567b904b342dc9b7778569201fe02e6897
Signed-off-by: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com>
Reviewed-on: https://review.coreboot.org/23096
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-01-23 05:18:14 +00:00
Alex Thiessen a90e5ebde4 Makefile.inc: Improve git worktree check
`Makefile.inc` checks for `.git` to be present under $(top) to define
the value of $GIT. This check is rather weak and doesn't handle many
edge cases like that of a broken gitfile.

Add a proper `git rev-parse` call to check the condition.

Change-Id: Ifd6da19f13d9f2a9fddb6afd7cb5f16daba2401e
Signed-off-by: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com>
Reviewed-on: https://review.coreboot.org/23254
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-01-22 12:32:00 +00:00
Arthur Heymans 82aa8338c7 drivers/mrc_cache: Always generate an FMAP region
This automatically generates an FMAP region for the MRC_CACHE driver
which is easier to handle than a cbfsfile.

Adds some spaces and more comments to Makefile.inc to improve
readability.

Tested on Thinkpad x200 with some proof of concept patches.

Change-Id: Iaaca36b1123b094ec1bbe5df4fb25660919173ca
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/23150
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-01-20 16:11:44 +00:00
Denis 'GNUtoo' Carikli 780e931eed util/blobtool: rename to bincfg
The name blobtool is confusing as 'blob' is also used to
describe nonfree software in binary form.

Since this utility deals with binary configurations it
makes more sense to call it bincfg.

Change-Id: I3339274f1c42df4bb4a6b30b9538d91c3c03d7d0
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Reviewed-on: https://review.coreboot.org/23239
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-01-18 13:47:20 +00:00
Antonello Dettori fbcfdaf785 payloads: add support lz4 compression
Add the option to use the lz4 compression method
to compress payloads.
Also sets LZ4 as the default compression method.

Change-Id: Ic712f984f791d268440c8463eaea0d246aa31d99
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/15817
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2018-01-15 01:27:48 +00:00
Marc Jones 9ab8ae6a55 util/gitconfig: Make gitconfig a bash script
The gitconfig target has a few bashisms and would fail
silently on systems that use a POSIX standard sh (like Ubuntu dash).

Remove the code from the makefile and put it in a bash script that
is called by the gitconfig target.

Change-Id: I3bc8cf688a3ad211b57c8ca0e6b1e86c82dc6a37
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/22857
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-12-15 23:02:11 +00:00
Julius Werner ec477346bf Kconfig: Remove BOARD_ID_MANUAL option
The BOARD_ID_MANUAL and BOARD_ID_STRING options were introduced for the
Urara board which is now long dead, and have never been used anywhere
else. They were trying to do something that we usually handle with a
separate SKU ID these days, whereas BOARD_ID is supposed to be reserved
for different revisions of the same board/SKU. Get rid of it to make
further refactoring of other options easier.

Also shove some stuff back into the Urara mainboard that should've never
crept into generic headers.

Change-Id: I4e7018066eadb38bced96d8eca2ffd4f0dd17110
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/22694
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-12-06 23:27:03 +00:00
Patrick Georgi db7b8afc91 build system: drop duplicate rule for $(objutil)/blobtool/blobtool
There's already one in util/blobtool/Makefile.inc

BUG=chromium:787042
TEST=no more warning about duplicate rules

Change-Id: I8bc17d3b182369cf5b67bdcf392db7932e5389bf
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/22555
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-22 18:25:26 +00:00
Denis 'GNUtoo' Carikli 76e387319b Makefile.inc: Cosmetics: Format blobtool commands similar to other tools
Change-Id: Iddb09d0838da119bfccd5443652ca7a6baa95c7b
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Reviewed-on: https://review.coreboot.org/22126
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-11-07 04:45:14 +00:00
Philipp Deppenwiese fea2429e25 security/vboot: Move vboot2 to security kconfig section
This commit just moves the vboot sources into
the security directory and fixes kconfig/makefile paths.

Fix vboot2 headers

Change-Id: Icd87f95640186f7a625242a3937e1dd13347eb60
Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org>
Reviewed-on: https://review.coreboot.org/22074
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-10-22 02:14:46 +00:00
Chris Ching 782b9a7b75 Makefile.inc: remove '--global' flag from config check for gitconfig rule
As long as user.name and user.email are set, gitconfig should pass. This
handles if values are only set for the local repo, or if values are
stored in ~/.config/git/config

BUG=none
TEST=make gitconfig

Change-Id: Ie01e7a155f9e6db35d5991e4303aad85fb277a06
Signed-off-by: Chris Ching <chingcodes@google.com>
Reviewed-on: https://review.coreboot.org/22109
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-10-19 20:13:06 +00:00
Nico Huber 5218533ae7 Makefile.inc: Remove -gnatg from ADAFLAGS_common
It was only set by accident. `-gnatg` is a special mode for GNAT
internals and libgnat (we already set it explicitly for the latter).

TEST=Gave libgfxinit a shot on lenovo/t420.

Change-Id: Ie56a95da2dafd014bd6152cb419a2d315e7c78c4
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/21365
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-09-23 10:50:45 +00:00
Martin Roth 229e021110 Makefile.inc: Add left shift macro
Add a macro to shift a value to the left by a specified number of bits.

Change-Id: Ib3fb43b620f31fee2a41f00ddf7294edc81a60f6
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/21601
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2017-09-21 17:30:18 +00:00
Nico Huber 7a1fbdb1e6 Makefile: Keep list of exported variables
This can be useful to unexport them later.

Change-Id: I2ce9eff32d817ec190441550116376843abd1c11
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/21162
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-09-06 04:36:56 +00:00
Arthur Heymans 1db500c101 Fix build with CLANG, avoid GCC only CFLAGS
Commit 7c8d331fbb "Fine-tune compiler flags" added CFLAGS that are not
existing on CLANG hence breaking building coreboot with clang.

Fixes: https://ticket.coreboot.org/issues/134

Change-Id: Ie0250e285b0c5a9f8ee2eb99401aeca875d2789a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/21202
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Damien Zammit <damien@zamaudio.com>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-09-02 15:23:05 +00:00
Stefan Reinauer 7c8d331fbb Fine-tune compiler flags
Per default, GCC enables -fdelete-null-pointer-checks, which is
harmful and hence we should disable it:
  "Assume that programs cannot safely dereference null pointers, and
   that no code or data element resides there."

We want to be careful with our stack usage, hence enable
-fconserve-stack:
  "Attempt to minimize stack usage. The compiler will attempt to use
   less stack space, even if that makes the program slower."

Change-Id: I74eac2b07c986553f79898a2f2e57bbead4223f8
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/20883
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-08-11 15:56:12 +00:00
Martin Roth 6c9c196f1c copy & update test routines from what-jenkins-does
Currently the only testing we had was 'what-jenkins-does' and
'make lint'. While the lint testing is suitable for developers,
the 'what-jenkins-does' target really isn't, as it was designed
specifically for testing on jenkins.

This adds the infrastructure for basic tests that are more suitable
for the developer. Extended tests and improvements will follow.

Add the coreboot-builds directories to .gitignore.

TODO:
- Save/restore .config
- Update test-abuild to use existing COREBOOT_BUILD_DIR variable

Change-Id: I19e1256d79531112ff84e47a307f55791533806f
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20874
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chris Ching <chingcodes@google.com>
2017-08-11 15:24:56 +00:00
Martin Roth e624e270e6 Make: Move testing into a subdirectory
In preparation for expanding the testing, move the test targets
out of the top level Makefile.inc and into a separate
subdirectory.

Change-Id: Ie252c7555223f9ce76b54e6f7b66d03f3cf60500
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20873
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chris Ching <chingcodes@google.com>
2017-08-11 15:24:49 +00:00
Nico Huber a81f321924 drivers/pc80/rtc: Build for bootblock and postcar stages too
Fixes builds with BOOTBLOCK_CONSOLE && USE_OPTION_TABLE.

Change-Id: I1c7e9baa60f33c2c3651e2def0335454f7e20451
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20767
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-07-26 19:14:16 +00:00
Paul Menzel a8843dee58 Use more secure HTTPS URLs for coreboot sites
The coreboot sites support HTTPS, and requests over HTTP with SSL are
also redirected. So use the more secure URLs, which also saves a
request most of the times, as nothing needs to be redirected.

Run the command below to replace all occurences.

```
$ git grep -l -E 'http://(www.|review.|)coreboot.org'
| xargs sed -i 's,http://\(.*\)coreboot.org,https://\1coreboot.org,g'
```

Change-Id: If53f8b66f1ac72fb1a38fa392b26eade9963c369
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/20034
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-06-07 12:04:50 +02:00
Youness Alaoui c4b4ff3b1f console/flashsconsole: Add spi flash console for debugging
If CONSOLE_SPI_FLASH config is enabled, we write the cbmem
messages to the 'CONSOLE' area in FMAP which allows us to grab the
log when we read the flash.

This is useful when you don't have usb debugging, and
UART lines are hard to find. Since a failure to boot would
require a hardware flasher anyways, we can get the log
at the same time.

This feature should only be used when no alternative is
found and only when we can't boot the system, because
excessive writes to the flash is not recommended.

This has been tested on purism/librem13 v2 and librem 15 v3 which
run Intel Skylake hardware. It has not been tested on other archs
or with a driver other than the fast_spi.

Change-Id: I74a297b94f6881d8c27cbe5168f161d8331c3df3
Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm>
Reviewed-on: https://review.coreboot.org/19849
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
2017-06-04 18:44:56 +02:00
Aaron Durbin 5e88c3b18a device: allow devicetree accesses in postcar stage
Change-Id: Ib6f8ee937c4f3d8e2c0ff3851a819077fa499ccc
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/19334
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-04-25 18:15:14 +02:00
Aaron Durbin 42bcd13c75 Makefile.inc: ensure cbfs-files-processor-struct has correct ccopts
The ramstage-c-ccopts variable needs to be double dereferenced
for the cbfs-files-processor-struct handler so all the ccopts
are included since the ramstage-c-ccopts is fully constructed
later by another function. Without this not all the flags
are present on the command line.

Change-Id: I5425b3c1f23d767c61f654dd287584403f85d719
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/19380
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
2017-04-25 18:13:09 +02:00
Martin Roth cfce793052 util/blobtool: Hook into coreboot build
Add a Makefile.inc, based on sconfig's, to use the _shipped variants
so that the build doesn't have to generate them with flex & bison.

The GENPARSER check is inactive, and will be updated in the next
commit.

Add the c_shipped & h_shipped files for the current .l & .y files.

Change-Id: Ia6c68bfb6e0611ceb6bc76cc66e43266bafc98ad
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/19228
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-04-14 17:26:30 +02:00
Martin Roth ee762fa42b Makefile.inc: Fix jenkins build of nvramcui & coreinfo
With COREBOOT_BUILD_DIR set, nvramcui & coreinfo were getting built
in the wrong location, causing those builds to fail.

Also, because they were built in the wrong location, the build failures
were not detected by jenkins which was looking for the junit.xml files
under the payloads directory.

Change-Id: I9d81ebabebe5d8b5f79ae63f8a5f388430e06754
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/19069
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
2017-04-03 04:52:22 +02:00
Julius Werner e91d170d21 Remove libverstage as separate library and source file class
In builds without CONFIG_VBOOT_SEPARATE_VERSTAGE, verstage files are
linked directly into the bootblock or the romstage. However, they're
still compiled with a separate "libverstage" source file class, linked
into an intermediate library and then linked into the final destination
stage.

There is no obvious benefit to doing it this way and it's unclear why it
was chosen in the first place... there are, however, obvious
disadvantages: it can result in code that is used by both libverstage
and the host stage to occur twice in the output binary. It also means
that libverstage files have their separate compiler flags that are not
necessarily aligned with the host stage, which can lead to weird effects
like <rules.h> macros not being set the way you would expect. In fact,
VBOOT_STARTS_IN_ROMSTAGE configurations are currently broken on x86
because their libverstage code that gets compiled into the romstage sets
ENV_VERSTAGE, but CAR migration code expects all ENV_VERSTAGE code to
run pre-migration.

This patch resolves these problems by removing the separate library.
There is no more difference between the 'verstage' and 'libverstage'
classes, and the source files added to them are just treated the same
way a bootblock or romstage source files in configurations where the
verstage is linked into either of these respective stages (allowing for
the normal object code deduplication and causing those files to be
compiled with the same flags as the host stage's files).

Tested this whole series by booting a Kevin, an Elm (both with and
without SEPARATE_VERSTAGE) and a Falco in normal and recovery mode.

Change-Id: I6bb84a9bf1cd54f2e02ca1f665740a9c88d88df4
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/18302
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-03-28 22:18:53 +02:00
Patrick Georgi 78a5f22994 build system: mark sub-make invocations as parallelizable
We rely on gnu make, so we can expect the jobserver to be around in
parallel builds, too. Avoids some make warnings and slightly speeds up
the build if those sub-makes are executed (eg for arm-trusted-firmware
and vboot).

Change-Id: I0e6a77f2813f7453d53e88e0214ad8c1b8689042
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/18263
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-31 18:51:55 +01:00
Arthur Heymans 7218a1e754 Only add etc/ps2-keyboard-spinup when not updating an image
Without this motherboards that requires a non zero timeout for ps2
keyboards on SeaBIOS don't build when CONFIG_UPDATE_IMAGE is set.

An alternative way to achieve this file would be to include a cbfsfile
instead of calling cbfstool. That way the file gets updated/added both
both image update and regular build. A difficulty of that approach is
that it needs to convert a decimal to a binary in little endian
representation, which is not a trivial thing to do in a Makefile.

Change-Id: Icafba8d3e279a2e70e607abba81e3dbebfb55e4b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/18231
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-27 02:09:38 +01:00
Patrick Georgi 0ffef882d8 build system: don't run xcompile or git for %clean/%config targets
It takes a long time for no gain: We don't need to update the
submodules, we don't need to fetch the revision, we don't need to find
the compilers, when all we want to do is to manipulate the .config file
or clean the build directory.

Change-Id: Ie1bd446a0d49a81e3cccdb56fe2c43ffd83b6c98
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/18182
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-24 23:22:56 +01:00
Patrick Georgi 847bbb8b1b cbfs-compression-tool: add to "make tools" target
Change-Id: I7bd0a17f9b20e46aee836fef1ff0b39de8670a15
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/18202
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-01-24 18:19:28 +01:00
Paul Menzel acbb70b810 Makefile.inc: Explicitly set GNU11 as C language standard
Different compiler versions use a different C language standard by
default.

GCC 4.9 uses GNU89 by default [1], while GCC 5.x uses GNU11 [2].

The discussion on the mailing list in thread *[RFC] Setting C99 by
default* [3] resulted in the preference of C11, which results in build
errors.

So explicitly set it to GNU11, which is also what the current coreboot
toolchain with GCC 5.3 is using.

[1] https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/C-Dialect-Options.html
[2] https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gcc/Standards.html
[3] https://www.coreboot.org/pipermail/coreboot/2016-November/082541.html

Change-Id: If1569618f8044925ff72dcf3543480b34d4f90d6
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/17636
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
2017-01-22 19:26:26 +01:00
Martin Roth 8d49d52ae9 Makefile.inc: Update what-jenkins-does target
- Update the junit.xml target to make it less util specific
- Add builds of coreboot internal payloads: nvramcui and coreinfo

Change-Id: I97fda909065659ab7fa4c8ee00d936d97b255bf7
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/17014
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-12-12 17:45:41 +01:00
Matt DeVillier 91480cc64c Makefile.inc: export VARIANT_DIR as top-level variable
export VARIANT_DIR at the top level, rather than doing so multiple
times at the SoC / board level

Change-Id: If825701450c78289cb8cca731d589e12aafced11
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/17451
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-18 20:28:37 +01:00
Martin Roth d61b5404dc southbridge/amd: update for amdfwtool size on command line
amdfwtool was getting the ROM size as a #define when it was built.
It has been updated to pass it in as a command line parameter, so
now it can be built just once for abuild as a shared tool.

Update the calls to amdfwtool to pass the ROM size.

All platforms using amdfwtool had the output verified using
a binary compare.

This reverts commit 0529236ed2
(Makefile.inc: Don't share amdfwtool between platforms)

Change-Id: I188b34e08249f2d00bd48957ced750b21f1ec348
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/17327
Tested-by: build bot (Jenkins)
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2016-11-10 00:27:52 +01:00
Nico Huber ef405a2c04 Set up 3rdparty/libgfxinit
`libgfxinit` is a SPARK library for graphics modesetting. It supports
Intel integrated graphics only, strictly speaking, the Core i processor
line.

Change-Id: Idf4b0e5fbf37a5d974075b2e44d1fa16dc428da3
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16949
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-10-29 01:35:03 +02:00
Nico Huber e09f8acdad Set up 3rdparty/libhwbase
`libhwbase` is a SPARK library that contains some basic support for i/o
access, debugging, timers. Just what I put around `libgfxinit`, to make
it build standalone.

Change-Id: I1918680c14696215522e1c5dae072235bb4e71a3
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16948
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-10-29 01:34:45 +02:00
Nico Huber e84e625483 Add option to build Ada debugging code
Ada knows a pragma `Debug` that is used to exclude procedure calls from
a release build. The new option `DEBUG_ADA_CODE` enables those procedure
calls.

Change-Id: Id5298e5819606c3d1cf2a2a1cd4f1d5d1227aa4f
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16943
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-10-29 01:28:13 +02:00
Paul Menzel a3a6746495 Makefile.inc: Explicitly disable PIE
Some distribution compilers enable Position Independent Executable (PIE)
by default, causing a build failure.

So explicitly disable PIE by passing the flag `-fno-pie`, to fix the
build error.

Change-Id: I1b7d7168e34c5c93c25bc03ffa49b2eeac0e76f8
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/17097
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-10-28 20:16:33 +02:00
Martin Roth 0529236ed2 Makefile.inc: Don't share amdfwtool between platforms
amdfwtool currently gets built for a specific size of ROM chip.  This
should be updated to be passed in on the amdfwtool command line, but
until that's done, stop sharing the tool between builds.

This caused a problem for abuild when we tried changing the default
rom to one that used a 256KB rom chip.  That wasn't large enough for
all of the files included by amdfwtool on several platforms, causing
build failures.

Change-Id: Ib08f3283e5be956f995a4a416a70b12a32462882
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/17070
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-10-21 19:38:39 +02:00
Daisuke Nojiri 165af1c5c2 gitconfig: Allow user name and email to be in includes
This patch adds '--includes' option to 'git config --global' command
to allow user name and email to be defined in a file included from
the global gitconfig (~/.gitconfig) file.

BUG=none
BRANCH=none
TEST=make gitconfig with ~/.gitconfig including another file which
defines user.name and email.

Change-Id: I4fe61078b143c3a2e26b0be69c3ca8e6f069d8b0
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://review.coreboot.org/16912
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-10-13 18:21:17 +02:00
Nico Huber 6dfffdc297 Makefile.inc: Fix make gitconfig for blobs repo
It's `.git/modules/3rdparty/blobs` now.

Change-Id: Ief12bb934332375a20f150afb568aef266924c9f
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16946
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2016-10-10 13:46:02 +02:00
Martin Roth 0f671f6ee9 Build system: Remove IASL_WARNINGS_ARE_ERRORS option
All systems are building with IASL warnings as errors enabled.
Remove the option to disable it.

Remove the notification at the end of the build.

Change-Id: I5c6218c182fdf173b4026fd010d939a5fa36040e
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16606
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-22 22:33:55 +02:00
Martin Roth 03b9ecb2cf Makefile.inc: Add aliases for submodule updates to gitconfig target
Updating submodules seem to give people headaches, so this adds a pair
of git aliases to update them.

'git sup' updates the submodules to the latest versions, but leaves any
locally modified files.

'git sup-destroy' will remove the current submodules and re-initialize
them.  This deletes any local changes.

Change-Id: Id62a30d88b3b6d285b3f00555d7609509aa1561f
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/16573
Tested-by: build bot (Jenkins)
Reviewed-by: Omar Pakker
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-20 22:20:30 +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
Nico Huber 2e09d2b239 Make Ada a first class citizen
Some remarks on the make process:
  o We usually leave Ada specs (.ads files which are like c headers)
    together with the bodies (implementations in .adb files) in one
    directory. So we have to know, where they live.
  o If there is no matching .adb an .ads is a valid source file and
    we'll generate an object file from it.
  o Object files need to have the same basename as their source files :-/
    That's why we put them in build/<class>/ dirs now.
  o We track dependencies by looking at the compiler output (.ali files
    which accompany every .o). This way we don't need any gnatmake
    magic, or even more complex, less portable tools.

For ADAFLAGS_common, I simply copied the CFLAGS_common whilst dropping
everything unsupported and adding sane warning options.

The set of language features is highly restricted (see gnat.adc). This
should suit the embedded nature of coreboot and helps proving absence
of runtime errors with SPARK.

Change-Id: I70df9adbd467ecd2dc7c5c1cf418b7765aca4e93
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/13044
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
2016-09-19 11:14:18 +02:00
Alexander Couzens c7702536ed Makefile.inc: build ifdtool using its own makefile
Change-Id: I67c73c101b928d104e231064e05d367bf9584730
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://review.coreboot.org/16571
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-09-12 20:04:33 +02:00
Iru Cai 2128d625ca Makefile.inc: Use $(MAINBOARDDIR)
Commit 93ef3ff makes the following only print the part number when
the ROM is built. In Makefile.inc, $(MAINBOARDDIR) is the variable
that has the quotes stripped off from $(CONFIG_MAINBOARD_DIR), so
use it instead of $(MAINBOARD_DIR).

build_complete:: coreboot
        printf "\nBuilt %s (%s)\n" $(MAINBOARD_DIR) \
                $(CONFIG_MAINBOARD_PART_NUMBER)

Change-Id: I729a583182937db7a926eb75aa28dfb53360046c
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/16410
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-09-04 05:33:25 +02:00