summaryrefslogtreecommitdiffstats
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Makefiles: Rename top-level Makefiles from .inc to .mkMartin Roth2024-01-241-10/+14
| | | | | | | | | | | | | | | | | | | The .inc suffix is confusing to various tools as it's not specific to Makefiles. This means that editors don't recognize the files, and don't open them with highlighting and any other specific editor functionality. This issue is also seen in the release notes generation script where Makefiles get renamed before running cloc. The rest of the Makefiles will be renamed in following commits. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Idaf69c6871d0bc1ee5e2e53157b8631c55eb3db9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80063 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* Kconfig: Move rustccfg file to a more benign placePatrick Georgi2023-11-301-0/+2
| | | | | | | | | | | | | It's put in $(obj) now. Not sure if we'll need it, but there has been some interest in rust support in coreboot, and removing support for it would be more work than this, so let's just keep it around. Change-Id: I532fde9625dbf7463752ef1af525b77d12676c93 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79342 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
* build system: Exempt `make *config` from strict symbol checksPatrick Georgi2023-11-301-3/+6
| | | | | | | | | | | | | | | | | | The "config" targets exist to edit the .config file, and so they should be more forgiving with invalid configs (that they'll convert into valid configs on save). They will still emit warnings about invalid symbols, but not exit with an error. The regular build process still fails if the .config looks unexpected (for example when there's an unknown config flag). Change-Id: If427e075766c68d493dd406609f21b6bb27d1d74 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79298 Reviewed-by: Mike Banon <mikebdp2@gmail.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
* util/kconfig: Uprev to Linux 6.6's kconfigPatrick Georgi2023-11-251-2/+4
| | | | | | | | | | | | | | | | | | Upstream reimplemented KCONFIG_STRICT, just calling it KCONFIG_WERROR. Therefore, adapt our build system and documentation. Upstream is less strict at this time, but there's a proposed patch that got imported. TEST=`util/abuild/abuild -C` output (config.h and config.build) remains the same. Also, the failure type fixed in https://review.coreboot.org/c/coreboot/+/11272 can be detected, which I tested by manually breaking our Kconfig in a similar way. Change-Id: I322fb08a2f7308b93cff71a5dd4136f1a998773b Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79259 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
* Revert "tests: Allow specifying vboot source directory"Felix Singer2023-11-161-1/+0
| | | | | | | | | | | | | | This reverts commit 7713a2f295d9ed9a7023a78e085ce190ee1203fe. Reason for revert: breaks main branch Change-Id: I2749bea9369c222e510b838e278c7797d5dce56e Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78852 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Patrick Georgi <patrick@coreboot.org>
* tests: Allow specifying vboot source directoryroccochen@chromium.com2023-11-161-0/+1
| | | | | | | | | | | | | | | | Respect VBOOT_SOURCE while including generic headers. BUG=none TEST=make clean-unit-tests && VBOOT_SOURCE=/path/to/vboot_reference/ make unit-tests -j TEST=make clean-unit-tests && make unit-tests -j BRANCH=none Change-Id: Id3bb3726c91167d2dd648d748763a3948787f28d Signed-off-by: roccochen@chromium.com <roccochen@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78849 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* Makefile: Fix typo in `make help` outputNico Huber2023-08-241-1/+1
| | | | | | | | | | Change-Id: I124e7d68198050616795a67df23b6481f6fe1276 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77407 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* docs: Redirect top-level make targets to Documentation/Nico Huber2023-08-241-2/+2
| | | | | | | | | | | | | | To avoid redundancy about how to call into `Makefile.sphinx`, only do that from the `Documentation/Makefile` and call into that from the top level. Change-Id: I99c462cdaf83d711e4b7c07b713d304274db8cb4 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77406 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* Makefile: Update build for include-what-you-useMartin Roth2023-08-241-1/+6
| | | | | | | | | | | | | | | | | This patch saves the output of the IWYU build into $(obj)/iwyu.txt. It will also automatically adds -k to the MAKEFLAFGS when IWYU is selected, so that the build doesn't halt after the first operation. When IWYU is not selected, there is no change to the build. This will allow us to create an automated IWYU build on jenkins. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I0ea300d4c64bb923e9f7cc0e595885c3006ec3ca Reviewed-on: https://review.coreboot.org/c/coreboot/+/77192 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
* Makefile: Get rid of invalid pathsNikolai Vyssotski2023-08-081-11/+12
| | | | | | | | | | | | | | When wildcards are used in toplevel Makefile.inc it ends up appending all items including regular files into subdirs-y which then are treated as directories in "evaluate_subdirs" with "Makefile.inc" appended to them. Check for a valid path (existing Makefiles.inc) before attempting to process it. Change-Id: I368b5b9a7ece3c675674fcb24303276a87c15668 Signed-off-by: Nikolai Vyssotski <nikolai.vyssotski@amd.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68800 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
* Append per-board ccache statistics in logKyösti Mälkki2023-06-111-0/+4
| | | | | | | | | | | | | | Starting with ccache 4.4 it is possible to collect statistics about cache miss/hit rates in a separate file. Add the info of the build at end of created make.log file or on stdout. Change-Id: I1bab712712f4d6379ec6733fdc55b234e3845da7 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75087 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* cpu/Kconfig: Remove MMX config optionArthur Heymans2023-05-251-4/+0
| | | | | | | | | | | | Now -mno-mmx is statically set in arch/x86 so remove this option. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: I0da7f9f1afb0c8ecae728c45591897ca1d4dfb11 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75318 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
* Makefile: Fix project_filelist.txt generationMaximilian Brune2023-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The ctags tool (called by ctags-project target) currently complains about not finding certain files. The project_filelist.txt generation includes the compiler generated "*.d" files, except for files found in build/util. Most file paths in these "*.d" files are file paths relative to the root directory of coreboot. Some projects though are compiled separately from coreboot (e.g. payload, vboot, util). Some of these (e.g. util, vboot) are also put into the build directory of coreboot and relative file paths are relative to these projects instead of coreboot. This has the uncanning side effect that the ctags Makefile target can't find these files, since they are not relative to the coreboot root directory. This patch also excludes the build/external directory from those files, since they contain 'separately' compiled projects like 3rdparty/vboot. That fixes the ctags-project Makefile target. Change-Id: I16294171c29a0d5fd25a31018846f1013e130ee0 Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71517 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
* Add option to use Ada code in romstageJeremy Compostella2022-12-171-0/+3
| | | | | | | | | | | | | | | | | If selected, libgnat is linked into romstage. In addition, a call to romstage_adainit() is added to support Ada program data initialization. BUG=b:252792591 BRANCH=firmware-brya-14505.B TEST=Ada code compiles for romstage and loads successfully Change-Id: I74f0460f6b14fde2b4bd6391e1782b2e5b217707 Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70274 Reviewed-by: Tarun Tuli <taruntuli@google.com> Reviewed-by: Nick Vaccaro <nvaccaro@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* Makefile: Add default for HOSTPKG_CONFIGNico Huber2022-12-121-0/+3
| | | | | | | | | | | | | Kconfig uses this variable to detect `ncurses` compilation and linking flags. Without it, some guesswork fallback is assumed that only works by chance. Change-Id: Iad21bdb2d61db04cf7397ab447c7c045e2067705 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70584 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Büchler <michael.buechler@posteo.net> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* Makefile: Add printall as a NOCOMPILE targetMartin Roth2022-12-051-1/+2
| | | | | | | | | | | | | | | Previously, running "make printall" when there was no .config available, the system would give an error that printall wasn't a valid target. This is because it was only in an invalid if clause. This change adds it to the other branch of the if clause so it will print out a notice of what the issue is. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I20670ae875be67ac2edf877c53de4702c4fc7c7d Reviewed-on: https://review.coreboot.org/c/coreboot/+/70057 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jakub Czapiga <jacz@semihalf.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* Makefile: Add targets to add and remove symlinksChristian Walter2022-10-171-1/+29
| | | | | | | | | | | | | | | | | | When "make symlink" is run, it looks for symlink.txt files recursively under site-local directory, and make symbolic links accordingly. "make clean-symlink" removes the symbolic links made. One application is for development of support for new processors and/or new mainboards, where new directories are added, along with some common code changes. Change-Id: I3fa119675ecca1626d70375a61e8a71abec6a53b Signed-off-by: Christian Walter <christian.walter@9elements.com> Signed-off-by: Jonathan Zhang <jonzhang@meta.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65093 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
* Makefile: Add util/kconfig/Makefile.real to nocompile listMartin Roth2022-07-171-3/+11
| | | | | | | | | | | | | | | | | | | | | | | Messages shown with the '$(info ...)' Make command could be shown twice because the entire Makefile stack was evaluated twice at MAKELEVEL 0. The first time was to generate the build/util/kconfig/Makefile.real file. The second time was to do the rest of the build. Adding the kconfig Makefile.real file to the nocompile list prevents all the rest of the coreboot makefiles from being read in during that first step, which prevents the messages from being printed twice. You can see this behavior by running "make clean; make -d" and searching for the text: "Successfully remade target file 'build/util/kconfig/Makefile.real'." This breaks when the build target is 'tools', so add an exception for just that target. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: If29c3a84c7c82ea099ef9610f4ecaa599f0d8649 Reviewed-on: https://review.coreboot.org/c/coreboot/+/59607 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* Makefile: Update error if building real-all when NOCOMPILE is setMartin Roth2022-06-281-3/+5
| | | | | | | | | | | | | | | | | | The real-all target here had never been updated since the original NOCOMPILE, which only depended on DOTCONFIG. Since the reasons that the NOCOMPILE flag can be set is much larger now, the error given no longer matches the possible issues. Give the reason for the failure (nocompile is set), some debug info, and ask the user to file a bug. We shouldn't really ever run across this, but I just saw it when I was working on the NOCOMPILE code. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I5b4be3349fb4cf2d3a8a2a7c183b7a205b9e8733 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65319 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
* Treewide: Remove doxygen config files and targetsMartin Roth2022-05-281-27/+2
| | | | | | | | | | | | | | | | In the last coreboot leadership meeting, the doxygen documentation was declared to be dead. Remove it. Doxygen style comments can still be added to files, and we may generate doxygen based documentation, but it won't be for the entire project, but instead just for those individual areas where it is being maintained. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I8983a20793786a18d2331763660842fea836aa2a Reviewed-on: https://review.coreboot.org/c/coreboot/+/64228 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
* Makefile: Clean up old targetsArthur Heymans2022-03-311-2/+2
| | | | | | | | | | | | Some of these targets seem to come from a long time ago. Now just rm -rf $(obj) is all that is needed for a clean. Change-Id: Iccc62b3c54ee2a074c25674715403c1457f6aad3 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63117 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Martin Roth <martinroth@google.com>
* Makefile: Add .SECONDARYRaul E Rangel2022-02-281-0/+1
| | | | | | | | | | | | | | | | We currently delete intermediate files. This can make it difficult to debug and is also unexpected. Setting .SECONDARY will prevent make from deleting the files. BUG=b:221231786 TEST=Build guybrush with CL stack and see .map files are preserved Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I657a696acc71d42ba94442d4754ee63efd3e6a74 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62398 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Martin Roth <martinroth@google.com>
* Makefile: Defer normalizing configuration for reproducible buildsPatrick Georgi2022-01-141-11/+11
| | | | | | | | | | | | | | | | The call to genbuild_h needs to happen after xcompile is imported so that genbuid_h can use iasl as chosen by xcompile. Move the entire section down to keep things together. TEST=no more error that util/crossgcc/xgcc/bin/iasl isn't found. Change-Id: Ia7afd32bd120e5405e65825144b0c30d69931a22 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52292 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* Makefiles: Hide skipping submodule info unless V=1Martin Roth2021-11-221-0/+1
| | | | | | | | | | | | | Currently, git prints out the submodules that are being skipped twice on many builds. This patch hides that output unless the build is set to show it with `make V=1`. This is the normal way of showing the extra information during the build. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I7b5c7f1f79dcc88793a9a21f2e92e7accc5de1e0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/59511 Reviewed-by: Patrick Georgi <patrick@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* util/kconfig: Uprev to Linux 5.13's kconfigPatrick Georgi2021-07-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | This was originally several commits that had to be squashed into one because the intermediate states weren't able to build coreboot: - one to remove everything that wasn't our own code, leaving only regex.[ch], toada.c, description.md and Makefile.inc. - one to copy in Linux 5.13's scripts/kconfig and adapt Makefile.inc to make the original Makefile work again. - adapt abuild to use olddefconfig, simplifying matters. - apply patches in util/kconfig/patches. - Some more adaptations to the libpayload build system. The patches are now in util/kconfig/patches/, reverse applying them should lead to a util/kconfig/ tree that contains exactly the Linux version + our own 5 files. Change-Id: Ia0e8fe4e9022b278f34ab113a433ef4d45e5c355 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37152 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
* tests: improve code coverage supportPaul Fagerburg2021-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | Fix the exclusion path for lcov; it should exclude the directory with source code, not object files. Use the COV environment variable to * control whether we build for coverage or not * select the output directory Add a separate target for generating the report, so we can get a report for all of the tests together or just a single test. Add documentation. Signed-off-by: Paul Fagerburg <pfagerburg@google.com> Change-Id: I2bd2bfdedfab291aabeaa968c10b17e9b61c9c0a Reviewed-on: https://review.coreboot.org/c/coreboot/+/54072 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
* Makefile: Don't run genbuild_h if not doing a buildMartin Roth2021-05-121-0/+2
| | | | | | | | | | | | | genbuild_h was being run on every make invocation - clean, distclean, etc. to get the source date epoch value. This value isn't used unless a build is being done, so don't run it on non-compile make invocations. Signed-off-by: Martin Roth <martin@coreboot.org> Change-Id: I2afc0affc17116e0db849ea968474bc19dbb0ae1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/53997 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Makefile: Add unit-tests help and targets listJakub Czapiga2021-04-151-1/+8
| | | | | | | | | | | | Add unit-tests targets to help output. Add list-unit-tests target that lists all available unit-tests. Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Change-Id: I464a76cbea1f4afbc3fc772960787952e61b95b9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/52293 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
* Makefile: set and export SOURCE_DATE_EPOCHAlexander Couzens2021-04-091-1/+2
| | | | | | | | | | | | | Set SOURCE_DATE_EPOCH [1] to allow payload builds and tools to use this as arbitrary timestamp to allow reprocucible builds. [1] https://reproducible-builds.org/docs/source-date-epoch/ Change-Id: I2c870023d13ff4c95305c8aba1459c1fcaf18773 Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51364 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Makefile: export LANG LC_ALL TZ without using COREBOOT_EXPORTSAlexander Couzens2021-04-091-1/+3
| | | | | | | | | | | | LANG LC_ALL TZ are required for reproducible builds. Those environment should be always used for all builds in coreboot and for payloads. By using COREBOOT_EXPORTS those would be removed in payload builds. Change-Id: Iea965abbce23bf6ec408ef587da0a4c4ebc65a27 Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51363 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Makefile.inc: Use `additional-dirs` for $(objcbfs), $(objgenerated)Nico Huber2021-03-271-0/+2
| | | | | | | | | | | | | | | We use `additional-dirs` for a single `mkdir -p` invocation for all directiories. I don't see why these two, $(objcbfs) and $(objgenerated), should be an exception. Fixes clean builds for targets that don't include the phony `coreboot` target, e.g. `make qemu`. Change-Id: I85abaa74cddefd2bd669e2b5c8934352775070fe Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51318 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* Makefile: Add $(xcompile) to specify where to write xcompileRaul E Rangel2020-12-231-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file was being written to the root src directory. It is the only file being written to src during a normal build, while all others are being written to $(obj). I added a new variable to allow specifying the xcompile path. This allows generating a single file if building multiple boards. I also moved the default location into $(obj) so we don't pollute the src directory by default. I also cleaned up the generation of xcompile by removing the unnecessary eval and NOCOMPILE check. I also left .xcompile in distclean so it cleans up stale files. Since .xcompile is written into $(obj), `make clean` will now remove it. The tegra Makefiles are outside of the normal build process, so I just updated those Makefiles to point to the default xcompile location of a normal build. The what-jenkins-does target had to be updated to support these special targets. We generate an xcompile specifically for these targets and pass it into the Makefile. Ideally we should get these targets added to the main build. BUG=b:112267918 TEST=ran `emerge-grunt coreboot` and `make what-jenkins-does` Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: Ia83f234447b977efa824751c9674154b77d606b0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/28101 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* Makefile: Remove possibly illegal characters from doxyplatformMartin Roth2020-10-311-2/+2
| | | | | | | | | | | | | | | | | | | The CONFIG_MAINBOARD_PART_NUMBER string can have characters in it that don't work in the doxyplatform make script under sh, so change any non-alphanumeric characters to an underscore. Also strip all the quotes - they aren't needed. The spaces in the "QEMU x86 i440fx/piix4" platform are one example of this. Signed-off-by: Martin Roth <martin@coreboot.org> Change-Id: I10bc6a8a245a34e89c859ff46835bde35aaa4286 Reviewed-on: https://review.coreboot.org/c/coreboot/+/46287 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
* build system: Rely on xcompile for HOSTCC and HOSTCXXPatrick Georgi2020-07-081-2/+5
| | | | | | | | | | | | It already looks for them, so let's use the result instead of blindly defaulting to gcc/g++, except when not building an image (but run kconfig or tests) because we don't use xcompile in those cases. Change-Id: I3e50c70a609f1903a925610928f8779c191040d8 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43145 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* Documentation: Add several fixesPatrick Rudolph2020-07-011-1/+9
| | | | | | | | | | | | | | * Add support for Sphinx 3.0+ * Add backward support for Sphinx 1.8 and older * Make sphinxcontrib ditaa an optional extension * Allow SPHINXOPTS to be set from command line * Add sphinx and sphinx-lint to top level Makefile Change-Id: If10aef51dc426445cb742aad13b19ee7fe169c51 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41492 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* crossgcc: Remove "Make"Elyes HAOUAS2020-06-171-1/+1
| | | | | | | | | | | In its current state, it draws more dependencies in than it solves which makes it useless. Change-Id: I08f592731c3da2ac19e1f93682256f559a067fc4 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38483 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* Makefile: Use SPDX identifierJacob Garber2020-05-231-30/+1
| | | | | | | | | | Change-Id: Ia05f2ecd31d0606dfe2bca843dbe6df2b8212a27 Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41598 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* treewide: Remove "this file is part of" linesPatrick Georgi2020-05-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stefan thinks they don't add value. Command used: sed -i -e '/file is part of /d' $(git grep "file is part of " |egrep ":( */\*.*\*/\$|#|;#|-- | *\* )" | cut -d: -f1 |grep -v crossgcc |grep -v gcov | grep -v /elf.h |grep -v nvramtool) The exceptions are for: - crossgcc (patch file) - gcov (imported from gcc) - elf.h (imported from GNU's libc) - nvramtool (more complicated header) The removed lines are: - fmt.Fprintln(f, "/* This file is part of the coreboot project. */") -# This file is part of a set of unofficial pre-commit hooks available -/* This file is part of coreboot */ -# This file is part of msrtool. -/* This file is part of msrtool. */ - * This file is part of ncurses, designed to be appended after curses.h.in -/* This file is part of pgtblgen. */ - * This file is part of the coreboot project. - /* This file is part of the coreboot project. */ -# This file is part of the coreboot project. -# This file is part of the coreboot project. -## This file is part of the coreboot project. --- This file is part of the coreboot project. -/* This file is part of the coreboot project */ -/* This file is part of the coreboot project. */ -;## This file is part of the coreboot project. -# This file is part of the coreboot project. It originated in the - * This file is part of the coreinfo project. -## This file is part of the coreinfo project. - * This file is part of the depthcharge project. -/* This file is part of the depthcharge project. */ -/* This file is part of the ectool project. */ - * This file is part of the GNU C Library. - * This file is part of the libpayload project. -## This file is part of the libpayload project. -/* This file is part of the Linux kernel. */ -## This file is part of the superiotool project. -/* This file is part of the superiotool project */ -/* This file is part of uio_usbdebug */ Change-Id: I82d872b3b337388c93d5f5bf704e9ee9e53ab3a9 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41194 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* tests: Add build subsystem for unit testing corebootJan Dabros2020-05-011-0/+19
| | | | | | | | | | | | | | | | | | | | Add a subsystem which will be used for writing, building and running unit tests for different coreboot's modules. This work is built using Cmocka unit testing framework. Description of what unit testing means (for the author) and how unit testing framework evaluation was performed may be found in Documentation/technotes/2020-03-unit-testing-coreboot.md Makefiles structure is very similar to this used for building coreboot images. Every directory has its own Makefile.inc were tests' names, sources, subdirs and multiple other test-related attributes are defined in form of variables. Signed-off-by: Jan Dabros <jsd@semihalf.com> Change-Id: I9b0220b84b9a6e448476ca3eb3ccccc5fb829ad1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/39894 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* cbfstool: Build vboot libraryYu-Ping Wu2020-03-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently cbfstool cherry-picks a few files from vboot and hopes these files will work standalone without any dependencies. This is pretty brittle (for example, CL:2084062 will break it), and could be improved by building the whole vboot library and then linking against it. Therefore, this patch creates a new target $(VBOOT_HOSTLIB) and includes it as a dependency for cbfstool and ifittool. To prevent building the vboot lib twice (one for cbfstool and the other for futility) when building coreboot tools together, add the variable 'VBOOT_BUILD' in Makefile to define a shared build path among different tools so that vboot files don't need to be recompiled. Also ignore *.o.d and *.a for vboot library. BRANCH=none BUG=none TEST=make -C util/cbfstool TEST=make -C util/futility TEST=Run 'make tools' and make sure common files such as 2sha1.c are compiled only once TEST=emerge-nami coreboot-utils Change-Id: Ifc826896d895f53d69ea559a88f75672c2ec3146 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39390 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Makefile: Explicitly silence sub-makesNico Huber2020-03-041-0/+1
| | | | | | | | | | | | | | | | | GNU Make 4.3 doesn't propagate a global .SILENT to sub-processes anymore. Let's make it explicit to maintain the behaviour we are used to. From the changelog: [SV 54740] Ensure .SILENT settings do not leak into sub-makes Change-Id: I3de51c245d3344b062dc0fe9c62b8d5c0ac5e67d Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38931 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* util/kconfig: Move coreboot specific changes into Makefile.incPatrick Georgi2019-11-271-1/+1
| | | | | | | | | | This eases maintenance of our kconfig fork. Change-Id: Ia4bc0bf22e66457356b9f8fcbea9412792495bca Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37151 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* Makefile.inc: Add a class 'all' to link files in all stage except SMMArthur Heymans2019-10-301-2/+2
| | | | | | | | Change-Id: I955dd2dc22cb3cfc4fdf1198cfd32f56475f97c9 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33198 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* Makefile: Switch to `.config` as input for the Ada `CB.Config`Nico Huber2019-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | So, this is odd in multiple ways. First of all, we fix something: We work around a weirdness in `make oldconfig` that adds spurious entries into the `auto.conf` for choices that were given a symbol name. When introducing the Ada config package, it seemed reasonable to use `auto.conf` as source, but it turned out that we didn't use it as input, only `config.h` and the original `.config` were used. As the syntax for `.config` is the same as for `auto.conf` we use the former now as input for Ada, too. One question remains: If `.config` already contains all required information, what is this `auto.conf` and what does it want? Alternatively, we could try to fix `oldconfig` or add a linter to forbid named choices. I thought, our build test would reject the latter already. But the `oldconfig` behaviour is too subtle. We keep a dependency on the `oldconfig` step, to make sure it runs first. Change-Id: If3fe6bc782251cdbd696395d3069a1c0bb0ae802 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36320 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* Revert "site-local: Allow to read Makefile.inc w/o .config"Werner Zeh2019-10-081-2/+1
| | | | | | | | | | | | | | | | | | | This reverts commit 275f2e22a1a441d48a12bfe39ef3ce960efd7a04. Since in this commit the inclusion of site-local/Makefile.inc was moved outside of the guard 'ifeq ($(NOCOMPILE),1)', this Makefile.inc will be included always here (what seems to be the intention of this commit). As we have a second place where site-local/Makefile.inc is included (top-level Makefile.inc via subdirs-y class) this unconditional include leads to a double included site-local/Makefile.inc. Therefore one will get errors if a separate rule is used in site-local/Makefile.inc. Change-Id: I0a693c1d793b978c8023e4f107dce139d537d8db Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35786 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
* coreboot/Makefile: display error when spaces in path of toplevel makefileHimanshu Sahdev2019-09-261-0/+3
| | | | | | | | | | | | | | | coreboot toplevel makefile breaks when path to the coreboot directory contains spaces. This patch displays a reasonable message to the user whenever spaces are found within the path to the coreboot direcrory. This commit addresses coreboot ticket #179. Change-Id: Id11deffa01ddca1ff9332d67c7aa33a382b4cdc7 Signed-off-by: Sourabh Kashyap <sourabhka@hcl.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35434 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* Makefile: set TZ LANG LC_ALLAlexander Couzens2019-09-241-0/+6
| | | | | | | | | | | | To be reproducible, TZ LANG LC_ALL should be set early in the build process to be always used. Change-Id: Iad802968347c8d41f974af930e0d0ad5b66719cb Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35391 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
* Makefile: Move the .xcompile rule out of the if !NOCOMPILE blockRaul E Rangel2019-08-281-6/+6
| | | | | | | | | | | | | | Generating the .xcompile file should be possible even without a config. BUG=b:112267918 TEST=Ran make and verified .xcompile was created Change-Id: I8075f71e6e3e2c150378818eeff2858c36b35843 Signed-off-by: Raul E Rangel <rrangel@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34242 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Makefile: Don't create build directory for additional targetsRaul E Rangel2019-07-291-1/+1
| | | | | | | | | | | BUG=b:112267918 TEST=Ran make help and verified build directory is no longer created Change-Id: I4bb066b5c3b3d9a7bb19291ef928042b90f10440 Signed-off-by: Raul E Rangel <rrangel@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34525 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* site-local: Allow to read Makefile.inc w/o .configBalaji Manigandan B2019-07-171-1/+2
| | | | | | | | | | | | | Makefile.inc allows extending site-specific configurations. This change is to allow make utility to list supported options, irrespective of a .config file availability. Change-Id: I7c968c773c368ea74689b9741c4c978c35110187 Signed-off-by: Balaji Manigandan B <balaji.manigandan@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34024 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>