summaryrefslogtreecommitdiffstats
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove libverstage as separate library and source file classJulius Werner2017-03-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Documentation: Add doxygen_platform targetMartin Roth2017-03-231-0/+10
| | | | | | | | | | | | | | Create a doxygen target that builds documentation just for the platform that is currently selected in Kconfig. This gives us something that is much more useful to most people. Change-Id: I25c3cdac2dd383b89df6389ba9011dac913a0a9b Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/15577 Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* build system: mark sub-make invocations as parallelizablePatrick Georgi2017-01-311-1/+1
| | | | | | | | | | | | | | 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>
* Makefile: Just error out if no .config existsMartin Roth2017-01-271-2/+5
| | | | | | | | | | | | | | Currently coreboot runs the 'config' command if no .config file exists. This isn't what anyone wants, and is particularly frustrating for tools that automate the build, where the build just hangs waiting for input. Instead, just show an error message and then exit the build. Change-Id: If9e0c2c26f8273814518589a2f94c5b00fc4cefe Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/18245 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
* build system: don't run xcompile or git for %clean/%config targetsPatrick Georgi2017-01-241-10/+10
| | | | | | | | | | | | | | 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>
* Makefile: Allow inclusion of source files from 3rdparty/Nico Huber2016-10-291-2/+4
| | | | | | | | Change-Id: I81c6f628f239223ba293a1196f70e4f26e022f6c Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/16950 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* Makefile: Give .ali files an empty recipeNico Huber2016-09-201-1/+1
| | | | | | | | | | | | | For Ada sources, .ali files are emitted together with their respective .o files during compilation. To convince `make` that an .ali was updated when the .o was rebuilt, it needs an empty recipe. Change-Id: Ie47122ff3d00460600ed1db97362abf68f59b751 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/16639 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Add minimal GNAT run time system (RTS)Nico Huber2016-09-191-1/+2
| | | | | | | | | | | | | | | 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>
* Make Ada a first class citizenNico Huber2016-09-191-4/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* crossgcc: Add gnumake target so that make can be built directlyMartin Roth2016-08-131-1/+1
| | | | | | | | | | | | | | | | | 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>
* Makefile: Include $(top) in DOTCONFIG definition to allow overridePaul Kocialkowski2016-07-281-1/+1
| | | | | | | | | | | | | | Including $(top) in the DOTCONFIG definition allows getting rid of the $(top) prefix in payloads, which in turns allows providing a full path for DOTCONFIG via the command line. Change-Id: I7546a12cf4a2a146e32fef81121f45f83ba67ac8 Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-on: https://review.coreboot.org/15826 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Makefile: Include config from DOTCONFIG instead of HAVE_DOTCONFIGPaul Kocialkowski2016-07-151-1/+1
| | | | | | | | | | | | | This includes the build config from the DOTCONFIG variable instead of HAVE_DOTCONFIG, which is expected to be used for tests. This slightly improves the readability and consistency of the Makefile. Change-Id: Id7cdf5d33024f21f3079db9d2ea47a8b847cd7b1 Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-on: https://review.coreboot.org/15651 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Makefile: Make printall target more readableMartin Roth2016-06-071-6/+5
| | | | | | | | | | | | - Put each piece of data from the printall target on its own line. - Add a blank line between each section. Change-Id: I50068690ab6795b7ef211865f3798c87debf2a07 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/15077 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* Makefile: Update payload clean targetsMartin Roth2016-03-091-1/+2
| | | | | | | | | | | | Move payload clean targets into payloads/Makefile.inc Add clean targets for coreinfo, nvramcui, Memtest86+ Change-Id: I70c13582311dfba3e309805053159f8a039cb109 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13940 Tested-by: build bot (Jenkins) Reviewed-by: Ben Gardner <gardner.ben@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* build system: avoid setting HOSTCC to " gcc"Patrick Georgi2016-02-021-1/+1
| | | | | | | | Change-Id: I650b3a347edc2d575c5cbee2051f8ed7b4bd1645 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13544 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
* Makefile: Add a comment to fix syntax highlightingMartin Roth2016-02-021-0/+1
| | | | | | | | | | | | | Trivial fix for syntax highlighting in editors. Some get confused by the double quote that doesn't have a close quote and stop highlighting at that point. This comment closes the quote and the paren pair so that they can recover. Change-Id: I566e8e0f4412009f679ab079f20ae30c2049b502 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13435 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Move object files to $(obj)/<class>/Nico Huber2016-01-281-1/+7
| | | | | | | | | | | | | | | | | | Instead of tagging object files with .<class>, move them to a <class> directory below $(obj)/. This way we can keep a 1:1 mapping between source- and object-file names. The 1:1 mapping is a prerequisite for Ada, where the compiler refuses any other object-file name. Tested by verifying that the resulting coreboot.rom files didn't change for all of Jenkins' abuild configurations. Change-Id: Idb7a8abec4ea0a37021d9fc24cc8583c4d3bf67c Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/13181 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
* Makefile: Make full use of src-to-obj macroNico Huber2016-01-281-6/+6
| | | | | | | | | | | | | | | | There were several spots in the tree where the path to a per class object file was hardcoded. To make use of the src-to-obj macro for this, it had to be moved before the inclusion of subdirs. Which is fine, as it doesn't have dependencies beside $(obj). Tested by verifying that the resulting coreboot.rom files didn't change for all of Jenkins' abuild configurations. Change-Id: I2eb1beeb8ae55872edfd95f750d7d5a1cee474c4 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/13180 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Makefile: Correct spelling in help messageWerner Zeh2016-01-121-1/+1
| | | | | | | | | | | Correct wrong spelled "subnit" in help message. Change-Id: Iadbf483835ee4c1b6e3faa454d1cae2660b99c5e Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/12905 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* Enable KCONFIG_STRICT modeStefan Reinauer2015-12-171-0/+1
| | | | | | | | Change-Id: I6aa77db1b12a67472302ea39d7433993a6838af6 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/10978 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* Makefile: Individualize help targets & set as non-compile targetsMartin Roth2015-12-061-1/+1
| | | | | | | | | | | | | | | | - 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>
* Makefile.inc: Add build targets for IASL & ClangMartin Roth2015-11-271-3/+3
| | | | | | | | | | | - 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>
* Makefiles: Add / Update help for makefile targetsMartin Roth2015-11-241-0/+15
| | | | | | | | | | | | | | 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>
* build system: also remove .xcompile.tmpPatrick Georgi2015-11-211-0/+1
| | | | | | | | | Change-Id: I18df6a6ec088b9036c3c17480843e5710bc82308 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12502 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc@marcjonesconsulting.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* build system: tighten down .xcompile handling some morePatrick Georgi2015-11-201-1/+8
| | | | | | | | | | 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>
* build system: don't let a broken .xcompile linger in the treePatrick Georgi2015-11-201-1/+1
| | | | | | | | | | | | | If the xcompile script fails (with an error message), we should delete the generated file so that later builds try to regenerate the file and re-report the problem if it still persists. Change-Id: I70ec37ca8ccb8ed3d8d0da48b326f5e0d722f314 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12473 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
* Makefile: Set HOSTCC as gcc or cc respectivelyzbao2015-11-201-1/+1
| | | | | | | | | | | | | | | | The HOSTCC should be set in .xcompile, which tests the existence of gcc and cc. But the .xcompile has to be included after kconfig/Makefile. So building util/kconfig uses the seperated HOSTCC definition above it, instead of the one in .xcompile. For the system which clang is the default host compiler, gcc is not installed by default. In that case, we need to set HOSTCC as cc. Change-Id: I1e51a37c4426e2c97d36a31f26a18ab4b0d0608d Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/12331 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* $(top)/Makefile: Strip the white space in function strip_quotesZheng Bao2015-11-171-1/+1
| | | | | | | | Change-Id: I5e8cf2ccd1cd53b863cf8d24353428f3c183b68c Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/12434 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* Add cscope/ctags generation for the current projectMartin Roth2015-07-301-1/+18
| | | | | | | | | | | | | | | Use the dependency files to generate ctags or cscope data for the current project instead of the entire coreboot tree. This isn't completely working for every platform at this point - while it finds all of the code in the coreboot/src tree, it doesn't find the code in 3rdparty right now. Change-Id: Ie8aabcf46c8a69f718940c9e0fd7e7b05c9ce1fb Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/11074 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
* Makefile: Fix KCONFIG_AUTOHEADER dependenciesStefan Reinauer2015-07-181-2/+2
| | | | | | | | | | | | This makes the Makefile more robust when changing the file name or changing the .config outside of make *config Change-Id: Ifc013cc3ef899a7846742a961261ac50bc67e27b Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10970 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* Makefile: Use variables defined for KconfigStefan Reinauer2015-06-301-2/+2
| | | | | | | | | Change-Id: I72df5fef187e12d1c3c2409449dc9d9b7b80a5e2 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10709 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* fix doxy target in root MakefileNicky Sielicki2015-06-071-2/+2
| | | | | | | | | | | the moving of 'documentation' to 'Documentation/' means that the doxygen target in the main Makefile was broken as it couldn't find the directory. Change-Id: If6c6d34110e683f38959571a03767fb472675f40 Signed-off-by: Nicky Sielicki <nlsielicki@wisc.edu> Reviewed-on: http://review.coreboot.org/10445 Tested-by: build bot (Jenkins) Reviewed-by: Idwer Vollering <vidwer@gmail.com>
* build system: move more clang handling to xcompilePatrick Georgi2015-06-041-22/+0
| | | | | | | | | | | | clang requires some additional options to disable warnings which can be handled by xcompile. Also drop the hard coded clang compilers in Makefile Change-Id: I0f12f755420f315127e6d9adc00b1246c6e7131b Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/7612 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* build system: Move .xcompile include further downPatrick Georgi2015-06-041-2/+2
| | | | | | | | | | | It's not used until then, but by moving it below including .config, we can use CONFIG_* in the .xcompile file in the future. Change-Id: I672f444dd28b5fae1fc339a1e0e78a249c9b7875 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/10422 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
* make: support absolute and relative obj= specificationsVadim Bendebury2015-05-081-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There has been a problem with out of tree build directories specified using relative paths, as in $ make obj=../build/peppy while specifying full path to obj works fine. This patch fixes the problem, making sure that make's path manipulation string substitute command is applied to both source and build roots. To test this ran the following script echo > /tmp/build.log for build_root in ./ ../ ''; do build_dirs="${build_root}build/peppy" if [ -n "${build_root}" ]; then build_dirs+=" $(realpath ${build_root})/build/peppy" fi for build_dir in ${build_dirs}; do rm -rf $build_dir .config* build* ../build* make obj=${build_dir} menuconfig # configure for google peppy board echo "building in ${build_dir}" >> /tmp/build.log if ! make obj=${build_dir}; then exit fi done done and then checked the generated file: $ cat /tmp/build.log building in ./build/peppy building in /home/vbendeb/old_projects/coreboot/source_code/build/peppy building in ../build/peppy building in /home/vbendeb/old_projects/coreboot/build/peppy building in build/peppy Change-Id: If46b046108e906796fe84716e93bf341b3785f14 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://review.coreboot.org/10127 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* make: avoid problems with mv aliasesVadim Bendebury2015-04-281-1/+2
| | | | | | | | | | | | | | | | | | | | | Make fails to update .xcompile in case there is an mv alias preventing silent overwrites of existing files. To avoid ambiguity, invoke mv from standard location. While we are at it, drop the code creating a unique .xcompile instance before copying it into destination: this was done for the case of running multiple independent make processes in parallel, but there is a problem with this approach with multiple processes copying their unique copies into the same destination file. The tool running multiple make invocations in parallel should explicitly invoke xcompile first. Change-Id: Iedc5e288fbcc5dfc18ce39de5c067bb869a13275 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://review.coreboot.org/9994 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Makefile: Disable implicit rulesJulius Werner2015-04-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | This patch disables implicit make rules (like %.o: %.c) from our build system, since we don't use them and they can cause unexpected results when there's a mistake in the Makefiles. BRANCH=None BUG=chromium:466469 TEST=emerge-falco coreboot fails with only this patch and succeeds with this and the $(src-to-obj) fix. Change-Id: I7478adaddbbeaa2226fd941ffacfce2577ba59ba Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: c2543f25f7db61f93be96784eca3f4f65e3ffaa0 Original-Change-Id: Ia6a91f040ad4ef556cf7912cd82a73173dfec8cb Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/259947 Original-Reviewed-by: Mike Frysinger <vapier@chromium.org> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/9865 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* Makefile: Avoid duplicate class suffixes in $(call src-to-obj)Julius Werner2015-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The build system uses the $(src-to-obj) function in multiple places to figure out the corresponding output object file for a certan source file, most importantly when generating the rule to build it. Usually this is pretty simple, but some odd cases are a little tricky... such as the auto-generated intermediary C files containing an array definition generated from an ASL file. These files have already been compiled per stage, so they contain the stage as a suffix and reside in the build directory (e.g. build/.../dsdt.ramstage.c). The previous $(src-to-obj) implementation just blindly appends the stage again and turns this into build/.../dsdt.ramstage.ramstage.o. This isn't very useful, so to avoid confusion this patch makes it strip additional stage suffixes for those intermediary files. This also fixes a bug with the ASL postprocessor, which didn't take this double suffix into account: it added build/.../dsdt.ramstage.o to ramstage-objs which should've been build/.../dsdt.ramstage.ramstage.o. This only worked by accident because make compiled the file with its implicit %.o: %.c rule instead. BRANCH=none BUG=chromium:466469 TEST=emerge-falco coreboot with the new make 4.1. Also build Falco and Veyron_Jerry with make -r -R to make sure there are no other accidental uses of implicit rules in our build system. Change-Id: I4aeaa60add1ef4215cb6c0b222c3886395c7a045 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: d9ea2e082eca1045409ea1f403082c97dedc70d8 Original-Change-Id: I951edbc9f653321a9084543a65009c6e9154d819 Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/259950 Original-Reviewed-by: Mike Frysinger <vapier@chromium.org> Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/9861 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* Makefile: Fix dependency tracking for ramstage objectsJulius Werner2015-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Dependency tracking in incremental builds is currently broken for the ramstage, due to the intermediate linking step into one ramstage.o file per directory. The original xxx.ramstage.o files are removed from ramstage-objs, so they don't end up in allobjs and won't get translated into DEPENDENCIES. This patch explicitly adds them to DEPENDENCIES beforehand to resolve the issue. BRANCH=None BUG=None TEST=Built, ran 'touch src/include/cbmem.h' and built again incrementally. Confirmed that objects dependent on the modified header such as timestamp.ramstage.o get rebuilt correctly. Change-Id: I3ba411e4073b38e038445aadceeccfe6c09670c8 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 9c57d6a8421a109ee3e87567c9add579f9ae761e Original-Change-Id: Ife529ad8f5c011456c1e0c380356f1b1bb5047cb Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/233571 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9745 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* build system: run linker scripts through the preprocessorPatrick Georgi2015-04-061-0/+2
| | | | | | | | | | | | | | | | This allows combining and simplifying linker scripts. This is inspired by the commit listed below, but rewritten to match upstream, and split in smaller pieces to keep intent clear. Change-Id: Ie5c11bd8495a399561cefde2f3e8dd300f4feb98 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b Based-On-Signed-off-by: Julius Werner <jwerner@chromium.org> Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170 Reviewed-on: http://review.coreboot.org/9303 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* build system x86: deprecate bootblock_lds and ldscripts variablesPatrick Georgi2015-04-041-1/+1
| | | | | | | | | | | | | | | | | Instead of keeping this separate variable around, add linker scripts to the $(class)-y source lists and let the build system sort things out. This is inspired by the commit listed below, but rewritten to match upstream, and split in smaller pieces to keep intent clear. Change-Id: I4af687becf2971e009cb077debc902d2f0722cfb Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b Based-On-Signed-off-by: Julius Werner <jwerner@chromium.org> Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170 Reviewed-on: http://review.coreboot.org/9289 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
* build system: use full (in-tree) pathsPatrick Georgi2015-04-041-2/+2
| | | | | | | | | | | | | | | | | | | | | So far we assumed that all files in *-srcs are below src/ which wasn't really true actually and will be less true with future changes. Fix up crt0.S handling on x86, which is covered by default rules due to this change. This is inspired by the commit listed below, but rewritten to match upstream, and split in smaller pieces to keep intent clear. Change-Id: Icae563c2d545b1aea809406e73faf3b417796a1b Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b Based-On-Signed-off-by: Julius Werner <jwerner@chromium.org> Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170 Reviewed-on: http://review.coreboot.org/9288 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
* build system: Allow defining generic rulesPatrick Georgi2015-04-041-1/+2
| | | | | | | | | | | | Provide a mechanism to define rules that apply for a given filetype (.c, .asl, ...) across all classes (ramstage, ...) Change-Id: If45c526d294e0374c32efef01f0213c6b78b1e43 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/9286 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* build system: create proper dependency filesPatrick Georgi2015-04-041-1/+1
| | | | | | | | | | | | | | | | | Tell gcc what to use as target part of the generated rule. This is inspired by the commit listed below, but rewritten to match upstream, and split in smaller pieces to keep intent clear. Change-Id: Ie4814143337abb3cf1e9e8db7e96201a517a17b8 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b Based-On-Signed-off-by: Julius Werner <jwerner@chromium.org> Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170 Reviewed-on: http://review.coreboot.org/9285 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* build system: extend src-to-obj for non-.c/.S filesPatrick Georgi2015-04-021-2/+7
| | | | | | | | | | | | | | | | | | | | It also creates file names in the build directory and with the stage sliced in, but keeps the extension for anything not .c or .S. Also some handling for non-.c/.S files was adapted to match. This is inspired by the commit listed below, but rewritten to match upstream, and split in smaller pieces to keep intent clear. Change-Id: If8f89a7daffcf51f430b64c3293d2a817ae5120f Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b Based-On-Signed-off-by: Julius Werner <jwerner@chromium.org> Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170 Reviewed-on: http://review.coreboot.org/9175 Reviewed-by: Aaron Durbin <adurbin@google.com> Tested-by: build bot (Jenkins)
* build system: generalize src-to-objPatrick Georgi2015-03-301-2/+2
| | | | | | | | | | | | | | | | | | It can now be used on any list of files instead of assuming to work on $($(class)-src). This is inspired by the commit listed below, but rewritten to match upstream, and split in smaller pieces to keep intent clear. Change-Id: Ib77afedd4c3f847963497beea503f5447a7c6e28 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b Based-On-Signed-off-by: Julius Werner <jwerner@chromium.org> Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170 Reviewed-on: http://review.coreboot.org/9161 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* build system: provide generic compiler flag variablesPatrick Georgi2015-03-301-0/+1
| | | | | | | | | | | | | | | | | | Introduce generic-$(type)-ccopts and $(class)-generic-ccopts to declare compiler flags that apply to all files of a certain type or of a certain class. Then use them. This is inspired by the commit listed below, but rewritten to match upstream, and split in smaller pieces to keep intent clear. Change-Id: I655688e82a0cc5bad89b6f55dc217b9f66b64604 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b Based-On-Signed-off-by: Julius Werner <jwerner@chromium.org> Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170 Reviewed-on: http://review.coreboot.org/9114 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
* build system: Allow running make what-jenkins-does without ccachePatrick Georgi2015-02-171-1/+1
| | | | | | | | | | | | coverity isn't too happy with ccache, and given the current setup it also isn't too useful. Change-Id: I420fdd7350dff29296d7101569cb183afe1f92d6 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: http://review.coreboot.org/8478 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Marc Jones <marc.jones@se-eng.com>
* build system: lint targets aren't compile targetsPatrick Georgi2015-02-171-1/+1
| | | | | | | | | | | | So don't treat them as such. Fixes interactions with class initialization (eg. verstage) on lint. Change-Id: I8b5f2a56e73ba934590c45494e6a49f93c42096f Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: http://review.coreboot.org/8472 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Marc Jones <marc.jones@se-eng.com>
* Doxygen: add a "simple" output config and make targetMartin Roth2015-01-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | This is a doxygen target I'm using for cleaning up the coreboot doxygen output. It runs in about a minute instead of.... a lot longer, and only generates documentation for the coreboot/src directory, excluding vendorcode. It was requested that the comments be stripped to make it easier to read. This was done through the following command (split for gerrit): head -n 1 Doxyfile.coreboot_simple > Doxyfile.tmp ; cat Doxyfile.coreboot_simple | sed 's|^\s*#.*$||' | sed '/^$/d' | sed 's|[[:space:]]\+$||' >> Doxyfile.tmp ; mv Doxyfile.tmp Doxyfile.coreboot_simple I'm including the command here because any time the file is updated with the doxygen wizard, it will need to be run again. It might be desirable to turn this into a script in the documentation directory. Change-Id: Ic0cbbcd21aa647e80a037481546bdcd2aab8949e Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: http://review.coreboot.org/8068 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>