- 03 3月, 2020 1 次提交
-
-
由 Masahiro Yamada 提交于
Most of the Kconfig commands (except defconfig and all*config) read the .config file as a base set of CONFIG options. When it does not exist, the files in DEFCONFIG_LIST are searched in this order and loaded if found. I do not see much sense in the last two lines in DEFCONFIG_LIST. [1] ARCH_DEFCONFIG The entry for DEFCONFIG_LIST is guarded by 'depends on !UML'. So, the ARCH_DEFCONFIG definition in arch/x86/um/Kconfig is meaningless. arch/{sh,sparc,x86}/Kconfig define ARCH_DEFCONFIG depending on 32 or 64 bit variant symbols. This is a little bit strange; ARCH_DEFCONFIG should be a fixed string because the base config file is loaded before the symbol evaluation stage. Using KBUILD_DEFCONFIG makes more sense because it is fixed before Kconfig is invoked. Fortunately, arch/{sh,sparc,x86}/Makefile define it in the same way, and it works as expected. Hence, replace ARCH_DEFCONFIG with "arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)". [2] arch/$(ARCH)/defconfig This file path is no longer valid. The defconfig files are always located in the arch configs/ directories. $ find arch -name defconfig | sort arch/alpha/configs/defconfig arch/arm64/configs/defconfig arch/csky/configs/defconfig arch/nds32/configs/defconfig arch/riscv/configs/defconfig arch/s390/configs/defconfig arch/unicore32/configs/defconfig The path arch/*/configs/defconfig is already covered by "arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)". So, this file path is not necessary. I moved the default KBUILD_DEFCONFIG to the top Makefile. Otherwise, the 7 architectures listed above would end up with endless loop of syncconfig. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 04 2月, 2020 1 次提交
-
-
由 Masahiro Yamada 提交于
In old days, the "host-progs" syntax was used for specifying host programs. It was renamed to the current "hostprogs-y" in 2004. It is typically useful in scripts/Makefile because it allows Kbuild to selectively compile host programs based on the kernel configuration. This commit renames like follows: always -> always-y hostprogs-y -> hostprogs So, scripts/Makefile will look like this: always-$(CONFIG_BUILD_BIN2C) += ... always-$(CONFIG_KALLSYMS) += ... ... hostprogs := $(always-y) $(always-m) I think this makes more sense because a host program is always a host program, irrespective of the kernel configuration. We want to specify which ones to compile by CONFIG options, so always-y will be handier. The "always", "hostprogs-y", "hostprogs-m" will be kept for backward compatibility for a while. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 07 1月, 2020 3 次提交
-
-
由 Tetsuo Handa 提交于
Since kernel configs provided by syzbot are close to "make allyesconfig", it takes long time to rebuild. This is especially waste of time when we need to rebuild for many times (e.g. doing manual printk() inspection, bisect operations). We can save time if we can exclude modules which are irrelevant to each problem. But "make localmodconfig" cannot exclude modules which are built into vmlinux because /sbin/lsmod output is used as the source of modules. Therefore, this patch adds "make yes2modconfig" which converts from =y to =m if possible. After confirming that the interested problem is still reproducible, we can try "make localmodconfig" (and/or manually tune based on "Modules linked in:" line) in order to exclude modules which are irrelevant to the interested problem. While we are at it, this patch also adds "make mod2yesconfig" which converts from =m to =y in case someone wants to convert from =m to =y after "make localmodconfig". Signed-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
The top Makefile defines and exports the variable 'PERL'. Use it in case somebody wants to specify a particular version of perl from the command line. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
由 Masahiro Yamada 提交于
The indentation for if ... else ... fi is too deep. Fix it. Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-
- 11 11月, 2019 3 次提交
-
-
由 Laura Abbott 提交于
make listnewconfig will list the individual options that need to be set. This is useful but there's no easy way to get the help text associated with the options at the same time. Introduce a new targe 'make helpnewconfig' which lists the full help text of all the new options as well. This makes it easier to automatically generate changes that are easy for humans to review. This command also adds markers between each option for easier parsing. Signed-off-by: NLaura Abbott <labbott@redhat.com> Acked-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Geert Uytterhoeven 提交于
Some "make help" text lines extend beyond 80 characters. Wrap them before an opening parenthesis, or before 80 characters. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
util.c exists both in scripts/kconfig/ and scripts/kconfig/lxdialog. Prior to commit 54b8ae66 ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)"), Kbuild could not pass different flags to source files with the same basename. Now that this issue was solved, you can split util.c out of parser.y and compile them independently of each other. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 04 9月, 2019 1 次提交
-
-
由 Masahiro Yamada 提交于
Kbuild provides per-file compiler flag addition/removal: CFLAGS_<basetarget>.o CFLAGS_REMOVE_<basetarget>.o AFLAGS_<basetarget>.o AFLAGS_REMOVE_<basetarget>.o CPPFLAGS_<basetarget>.lds HOSTCFLAGS_<basetarget>.o HOSTCXXFLAGS_<basetarget>.o The <basetarget> is the filename of the target with its directory and suffix stripped. This syntax comes into a trouble when two files with the same basename appear in one Makefile, for example: obj-y += foo.o obj-y += dir/foo.o CFLAGS_foo.o := <some-flags> Here, the <some-flags> applies to both foo.o and dir/foo.o The real world problem is: scripts/kconfig/util.c scripts/kconfig/lxdialog/util.c Both files are compiled into scripts/kconfig/mconf, but only the latter should be given with the ncurses flags. It is more sensible to use the relative path to the Makefile, like this: obj-y += foo.o CFLAGS_foo.o := <some-flags> obj-y += dir/foo.o CFLAGS_dir/foo.o := <other-flags> At first, I attempted to replace $(basetarget) with $*. The $* variable is replaced with the stem ('%') part in a pattern rule. This works with most of cases, but does not for explicit rules. For example, arch/ia64/lib/Makefile reuses rule_as_o_S in its own explicit rules, so $* will be empty, resulting in ignoring the per-file AFLAGS. I introduced a new variable, target-stem, which can be used also from explicit rules. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NMarc Zyngier <maz@kernel.org>
-
- 29 8月, 2019 1 次提交
-
-
由 Masahiro Yamada 提交于
The only the difference between clean-files and clean-dirs is the -r option passed to the 'rm' command. You can always pass -r, and then remove the clean-dirs syntax. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 17 7月, 2019 1 次提交
-
-
由 Masahiro Yamada 提交于
'make olddefconfig' is non-interactive, so we can drop 'yes'. The behavior is equivalent. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 09 6月, 2019 2 次提交
-
-
由 Masahiro Yamada 提交于
Until recently, if KBUILD_DEFCONFIG was not set by the arch Makefile, the default path arch/*/defconfig was used. The last users of the default are gone by the following commits: - Commit f3e20ad6 ("s390: move arch/s390/defconfig to arch/s390/configs/defconfig") - Commit 986a1376 ("alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfig") Let's set arch/*/configs/defconfig as a new default. This saves KBUILD_DEFCONFIG for some architectures. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
-
由 Masahiro Yamada 提交于
With the following two commits applied, all the arch Makefiles define KBUILD_DEFCONFIG. - Commit f3e20ad6 ("s390: move arch/s390/defconfig to arch/s390/configs/defconfig") - Commit 986a1376 ("alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfig") The first conditional in the defconfig rule is always false. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 19 5月, 2019 1 次提交
-
-
由 Masahiro Yamada 提交于
'ifeq ... else ifneq ... endif' notation is supported by GNU Make 3.81 or later, which is the requirement for building the kernel since commit 37d69ee3 ("docs: bump minimal GNU Make version to 3.81"). Use it to improve the readability. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 18 5月, 2019 1 次提交
-
-
由 Masahiro Yamada 提交于
Currently, the Kbuild core manipulates header search paths in a crazy way [1]. To fix this mess, I want all Makefiles to add explicit $(srctree)/ to the search paths in the srctree. Some Makefiles are already written in that way, but not all. The goal of this work is to make the notation consistent, and finally get rid of the gross hacks. Having whitespaces after -I does not matter since commit 48f6e3cf ("kbuild: do not drop -I without parameter"). [1]: https://patchwork.kernel.org/patch/9632347/Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 13 2月, 2019 2 次提交
-
-
由 Masahiro Yamada 提交于
Use a more logical name. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
Use a more logical name. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 14 1月, 2019 1 次提交
-
-
由 Masahiro Yamada 提交于
I accidentally dropped '*' in the previous renaming patch. Revive it so that 'make mrproper' can clean the generated files. Fixes: d86271af ("kconfig: rename generated .*conf-cfg to *conf-cfg") Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 06 1月, 2019 2 次提交
-
-
由 Masahiro Yamada 提交于
Remove the dot-prefixing since it is just a matter of the .gitignore file. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
You do not have to use define ... endef for filechk_* rules. For simple cases, the use of assignment looks cleaner, IMHO. I updated the usage for scripts/Kbuild.include in case somebody misunderstands the 'define ... endif' is the requirement. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
-
- 28 12月, 2018 3 次提交
-
-
由 Masahiro Yamada 提交于
Currently, images.c is included by qconf.cc and gconf.c. qconf.cc uses all of xpm_* arrays, but gconf.c only some of them. Hence, lots of "... defined but not used" warnings are displayed while compiling gconf.c Splitting out images.c fixes the warnings. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
Compile zconf.lex.c independently of the other files. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
I want to compile each C file independently instead of including all of them from zconf.y. Split out confdata.c, expr.c, symbol.c, and preprocess.c . These are low-hanging fruits. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 01 11月, 2018 2 次提交
-
-
由 Masahiro Yamada 提交于
As commit 911a91c3 ("kconfig: rename silentoldconfig to syncconfig") announced, it is time for the removal. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
-
由 Masahiro Yamada 提交于
As commit 312ee687 ("kconfig: announce removal of oldnoconfig if used") announced, it is time for the removal. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 03 9月, 2018 1 次提交
-
-
由 Masahiro Yamada 提交于
Meelis Roos reported a {menu,n}config regression: "I have libncurses devel package installed in the default system location (as do 99%+ on actual developers probably) and in this case, pkg-config is useless. pkg-config is needed only when libraries and headers are installed in non-default locations but it is bad to require installation of pkg-config on all the machines where make menuconfig would be possibly run." For {menu,n}config, do not use pkg-config if it is not installed. For {g,x}config, keep checking pkg-config since we really rely on it for finding the installation paths of the required packages. Fixes: 4ab3b801 ("kconfig: check for pkg-config on make {menu,n,g,x}config") Reported-by: NMeelis Roos <mroos@linux.ee> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Tested-by: NMeelis Roos <mroos@linux.ee> Tested-by: NRandy Dunlap <rdunlap@infradead.org>
-
- 22 8月, 2018 2 次提交
-
-
由 Masahiro Yamada 提交于
If you run "make menuconfig" or "make nconfig" with -j<N> option in a fresh source tree, you will see several "Can't open ..." messages: $ make -j8 menuconfig HOSTCC scripts/basic/fixdep YACC scripts/kconfig/zconf.tab.c LEX scripts/kconfig/zconf.lex.c /bin/sh: 1: .: Can't open scripts/kconfig/.mconf-cfg /bin/sh: 1: .: Can't open scripts/kconfig/.mconf-cfg /bin/sh: 1: .: Can't open scripts/kconfig/.mconf-cfg /bin/sh: 1: .: HOSTCC scripts/kconfig/lxdialog/checklist.o Can't open scripts/kconfig/.mconf-cfg /bin/sh: 1: .: Can't open scripts/kconfig/.mconf-cfg /bin/sh: 1: .: Can't open scripts/kconfig/.mconf-cfg /bin/sh: 1: .: Can't open scripts/kconfig/.mconf-cfg HOSTCC scripts/kconfig/lxdialog/inputbox.o /bin/sh: 1: .: Can't open scripts/kconfig/.mconf-cfg /bin/sh: 1: .: Can't open scripts/kconfig/.mconf-cfg /bin/sh: 1: .: Can't open scripts/kconfig/.mconf-cfg UPD scripts/kconfig/.mconf-cfg /bin/sh: 1: .: Can't open scripts/kconfig/.mconf-cfg HOSTCC scripts/kconfig/lxdialog/menubox.o HOSTCC scripts/kconfig/lxdialog/textbox.o HOSTCC scripts/kconfig/lxdialog/util.o HOSTCC scripts/kconfig/lxdialog/yesno.o HOSTCC scripts/kconfig/mconf.o HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/mconf Correct dependencies to fix this problem. Fixes: 1c5af5cf ("kconfig: refactor ncurses package checks for building mconf and nconf") Cc: linux-stable <stable@vger.kernel.org> # v4.18 Reported-by: NBorislav Petkov <bp@suse.de> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Tested-by: NBorislav Petkov <bp@suse.de>
-
由 Randy Dunlap 提交于
Add build-only targets for build_menuconfig, build_nconfig, build_xconfig, and build_gconfig. (targets must end in "config" to qualify in top-level Makefile) This allows these target to be built without execution (e.g., to look for errors or warnings) and/or to be built and checked by sparse. Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 25 7月, 2018 2 次提交
-
-
由 Masahiro Yamada 提交于
'make syncconfig' creates some files such as include/config/auto.conf, include/generate/autoconf.h, etc. but the necessary directory creation relies on scripts/kconfig/Makefile. To make Kconfig self-contained, create directories as needed in conf_write_autoconf(). This change allows scripts/kconfig/Makefile cleanups; syncconfig can be merged into simple-targets. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
Commit 17263baf ("kconfig: Create include/generated for localmodconfig") added the 'mkdir' line because local{yes,mod}config ran streamline_config.pl followed by silentoldconfig at that time. Since commit 81d2bc22 ("kconfig: invoke oldconfig instead of silentoldconfig from local*config"), no sub-directory is required. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 18 7月, 2018 2 次提交
-
-
由 Randy Dunlap 提交于
Each of 'make {menu,n,g,x}config' uses (needs) pkg-config to make sure that other required files are present and to determine build flags settings, but none of these check that pkg-config itself is present. Add a check for all 4 of these targets and update Documentation/process/changes.rst to mention 'pkg-config'. Fixes kernel bugzilla #77511: https://bugzilla.kernel.org/show_bug.cgi?id=77511Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Cc: Bjørn Forsman <bjorn.forsman@gmail.com> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Laura Abbott 提交于
In preparation for enabling command line LDLIBS, re-name HOST_LOADLIBES to KBUILD_HOSTLDLIBS as the internal use only flags. Also rename existing usage to HOSTLDLIBS for consistency. This should not have any visible effects. Signed-off-by: NLaura Abbott <labbott@redhat.com> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 05 6月, 2018 2 次提交
-
-
由 Petr Vorel 提交于
Signed-off-by: NPetr Vorel <pvorel@suse.cz> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Petr Vorel 提交于
Signed-off-by: NPetr Vorel <pvorel@suse.cz> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 28 5月, 2018 4 次提交
-
-
由 Sam Ravnborg 提交于
The localization support is broken and appears unused. There is no google hits on the update-po-config target. And there is no recent (5 years) activity related to the localization. So lets just drop this as it is no longer used. Suggested-by: NUlf Magnusson <ulfalizer@gmail.com> Suggested-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NSam Ravnborg <sam@ravnborg.org> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
The mconf (or its infrastructure, lxdiaglog) depends on the ncurses. Move and rename check-lxdialog.sh to mconf-cfg.sh to make it work in the same way as for qconf and gconf. This commit fixes some more weirdnesses. The nconf also needs ncurses packages. HOSTLOADLIBES_nconf is set to the libraries needed for nconf, but the cflags is not explicitly set. Actually, nconf relies on the check-lxdialog.sh for the proper cflags: HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \ -DLOCALE The code above passes the ncurses flags to all objects, even for conf, qconf, gconf. Let's pass the ncurses flags only to mconf and nconf. Currently, the presence of ncurses is not checked for nconf. Let's show a prompt like the mconf case. According to Randy's report, the shell scripts still need to carry the fallback code in case the pkg-config fails to find the ncurses packages. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Tested-by: NRandy Dunlap <rdunlap@infradead.org> Acked-by: NRandy Dunlap <rdunlap@infradead.org> Reviewed-by: NSam Ravnborg <sam@ravnborg.org>
-
由 Masahiro Yamada 提交于
Refactor the package checks for gconf in the same way as for qconf. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Tested-by: NRandy Dunlap <rdunlap@infradead.org> Acked-by: NRandy Dunlap <rdunlap@infradead.org> Reviewed-by: NSam Ravnborg <sam@ravnborg.org>
-
由 Masahiro Yamada 提交于
Currently, the necessary package checks for building qconf is surrounded by ifeq ($(MAKECMDGOALS),xconfig) ... endif. Then, Make will restart when .tmp_qtcheck is generated. To simplify the Makefile, move the scripting to a separate file, and use filechk. The shell script is executed everytime xconfig is run, but it is not a costly script. In the old code, 'pkg-config --exists' only checked Qt5Core / QtCore, but the set of necessary packages should be checked. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Tested-by: NRandy Dunlap <rdunlap@infradead.org> Acked-by: NRandy Dunlap <rdunlap@infradead.org> Reviewed-by: NSam Ravnborg <sam@ravnborg.org>
-
- 07 4月, 2018 2 次提交
-
-
由 Masahiro Yamada 提交于
Files generated by if_changed* must be added to 'targets' to include *.cmd files. Otherwise, they would be regenerated every time. The build system automatically adds objects to 'targets' where appropriate, such as obj-y, extra-y, etc. but does nothing for intermediate files. So, each Makefile needs to add them by itself. There are some common cases where objects are generated by chained rules. Lexers and parsers are compiled like follows: %.lex.o <- %.lex.c <- %.l %.tab.o <- %.tab.c <- %.y They are common patterns, so it is reasonable to take care of them in the core Makefile instead of requiring each Makefile to do so. At this moment, you cannot delete 'target += zconf.lex.c' in the Kconfig Makefile because zconf.lex.c is included from zconf.tab.c instead of being compiled separately. It should be deleted after Kconfig is more refactored. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NFrank Rowand <frowand.list@gmail.com>
-
由 Masahiro Yamada 提交于
Files suffixed by .lex.c, .tab.[ch] are generated lexers, parsers, respectively. Clean them up globally from the top Makefile. Some of the final host programs those lexer/parser are linked into are necessary for building external modules, but the intermediates are unneeded. They can be cleaned away by 'make clean' instead of 'make mrproper'. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NFrank Rowand <frowand.list@gmail.com>
-