Commit Graph

65 Commits (1634461bd208f4bd108ea5c3d3f1cf9eb56d4a7e)

Author SHA1 Message Date
Sergio E. Nemirowski ab26022cc1 build: mconf readme update
This updates mconf.c readme message to maintain less changes with
upstream and consistency with nconf.c

Signed-off-by: Sergio E. Nemirowski <sergio@outerface.net>
4 years ago
Sergio E. Nemirowski 8fb0b15efd build: add nconfig
Add support for make target nconfig (ncurses)

Reviewed-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Sergio E. Nemirowski <sergio@outerface.net>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Álvaro Fernández Rojas 3f8e163e01 scripts: config: remove accidentally added file
Also ignore the file.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 35d7f92c60 scripts: support Sercomm load tags
Header consists in Sercomm PID bytes, followed by a SHA256 hash of the
input binary.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Eneas U de Queiroz 80b350f528 build: have config-clean deal with old temp files
This is a temporary commit to have 'make config-clean' remove
temporary files from the previous scripts/config version.

The .gitignore file is updated to deal with the old files as well.

Cc: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years ago
Eneas U de Queiroz 9f843b1d43 build: scripts/config - update to kconfig-v5.6
Major changes include:
 - Much more readable reverse dependencies separated in groups
 - Improved recursive dependency report
 - More readable .config files: add comments to signal end of menus
 - More warnings for incorrect Config.in entries, such as a 'choice'
   default not contained in the 'choice'
 - Hability to properly display pseudographics with non-latin locales
 - Recursive dependencies can optionally be treated as errors

Changes from failed dcf3e63a35 attempt:
 - Recursive dependencies are treated as warnings by default
 - The option to treat them as errors is implemented as a command-line
   flag to scripts/config/conf instead of a compile-time definition
 - fixed handling of select with umnet dependencies

Cc: Petr Štetiar <ynezz@true.cz>
Cc: Jo-Philip Wich <jow@mein.io>
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years ago
Jo-Philipp Wich 7b1d809a8d Revert "build: scripts/config - update to kconfig-v5.6"
This reverts commit dcf3e63a35.

The kconfig update requires further testing and refinement until it can
remain in tree. Main problems are:

 - Recursive deps are now fatal instead of a warning
 - Previously legal syntax now leads to hard failures
 - It fails all package builds since multiple days

The updated kconfig implementation needs to cope with the current status
quo in the various package feeds before we can reconsider it for master.

It is not desirable that single broken packages can hard-fail the entire
build pipeline.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years ago
Jo-Philipp Wich 6c16d64b2a Revert "build: add option to warn on recursive dependency"
This reverts commit 3204430e38.

Reverting this commit in preparation for reverting
dcf3e63a35 ("build: scripts/config - update to kconfig-v5.6") which
introduces various unaddressed build breakages.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years ago
Jo-Philipp Wich fbc01f2a4c Revert "build: config: allow bool to select a module pkg"
This reverts commit 8514b6b42c.

Reverting this commit in preparation for reverting
dcf3e63a35 ("build: scripts/config - update to kconfig-v5.6") which
introduces various unaddressed build breakages.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years ago
Eneas U de Queiroz 8514b6b42c build: config: allow bool to select a module pkg
kconfig-v5.6 disallowed a bool symbol to select another symbol that
'depends on m' (i.e. can be only 'm' on 'n').  It is, in fact, an unmet
dependency to have set to 'y'.  However, openwrt depends on the previous
behavior, to be able to build a package that can be a module or built-in
depending on a bool config.  This restores the previous behavior.

Ref: https://forum.openwrt.org/t/wireless-fails-on-snapshot-r12900-kernel-5-4-on-c2600-ipq806x
Tested-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [added forum ref]
4 years ago
Eneas U de Queiroz 3204430e38 build: add option to warn on recursive dependency
This addes the option to treat recursive dependencies as warnings
instead of errors, by running make with WARN_RECURSIVE_DEP=1.

Note that the script/config targets will not get rebuilt when you add or
remove WARN_RECURSIVE_DEP while running make.  One must run
'make config-clean' before building config with a different setting.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years ago
Eneas U de Queiroz dcf3e63a35 build: scripts/config - update to kconfig-v5.6
Major changes include:
 - Much more readable reverse dependencies separated in groups
 - Improved recursive dependency report
 - More readable .config files: add comments to signal end of menus
 - More warnings for incorrect Config.in entries, such as a 'choice'
   default not contained in the 'choice'
 - Hability to properly display pseudographics with non-latin locales
 - Recursive dependencies are now treated as errors - this should make
   it harder for them to creep in.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years ago
Eneas U de Queiroz 8636a17214 build: simplify building *config targets
Instead of passing pkg-config location through a variable when building
qconf (make xconfig), prepend its parent directory to the PATH, as it is
being done for other conf targets.

Use a Makefile pattern rule to group all 'scripts/config/%onf'
(currently conf, mconf, qconf) targets in a single rule.  Add -O2 to
CFLAGS when building them as well.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years ago
leo chung b2c55d50f8 build: fix xconfig target
`make xconfig` fails with following linking error of qconf binary:

 g++ -lQt5Widgets -lQt5Gui -lQt5Core -o qconf qconf.o zconf.tab.o
 /usr/bin/ld: qconf.o: in function ConfigList::metaObject() const': qconf.cc:(.text+0x3eb): undefined reference to QObjectData::dynamicMetaObject() const'
 /usr/bin/ld: qconf.o: in function `ConfigList::qt_metacast(char const*)': link error.

which is caused by the wrong order of the linked objects/libraries so
this patch reorders the linker's arguments which makes the qconf compile
again.

Signed-off-by: leo chung <gewalalb@gmail.com>
[commit subject and message tweaks, whitespace fix]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar 965f341aa9 build: fix host menu config targets using ncurses
On a recent Gentoo Linux installation, invoking `make menuconfig`, `make
kernel_menuconfig` or `make kernel_nconfig` in the build system fails,
whereas for example `make menuconfig` in the kernel tree alone works as
expected.

This is happening because STAGING_PREFIX is not defined when kernel's
{menu,n}config target calls pkg-config from the toolchain/host and thus
pkg-config returns an empty value, and the fallback values in the kernel
config script are applied but those are off and the linking fails.

Solution is to use system's pkg-config for all ncurses based menu config
targets in order to provide proper compiler/linker flags.

Ref: FS#2423
Cc: Thomas Albers <thomas.gameiro@gmail.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Jonas Gorski 0096a1cf00 scripts/config: fix *c_shipped build depency tracking
The Makefile was missing dependencies on *c_shipped, so changes never
triggered a rebuild. Add these as optional dependencies so their absence
isn't treated as an error.

In addition, fix a typo preventing the zconf.lex.o from being removed on
clean.

Fixes: 9d5510a500 ("build: add new menuconfig code based on linux 3.9")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Acked-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Nicolas Pitre 75dcaf3d23 config: fix relational operators for bool and tristate symbols
Since commit 31847b67bec0 ("kconfig: allow use of relations other than
(in)equality") it is possible to use relational operators in Kconfig
statements. However, those operators give unexpected results when
applied to bool/tristate values:

	(n < y) = y (correct)
	(m < y) = y (correct)
	(n < m) = n (wrong)

This happens because relational operators process bool and tristate
symbols as strings and m sorts before n. It makes little sense to do a
lexicographical compare on bool and tristate values though.

Documentation/kbuild/kconfig-language.txt states that expression can have
a value of 'n', 'm' or 'y' (or 0, 1, 2 respectively for calculations).
Let's make it so for relational comparisons with bool/tristate
expressions as well and document them. If at least one symbol is an
actual string then the lexicographical compare works just as before.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[rebased against OpenWrt kconfig, slightly reword commit message]
(backported from upstream 9059a3493efea6492451430c7e2fa0af799a2abb)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Jonas Gorski 972123f1e0 config: regenerate *_shipped sources
The pregenerated `zconf.hash.c` and `zconf.lex.c` files have not been
kept in sync with their respective `*.y` and `*.l` sources in the past
causing our kconfig implementation to not recognize important kconfig
grammer elements such as relational `<`, `<=`, `>` and `>=` operators.

Fixes: 2d7e602381 ("scripts/config: sync with latest linux upstream")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
[reword commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Paul Schulz 7bbd1855cd config: Change conf.c remove compiler warnings
Compiler is producing the warning:
   warning: format not a string literal and no format arguments
   [-Wformat-security]

This patch makes the format a literal string in printf statements.

This with: gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3) in Ubuntu 18.04

Signed-off-by: Paul Schulz <paul@mawsonlakes.org>
6 years ago
Alif M. Ahmad 02a1a8af95 build: cleanup leftover qconf files
``make xconfig`` toplevel target will invoke ``make qconf`` inside
./scripts/config directory, which results a ``qconf`` executable.

This commit removes leftover ``qconf`` executable during ``make
config-clean``.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
6 years ago
Zoltan HERPAI 34bbbbf9c3 merge: base: update base-files and basic config
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 years ago
Alif M. Ahmad b1501a684b scripts/config: add qconf files to .gitignore
This commit adds qconf related files to .gitignore.
The files to be tracked are qconf.cc, qconf.h, and images.c.
The files to be ignored are qconf*.o, qconf*, qconf.moc, and
.tmp_qtcheck.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
7 years ago
Alif M. Ahmad ff43c03c14 scripts/config: Add qconf target to Makefile
qconf is kconfig UI utilizing QT toolkit. This makes it possible to use
graphical interface interaction to configure LEDE build target.

This commit adds qconf target to ./script/config/Makefile to be used by
toplevel ``make xconfig`` later.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
7 years ago
Felix Fietkau 349bb6e663 scripts/config: add -DKBUILD_NO_NLS to CXXFLAGS
Preparation for adding C++ code which needs the same flag

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Alif M. Ahmad 96eb96c3f0 scripts/config: import qconf
Import qconf.cc, qconf.h, and images.c from linux kernel 4.9.13 archive.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
7 years ago
Felix Fietkau 9bfa6971ae scripts/config: properly handle select on symbols with unmet direct dependencies
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 2d7e602381 scripts/config: sync with latest linux upstream
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
John Crispin fa69553900 branding: add LEDE branding
Signed-off-by: John Crispin <blogic@openwrt.org>
8 years ago
Felix Fietkau b0d9e64464 scripts/config: fix handling of CONFDEFAULT on oldconfig
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47372
9 years ago
Felix Fietkau a9f6941436 scripts/config: sync with linux upstream
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43873
9 years ago
Felix Fietkau 0fa857f3ba scripts/config: fix segfault introduced in r43652
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43695
9 years ago
Jo-Philipp Wich 8557b8cd3f scripts/config: remove debug statement
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 43655
9 years ago
Jo-Philipp Wich 2f39014a48 scripts/config: support includes relative to the currently processed file
When the initial glob() attempt on a path specified with "source" statement
yields no result, then retry the globbing on the same path with the directory
part of the currently processed file prepended.

This allows us to reference Config.in files relative to their parent instead
of relative to the top dir.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 43652
9 years ago
Felix Fietkau 81013f6bbe scripts/config: make wildcard include with no results non-fatal
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39862
10 years ago
Felix Fietkau f935d800bf scripts/config: fix an option processing error that caused duplication in diffconfig.sh output (#13384)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 36522
11 years ago
Felix Fietkau 45339e03de scripts/config: warn on deprected "depends" syntax instead of throwing a syntax error
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 36375
11 years ago
Felix Fietkau 9d5510a500 build: add new menuconfig code based on linux 3.9
SVN-Revision: 36361
11 years ago
Jo-Philipp Wich 5b38fdd704 scripts/config: fix menuconfig segfault in text inputs when format patterns are entered by the user
SVN-Revision: 33773
12 years ago
Michael Büsch 50a7ff97ef mconf: Fix compile warning: "warning: conflicting types for ‘sym_set_all_changed’"
SVN-Revision: 29190
13 years ago
Felix Fietkau 5e48d47dfe scripts/config: merge fixes for various issues, including recursive dependency detection/handling (patch by mbm)
SVN-Revision: 28658
13 years ago
Jo-Philipp Wich 11dcad2834 scripts/config/.gitignore omits source files scripts/config/.gitignore aims to avoid checking binaries in to git. Unfortunately it also omits conf.c, confdata.c, and all source files in lxdialog. An OpenWRT tree pulled from a git repository will not build, and I suspect this was not the intention.
Signed-off-by: Denton Gentry <denny@geekhold.com>

SVN-Revision: 27244
13 years ago
Felix Fietkau b0f60f8023 scripts/config: add an option for making the conf tool write to a different file
SVN-Revision: 25230
13 years ago
Florian Fainelli aca9c9c81d adjust svn:ignore for cygwin builds
SVN-Revision: 19040
14 years ago
Felix Fietkau 30992cceeb menuconfig: allow wildcard includes to return no match (#6339)
SVN-Revision: 18743
15 years ago
Imre Kaloz 49e657f433 fix breakage introduced with [17394]
SVN-Revision: 17395
15 years ago
Florian Fainelli 32ab3b9692 do not check for a specific Cygwin version, rather check the operating system name directly, thanks AndyI
SVN-Revision: 17394
15 years ago
Florian Fainelli 9c470b63b3 cygwin also needs to be passed LIBS=-lncurses to link lxdialog successfully
SVN-Revision: 15183
15 years ago
Felix Fietkau fa6b452873 menuconfig: don't generate inconsistencies when ~/.openwrt/defconfig specifies a default target
SVN-Revision: 13008
16 years ago
Felix Fietkau 6700c1d745 ignore mconf_check
SVN-Revision: 9379
17 years ago
John Crispin 1a3c4d1090 add possibility to set default .config values
SVN-Revision: 9300
17 years ago