Commit 1d35aae7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull Kbuild updates from Masahiro Yamada:

 - Generate a list of built DTB files (arch/*/boot/dts/dtbs-list)

 - Use more threads when building Debian packages in parallel

 - Fix warnings shown during the RPM kernel package uninstallation

 - Change OBJECT_FILES_NON_STANDARD_*.o etc. to take a relative path to
   Makefile

 - Support GCC's -fmin-function-alignment flag

 - Fix a null pointer dereference bug in modpost

 - Add the DTB support to the RPM package

 - Various fixes and cleanups in Kconfig

* tag 'kbuild-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (67 commits)
  kconfig: tests: test dependency after shuffling choices
  kconfig: tests: add a test for randconfig with dependent choices
  kconfig: tests: support KCONFIG_SEED for the randconfig runner
  kbuild: rpm-pkg: add dtb files in kernel rpm
  kconfig: remove unneeded menu_is_visible() call in conf_write_defconfig()
  kconfig: check prompt for choice while parsing
  kconfig: lxdialog: remove unused dialog colors
  kconfig: lxdialog: fix button color for blackbg theme
  modpost: fix null pointer dereference
  kbuild: remove GCC's default -Wpacked-bitfield-compat flag
  kbuild: unexport abs_srctree and abs_objtree
  kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1
  kconfig: remove named choice support
  kconfig: use linked list in get_symbol_str() to iterate over menus
  kconfig: link menus to a symbol
  kbuild: fix inconsistent indentation in top Makefile
  kbuild: Use -fmin-function-alignment when available
  alpha: merge two entries for CONFIG_ALPHA_GAMMA
  alpha: merge two entries for CONFIG_ALPHA_EV4
  kbuild: change DTC_FLAGS_<basetarget>.o to take the path relative to $(obj)
  ...
parents 88d92fb1 f2fd2aad
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@
*.xz
*.zst
Module.symvers
dtbs-list
modules.order

#
+1 −5
Original line number Diff line number Diff line
@@ -393,7 +393,7 @@ of C0, which doesn't depend on M::

choices::

	"choice" [symbol]
	"choice"
	<choice options>
	<choice block>
	"endchoice"
@@ -412,10 +412,6 @@ the kernel, but all drivers can be compiled as modules.

A choice accepts another option "optional", which allows to set the
choice to 'n' and no entry needs to be selected.
If no [symbol] is associated with a choice, then you can not have multiple
definitions of that choice. If a [symbol] is associated to the choice,
then you may define the same choice (i.e. with the same entries) in another
place.

comment::

+166 −197
Original line number Diff line number Diff line
===================
Kconfig make config
===================
=================================
Configuration targets and editors
=================================

This file contains some assistance for using `make *config`.
This file contains some assistance for using ``make *config``.

Use "make help" to list all of the possible configuration targets.
Use ``make help`` to list all of the possible configuration targets.

The xconfig ('qconf'), menuconfig ('mconf'), and nconfig ('nconf')
programs also have embedded help text.  Be sure to check that for
@@ -12,8 +12,9 @@ navigation, search, and other general help text.

The gconfig ('gconf') program has limited help text.


General
-------
=======

New kernel releases often introduce new config symbols.  Often more
important, new kernel releases may rename config symbols.  When
@@ -34,60 +35,48 @@ Alternatively, you can use the brute force method::
    make oldconfig
    scripts/diffconfig .config.old .config | less

----------------------------------------------------------------------

Environment variables for `*config`
Environment variables
=====================

Environment variables for ``*config``:

KCONFIG_CONFIG
--------------
``KCONFIG_CONFIG``
    This environment variable can be used to specify a default kernel config
    file name to override the default name of ".config".

KCONFIG_DEFCONFIG_LIST
----------------------
``KCONFIG_DEFCONFIG_LIST``
    This environment variable specifies a list of config files which can be
    used as a base configuration in case the .config does not exist yet.
    Entries in the list are separated with whitespaces to each other, and
    the first one that exists is used.

This environment variable specifies a list of config files which can be used
as a base configuration in case the .config does not exist yet. Entries in
the list are separated with whitespaces to each other, and the first one
that exists is used.

KCONFIG_OVERWRITECONFIG
-----------------------
``KCONFIG_OVERWRITECONFIG``
    If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
    break symlinks when .config is a symlink to somewhere else.

KCONFIG_WARN_UNKNOWN_SYMBOLS
----------------------------
``KCONFIG_WARN_UNKNOWN_SYMBOLS``
    This environment variable makes Kconfig warn about all unrecognized
    symbols in the config input.

KCONFIG_WERROR
--------------
``KCONFIG_WERROR``
    If set, Kconfig treats warnings as errors.

`CONFIG_`
---------
If you set `CONFIG_` in the environment, Kconfig will prefix all symbols
with its value when saving the configuration, instead of using the default,
`CONFIG_`.

----------------------------------------------------------------------
``CONFIG_``
    If you set ``CONFIG_`` in the environment, Kconfig will prefix all symbols
    with its value when saving the configuration, instead of using the
    default, ``CONFIG_``.

Environment variables for '{allyes/allmod/allno/rand}config'

KCONFIG_ALLCONFIG
-----------------
(partially based on lkml email from/by Rob Landley, re: miniconfig)

--------------------------------------------------
Environment variables for ``{allyes/allmod/allno/rand}config``:

``KCONFIG_ALLCONFIG``
    The allyesconfig/allmodconfig/allnoconfig/randconfig variants can also
    use the environment variable KCONFIG_ALLCONFIG as a flag or a filename
    that contains config symbols that the user requires to be set to a
    specific value.  If KCONFIG_ALLCONFIG is used without a filename where
KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", `make *config`
    KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", ``make *config``
    checks for a file named "all{yes/mod/no/def/random}.config"
(corresponding to the `*config` command that was used) for symbol values
    (corresponding to the ``*config`` command that was used) for symbol values
    that are to be forced.  If this file is not found, it checks for a
    file named "all.config" to contain forced values.

@@ -96,7 +85,7 @@ config files containing just the config symbols that you are interested
    in.  Then the kernel config system generates the full .config file,
    including symbols of your miniconfig file.

This 'KCONFIG_ALLCONFIG' file is a config file which contains
    This ``KCONFIG_ALLCONFIG`` file is a config file which contains
    (usually a subset of all) preset config symbols.  These variable
    settings are still subject to normal dependency checks.

@@ -116,18 +105,14 @@ These examples will disable most options (allnoconfig) but enable or
    disable the options that are explicitly listed in the specified
    mini-config files.

----------------------------------------------------------------------

Environment variables for 'randconfig'
Environment variables for ``randconfig``:

KCONFIG_SEED
------------
``KCONFIG_SEED``
    You can set this to the integer value used to seed the RNG, if you want
    to somehow debug the behaviour of the kconfig parser/frontends.
    If not set, the current time will be used.

KCONFIG_PROBABILITY
-------------------
``KCONFIG_PROBABILITY``
    This variable can be used to skew the probabilities. This variable can
    be unset or empty, or set to three different formats:

@@ -159,33 +144,24 @@ Examples::
        10% of booleans will be set to 'y', 90% to 'n'
        15% of tristates will be set to 'y', 15% to 'm', 70% to 'n'

----------------------------------------------------------------------
Environment variables for ``syncconfig``:

Environment variables for 'syncconfig'

KCONFIG_NOSILENTUPDATE
----------------------
``KCONFIG_NOSILENTUPDATE``
    If this variable has a non-blank value, it prevents silent kernel
    config updates (requires explicit updates).

KCONFIG_AUTOCONFIG
------------------
``KCONFIG_AUTOCONFIG``
    This environment variable can be set to specify the path & name of the
    "auto.conf" file.  Its default value is "include/config/auto.conf".

KCONFIG_AUTOHEADER
------------------
``KCONFIG_AUTOHEADER``
    This environment variable can be set to specify the path & name of the
    "autoconf.h" (header) file.
    Its default value is "include/generated/autoconf.h".


----------------------------------------------------------------------

menuconfig
----------

SEARCHING for CONFIG symbols
==========

Searching in menuconfig:

@@ -212,7 +188,7 @@ Searching in menuconfig:
      is when the search matches the complete symbol name);
    - then, other matches, sorted alphabetically.

	For example: ^ATH.K matches:
    For example, ^ATH.K matches:

        ATH5K ATH9K ATH5K_AHB ATH5K_DEBUG [...] ATH6KL ATH6KL_DEBUG
        [...] ATH9K_AHB ATH9K_BTCOEX_SUPPORT ATH9K_COMMON [...]
@@ -225,12 +201,9 @@ Searching in menuconfig:
    directly to that location. You will be returned to the current
    search results after exiting this new menu.

----------------------------------------------------------------------
User interface options for 'menuconfig':

User interface options for 'menuconfig'

MENUCONFIG_COLOR
----------------
``MENUCONFIG_COLOR``
    It is possible to select different color themes using the variable
    MENUCONFIG_COLOR.  To select a theme use::

@@ -243,18 +216,16 @@ Available themes are::
      - classic    => theme with blue background. The classic look
      - bluetitle  => a LCD friendly version of classic. (default)

MENUCONFIG_MODE
---------------
``MENUCONFIG_MODE``
    This mode shows all sub-menus in one large tree.

    Example::

        make MENUCONFIG_MODE=single_menu menuconfig

----------------------------------------------------------------------

nconfig
-------
=======

nconfig is an alternate text-based configurator.  It lists function
keys across the bottom of the terminal (window) that execute commands.
@@ -281,18 +252,18 @@ Searching in nconfig:
    jump directly to that location. You will be returned to the
    current search results after exiting this new menu.

NCONFIG_MODE
------------
Environment variables:

``NCONFIG_MODE``
    This mode shows all sub-menus in one large tree.

    Example::

        make NCONFIG_MODE=single_menu nconfig

----------------------------------------------------------------------

xconfig
-------
=======

Searching in xconfig:

@@ -315,10 +286,8 @@ Searching in xconfig:
    to return to the main menu.


----------------------------------------------------------------------

gconfig
-------
=======

Searching in gconfig:

+28 −21
Original line number Diff line number Diff line
@@ -39,8 +39,8 @@ __all:
# prepare rule.

this-makefile := $(lastword $(MAKEFILE_LIST))
export abs_srctree := $(realpath $(dir $(this-makefile)))
export abs_objtree := $(CURDIR)
abs_srctree := $(realpath $(dir $(this-makefile)))
abs_objtree := $(CURDIR)

ifneq ($(sub_make_done),1)

@@ -965,8 +965,15 @@ export CC_FLAGS_CFI
endif

ifneq ($(CONFIG_FUNCTION_ALIGNMENT),0)
# Set the minimal function alignment. Use the newer GCC option
# -fmin-function-alignment if it is available, or fall back to -falign-funtions.
# See also CONFIG_CC_HAS_SANE_FUNCTION_ALIGNMENT.
ifdef CONFIG_CC_HAS_MIN_FUNCTION_ALIGNMENT
KBUILD_CFLAGS += -fmin-function-alignment=$(CONFIG_FUNCTION_ALIGNMENT)
else
KBUILD_CFLAGS += -falign-functions=$(CONFIG_FUNCTION_ALIGNMENT)
endif
endif

# arch Makefile may override CC so keep this after arch Makefile is included
NOSTDINC_FLAGS += -nostdinc
@@ -1384,7 +1391,7 @@ ifneq ($(dtstree),)

PHONY += dtbs dtbs_prepare dtbs_install dtbs_check
dtbs: dtbs_prepare
	$(Q)$(MAKE) $(build)=$(dtstree)
	$(Q)$(MAKE) $(build)=$(dtstree) need-dtbslist=1

# include/config/kernel.release is actually needed when installing DTBs because
# INSTALL_DTBS_PATH contains $(KERNELRELEASE). However, we do not want to make
@@ -1402,7 +1409,7 @@ endif
dtbs_check: dtbs

dtbs_install:
	$(Q)$(MAKE) $(dtbinst)=$(dtstree) dst=$(INSTALL_DTBS_PATH)
	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.dtbinst obj=$(dtstree)

ifdef CONFIG_OF_EARLY_FLATTREE
all: dtbs
@@ -1923,7 +1930,7 @@ clean: $(clean-dirs)
		-o -name '*.ko.*' \
		-o -name '*.dtb' -o -name '*.dtbo' \
		-o -name '*.dtb.S' -o -name '*.dtbo.S' \
		-o -name '*.dt.yaml' \
		-o -name '*.dt.yaml' -o -name 'dtbs-list' \
		-o -name '*.dwo' -o -name '*.lst' \
		-o -name '*.su' -o -name '*.mod' \
		-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
+12 −0
Original line number Diff line number Diff line
@@ -1597,4 +1597,16 @@ config FUNCTION_ALIGNMENT
	default 4 if FUNCTION_ALIGNMENT_4B
	default 0

config CC_HAS_MIN_FUNCTION_ALIGNMENT
	# Detect availability of the GCC option -fmin-function-alignment which
	# guarantees minimal alignment for all functions, unlike
	# -falign-functions which the compiler ignores for cold functions.
	def_bool $(cc-option, -fmin-function-alignment=8)

config CC_HAS_SANE_FUNCTION_ALIGNMENT
	# Set if the guaranteed alignment with -fmin-function-alignment is
	# available or extra care is required in the kernel. Clang provides
	# strict alignment always, even with -falign-functions.
	def_bool CC_HAS_MIN_FUNCTION_ALIGNMENT || CC_IS_CLANG

endmenu
Loading