uniLoader/Documentation/kbuild/kbuild.txt
ivoszbg fd8ed2d1b8 uniLoader: Migrate to kconfig based configurations
Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
2022-06-14 18:02:47 +03:00

115 lines
4.0 KiB
Plaintext

Environment variables
KCPPFLAGS
--------------------------------------------------
Additional options to pass when preprocessing. The preprocessing options
will be used in all cases where kbuild does preprocessing including
building C files and assembler files.
KAFLAGS
--------------------------------------------------
Additional options to the assembler (for built-in and modules).
AFLAGS_MODULE
--------------------------------------------------
Additional module specific options to use for $(AS).
AFLAGS_KERNEL
--------------------------------------------------
Additional options for $(AS) when used for assembler
code for code that is compiled as built-in.
KCFLAGS
--------------------------------------------------
Additional options to the C compiler (for built-in and modules).
CFLAGS_KERNEL
--------------------------------------------------
Additional options for $(CC) when used to compile
code that is compiled as built-in.
CFLAGS_MODULE
--------------------------------------------------
Additional module specific options to use for $(CC).
LDFLAGS_MODULE
--------------------------------------------------
Additional options used for $(LD) when linking modules.
KBUILD_VERBOSE
--------------------------------------------------
Set the kbuild verbosity. Can be assigned same values as "V=...".
See make help for the full list.
Setting "V=..." takes precedence over KBUILD_VERBOSE.
KBUILD_EXTMOD
--------------------------------------------------
Set the directory to look for the kernel source when building external
modules.
The directory can be specified in several ways:
1) Use "M=..." on the command line
2) Environment variable KBUILD_EXTMOD
3) Environment variable SUBDIRS
The possibilities are listed in the order they take precedence.
Using "M=..." will always override the others.
KBUILD_OUTPUT
--------------------------------------------------
Specify the output directory when building the kernel.
The output directory can also be specified using "O=...".
Setting "O=..." takes precedence over KBUILD_OUTPUT.
KBUILD_DEBARCH
--------------------------------------------------
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.
CROSS_COMPILE
--------------------------------------------------
Specify an optional fixed part of the binutils filename.
CROSS_COMPILE can be a part of the filename or the full path.
CROSS_COMPILE is also used for ccache in some setups.
INSTALL_PATH
--------------------------------------------------
INSTALL_PATH specifies where to place the updated kernel and system map
images. Default is /boot, but you can set it to other values.
INSTALLKERNEL
--------------------------------------------------
Install script called when using "make install".
The default name is "installkernel".
The script will be called with the following arguments:
$1 - kernel version
$2 - kernel image file
$3 - kernel map file
$4 - default install path (use root directory if blank)
The implementation of "make install" is architecture specific
and it may differ from the above.
INSTALLKERNEL is provided to enable the possibility to
specify a custom installer when cross compiling a kernel.
KBUILD_EXTRA_SYMBOLS
--------------------------------------------------
For modules that use symbols from other modules.
See more details in modules.txt.
KBUILD_ENABLE_EXTRA_GCC_CHECKS
--------------------------------------------------
If enabled over the make command line with "W=1", it turns on additional
gcc -W... options for more extensive build-time checking.
KBUILD_BUILD_TIMESTAMP
--------------------------------------------------
Setting this to a date string overrides the timestamp used in the
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
is the output of the date command at one point during build.