aboutsummaryrefslogtreecommitdiff
path: root/util/kconfig/confdata.c
AgeCommit message (Collapse)Author
2019-08-30Kconfig: Write tmp files into same directory as target filesRaul E Rangel
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>
2019-08-30kconfig: Use config's full path when generating tmp fileRaul E Rangel
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>
2016-12-12Kconfig: Change symbol override from warning to noticeMartin Roth
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>
2016-02-12util/kconfig: Ignore extra symbols in configs instead of failingMartin Roth
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>
2015-11-20util/kconfig: Set parameter of mkdir to only one for mingw.zbao
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>
2015-09-30kconfig: Allow KCONFIG_STRICT outside of confdata.cStefan Reinauer
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>
2015-08-09Kconfig: Add KCONFIG_STRICT modeStefan Reinauer
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>
2015-04-06kconfig: use va_end to match corresponding va_startStefan Reinauer
Although on some systems va_end is a no-op, it is good practice to use va_end, especially since the manual states: "Each invocation of va_start() must be matched by a corresponding invocation of va_end() in the same function." Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Michal Marek <mmarek@suse.cz> Change-Id: Ia08a57c37a6294e002cb6ce4c0a010c0d2edf973 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/9309 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Marc Jones <marc.jones@se-eng.com>
2014-11-18kconfig: create files in target directory if requestedPatrick Georgi
Otherwise rename() fails when used across filesystem boundaries. Change-Id: I22a62310f0e46ac9cfee50b7e9eeed93536ed409 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: http://review.coreboot.org/7504 Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Tested-by: build bot (Jenkins)
2014-05-07kconfig: update to follow upstream more closelyPatrick Georgi
This might break a bunch of stuff (eg. win32 support), but otherwise introduces nconfig (ncurses based configuration frontend), partial configuration headers for improved dependency tracking (which requires some more build system support) and various bug fixes. Change-Id: I5d8a280810c6a26fc3fd056d5d94cb9e591a0ff5 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/5487 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-04-02Force coreboot mconf to create temp files in the output directoryVadim Bendebury
This change partially addresses the problem with attempting to generate coreboot image out of tree. The configuration step fails when in cheroot, if the destination directory is placed in /tmp. The problem is that the mconf package tries renaming the temporary file created in the local directory into the destination config file. If the destination root and the local directory are located on different file systems, the rename operation fails. The proper fix (still upcoming) would be to identify all places where mconf creates temp files, and make sure that all temp files get created in the destination tree. This change modifies just one location, which prevents building out of tree in the most common case. Test: run the following in the coreboot directory in chroot: (coreboot) cp config.lumpy .config (coreboot) /bin/rm -rf /tmp/cb (coreboot) CROSS_COMPILE=i686-pc-linux-gnu- make obj=/tmp/cb oldconfig (coreboot) CROSS_COMPILE=i686-pc-linux-gnu- make obj=/tmp/cb Observe the build succeed (it was failing during the config phase before this change) Change-Id: If4506e984b8afc192a1689c7b0aa956dd35f66c6 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://review.coreboot.org/815 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2011-11-06kconfig: Use more collision resistant temporary filenamesPatrick Georgi
kconfig creates reasonably safe filenames for its temporary files except for two of them. Change-Id: I6861f55ae2a5311e3fb7919333ce9af1e39ce78b Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/408 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2011-04-18Emit unwritten symbols in Kconfig so we don't have to do constructs likeStefan Reinauer
#if defined(CONFIG_FOO) && CONFIG_FOO anymore. This was partially implemented but didn't work for symbols that were unset because of a missing dependency. Patch taken from SeaBIOS. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6511 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-04-27Since some people disapprove of white space cleanups mixed in regular commitsStefan Reinauer
while others dislike them being extra commits, let's clean them up once and for all for the existing code. If it's ugly, let it only be ugly once :-) Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5507 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-11-21Make the kconfig-style build work in mingw:Patrick Georgi
* use relative paths in ldscript.ld and crt0_includes.h * avoid use of dd(1) in xcompile * build libregex for kconfig, if necessary * work around missing utsname on win32 * unlink targets before rename on win32 * implement (crude) mkstemp for win32 * avoid open/read/close, use fopen/fread/fclose instead * don't free certain data structures in romcc on win32 to avoid crashes (likely use-after-free()) * handle "\CRLF" and win32 style absolute paths (X:/ or X:\) in romcc * make lzma (part of cbfstool) build on XP * implement ntohl/htonl on win32 * handle CRLF in awk script * set larger stack for romcc on win32 Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4952 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-08-12Kconfig!Patrick Georgi
Works on Kontron, qemu, and serengeti. Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> tested on abuild only. Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4534 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1