Commit Graph

89 Commits

Author SHA1 Message Date
Patrick Georgi 7e9b9d893c Add Kconfig options to handle the blobs repository
One option to allow using the repo (defaults to no),
one to let boards state that they require it in the
current configuration.

The build system checks out the repo if allowed, and
fails if the repo is requested by the configuration
but not desired by the user.

Change-Id: If71d80b329cf528aa467fcb0b4d9d7c7434aab27
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/957
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
2012-05-01 00:09:27 +02:00
Stefan Reinauer ae5e11d7cd Move top level pc80 directory to drivers/
There is no reason for this to be a top level directory.
Some stuff from lib/ should also be moved to drivers/

Change-Id: I3c2d2e127f7215eadead029cfc7442c22b26814a
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/939
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2012-04-27 19:23:16 +02:00
Kyösti Mälkki 0db2ae3ac4 Makefile: define build result directories
Final build results (.elf, .debug, .map) are to be placed under
directory $(objcbfs), the default is:
   $(obj)/cbfs/$(CONFIG_CBFS_PREFIX)/

Intermediate build results (.o, .s, .S, .inc, .ld) that do not have
a clear one-to-one relation to a file under src/ are to be placed
under directory $(objgenerated), the default is:
   $(obj)/generated

Also defines implicit rules for final build results:

  .debug -> .elf and .map
  .elf -> .bin

Change-Id: I448c6b7c9a952e54170df42091d7db438025a795
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/858
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
2012-04-21 09:43:32 +02:00
Stefan Reinauer f13772af9f Drop duplicate inclusion of src/vendorcode
Change-Id: I95908bdca51c5ee959ae9f2307d4b6e0e002d04a
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/857
Reviewed-by: Martin Roth <martin@se-eng.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Mathias Krause <minipli@googlemail.com>
2012-04-04 16:21:51 +02:00
Stefan Reinauer 3aa067f595 Add support to run SMM handler in TSEG instead of ASEG
Traditionally coreboot's SMM handler runs in ASEG (0xa0000),
"behind" the graphics memory. This approach has two issues:
- It limits the possible size of the SMM handler (and the
  number of CPUs supported in a system)
- It's not considered a supported path anymore in newer CPUs.

Change-Id: I9f2877e46873ab2ea8f1157ead4bc644a50be19e
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Acked-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/842
Reviewed-by: Peter Stuge <peter@stuge.se>
Tested-by: build bot (Jenkins)
2012-04-04 04:49:09 +02:00
Patrick Georgi 3bbd2bfa1c Add preprocessing capabilities to the cbfs-files mechanism
It's now possible to generate files that are about to be added to
CBFS by specifying "sourcefile:method" as real file name.

This makes the build system use the cbfs-files-preprocessor-$(method)
function to create a file from sourcefile. That generated file is
then added to CBFS.

The first method to be defined is "nvramtool". It expects a plain text
specification of the CMOS configuration and emits the binary format
suitable for cmos.default.

Change-Id: I33a142718fc7238eaf5317b0ed62b4726d9b48f2
Signed-off-by: Patrick Georgi <Patrick.Georgi@secunet.com>
Reviewed-on: http://review.coreboot.org/847
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-04-03 18:33:23 +02:00
Patrick Georgi 499fc926f8 Add nvramtool to coreboot build system
This way we can depend on it during build.

Change-Id: I7e773c6a029e376e3d70d0a8c9e96ffe0c2cf82e
Signed-off-by: Patrick Georgi <Patrick.Georgi@secunet.com>
Reviewed-on: http://review.coreboot.org/845
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-04-03 18:32:23 +02:00
Stefan Reinauer 9aea04aa89 Add Google ChromeOS vendor support
Google's ChromeOS can be booted super fast and safely
using coreboot. This adds the ChromeOS specific code that
is required by all ChromeBooks to do this.

Change-Id: Ic03ff090a569a27acbd798ce1e5f89a34897a2f2
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/817
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2012-04-02 18:39:31 +02:00
Marc Jones 1dd0dda442 Fix cleaning SeaBIOS from coreboot makefile
The coreboot makefile didn't pass the OUT and CC variables to seabios,
so the clean didn't clean anything.

Change-Id: Ieaf0c417d6e5dfb9e0a11df70b03d6313919578b
Signed-off-by: Marc Jones <marc.jones@se-eng.com>
Reviewed-on: http://review.coreboot.org/801
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martin@se-eng.com>
Reviewed-by: Marc Jones <marcj303@gmail.com>
2012-03-26 19:12:22 +02:00
Patrick Georgi c040e476bf Portability improvement
Makefile.inc uses $( ) syntax on the shell. That's isn't as universal
as one would like.

Change-Id: I9a8fd511eef7fefc1458d5bae2cd7ef5475b7392
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/777
Tested-by: build bot (Jenkins)
Reviewed-by: Bernhard Urban <lewurm@gmail.com>
2012-03-10 14:20:44 +01:00
Stefan Reinauer 8ebd11eab9 Fix lint-stable checkin hooks on MacOS X
- wc adds a number of leading spaces which broke cut
- sed can't replace spaces with new lines, so use tr for that.
- make sure directories are created if they're not there.

Change-Id: Ia0db059683abe3d97b0ab6feaece660a1f4e5079
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/774
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins)
2012-03-09 05:29:08 +01:00
Patrick Georgi c8feeddf34 Unify Local APIC address definitions
We used several names for that same value, and hardcoded the value
at some more places.

They're all LOCAL_APIC_ADDR now (except for lapic specific code
that still uses LAPIC_DEFAULT_BASE).

Change-Id: I1d4be73b1984f22b7e84681edfadf0588a7589b6
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/676
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-03-08 15:39:05 +01:00
Patrick Georgi 07408e687c gitconfig: Add lint-stable as pre-commit hook
When configuring the tree with "make gitconfig", a pre-commit hook
is installed that runs the stable lint tests.
If any of these fail, the log is visible (on stdout) and the
commit is aborted.

Change-Id: Ie2a26e87f466c63b24db8dca8827057a18ac7f3e
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/682
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-03-01 00:04:40 +01:00
Patrick Georgi cb02cb70d8 lint: create two classes of tests, stable and dev
We have tests that pass (and should be enforced soonish) and those
that don't pass yet (and thus shouldn't break the build).

The plan is simple: As soon as a test passes, it's marked stable so
things remain that way.

"make lint" runs all tests,
"make lint-stable" runs only those that shouldn't fail.

Change-Id: Iaa85d71141606d9756e29b37c7a34c2a15e573ac
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/681
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-03-01 00:04:21 +01:00
Kyösti Mälkki 2a830d0b98 Change AMD vendorcode build
Apply the normal method of recursively including subdirectories
for src/vendorcode. Remove redundant references under
mainboard and northbridge.

Change-Id: I914a6e262ed2abe83f407df36fe5c1af5eb4bcb0
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/468
Tested-by: build bot (Jenkins)
Reviewed-by: Kerry Sheh <shekairui@gmail.com>
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
2011-12-02 08:59:26 +01:00
Patrick Georgi a25828dd0e Provide mechanism to local additions to the build
site-local/ is an optional directory for local additions to the build.
If site-local/Makefile.inc exists it will be parsed and used.

Use it to define VGA option roms, splash screens, extra rules to the
tree...

Change-Id: I0c6ee43ffa40e6c3f193db081ab551ab75bc7478
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Reviewed-on: http://review.coreboot.org/212
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marcj303@gmail.com>
2011-09-14 07:44:25 +02:00
Rudolf Marek 7f0e93060e Add support for the tracing infastructure in coreboot.
The compiler is forced to emmit special functions on every
entry/exit of the function. Add a compile time option
to support it. Function entries will be printed in
the console. The CONFIG_TRACE has more documentation.

Patch for userspace tools will follow.

Change-Id: I2cbeb3f104892b034c8756f86ed05bf71187c3f3
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Reviewed-on: http://review.coreboot.org/178
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2011-09-07 01:26:47 +02:00
Sven Schnelle 054849dc6b Add dirty flag to git describe
git describe knows --dirty, which adds -dirty to the verion number
if the tree contains uncommited changes. We should add this flag
to make it obvious that the COREBOOT_VERSION might be misleading.
This is especially important as this version number is now used
in the SMBIOS data structures.

Change-Id: If4c608c7455e1bbf0cc530c6299fa00eb0fe4d58
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Reviewed-on: http://review.coreboot.org/173
Tested-by: build bot (Jenkins)
2011-08-27 09:44:34 +02:00
Sven Schnelle 164bcfdd1b Add automatic SMBIOS table generation
Change-Id: I0ae16dda8969638a8f70fe1d2e29e992aef3a834
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Reviewed-on: http://review.coreboot.org/152
Tested-by: build bot (Jenkins)
2011-08-26 20:08:52 +02:00
Peter Stuge 875b9b197f Use git describe to set KERNELVERSION
Change-Id: Id579b19fc38c7ca2b98ad1e87aaec71c070a9178
Signed-off-by: Peter Stuge <peter@stuge.se>
Reviewed-on: http://review.coreboot.org/163
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
2011-08-21 07:40:39 +02:00
Marc Jones 2aac3f6c51 Add iasl to buldgcc and rev the version.
Change-Id: If9144cdf088f16bc3974a1784a442a1fd12ac75b
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: http://review.coreboot.org/147
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2011-08-10 01:10:40 +02:00
Patrick Georgi ca8a68d26b Fix coreboot revision detection
Neither do we publish coreboot via svn, nor is git-svn a useful indicator
anymore.  Instead, fetch a shortened commit id.

Change-Id: I1b990384553209a7d39ecf7f5e8a2db7c7e34d0b
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/110
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marcj303@gmail.com>
2011-07-18 21:50:39 +02:00
Patrick Georgi 3b81b9dfef Add local copy of commit-msg hook
To avoid using untrusted network to download code, copy the
relevant file to the repo and adapt "make gitconfig" to copy
from there.

Change-Id: I21f0b58d59250aa5d795cf289267ad93bd8d74db
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/73
Reviewed-by: Uwe Hermann <uwe@hermann-uwe.de>
Tested-by: build bot (Jenkins)
2011-06-30 21:04:22 +02:00
Peter Stuge 0b6b4d6d43 Change make crossgcc to build without gdb by default
Using gdb with coreboot is not (yet) very common, so at least for
now it makes sense to not build gdb by default. A make crosstools
target is also added, which runs the full build in util/crossgcc
and thus generates a toolchain with both compiler and debugger.

Change-Id: I939ebcd06ae9a1bc485fd18e70cac98112d3bbbf
Signed-off-by: Peter Stuge <peter@stuge.se>
Reviewed-on: http://review.coreboot.org/17
Tested-by: build bot (Jenkins)
Reviewed-by: Marshall Buschman <mbuschman@lucidmachines.com>
2011-06-09 06:09:17 +02:00
Patrick Georgi bb60528e73 Add "gitconfig" make target to simplify gerrit configuration
"make gitconfig" installs the gerrit commit-msg hook and validates
that user.name and user.email are configured.

No data will be overwritten.

Change-Id: I49ec98538574866e7ad6238ff3d02b9c1beef1bb
Reviewed-on: http://review.coreboot.org/2
Tested-by: build bot (Jenkins)
Reviewed-by: Peter Stuge <peter@stuge.se>
2011-06-07 21:46:08 +02:00
Patrick Georgi b2a4264ea5 Really fix iasl filename issues in our build system
There's a remaining issue that iasl cuts of "\..*$" from
output paths, even if that substring contains "/" (ie.
across directories)

Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Acked-by: Patrick Georgi <patrick@georgi-clan.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6616 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-06-01 19:54:16 +00:00
Patrick Georgi 64ccc3b803 Handle both cases, obj being absolute and relative
gnu make's handling of filenames is less than optimal. It simply
compares strings, so foo/../bar is different from bar, even though
they're logically the same.

Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Acked-by: Patrick Georgi <patrick@georgi-clan.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6605 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-05-20 23:08:12 +00:00
Patrick Georgi 447cf563ca Fix building with relative path to object directory outside the source tree
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6604 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-05-20 22:17:58 +00:00
Patrick Georgi 0c5b0642a9 iasl still can't cope with extra "." in file paths
It's really a work around, but given how this issue seems to come
back again and again, let's work around it.

Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6603 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-05-20 22:16:49 +00:00
Patrick Georgi 6c44550df1 Move crossgcc rules to coreboot specific Makefile
Toplevel Makefile should (as far as possible) be coreboot-agnostic,
we have Makefile.inc for that.

Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Acked-by: Patrick Georgi <patrick@georgi-clan.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6599 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-05-16 15:32:28 +00:00
Frank Vibrans ec40260ade Remove AMD Agesa requirement for standard include files
This change modifies Makefile.inc to add the -nostdinc flag to the default
CFLAGS value and removes the test for non-AMD Agesa builds.  Other code is
added to the gcc-intrin.h file in the Agesa Include folder to make the
requirement for the standard includes obsolete from the Agesa perspective.

Signed-off-by: Frank Vibrans <frank.vibrans@amd.com>
Acked-by: Marc Jones <marcj303@gmail.com>




git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6555 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-05-05 16:45:36 +00:00
Sven Schnelle 8eee19d0ea Add option 'compress ramstage'
Add an option to make compression of ramstage configurable. Right now
it is always compressed. On my Thinkpad, the complete boot to grub takes
4s, with around 1s required for decompressing ramstage. This is probably
caused by the fact the decompression does a lot of single byte/word/qword
accesses, which are really slow on SPI buses. So give the user the option
to store ramstage uncompressed, if he has enough memory.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Patrick Georgi <patrick@georgi-clan.de>

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6552 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-05-02 19:53:04 +00:00
Stefan Reinauer 24ef134b37 drop half an uart8250 implementation from smiutil and use the common code
for that instead. This also allows using non-uart8250 consoles for smi
debugging.

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



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6501 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-04-14 22:28:00 +00:00
Stefan Reinauer 61aee5f4b1 In 2007 Adrian Reber suggested that we drop ASSEMBLY in favor of __ASSEMBLER__.
http://www.coreboot.org/pipermail/coreboot/2007-September/024665.html

It's about time we follow this advice.

Also move some manually set __PRE_RAM__ defines (ap_romstage.c) to the Makefile and
drop unused CPP define

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Patrick Georgi <patrick@georgi-clan.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6482 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-04-10 04:15:23 +00:00
Sven Schnelle d69438e05e BUILD: add missing config.h dependency
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Patrick Georgi <patrick.georgi@secunet.com>

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6467 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-03-29 09:01:10 +00:00
Sven Schnelle e6de7069de BUILD: add -MMD to iasl cpp call
Right now there are no dependency rules for compiling dsdt.asl.
If ACPI code includes asl files, the dsdt isn't recompiled if any
of those file is changed. Add the flags to the preprocessor call
to have it generate the neccessary dependency rule.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Peter Stuge <peter@stuge.se>

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6456 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-03-20 19:34:05 +00:00
Patrick Georgi b8e9ba9a7a More complete control over KERNELVERSION variable
Allow using revision information (from svn or git) even if the version
number is changed on the command line (eg. make KERNELVERSION='11.03$(REV)')
or dropping it entirely if having that information in the coreboot binary is
not desired.

Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6449 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-03-17 07:47:49 +00:00
Patrick Georgi 57205c7e43 Add option_table.h as dependency for all C based object files if option tables are used.
This is to make sure that the file exists when it is needed. While this isn't the case for every C source file, it doesn't hurt either to create the file a bit sooner than strictly necessary.

Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Acked-by: Jonathan Kollasch <jakllsch@kollasch.net>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6438 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-03-08 20:49:18 +00:00
Patrick Georgi 71b8480921 Move coreboot specific rules and setup to toplevel Makefile.inc
KERNELVERSION issue found by Stefan is fixed.

Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6375 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-02-22 14:35:05 +00:00