summaryrefslogtreecommitdiffstats
path: root/util/kconfig
Commit message (Collapse)AuthorAgeFilesLines
* util/kconfig: Add README.md documenting the uprev procedurePatrick Georgi2022-07-221-0/+39
| | | | | | | | Change-Id: I2e74f1c5cb1657e11d4f7ea101549329274102db Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57879 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* util/kconfig: Uprev to Linux 5.15's kconfigPatrick Georgi2021-11-021-0/+15
| | | | | | | | | | | Upstream's changes only affect a script that we don't use. Still, this keeps us in sync with the official version. Change-Id: I39cbbfb8dc816b4f36f92e6bd53f40c733691242 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58792 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
* util/kconfig: Uprev to Linux 5.14's kconfigPatrick Georgi2021-11-022-40/+42
| | | | | | | | | | | | Upstream's changes have been minimal, to the perl script that we don't use and a constness change, so I expect no harm. Still, this keeps us in sync with the official version. Change-Id: I5e5a2400bc3323938da4b946930e2ec119819672 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57880 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
* util/kconfig: Rewrite patch in quilt's normal formPatrick Georgi2021-11-021-8/+5
| | | | | | | | | | | This is what quilt writes on `quilt refresh` and what it can apply and unapply cleanly. Change-Id: I8c8586da384b65fd5c21c1c1a093642534f83283 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57878 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
* util/kconfig: Add pre-built parserPatrick Georgi2021-09-134-0/+6465
| | | | | | | | | | | | | | | | | | | | | | | | | It avoids the dependency on bison/flex, minimally speeds up the build and also works around weird race conditions in some versions of bison that need more investigation. The issue this avoids manifests as a build error when creating parser.tab.c: input in flex scanner failed make: *** [util/kconfig/Makefile.inc:66: build/util/kconfig/parser.tab.c] Error 2 Since the error happens within bison the alternative would be to make bison part of our crossgcc environment to ensure that no broken OS build is used. BUG=b:197515860 TEST=things build with bison not installed Change-Id: Ib35dfb7beafc0a09dc333e962b1e3f33df46a854 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57409 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
* util/kconfig: Simplify dependencies for parser.tab.*Patrick Georgi2021-09-131-4/+2
| | | | | | | | | | | | | | | | | | | | With parser.tab.h depending on parser.tab.c it's possible for make to initiate the creation of parser.tab.c, then try to compile it, even though parser.tab.h is still missing. This isn't normally an issue yet because bison creates them both at a time but with pre-compiled files this will become a problem. Pattern rules support (until recently as a special case that no other type of rule could implement) multiple targets that are actually treated as "one command creates multiple output files" so use that to state the relationship properly. Change-Id: I4aa7eca9d3123808e0665a15a99c04fac7384940 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57509 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
* util/kconfig: detect ncurses on FreeBSDIdwer Vollering2021-08-063-0/+38
| | | | | | | | | | | | | | Even though pkg-config might be installed, it might or will not return true in the checks whether 'PKG' or 'PKG2' is installed. Extend the script to look in another location for ncurses.h Signed-off-by: Idwer Vollering <vidwer@gmail.com> Change-Id: I4344ba2116c0b8618357db4248d993509cbb666e Reviewed-on: https://review.coreboot.org/c/coreboot/+/56677 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com>
* util/kconfig: Provide default for DEFCONFIGPatrick Georgi2021-08-051-0/+2
| | | | | | | | | | | | | | | Our documentation claims that the DEFCONFIG make variable, used for targets such as savedefconfig, defaults to 'defconfig'. With the update to kconfig 5.13 we lost this default, so bring it back. Fixes: 53ea1d44f0 ("util/kconfig: Uprev to Linux 5.13's kconfig") Resolves: https://ticket.coreboot.org/issues/317 Change-Id: Idb88b69ffa855fa97df8c821601308e717575550 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/56718 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Martin Roth <martinroth@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* util/kconfig: Stop trying to make sense of Linux configsPatrick Georgi2021-07-171-0/+1
| | | | | | | | | | | | It only leads to missing symbol errors. Change-Id: Idbce93232ba2b54561abab5b2747c418d6efa92b Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/56373 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-by: Lean Sheng Tan <lean.sheng.tan@intel.com> Reviewed-by: Martin Roth <martinroth@google.com>
* util/kconfig: Uprev to Linux 5.13's kconfigPatrick Georgi2021-07-1362-9455/+6389
| | | | | | | | | | | | | | | | | | | | | | | 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>
* treewide: Remove trailing whitespaceMartin Roth2021-02-173-49/+49
| | | | | | | | | | Remove trailing whitespace in files that aren't typically checked. Signed-off-by: Martin Roth <martin@coreboot.org> Change-Id: I8dfffbdeaadfa694fef0404719643803df601065 Reviewed-on: https://review.coreboot.org/c/coreboot/+/50704 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* util: Update all shebangs to use /usr/bin/envMartin Roth2021-01-252-2/+2
| | | | | | | | | | | | Instead of hardcoding paths to the executables, use the version in the path. This allows the scripts to work on more systems, and allows the binary version to be changed more easily if needed. Signed-off-by: Martin Roth <martin@coreboot.org> Change-Id: Ifcc56aa21092cd3866eacb6a02d198110ec6051d Reviewed-on: https://review.coreboot.org/c/coreboot/+/48904 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* 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>
* util/: Replace GPLv2 boiler plate with SPDX headerPatrick Georgi2020-05-091-11/+1
| | | | | | | | | | | | | | | | | | | Used commands: perl -i -p0e 's|\/\*[\s*]*.*is free software[:;][\s*]*you[\s*]*can[\s*]*redistribute[\s*]*it[\s*]*and\/or[\s*]*modify[\s*]*it[\s*]*under[\s*]*the[\s*]*terms[\s*]*of[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*as[\s*]*published[\s*]*by[\s*]*the[\s*]*Free[\s*]*Software[\s*]*Foundation[;,][\s*]*version[\s*]*2[\s*]*of[\s*]*the[\s*]*License.[\s*]*This[\s*]*program[\s*]*is[\s*]*distributed[\s*]*in[\s*]*the[\s*]*hope[\s*]*that[\s*]*it[\s*]*will[\s*]*be[\s*]*useful,[\s*]*but[\s*]*WITHOUT[\s*]*ANY[\s*]*WARRANTY;[\s*]*without[\s*]*even[\s*]*the[\s*]*implied[\s*]*warranty[\s*]*of[\s*]*MERCHANTABILITY[\s*]*or[\s*]*FITNESS[\s*]*FOR[\s*]*A[\s*]*PARTICULAR[\s*]*PURPOSE.[\s*]*See[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*for[\s*]*more[\s*]*details.[\s*]*\*\/|/* SPDX-License-Identifier: GPL-2.0-only */|' $(cat filelist) perl -i -p0e 's|This[\s*]*program[\s*]*is[\s*]*free[\s*]*software[:;][\s*]*you[\s*]*can[\s*]*redistribute[\s*]*it[\s*]*and/or[\s*]*modify[\s*]*it[\s*]*under[\s*]*the[\s*]*terms[\s*]*of[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*as[\s*]*published[\s*]*by[\s*]*the[\s*]*Free[\s*]*Software[\s*]*Foundation[;,][\s*]*either[\s*]*version[\s*]*2[\s*]*of[\s*]*the[\s*]*License,[\s*]*or[\s*]*.at[\s*]*your[\s*]*option.*[\s*]*any[\s*]*later[\s*]*version.[\s*]*This[\s*]*program[\s*]*is[\s*]*distributed[\s*]*in[\s*]*the[\s*]*hope[\s*]*that[\s*]*it[\s*]*will[\s*]*be[\s*]*useful,[\s*]*but[\s*]*WITHOUT[\s*]*ANY[\s*]*WARRANTY;[\s*]*without[\s*]*even[\s*]*the[\s*]*implied[\s*]*warranty[\s*]*of[\s*]*MERCHANTABILITY[\s*]*or[\s*]*FITNESS[\s*]*FOR[\s*]*A[\s*]*PARTICULAR[\s*]*PURPOSE.[\s*]*See[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*for[\s*]*more[\s*]*details.[\s*]*\*\/|/* SPDX-License-Identifier: GPL-2.0-or-later */|' $(cat filelist) perl -i -p0e 's|\/\*[\s*]*.*This[\s*#]*program[\s*#]*is[\s*#]*free[\s*#]*software[;:,][\s*#]*you[\s*#]*can[\s*#]*redistribute[\s*#]*it[\s*#]*and/or[\s*#]*modify[\s*#]*it[\s*#]*under[\s*#]*the[\s*#]*terms[\s*#]*of[\s*#]*the[\s*#]*GNU[\s*#]*General[\s*#]*Public[\s*#]*License[\s*#]*as[\s*#]*published[\s*#]*by[\s*#]*the[\s*#]*Free[\s*#]*Software[\s*#]*Foundation[;:,][\s*#]*either[\s*#]*version[\s*#]*3[\s*#]*of[\s*#]*the[\s*#]*License[;:,][\s*#]*or[\s*#]*.at[\s*#]*your[\s*#]*option.*[\s*#]*any[\s*#]*later[\s*#]*version.[\s*#]*This[\s*#]*program[\s*#]*is[\s*#]*distributed[\s*#]*in[\s*#]*the[\s*#]*hope[\s*#]*that[\s*#]*it[\s*#]*will[\s*#]*be[\s*#]*useful[;:,][\s*#]*but[\s*#]*WITHOUT[\s*#]*ANY[\s*#]*WARRANTY[;:,][\s*#]*without[\s*#]*even[\s*#]*the[\s*#]*implied[\s*#]*warranty[\s*#]*of[\s*#]*MERCHANTABILITY[\s*#]*or[\s*#]*FITNESS[\s*#]*FOR[\s*#]*A[\s*#]*PARTICULAR[\s*#]*PURPOSE.[\s*#]*See[\s*#]*the[\s*#]*GNU[\s*#]*General[\s*#]*Public[\s*#]*License[\s*#]*for[\s*#]*more[\s*#]*details.[\s*]*\*\/|/* SPDX-License-Identifier: GPL-3.0-or-later */|' $(cat filelist) perl -i -p0e 's|(\#\#*)[\w]*.*is free software[:;][\#\s]*you[\#\s]*can[\#\s]*redistribute[\#\s]*it[\#\s]*and\/or[\#\s]*modify[\#\s]*it[\s\#]*under[\s \#]*the[\s\#]*terms[\s\#]*of[\s\#]*the[\s\#]*GNU[\s\#]*General[\s\#]*Public[\s\#]*License[\s\#]*as[\s\#]*published[\s\#]*by[\s\#]*the[\s\#]*Free[\s\#]*Software[\s\#]*Foundation[;,][\s\#]*version[\s\#]*2[\s\#]*of[\s\#]*the[\s\#]*License.*[\s\#]*This[\s\#]*program[\s\#]*is[\s\#]*distributed[\s\#]*in[\s\#]*the[\s\#]*hope[\s\#]*that[\s\#]*it[\s\#]*will[\#\s]*be[\#\s]*useful,[\#\s]*but[\#\s]*WITHOUT[\#\s]*ANY[\#\s]*WARRANTY;[\#\s]*without[\#\s]*even[\#\s]*the[\#\s]*implied[\#\s]*warranty[\#\s]*of[\#\s]*MERCHANTABILITY[\#\s]*or[\#\s]*FITNESS[\#\s]*FOR[\#\s]*A[\#\s]*PARTICULAR[\#\s]*PURPOSE.[\#\s]*See[\#\s]*the[\#\s]*GNU[\#\s]*General[\#\s]*Public[\#\s]*License[\#\s]*for[\#\s]*more[\#\s]*details.\s(#* *\n)*|\1 SPDX-License-Identifier: GPL-2.0-only\n\n|' $(cat filelist) perl -i -p0e 's|(\#\#*)[\w*]*.*is free software[:;][\s*]*you[\s*]*can[\s*]*redistribute[\s*]*it[\s*]*and\/or[\s*]*modify[\s*]*it[\s*]*under[\s*]*the[\s*]*terms[\s*]*of[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*as[\s*]*published[\s*]*by[\s*]*the[\s*]*Free[\s*]*Software[\s*]*Foundation[;,][\s*]*version[\s*]*2[\s*]*of[\s*]*the[\s*]*License.[\s*]*This[\s*]*program[\s*]*is[\s*]*distributed[\s*]*in[\s*]*the[\s*]*hope[\s*]*that[\s*]*it[\s*]*will[\s*]*be[\s*]*useful,[\s*]*but[\s*]*WITHOUT[\s*]*ANY[\s*]*WARRANTY;[\s*]*without[\s*]*even[\s*]*the[\s*]*implied[\s*]*warranty[\s*]*of[\s*]*MERCHANTABILITY[\s*]*or[\s*]*FITNESS[\s*]*FOR[\s*]*A[\s*]*PARTICULAR[\s*]*PURPOSE.[\s*]*See[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*for[\s*]*more[\s*]*details.\s(#* *\n)*|\1 SPDX-License-Identifier: GPL-2.0-only\n\n|' $(cat filelist) Change-Id: I1008a63b804f355a916221ac994701d7584f60ff Signed-off-by: Patrick Georgi <pgeorgi@google.com> Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41177 Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* AUTHORS, util/: Drop individual copyright noticesPatrick Georgi2020-05-091-2/+1
| | | | | | | | | | We have the git history which is a more reliable librarian. Change-Id: Idbcc5ceeb33804204e56d62491cb58146f7c9f37 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41175 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: ron minnich <rminnich@gmail.com>
* util/kconfig: Remove miniconfig scriptPatrick Georgi2020-04-291-87/+0
| | | | | | | | | | | | | | It replicates the functionality of savedefconfig because back when the script was added, savedefconfig didn't work for us. It now does, is the official way of doing things, is recommended in our documentation and is also a fair bit faster. Change-Id: Ia8e0377537ff7cd638c564037ea6a77b01a87243 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37150 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* util/kconfig: Silence warning about _GNU_SOURCEAngel Pons2020-03-082-0/+4
| | | | | | | | | | | For some reason, this symbol gets redefined, which causes a warning. Hide the warning by checking whether it is already defined. Change-Id: I70ffc9a799e0b536d6aba7d00f828bd6d915d94c Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39183 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* util/kconfig: Move coreboot specific changes into Makefile.incPatrick Georgi2019-11-272-15/+27
| | | | | | | | | | 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>
* Kconfig: Write tmp files into same directory as target filesRaul E Rangel2019-08-301-49/+63
| | | | | | | | | | | | | | | | | | | This removes the need for COREBOOT_BUILD_DIR in Kconfig. Since the original files will be replaced with the tmp file, the parent directory already needs to be writable. Before this change, the tmp files would be created in the CWD (src) if COREBOOT_BUILD_DIR was not specified. BUG=b:112267918 TEST=emerge-grunt coreboot and verified no tmp files were created in the src directory. Change-Id: Icdaf2ff3dd1ec98813b75ef55b96e38e1ca19ec7 Signed-off-by: Raul E Rangel <rrangel@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34244 Reviewed-by: Martin Roth <martinroth@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* kconfig: Use config's full path when generating tmp fileRaul E Rangel2019-08-301-6/+13
| | | | | | | | | | | | | | | If KCONFIG_CONFIG is set to a full path, we should generate the tmp file in the same directory instead of the current working directory. BUG=b:112267918 TEST=emerge-grunt coreboot and verified with print statements that the correct path was used. Change-Id: Ia21e930a9b0a693f851c34bcde26b34886cbe902 Signed-off-by: Raul E Rangel <rrangel@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34243 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
* util/kconfig: Use snprintf to avoid buffer overflowJacob Garber2019-05-132-2/+4
| | | | | | | | | | | | | 'name' and 'env' are supposed to be file system paths, but could overflow the buffer if configured incorrectly. Let's avoid that entirely. Found-by: Coverity Scan #1362515 Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Change-Id: I1aef36819d49ebcbde1c51995dc0961c85e74150 Reviewed-on: https://review.coreboot.org/c/coreboot/+/32686 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* util/kconfig: Fix missing library issue with ld 2.24 and newerWerner Zeh2019-04-031-1/+2
| | | | | | | | | | | | | | | | | | | When invoking 'make menuconfig' with gcc 4.9.2 an error is thrown: ld: build/util/kconfig/lxdialog/checklist.o: undefined reference to symbol 'acs_map' This happens with ld version 2.24 and newer when menuconfig is executed for the first time after make clean. This does not happen with ld 2.20 (part of gcc 4.4.7). It can be fixed with the flag -ltinfo in HOST_LOADLIBES. Change-Id: I6216bb4d276d4bf98aa4ec06457b809fdcd73235 Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32137 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* util/kconfig: Add `toada` Ada spec generation toolNico Huber2019-01-242-0/+150
| | | | | | | | | | | | | Converts `auto.conf` to an Ada spec file. Write to $(obj)/cb-config.ads and set the package name to `CB.Config`. Change-Id: I97c060d8a613c74a82a18aff9524ad4b01f9df56 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/31053 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* treewide: use /usr/bin/env where appropriateYegor Timoshenko2018-11-171-1/+1
| | | | | | | | | | | | Some Unix systems (GuixSD, NixOS) do not install programs like Bash and Python to /usr/bin, and /usr/bin/env has to be used to locate these instead. Change-Id: I7546bcb881c532adc984577ecb0ee2ec4f2efe00 Signed-off-by: Yegor Timoshenko <yegortimoshenko@riseup.net> Reviewed-on: https://review.coreboot.org/28953 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* util: Add description.md to each utilTom Hiller2018-07-261-0/+1
| | | | | | | | | | | | Descriptions are taken from the files themselves or READMEs. Description followed by a space with the language in marked up as code. Change-Id: I5f91e85d1034736289aedf27de00df00db3ff19c Signed-off-by: Tom Hiller <thrilleratplay@gmail.com> Reviewed-on: https://review.coreboot.org/27563 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* {src,util}: Use NULL instead of 0 for pointerElyes HAOUAS2018-06-114-10/+10
| | | | | | | | Change-Id: I75fa4577055f25dde0a8b1044c005bba72cabd92 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/26857 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Kconfig: Change symbol override from warning to noticeMartin Roth2016-12-121-3/+13
| | | | | | | | | | | | | | | | | | | | Overriding symbols within a .config is pretty common when doing automated builds with various different options. The warning text makes it sound like this is an issue, so change it to say 'notice' instead. We could get rid of it completely, but it's not a bad thing to know that we have two copies of the same symbol in the .config. BUG=chrome-os-partner:54059 TEST=copy a disabled kconfig option to the end and set it to y. See notice text instead of warning. Change-Id: I9f575b2275233f638e42676263348c807e6515bd Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/16691 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* util/kconfig/conf.c: Fix newline in error printfMartin Roth2016-12-091-1/+1
| | | | | | | | | | | | For some reason the \n in the defconfig save error was not escaped. Change-Id: I6a76b258f461a194fe17aae2b4fa04326b46d8d6 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17742 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@googlemail.com>
* Remove non-ascii & unprintable charactersMartin Roth2016-08-012-27/+27
| | | | | | | | | | | | These non-ascii & unprintable characters aren't needed. Change-Id: I129f729f66d6a692de729d76971f7deb7a19c254 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/15977 Tested-by: build bot (Jenkins) Reviewed-by: Omar Pakker Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* kconfig: add olddefconfig target to helpMartin Roth2016-07-121-0/+1
| | | | | | | | | | | | | olddefconfig is used to expand the miniconfig files with all the default values removed by the 'savedefconfig' target. Change-Id: Ic9c62f4c334919e8be478d30099819b90891670a Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/15319 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* util/kconfig: Fix gconfig buildJonathan Neuschäfer2016-07-011-0/+2
| | | | | | | | | | | | | | | | | | | | | This linker error was the problem: build/util/kconfig/zconf.tab.o: In function `conf_read_simple': /home/jn/dev/coreboot/util/kconfig/confdata.c:413: undefined reference to `kconfig_warnings' /home/jn/dev/coreboot/util/kconfig/confdata.c:413: undefined reference to `kconfig_warnings' build/util/kconfig/zconf.tab.o: In function `sym_calc_value': /home/jn/dev/coreboot/util/kconfig/symbol.c:388: undefined reference to `kconfig_warnings' /home/jn/dev/coreboot/util/kconfig/symbol.c:388: undefined reference to `kconfig_warnings' collect2: error: ld returned 1 exit status /home/jn/dev/coreboot/util/kconfig/Makefile:339: recipe for target 'build/util/kconfig/gconf' failed make: *** [build/util/kconfig/gconf] Error 1 Change-Id: I4a667c7c15b35618fb9ad536f2be5044b8031ab4 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/15505 Tested-by: build bot (Jenkins) Reviewed-by: Idwer Vollering <vidwer@gmail.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* kconfig: make oldconfig work "non-strict"Patrick Georgi2016-02-151-1/+3
| | | | | | | | | | | | | oldconfig is regularly used to clean up templates that sometimes contain duplicates or old symbols. Since it cleans up the config, it doesn't need to fail on issues. Change-Id: Ife0e9e3b9bfdde1eb6be0e2e38e81b9042cb7950 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13687 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* util/kconfig: Ignore extra symbols in configs instead of failingMartin Roth2016-02-121-1/+3
| | | | | | | | | | | | | | | | | | | When updating an old .config file that has a symbol that has been removed from the current Kconfig tree, kconfig will generate a warning and fail to save the updated file. This is incredibly annoying, and not the goal when trying to eliminate Kconfig warnings. Instead of generating a warning, just print a message that it's being ignored. This will remove the offending symbol, while allowing the updated config file to be saved. Split the change from 1 line to 3 lines to keep it at 80 characters. Change-Id: I09d5775c9ed14bde80077b51b862a7f41bee098a Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13674 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* util/kconfig:xconf(QT): Update QT version of xconfzbao2016-02-033-429/+466
| | | | | | | | | | | | | | Update the qconf.cc and qconf.h to upstream code, which added support of QT5 and removed the support of QT3. All code is ported from kernel.org, with only one line added to qconf.cc. int kconfig_warnings = 0; Change-Id: Ice77cddcc00e43375039379978e55f42acf867f7 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/13130 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* Makefile: Individualize help targets & set as non-compile targetsMartin Roth2015-12-061-2/+2
| | | | | | | | | | | | | | | | - 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>
* util/kconfig: Remove utsname for mingwzbao2015-11-261-0/+10
| | | | | | | | | | | Mingw doesn't have that this function. Change-Id: I640ea61ff24fba812e3f10771dd7e468dcfc63dd Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/11724 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Makefiles: Add / Update help for makefile targetsMartin Roth2015-11-241-7/+9
| | | | | | | | | | | | | | 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>
* util/kconfig: Set parameter of mkdir to only one for mingw.zbao2015-11-201-0/+4
| | | | | | | | | | | | The second parameter is to set file permissions for the directory, which is not needed in mingw. Change-Id: I88e317f075e8a39f0a280b3dd6e597d119f0f741 Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/11723 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* util/kconfig: fill glob_t with 0 before calling globzbao2015-11-052-2/+2
| | | | | | | | | | | | | | | | | On mingw, the function glob has some default options which are not compliant with man page. If gl_offs is not set as 0, there may be some slots which is reserved. If gl_pathc or gl_pathv is not set as 0, the result might be appended to the list instead of being added as new ones. Change-Id: I03110c4cdda70578828d6499262a085a81d26313 Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/11711 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
* kconfig: fix build for xconfig, tooPatrick Georgi2015-10-011-0/+2
| | | | | | | | | Change-Id: I1c5e3424cb56f1f10e75bb07db084c3500f3ba07 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/11768 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
* kconfig: kconfig_warnings needs to be defined for all frontendsPatrick Georgi2015-09-302-0/+4
| | | | | | | | | Change-Id: Iecefdd1e827e4eb8b4da573e4291850d6c47767f Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/11754 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
* kconfig: Allow KCONFIG_STRICT outside of confdata.cStefan Reinauer2015-09-306-5/+34
| | | | | | | | | | | | | | | | | To catch dependency errors in symbol.c (such as the ones fixed by I51b4ee326f082c6a656a813ee5772e9c34f5c343) we need to check for global kconfig warnings before saving config files. This patch will produce errors for wrong dependencies and add catching of errors to conf, nconf and mconf. Sorry, gconf users, you will have to wait. Change-Id: Idf7ee406ce3869941af319219aea16fab826df84 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/11291 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* util/kconfig: add olddefconfig targetMartin Roth2015-08-251-0/+3
| | | | | | | | | | | | | | There doesn't seem to have been an olddefconfig target in the coreboot version of the Kconfig makefile. It's listed in the .PHONY, but it doesn't seem like it's ever been there. This is useful for expanding a miniconfig saved with 'make savedefconfig'. Change-Id: I3798f8469135b58d32da68d4b0e434ab5351b501 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/11273 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Kconfig: Add KCONFIG_STRICT modeStefan Reinauer2015-08-091-0/+8
| | | | | | | | | | | | | | | | This is basically a -Werror mode for Kconfig. When exporting KCONFIG_STRICT in the Makefile, warnings in Kconfig will produce errors instead. This will make it easier to spot unclean Kconfig files, settings and dependencies. Change-Id: I941af24c3ccb10b8b9ddc5c98327154749ebbbc6 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10977 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* kconfig: Fix defconfig targetsStefan Reinauer2015-06-301-3/+3
| | | | | | | | | | | | | The syntax of "conf" has changed, but we never adapted our Kconfig Makefile since we are not typically using those targets (except for coreinfo) Change-Id: Ib95b53d255d7456cc6d6bcc7048fcaa0db1ce142 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10716 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Marc Jones <marc.jones@se-eng.com>
* libpayload: Drop duplicate copy of KconfigStefan Reinauer2015-06-303-1/+1
| | | | | | | | | | It's perfectly fine to have one single copy of kconfig in the tree. Change-Id: Icfe32f0249dfc1c223009d6e7136462f8f8a7248 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10521 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* kconfig: allow specifying the target for savedefconfigPatrick Georgi2015-06-161-1/+3
| | | | | | | | | Change-Id: Iee5ab0d3bdc8b754669356f2046d290d9ca555c2 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/10511 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* kconfig: enforce stable sort orderPatrick Georgi2015-06-111-0/+3
| | | | | | | | | | | | | Locales differ in the order in which they sort entries. This ensures predictable behavior. Change-Id: I4ceec90a56bbc368a847d14298db0a21cc21e77c Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/10510 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* util/kconfig/Makefile: Add savedefconfig targetMartin Roth2015-06-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | | Add a savedefconfig target and the help for it to the kconfig makefile. The main advantage I found for using defconfigs instead of the full .config is that they require less maintenence, so long as reasonable default values are set when adding new config options. When the defconfig is expanded, it will use default values for all options not saved in the defconfig. This cuts the size of a saved config from 500ish lines to roughly 20 lines. savedefconfig was added to the linux kernel in commit id 7cf3d73b4360e91b14326632ab1aeda4cb26308d Change-Id: I45f3dc87b773fb6e9ee53e32fdcafff1f53074d2 Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: http://review.coreboot.org/10462 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>
* Remove empty lines at end of fileElyes HAOUAS2015-06-083-3/+0
| | | | | | | | | | | | Used command line to remove empty lines at end of file: find . -type f -exec sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \; Change-Id: I816ac9666b6dbb7c7e47843672f0d5cc499766a3 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: http://review.coreboot.org/10446 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>