aboutsummaryrefslogtreecommitdiff
path: root/scripts/kconfig (follow)
Commit message (Collapse)AuthorAgeFilesLines
* build system: fix ncurses detectionRon Yorston2024-04-281-1/+1
| | | | | Recent versions of gcc fail to build the binary to test for ncurses because main() is lacking a return type.
* Update PDCursesRon Yorston2024-01-0616-278/+610
|
* build system: allow monochrome 'make menuconfig'Ron Yorston2022-11-161-0/+3
| | | | | | | | | 'make menuconfig' uses a hardcoded colour palette which may be difficult to read. Add support for the 'COLORS' environment variable. Setting this to '0' will cause 'make menuconfig' to be displayed in black and white. (GitHub issue #273)
* win32: native make menuconfig: support searchAvi Halachmi (:avih)2022-11-131-5/+21
| | | | | | | Previously, pressing slash to search at the menu aborted the menu program ('mconf'), because regexp is not available with native mingw. Now it works, but the search is of plain string rather than regexp.
* build system: try harder to detect w64devkitRon Yorston2022-11-121-0/+11
| | | | | | | | | | | | | | | We need to build the supplied PDCurses code when using w64devkit. This was being detected by checking for the W64DEVKIT environment variable, but this is only defined if w64devkit is started via w64devkit.exe. Set W64DEVKIT ourselves if HOSTCC targets the mingw32 platform. This won't be the case when cross-compiling on Linux but will for w64devkit and MSYS2 MINGW32/64. The build won't work properly for MSYS2 MINGW32/64, but it doesn't work when using the supplied curses library either. 'make menuconfig' requires the use of MSYS2 MSYS, and HOSTCC there targets msys.
* build system: silence compiler warningFRP-4784-g5507c8744Ron Yorston2022-11-081-0/+1
| | | | | | The compiler in MSYS2 warns that strcasecmp(3) isn't declared in scripts/kconfig/lxdialog/checklist.c. Add the appropriate include to silence this warning.
* win32: fix ESC/CR handling in 'make menuconfig'Ron Yorston2022-11-071-1/+1
| | | | | | | The WIN32 code in the 'mconf' build program should truncate the exit status from dialogs as if it were passed through WEXITSTATUS. The text dialog, for example, returns a status of -1 when ESC or CR is pressed. 'mconf' expects to see this as 255.
* Provide PDCurses source for w64devkit buildRon Yorston2022-11-0740-0/+10615
| | | | | | w64devkit doesn't ship a curses library. Provide a cut-down copy of PDCurses which is sufficient to allow 'make menuconfig' to work in w64devkit.
* win32: allow 'make menuconfig' in native buildsRon Yorston2022-11-071-6/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | 'make menuconfig' is a build option to allow changes to be made to the BusyBox configuration. It's a bit friendlier than using a text editor on the .config file. Previously 'menuconfig' was only available when cross-compiling on a Linux/Unix platform. The 'mconf' build program has been ported to WIN32 so it's now able to run the 'lxdialog' program which displays the configuration dialogs. Building 'lxdialog' is somewhat awkward in MSYS2. The MINGW32/64 build environments generate WIN32 executables for 'lxdialog'. These doesn't work properly in the MSYS2 console. For 'menuconfig' to work it's necessary to run it in an MSYS build environment. This generates an MSYS binary which works in the MSYS2 console. busybox-w32 should then be built in a MINGW32/64 build environment. Doing so will generate additional copies of the build programs without a '.exe' suffix: the MSYS build environment adds '.exe' to binaries it builds. This breaks 'menuconfig'. To configure an MSYS build environment use: pacman -S gcc ncurses-devel
* Merge branch 'busybox' into mergeRon Yorston2021-06-071-3/+14
|\
| * build system: use SOURCE_DATE_EPOCH for timestamp if availablePaul Spooren2021-06-051-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SOURCE_DATE_EPOCH is an effort of the Reproducible Builds organization to make timestamps/build dates in compiled tools deterministic over several repetitive builds. Busybox shows by default the build date timestamp which changes whenever compiled. To have a reasonable accurate build date while staying reproducible, it's possible to use the *date of last source modification* rather than the current time and date. Further information on SOURCE_DATE_EPOCH are available online [1]. This patch modifies `confdata.c` so that the content of the SOURCE_DATE_EPOCH env variable is used as timestamp. To be independent of different timezones between builds, whenever SOURCE_DATE_EPOCH is defined the GMT time is used. [1]: https://reproducible-builds.org/docs/source-date-epoch/ Signed-off-by: Paul Spooren <mail@aparcar.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-05-143-5/+5
|\|
| * fix "warning array subscript has type 'char'"Denys Vlasenko2021-04-143-5/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | .gitignore: support building on WindowsJohannes Schindelin2021-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These items are already listed, albeit without `.exe` suffix. Presumably, this is because BusyBox-w32 is traditionally cross-compiled on Linux. However, we are about to introduce a CI build definition that builds BusyBox-w32 in MSYS2 (using mingw-w64-gcc), meaning that those executables might very well exist _with_ `.exe` suffix. Let's ignore those, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | win32: fixes to build on Windows/MSYS2/mingw-w64Ron Yorston2021-02-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | To investigate GitHub issue #200 it was necessary to perform build on Window using the MSYS2/mingw-w64 toolchain. This threw up some issues: - The settings for _WIN32_WINNT and __USE_MINGW_ANSI_STDIO differ from those in Fedora resulting in compiler errors and warnings. Force the defaults I'm used to. - The workaround to allow native compilation of mconf.c was broken by a subsequent upstream change. Make it work again.
* | Merge branch 'busybox' into mergeRon Yorston2019-01-103-5/+10
|\|
| * build system: fix compiler warningsDenys Vlasenko2019-01-063-5/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2018-04-092-1/+7
|\|
| * scripts/kconfig/mconf.c: survive is SIGWINCH is not definedDenys Vlasenko2018-04-061-0/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * placate gcc 8.0.1 sprintf overflow warnings in config toolsDenys Vlasenko2018-04-051-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2017-09-271-2/+54
|\|
| * build system: fix a compiler warningDenys Vlasenko2017-09-071-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * build system: fix "allnoconfig" to clear all options. Closes 10296Denys Vlasenko2017-09-071-2/+52
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | kbuild: avoid warning when building with KBUILD_NO_NLSJohannes Schindelin2017-07-141-3/+3
| | | | | | | | | | | | | | The return values of bindtextdomain() and textdomain() are not actually used at all... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | kbuild: simulate force-renaming on WindowsJohannes Schindelin2017-07-141-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling rename() when a file with the target name exists already fails on Windows. Let's simply delete the target file, if it exists. This is usually a dangerous thing as it leaves time between deleting and renaming, during which (theoretically) another thread or process could have created the same file, and the rename() would fail again. Practically, we are talking about the kbuild system used to configure the build, where it does not matter, as we do not expect any other thread or process to interfere with the configuration files. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | kbuild: support at least non-interactive mode on WindowsJohannes Schindelin2017-07-143-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | without POSIX, kbuild has some trouble compiling its support executables. Luckily, the parts that really lean on POSIX functionality are pretty much all only needed when configuring the build interactively. When compiling BusyBox for Win32, we do not actually need interactive configuration at all: we simply choose the default. Therefore, a lot of the stuff that is typically built for the Kconfig system is totally unnecessary (such as: compiling documentation via fork()&exec(), changing the window size, etc). Liberally put all of the problematic code behind #ifndef __MINGW32__ guards, just to get `make mingw64_defconfig` going in Git for Windows' SDK (which is a special-purpose version of MSYS2). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* | fixdep: fix assumption that `long` is as large as `void *`Johannes Schindelin2017-07-143-31/+32
|/ | | | | | | | | | | It is not. At least not in general. And in particular not on 64-bit Windows, where sizeof(long) == 4. What the code wanted to use is actually called intptr_t. Note: `intptr_t` is a C99 feature. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* randomconfig fixesDenys Vlasenko2016-06-191-12/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* kconfig/lxdialog: get ncurses CFLAGS with pkg-configBjørn Forsman2016-04-031-1/+5
| | | | | | | | | | | | | This makes "make menuconfig" also work on systems where ncurses is not installed in a standard location (such as on NixOS). This patch changes ccflags() so that it tries pkg-config first, and only if pkg-config fails does it go back to the fallback/manual checks. This is the same algorithm that ldflags() already uses. Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* kbuild: Make scripts executableMichal Marek2016-04-031-0/+0
| | | | | | | | The Makefiles call the respective interpreter explicitly, but this makes it easier to use the scripts manually. Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* kconfig/lxdialog: rationalise the include paths where to find {.n}curses{,w}.hYann E. MORIN2016-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code does this: if [ -f /usr/include/ncursesw/curses.h ]; then echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"' elif [ -f /usr/include/ncurses/ncurses.h ]; then echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"' elif [ -f /usr/include/ncurses/curses.h ]; then echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"' [...] This is merely inconsistent: - adding the full path to the directory in the -I directive, - especially since that path is already a sub-path of the system include path, - and then repeating the sub-path in the #include directive. Rationalise each include directive: - only use the filename in the #include directive, - keep the -I directives: they are always searched for before the system include path; this ensures the correct header is used. Using the -I directives and the filename-only in #include is more in line with how pkg-config behaves, eg.: $ pkg-config --cflags ncursesw -I/usr/include/ncursesw This paves the way for using pkg-config for CFLAGS, too, now we use it to find the libraries. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* menuconfig: optionally use pkg-config to detect ncurses libsJustin Lecher2016-04-031-0/+2
| | | | | | | | | | | | | | | When building ncurses with --with-termlib several symbols get moved from libncurses.so to libtinfo.so. Thus when linking with libncurses.so, one additionally needs to link with libtinfo.so. The ncurses pkg-config module will be used to detect the necessary libs for linking. If not available the old heuristic for detection of the ncurses libs will be used. Signed-off-by: Justin Lecher <jlec@gentoo.org> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* menuconfig: fix extended colors ncurses supportKrzysztof Mazur2016-04-031-0/+1
| | | | | | | | | | | | | | | | | | The ncurses library allows for extended colors. The support for extended colors support depends on wide-character support. ncurses headers enable extended colors (NCURSES_EXT_COLORS) only when wide-character support is enabled (NCURSES_WIDECHAR). The "make menuconfig" uses wide-character ncursesw library, which can be compiled with wide-character support, but does not define NCURSES_WIDECHAR and it's using headers without wide-character (and extended colors) support. This fixes problems with colors on systems with enabled extended colors (like PLD Linux). Without this patch "make menuconfig" is hard to use. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* kbuild: Fix gcc -x syntaxJean Delvare2016-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The correct syntax for gcc -x is "gcc -x assembler", not "gcc -xassembler". Even though the latter happens to work, the former is what is documented in the manual page and thus what gcc wrappers such as icecream do expect. This isn't a cosmetic change. The missing space prevents icecream from recognizing compilation tasks it can't handle, leading to silent kernel miscompilations. Besides me, credits go to Michael Matz and Dirk Mueller for investigating the miscompilation issue and tracking it down to this incorrect -x parameter syntax. Signed-off-by: Jean Delvare <jdelvare@suse.de> Acked-by: Ingo Molnar <mingo@kernel.org> Cc: stable@vger.kernel.org Cc: Bernhard Walle <bernhard@bwalle.de> Cc: Michal Marek <mmarek@suse.cz> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* kconfig: fix check-lxdialog for DLL platformsYaakov Selkowitz2016-04-031-1/+1
| | | | | | | | | | Import libraries on Cygwin and MinGW/MSYS use the .dll.a suffix, so checking this suffix is necessary to make sure ncurses will still be found when built without static libraries. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* kconfig: check ncursesw headers first in check-lxdialogYaakov Selkowitz2016-04-031-3/+3
| | | | | | | | | | | | Commit 8c41e5e363db55d91aa3b1cdce4ab02ad9821de7 added a check for ncursesw/curses.h for the case where ncurses and ncursesw are build separately but only one is installed. But if both are installed, the headers ncurses/curses.h and ncursesw/curses.h differ, and since libncursesw will be found first, so should ncursesw/curses.h. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* kconfig: fix menuconfig on debian lennyJunio C Hamano2016-04-031-0/+2
| | | | | | | | | | | | | | | | | In 60f33b8 (kconfig: get rid of stray a.o, support ncursesw, 2006-01-15), support to link menuconfig with ncursesw library was added. To compute the linker command option -l, we check "libncursesw.{so,a,dylib}" to allow ncursesw to be used as a replacement ncurses. However, when checking what header file to include, we do not check /usr/include/ncursesw directory. Add /usr/include/ncursesw to the list of directories that are checked. With this patch, on my Debian Lenny box with libncursesw5-dev package but not libncurses5-dev package, I can say "make menuconfig". Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Revert "lxdialog: fix ncursesw include detection"Mike Frysinger2016-04-031-5/+1
| | | | | | | | | This reverts commit e91bc53d0c2e8de7dc4fbdb888ab0a4923c2b475. Let's get back to a state that matches upstream so we can pull in all of their fixes from the last few years. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fix if(p)/free(p) constructManinder Singh2015-06-072-4/+2
| | | | | | | | No need of explicit NULL check before free. Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: fix make gconfigDaniel Borca2013-12-191-1/+1
| | | | | | | Was getting "undefined reference to symbol 'dlsym@@GLIBC_2.2.5'". Signed-off-by: Daniel Borca <dborca@yahoo.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* buildsys: Add helper to list suid appletsBernhard Reutner-Fischer2013-07-261-4/+20
| | | | | | | | | | | | | Add a helper script that lists all applets that - do or may require SUID provileges (busybox.cfg.suid) - do not require SUID provileges (busybox.cfg.nosuid) Some setups prefer to build two busybox binaries, one that is suid which contains all applets that do or may require suid privileges, and a second one for all the rest (which drops suid). To ease splitting these two binaries, generate a list of CONFIG_ items for the suid binary. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* scripts/kconfig/mconf: work on systems w/o SIGWINCHDenys Vlasenko2012-09-271-5/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: fix build of kconfig on DarwinBernhard Walle2012-06-181-0/+2
| | | | | | | | | Of course busybox cannot be used on Darwin (Mac OS X), but it can be cross-compiled for Linux there. Cross-compilation still requires kconfig to be built as native host tool. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Support configuring Busybox from _defconfig filesDaniel Fandrich2011-07-081-1/+1
| | | | | | | | | The existing test .config files are moved to configs/ and renamed to *_defconfig. 'make xyz_defconfig' will enable the configuration in that specific file. Signed-off-by: Daniel Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* get rid of several "variable 'x' set but not used" warningsCristian Ionescu-Idbohrn2011-05-012-14/+5
| | | | | Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build fixes for scripts/kconfigDenys Vlasenko2011-04-182-0/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* scripts/kconfig/mconf.c: stop-gap fix for buffer overflowDenys Vlasenko2011-02-071-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* update _shipped file with hurd fixDenys Vlasenko2010-08-021-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: s/spaces/tabs/Denys Vlasenko2010-07-261-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: trailing empty lines removedDenys Vlasenko2010-07-266-7/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>