2019-06-12 17:52:48 +00:00
|
|
|
======
|
|
|
|
Kbuild
|
|
|
|
======
|
|
|
|
|
|
|
|
|
2009-12-07 15:38:33 +00:00
|
|
|
Output files
|
2019-06-12 17:52:48 +00:00
|
|
|
============
|
2009-12-07 15:38:33 +00:00
|
|
|
|
|
|
|
modules.order
|
2019-06-12 17:52:48 +00:00
|
|
|
-------------
|
2009-12-07 15:38:33 +00:00
|
|
|
This file records the order in which modules appear in Makefiles. This
|
|
|
|
is used by modprobe to deterministically resolve aliases that match
|
|
|
|
multiple modules.
|
|
|
|
|
|
|
|
modules.builtin
|
2019-06-12 17:52:48 +00:00
|
|
|
---------------
|
2009-12-07 15:38:33 +00:00
|
|
|
This file lists all modules that are built into the kernel. This is used
|
|
|
|
by modprobe to not fail when trying to load something builtin.
|
|
|
|
|
2019-04-29 16:11:14 +00:00
|
|
|
modules.builtin.modinfo
|
2019-07-09 16:25:51 +00:00
|
|
|
-----------------------
|
2019-04-29 16:11:14 +00:00
|
|
|
This file contains modinfo from all modules that are built into the kernel.
|
|
|
|
Unlike modinfo of a separate module, all fields are prefixed with module name.
|
|
|
|
|
kbuild: generate offset range data for builtin modules
Create file module.builtin.ranges that can be used to find where
built-in modules are located by their addresses. This will be useful for
tracing tools to find what functions are for various built-in modules.
The offset range data for builtin modules is generated using:
- modules.builtin: associates object files with module names
- vmlinux.map: provides load order of sections and offset of first member
per section
- vmlinux.o.map: provides offset of object file content per section
- .*.cmd: build cmd file with KBUILD_MODFILE
The generated data will look like:
.text 00000000-00000000 = _text
.text 0000baf0-0000cb10 amd_uncore
.text 0009bd10-0009c8e0 iosf_mbi
...
.text 00b9f080-00ba011a intel_skl_int3472_discrete
.text 00ba0120-00ba03c0 intel_skl_int3472_discrete intel_skl_int3472_tps68470
.text 00ba03c0-00ba08d6 intel_skl_int3472_tps68470
...
.data 00000000-00000000 = _sdata
.data 0000f020-0000f680 amd_uncore
For each ELF section, it lists the offset of the first symbol. This can
be used to determine the base address of the section at runtime.
Next, it lists (in strict ascending order) offset ranges in that section
that cover the symbols of one or more builtin modules. Multiple ranges
can apply to a single module, and ranges can be shared between modules.
The CONFIG_BUILTIN_MODULE_RANGES option controls whether offset range data
is generated for kernel modules that are built into the kernel image.
How it works:
1. The modules.builtin file is parsed to obtain a list of built-in
module names and their associated object names (the .ko file that
the module would be in if it were a loadable module, hereafter
referred to as <kmodfile>). This object name can be used to
identify objects in the kernel compile because any C or assembler
code that ends up into a built-in module will have the option
-DKBUILD_MODFILE=<kmodfile> present in its build command, and those
can be found in the .<obj>.cmd file in the kernel build tree.
If an object is part of multiple modules, they will all be listed
in the KBUILD_MODFILE option argument.
This allows us to conclusively determine whether an object in the
kernel build belong to any modules, and which.
2. The vmlinux.map is parsed next to determine the base address of each
top level section so that all addresses into the section can be
turned into offsets. This makes it possible to handle sections
getting loaded at different addresses at system boot.
We also determine an 'anchor' symbol at the beginning of each
section to make it possible to calculate the true base address of
a section at runtime (i.e. symbol address - symbol offset).
We collect start addresses of sections that are included in the top
level section. This is used when vmlinux is linked using vmlinux.o,
because in that case, we need to look at the vmlinux.o linker map to
know what object a symbol is found in.
And finally, we process each symbol that is listed in vmlinux.map
(or vmlinux.o.map) based on the following structure:
vmlinux linked from vmlinux.a:
vmlinux.map:
<top level section>
<included section> -- might be same as top level section)
<object> -- built-in association known
<symbol> -- belongs to module(s) object belongs to
...
vmlinux linked from vmlinux.o:
vmlinux.map:
<top level section>
<included section> -- might be same as top level section)
vmlinux.o -- need to use vmlinux.o.map
<symbol> -- ignored
...
vmlinux.o.map:
<section>
<object> -- built-in association known
<symbol> -- belongs to module(s) object belongs to
...
3. As sections, objects, and symbols are processed, offset ranges are
constructed in a straight-forward way:
- If the symbol belongs to one or more built-in modules:
- If we were working on the same module(s), extend the range
to include this object
- If we were working on another module(s), close that range,
and start the new one
- If the symbol does not belong to any built-in modules:
- If we were working on a module(s) range, close that range
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Tested-by: Sam James <sam@gentoo.org>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Tested-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-09-06 14:45:03 +00:00
|
|
|
modules.builtin.ranges
|
|
|
|
----------------------
|
|
|
|
This file contains address offset ranges (per ELF section) for all modules
|
|
|
|
that are built into the kernel. Together with System.map, it can be used
|
|
|
|
to associate module names with symbols.
|
2009-12-07 15:38:33 +00:00
|
|
|
|
2008-12-29 12:45:52 +00:00
|
|
|
Environment variables
|
2019-06-12 17:52:48 +00:00
|
|
|
=====================
|
2008-12-29 12:45:52 +00:00
|
|
|
|
|
|
|
KCPPFLAGS
|
2019-06-12 17:52:48 +00:00
|
|
|
---------
|
2008-12-29 12:45:52 +00:00
|
|
|
Additional options to pass when preprocessing. The preprocessing options
|
2009-01-08 18:59:34 +00:00
|
|
|
will be used in all cases where kbuild does preprocessing including
|
2008-12-29 12:45:52 +00:00
|
|
|
building C files and assembler files.
|
|
|
|
|
|
|
|
KAFLAGS
|
2019-06-12 17:52:48 +00:00
|
|
|
-------
|
kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
It is now possible to assign options to AS, CC and LD
on the command line - which is only used when building modules.
{A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC, LD when building modules
without overriding the original value.
Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
that is used by arch specific files and free up
{A,C,LD}FLAGS_MODULE so they can be assigned on
the command line.
All arch Makefiles that used the old variables has been updated.
Note: Previously we had a MODFLAGS variable for both
AS and CC. But in favour of consistency this was dropped.
So in some cases arch Makefile has one assignmnet replaced by
two assignmnets.
Note2: MODFLAGS was not documented and is dropped
without any notice. I do not expect much/any breakage
from this.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-07-28 15:33:09 +00:00
|
|
|
Additional options to the assembler (for built-in and modules).
|
|
|
|
|
|
|
|
AFLAGS_MODULE
|
2019-06-12 17:52:48 +00:00
|
|
|
-------------
|
2019-07-13 02:45:58 +00:00
|
|
|
Additional assembler options for modules.
|
2008-12-29 12:45:52 +00:00
|
|
|
|
2010-07-28 17:11:27 +00:00
|
|
|
AFLAGS_KERNEL
|
2019-06-12 17:52:48 +00:00
|
|
|
-------------
|
2019-07-13 02:45:58 +00:00
|
|
|
Additional assembler options for built-in.
|
2008-12-29 12:45:52 +00:00
|
|
|
|
|
|
|
KCFLAGS
|
2019-06-12 17:52:48 +00:00
|
|
|
-------
|
kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
It is now possible to assign options to AS, CC and LD
on the command line - which is only used when building modules.
{A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC, LD when building modules
without overriding the original value.
Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
that is used by arch specific files and free up
{A,C,LD}FLAGS_MODULE so they can be assigned on
the command line.
All arch Makefiles that used the old variables has been updated.
Note: Previously we had a MODFLAGS variable for both
AS and CC. But in favour of consistency this was dropped.
So in some cases arch Makefile has one assignmnet replaced by
two assignmnets.
Note2: MODFLAGS was not documented and is dropped
without any notice. I do not expect much/any breakage
from this.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-07-28 15:33:09 +00:00
|
|
|
Additional options to the C compiler (for built-in and modules).
|
|
|
|
|
2021-07-03 15:23:16 +00:00
|
|
|
KRUSTFLAGS
|
|
|
|
----------
|
|
|
|
Additional options to the Rust compiler (for built-in and modules).
|
|
|
|
|
2010-07-28 17:11:27 +00:00
|
|
|
CFLAGS_KERNEL
|
2019-06-12 17:52:48 +00:00
|
|
|
-------------
|
2011-03-31 01:57:33 +00:00
|
|
|
Additional options for $(CC) when used to compile
|
2010-07-28 17:11:27 +00:00
|
|
|
code that is compiled as built-in.
|
|
|
|
|
kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
It is now possible to assign options to AS, CC and LD
on the command line - which is only used when building modules.
{A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC, LD when building modules
without overriding the original value.
Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
that is used by arch specific files and free up
{A,C,LD}FLAGS_MODULE so they can be assigned on
the command line.
All arch Makefiles that used the old variables has been updated.
Note: Previously we had a MODFLAGS variable for both
AS and CC. But in favour of consistency this was dropped.
So in some cases arch Makefile has one assignmnet replaced by
two assignmnets.
Note2: MODFLAGS was not documented and is dropped
without any notice. I do not expect much/any breakage
from this.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-07-28 15:33:09 +00:00
|
|
|
CFLAGS_MODULE
|
2019-06-12 17:52:48 +00:00
|
|
|
-------------
|
2011-03-31 01:57:33 +00:00
|
|
|
Additional module specific options to use for $(CC).
|
kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
It is now possible to assign options to AS, CC and LD
on the command line - which is only used when building modules.
{A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC, LD when building modules
without overriding the original value.
Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
that is used by arch specific files and free up
{A,C,LD}FLAGS_MODULE so they can be assigned on
the command line.
All arch Makefiles that used the old variables has been updated.
Note: Previously we had a MODFLAGS variable for both
AS and CC. But in favour of consistency this was dropped.
So in some cases arch Makefile has one assignmnet replaced by
two assignmnets.
Note2: MODFLAGS was not documented and is dropped
without any notice. I do not expect much/any breakage
from this.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-07-28 15:33:09 +00:00
|
|
|
|
2021-07-03 15:23:16 +00:00
|
|
|
RUSTFLAGS_KERNEL
|
|
|
|
----------------
|
|
|
|
Additional options for $(RUSTC) when used to compile
|
|
|
|
code that is compiled as built-in.
|
|
|
|
|
|
|
|
RUSTFLAGS_MODULE
|
|
|
|
----------------
|
|
|
|
Additional module specific options to use for $(RUSTC).
|
|
|
|
|
kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
It is now possible to assign options to AS, CC and LD
on the command line - which is only used when building modules.
{A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC, LD when building modules
without overriding the original value.
Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
that is used by arch specific files and free up
{A,C,LD}FLAGS_MODULE so they can be assigned on
the command line.
All arch Makefiles that used the old variables has been updated.
Note: Previously we had a MODFLAGS variable for both
AS and CC. But in favour of consistency this was dropped.
So in some cases arch Makefile has one assignmnet replaced by
two assignmnets.
Note2: MODFLAGS was not documented and is dropped
without any notice. I do not expect much/any breakage
from this.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-07-28 15:33:09 +00:00
|
|
|
LDFLAGS_MODULE
|
2019-06-12 17:52:48 +00:00
|
|
|
--------------
|
kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
It is now possible to assign options to AS, CC and LD
on the command line - which is only used when building modules.
{A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC, LD when building modules
without overriding the original value.
Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
that is used by arch specific files and free up
{A,C,LD}FLAGS_MODULE so they can be assigned on
the command line.
All arch Makefiles that used the old variables has been updated.
Note: Previously we had a MODFLAGS variable for both
AS and CC. But in favour of consistency this was dropped.
So in some cases arch Makefile has one assignmnet replaced by
two assignmnets.
Note2: MODFLAGS was not documented and is dropped
without any notice. I do not expect much/any breakage
from this.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-07-28 15:33:09 +00:00
|
|
|
Additional options used for $(LD) when linking modules.
|
2008-12-29 12:45:52 +00:00
|
|
|
|
2018-07-10 00:46:02 +00:00
|
|
|
HOSTCFLAGS
|
2019-06-12 17:52:48 +00:00
|
|
|
----------
|
2018-07-10 00:46:02 +00:00
|
|
|
Additional flags to be passed to $(HOSTCC) when building host programs.
|
|
|
|
|
|
|
|
HOSTCXXFLAGS
|
2019-06-12 17:52:48 +00:00
|
|
|
------------
|
2018-07-10 00:46:02 +00:00
|
|
|
Additional flags to be passed to $(HOSTCXX) when building host programs.
|
|
|
|
|
2021-07-03 15:23:16 +00:00
|
|
|
HOSTRUSTFLAGS
|
|
|
|
-------------
|
|
|
|
Additional flags to be passed to $(HOSTRUSTC) when building host programs.
|
|
|
|
|
2018-07-10 00:46:02 +00:00
|
|
|
HOSTLDFLAGS
|
2019-06-12 17:52:48 +00:00
|
|
|
-----------
|
2018-07-10 00:46:02 +00:00
|
|
|
Additional flags to be passed when linking host programs.
|
|
|
|
|
|
|
|
HOSTLDLIBS
|
2019-06-12 17:52:48 +00:00
|
|
|
----------
|
2018-07-10 00:46:02 +00:00
|
|
|
Additional libraries to link against when building host programs.
|
|
|
|
|
2022-02-01 21:35:42 +00:00
|
|
|
.. _userkbuildflags:
|
|
|
|
|
|
|
|
USERCFLAGS
|
|
|
|
----------
|
|
|
|
Additional options used for $(CC) when compiling userprogs.
|
|
|
|
|
|
|
|
USERLDFLAGS
|
|
|
|
-----------
|
|
|
|
Additional options used for $(LD) when linking userprogs. userprogs are linked
|
|
|
|
with CC, so $(USERLDFLAGS) should include "-Wl," prefix as applicable.
|
|
|
|
|
2018-07-05 02:47:39 +00:00
|
|
|
KBUILD_KCONFIG
|
2019-06-12 17:52:48 +00:00
|
|
|
--------------
|
2018-07-05 02:47:39 +00:00
|
|
|
Set the top-level Kconfig file to the value of this environment
|
|
|
|
variable. The default name is "Kconfig".
|
|
|
|
|
2008-12-29 12:45:52 +00:00
|
|
|
KBUILD_VERBOSE
|
2019-06-12 17:52:48 +00:00
|
|
|
--------------
|
2009-01-08 18:59:34 +00:00
|
|
|
Set the kbuild verbosity. Can be assigned same values as "V=...".
|
2019-06-12 17:52:48 +00:00
|
|
|
|
2008-12-29 12:45:52 +00:00
|
|
|
See make help for the full list.
|
2019-06-12 17:52:48 +00:00
|
|
|
|
2008-12-29 12:45:52 +00:00
|
|
|
Setting "V=..." takes precedence over KBUILD_VERBOSE.
|
|
|
|
|
|
|
|
KBUILD_EXTMOD
|
2019-06-12 17:52:48 +00:00
|
|
|
-------------
|
2008-12-29 12:45:52 +00:00
|
|
|
Set the directory to look for the kernel source when building external
|
|
|
|
modules.
|
2019-06-12 17:52:48 +00:00
|
|
|
|
2018-11-20 15:04:18 +00:00
|
|
|
Setting "M=..." takes precedence over KBUILD_EXTMOD.
|
2008-12-29 12:45:52 +00:00
|
|
|
|
|
|
|
KBUILD_OUTPUT
|
2019-06-12 17:52:48 +00:00
|
|
|
-------------
|
2008-12-29 12:45:52 +00:00
|
|
|
Specify the output directory when building the kernel.
|
2019-06-12 17:52:48 +00:00
|
|
|
|
2024-09-19 17:37:17 +00:00
|
|
|
This variable can also be used to point to the kernel output directory when
|
|
|
|
building external modules against a pre-built kernel in a separate build
|
|
|
|
directory. Please note that this does NOT specify the output directory for the
|
|
|
|
external modules themselves.
|
|
|
|
|
2010-08-05 18:23:11 +00:00
|
|
|
The output directory can also be specified using "O=...".
|
2019-06-12 17:52:48 +00:00
|
|
|
|
2009-01-08 18:59:34 +00:00
|
|
|
Setting "O=..." takes precedence over KBUILD_OUTPUT.
|
2008-12-29 12:45:52 +00:00
|
|
|
|
2019-08-31 16:25:55 +00:00
|
|
|
KBUILD_EXTRA_WARN
|
|
|
|
-----------------
|
|
|
|
Specify the extra build checks. The same value can be assigned by passing
|
|
|
|
W=... from the command line.
|
|
|
|
|
|
|
|
See `make help` for the list of the supported values.
|
|
|
|
|
|
|
|
Setting "W=..." takes precedence over KBUILD_EXTRA_WARN.
|
|
|
|
|
2010-12-12 17:39:40 +00:00
|
|
|
KBUILD_DEBARCH
|
2019-06-12 17:52:48 +00:00
|
|
|
--------------
|
2010-12-12 17:39:40 +00:00
|
|
|
For the deb-pkg target, allows overriding the normal heuristics deployed by
|
|
|
|
deb-pkg. Normally deb-pkg attempts to guess the right architecture based on
|
|
|
|
the UTS_MACHINE variable, and on some architectures also the kernel config.
|
|
|
|
The value of KBUILD_DEBARCH is assumed (not checked) to be a valid Debian
|
|
|
|
architecture.
|
|
|
|
|
2023-06-09 08:46:41 +00:00
|
|
|
KDOCFLAGS
|
|
|
|
---------
|
|
|
|
Specify extra (warning/error) flags for kernel-doc checks during the build,
|
|
|
|
see scripts/kernel-doc for which flags are supported. Note that this doesn't
|
|
|
|
(currently) apply to documentation builds.
|
|
|
|
|
2008-12-29 12:45:52 +00:00
|
|
|
ARCH
|
2019-06-12 17:52:48 +00:00
|
|
|
----
|
2008-12-29 12:45:52 +00:00
|
|
|
Set ARCH to the architecture to be built.
|
2019-06-12 17:52:48 +00:00
|
|
|
|
2008-12-29 12:45:52 +00:00
|
|
|
In most cases the name of the architecture is the same as the
|
|
|
|
directory name found in the arch/ directory.
|
2019-06-12 17:52:48 +00:00
|
|
|
|
2009-01-08 18:59:34 +00:00
|
|
|
But some architectures such as x86 and sparc have aliases.
|
2019-06-12 17:52:48 +00:00
|
|
|
|
|
|
|
- x86: i386 for 32 bit, x86_64 for 64 bit
|
2023-02-05 16:37:52 +00:00
|
|
|
- parisc: parisc64 for 64 bit
|
2019-06-12 17:52:48 +00:00
|
|
|
- sparc: sparc32 for 32 bit, sparc64 for 64 bit
|
2008-12-29 12:45:52 +00:00
|
|
|
|
|
|
|
CROSS_COMPILE
|
2019-06-12 17:52:48 +00:00
|
|
|
-------------
|
2008-12-29 12:45:52 +00:00
|
|
|
Specify an optional fixed part of the binutils filename.
|
|
|
|
CROSS_COMPILE can be a part of the filename or the full path.
|
|
|
|
|
2010-02-17 08:45:33 +00:00
|
|
|
CROSS_COMPILE is also used for ccache in some setups.
|
2008-12-29 12:45:52 +00:00
|
|
|
|
|
|
|
CF
|
2019-06-12 17:52:48 +00:00
|
|
|
--
|
2008-12-29 12:45:52 +00:00
|
|
|
Additional options for sparse.
|
2019-06-12 17:52:48 +00:00
|
|
|
|
|
|
|
CF is often used on the command-line like this::
|
2008-12-29 12:45:52 +00:00
|
|
|
|
|
|
|
make CF=-Wbitwise C=2
|
|
|
|
|
|
|
|
INSTALL_PATH
|
2019-06-12 17:52:48 +00:00
|
|
|
------------
|
2008-12-29 12:45:52 +00:00
|
|
|
INSTALL_PATH specifies where to place the updated kernel and system map
|
2009-01-08 18:59:34 +00:00
|
|
|
images. Default is /boot, but you can set it to other values.
|
2008-12-29 12:45:52 +00:00
|
|
|
|
2009-07-20 19:37:11 +00:00
|
|
|
INSTALLKERNEL
|
2019-06-12 17:52:48 +00:00
|
|
|
-------------
|
2009-07-20 19:37:11 +00:00
|
|
|
Install script called when using "make install".
|
|
|
|
The default name is "installkernel".
|
|
|
|
|
|
|
|
The script will be called with the following arguments:
|
2019-07-09 16:25:51 +00:00
|
|
|
|
2019-06-12 17:52:48 +00:00
|
|
|
- $1 - kernel version
|
|
|
|
- $2 - kernel image file
|
|
|
|
- $3 - kernel map file
|
|
|
|
- $4 - default install path (use root directory if blank)
|
2009-07-20 19:37:11 +00:00
|
|
|
|
2010-08-05 18:23:11 +00:00
|
|
|
The implementation of "make install" is architecture specific
|
2009-07-20 19:37:11 +00:00
|
|
|
and it may differ from the above.
|
|
|
|
|
|
|
|
INSTALLKERNEL is provided to enable the possibility to
|
|
|
|
specify a custom installer when cross compiling a kernel.
|
2008-12-29 12:45:52 +00:00
|
|
|
|
|
|
|
MODLIB
|
2019-06-12 17:52:48 +00:00
|
|
|
------
|
2008-12-29 12:45:52 +00:00
|
|
|
Specify where to install modules.
|
2019-06-12 17:52:48 +00:00
|
|
|
The default value is::
|
2008-12-29 12:45:52 +00:00
|
|
|
|
|
|
|
$(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
|
|
|
|
|
|
|
|
The value can be overridden in which case the default value is ignored.
|
|
|
|
|
|
|
|
INSTALL_MOD_PATH
|
2019-06-12 17:52:48 +00:00
|
|
|
----------------
|
2008-12-29 12:45:52 +00:00
|
|
|
INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
|
|
|
|
relocations required by build roots. This is not defined in the
|
|
|
|
makefile but the argument can be passed to make if needed.
|
|
|
|
|
|
|
|
INSTALL_MOD_STRIP
|
2019-06-12 17:52:48 +00:00
|
|
|
-----------------
|
2008-12-29 12:45:52 +00:00
|
|
|
INSTALL_MOD_STRIP, if defined, will cause modules to be
|
|
|
|
stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
|
|
|
|
the default option --strip-debug will be used. Otherwise,
|
2011-01-09 07:59:49 +00:00
|
|
|
INSTALL_MOD_STRIP value will be used as the options to the strip command.
|
2008-12-29 12:45:52 +00:00
|
|
|
|
|
|
|
INSTALL_HDR_PATH
|
2019-06-12 17:52:48 +00:00
|
|
|
----------------
|
2009-01-08 18:59:34 +00:00
|
|
|
INSTALL_HDR_PATH specifies where to install user space headers when
|
2008-12-29 12:45:52 +00:00
|
|
|
executing "make headers_*".
|
2019-06-12 17:52:48 +00:00
|
|
|
|
|
|
|
The default value is::
|
2008-12-29 12:45:52 +00:00
|
|
|
|
|
|
|
$(objtree)/usr
|
|
|
|
|
|
|
|
$(objtree) is the directory where output files are saved.
|
|
|
|
The output directory is often set using "O=..." on the commandline.
|
|
|
|
|
|
|
|
The value can be overridden in which case the default value is ignored.
|
|
|
|
|
2023-10-12 10:54:21 +00:00
|
|
|
INSTALL_DTBS_PATH
|
|
|
|
-----------------
|
|
|
|
INSTALL_DTBS_PATH specifies where to install device tree blobs for
|
|
|
|
relocations required by build roots. This is not defined in the
|
|
|
|
makefile but the argument can be passed to make if needed.
|
|
|
|
|
2019-07-06 03:07:13 +00:00
|
|
|
KBUILD_ABS_SRCTREE
|
|
|
|
--------------------------------------------------
|
|
|
|
Kbuild uses a relative path to point to the tree when possible. For instance,
|
|
|
|
when building in the source tree, the source tree path is '.'
|
|
|
|
|
|
|
|
Setting this flag requests Kbuild to use absolute path to the source tree.
|
|
|
|
There are some useful cases to do so, like when generating tag files with
|
|
|
|
absolute path entries etc.
|
|
|
|
|
2015-07-20 20:16:28 +00:00
|
|
|
KBUILD_SIGN_PIN
|
2019-06-12 17:52:48 +00:00
|
|
|
---------------
|
2015-07-20 20:16:28 +00:00
|
|
|
This variable allows a passphrase or PIN to be passed to the sign-file
|
|
|
|
utility when signing kernel modules, if the private key requires such.
|
|
|
|
|
2008-12-29 12:45:52 +00:00
|
|
|
KBUILD_MODPOST_WARN
|
2019-06-12 17:52:48 +00:00
|
|
|
-------------------
|
2009-01-08 18:59:34 +00:00
|
|
|
KBUILD_MODPOST_WARN can be set to avoid errors in case of undefined
|
|
|
|
symbols in the final module linking stage. It changes such errors
|
|
|
|
into warnings.
|
2008-12-29 12:45:52 +00:00
|
|
|
|
2009-01-08 18:59:34 +00:00
|
|
|
KBUILD_MODPOST_NOFINAL
|
2019-06-12 17:52:48 +00:00
|
|
|
----------------------
|
2008-12-29 12:45:52 +00:00
|
|
|
KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules.
|
2009-01-08 18:59:34 +00:00
|
|
|
This is solely useful to speed up test compiles.
|
2008-12-29 12:45:52 +00:00
|
|
|
|
|
|
|
KBUILD_EXTRA_SYMBOLS
|
2019-06-12 17:52:48 +00:00
|
|
|
--------------------
|
2009-01-08 18:59:34 +00:00
|
|
|
For modules that use symbols from other modules.
|
2020-03-11 22:50:44 +00:00
|
|
|
See more details in modules.rst.
|
2009-01-05 06:57:03 +00:00
|
|
|
|
|
|
|
ALLSOURCE_ARCHS
|
2019-06-12 17:52:48 +00:00
|
|
|
---------------
|
2009-01-08 18:59:34 +00:00
|
|
|
For tags/TAGS/cscope targets, you can specify more than one arch
|
2019-06-12 17:52:48 +00:00
|
|
|
to be included in the databases, separated by blank space. E.g.::
|
2009-01-05 06:57:03 +00:00
|
|
|
|
|
|
|
$ make ALLSOURCE_ARCHS="x86 mips arm" tags
|
2010-03-02 15:57:52 +00:00
|
|
|
|
2019-06-12 17:52:48 +00:00
|
|
|
To get all available archs you can also specify all. E.g.::
|
2010-03-02 15:57:52 +00:00
|
|
|
|
|
|
|
$ make ALLSOURCE_ARCHS=all tags
|
2011-03-01 08:35:29 +00:00
|
|
|
|
2022-12-13 20:26:15 +00:00
|
|
|
IGNORE_DIRS
|
|
|
|
-----------
|
|
|
|
For tags/TAGS/cscope targets, you can choose which directories won't
|
|
|
|
be included in the databases, separated by blank space. E.g.::
|
|
|
|
|
|
|
|
$ make IGNORE_DIRS="drivers/gpu/drm/radeon tools" cscope
|
|
|
|
|
2011-04-05 12:32:30 +00:00
|
|
|
KBUILD_BUILD_TIMESTAMP
|
2019-06-12 17:52:48 +00:00
|
|
|
----------------------
|
2011-04-05 12:32:30 +00:00
|
|
|
Setting this to a date string overrides the timestamp used in the
|
2011-03-31 21:16:42 +00:00
|
|
|
UTS_VERSION definition (uname -v in the running kernel). The value has to
|
|
|
|
be a string that can be passed to date -d. The default value
|
2011-04-05 12:32:30 +00:00
|
|
|
is the output of the date command at one point during build.
|
|
|
|
|
|
|
|
KBUILD_BUILD_USER, KBUILD_BUILD_HOST
|
2019-06-12 17:52:48 +00:00
|
|
|
------------------------------------
|
2011-04-05 12:32:30 +00:00
|
|
|
These two variables allow to override the user@host string displayed during
|
|
|
|
boot and in /proc/version. The default value is the output of the commands
|
|
|
|
whoami and host, respectively.
|
2020-04-08 01:36:23 +00:00
|
|
|
|
|
|
|
LLVM
|
|
|
|
----
|
|
|
|
If this variable is set to 1, Kbuild will use Clang and LLVM utilities instead
|
|
|
|
of GCC and GNU binutils to build the kernel.
|