New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
menu "Kernel"
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL
|
|
|
|
bool "Linux Kernel"
|
|
|
|
help
|
|
|
|
Enable this option if you want to build a Linux kernel for
|
|
|
|
your embedded device
|
|
|
|
|
|
|
|
if BR2_LINUX_KERNEL
|
|
|
|
|
linux: add blind kconfig option to require kernel modules
Currently, packages that need the kernel to have support for laodable
modules have two ways to require it:
- either the use the kernel-module infra, which does it automatically,
- or they do not use it, and they need to require it manually by
setting the corresponding Makefile variable; however, they must only
set it when they are actually enabled, which makes for a slightly
cumbersome and ugly code, like:
ifeq ($(BR2_PACKAGE_FOO),y)
LINUX_NEEDS_MODULES = y
endif
Introduce a new blind Kconfig option that packages can select to signify
they need kernel modules. That Kconfig option is then used to set the
Makefile variable.
It makes it cleaner:
- code is simpler (one Kconfig line instead of a Makefile if-block,
- this is handled at the Kconfig level, which is where we usually
handle such dependencies.
Packages will be updated in follow-up commits.
Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-12-10 19:53:13 +01:00
|
|
|
# Packages that need to have a kernel with support for loadable modules,
|
|
|
|
# but do not use the kernel-modules infrastructure, should select that
|
|
|
|
# option.
|
|
|
|
config BR2_LINUX_NEEDS_MODULES
|
|
|
|
bool
|
|
|
|
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
#
|
|
|
|
# Version selection. We provide the choice between:
|
|
|
|
#
|
|
|
|
# 1. A single fairly recent stable kernel version
|
2016-08-14 17:32:55 +02:00
|
|
|
# 2. A custom stable version
|
|
|
|
# 3. A custom tarball
|
|
|
|
# 4. A set of custom repository locations
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
#
|
|
|
|
choice
|
|
|
|
prompt "Kernel version"
|
|
|
|
|
2013-05-06 06:10:55 +02:00
|
|
|
config BR2_LINUX_KERNEL_LATEST_VERSION
|
2017-03-02 13:33:57 +01:00
|
|
|
bool "Latest version (4.10.1)"
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_CUSTOM_VERSION
|
|
|
|
bool "Custom version"
|
|
|
|
help
|
2013-09-02 22:07:58 +02:00
|
|
|
This option allows to use a specific official version from
|
|
|
|
kernel.org, like 2.6.x, 2.6.x.y, 3.x.y, ...
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
|
2014-01-22 20:35:56 +01:00
|
|
|
Note: you cannot use this option to select a _longterm_ 2.6
|
|
|
|
kernel, because these kernels are not located at the standard
|
|
|
|
URL at kernel.org. Instead, select "Custom tarball" and
|
|
|
|
specify the right URL directly.
|
|
|
|
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
config BR2_LINUX_KERNEL_CUSTOM_TARBALL
|
|
|
|
bool "Custom tarball"
|
|
|
|
help
|
2015-01-16 09:07:05 +01:00
|
|
|
This option allows to specify a URL pointing to a kernel source
|
|
|
|
tarball. This URL can use any protocol recognized by Buildroot,
|
|
|
|
like http://, ftp://, file:// or scp://.
|
|
|
|
|
|
|
|
When pointing to a local tarball using file://, you may want to
|
|
|
|
use a make variable like $(TOPDIR) to reference the root of the
|
|
|
|
Buildroot tree.
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
|
2011-07-11 22:46:11 +02:00
|
|
|
config BR2_LINUX_KERNEL_CUSTOM_GIT
|
2013-09-02 22:07:56 +02:00
|
|
|
bool "Custom Git repository"
|
2011-07-11 22:46:11 +02:00
|
|
|
help
|
|
|
|
This option allows Buildroot to get the Linux kernel source
|
|
|
|
code from a Git repository.
|
|
|
|
|
2013-09-02 22:07:54 +02:00
|
|
|
config BR2_LINUX_KERNEL_CUSTOM_HG
|
|
|
|
bool "Custom Mercurial repository"
|
|
|
|
help
|
|
|
|
This option allows Buildroot to get the Linux kernel source
|
|
|
|
code from a Mercurial repository.
|
|
|
|
|
2016-03-29 19:22:58 +02:00
|
|
|
config BR2_LINUX_KERNEL_CUSTOM_SVN
|
|
|
|
bool "Custom Subversion repository"
|
|
|
|
help
|
|
|
|
This option allows Buildroot to get the Linux kernel source
|
|
|
|
code from a Subversion repository.
|
|
|
|
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
endchoice
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE
|
|
|
|
string "Kernel version"
|
|
|
|
depends on BR2_LINUX_KERNEL_CUSTOM_VERSION
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION
|
|
|
|
string "URL of custom kernel tarball"
|
|
|
|
depends on BR2_LINUX_KERNEL_CUSTOM_TARBALL
|
|
|
|
|
2016-03-29 19:22:58 +02:00
|
|
|
if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN
|
2011-07-11 22:46:11 +02:00
|
|
|
|
2013-09-02 22:07:54 +02:00
|
|
|
config BR2_LINUX_KERNEL_CUSTOM_REPO_URL
|
|
|
|
string "URL of custom repository"
|
|
|
|
default BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL \
|
|
|
|
if BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL != "" # legacy
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION
|
|
|
|
string "Custom repository version"
|
|
|
|
default BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION \
|
|
|
|
if BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION != "" # legacy
|
2012-05-10 15:59:46 +02:00
|
|
|
help
|
2016-03-29 19:22:58 +02:00
|
|
|
Revision to use in the typical format used by Git/Mercurial/Subversion
|
2012-05-10 15:59:46 +02:00
|
|
|
E.G. a sha id, a tag, branch, ..
|
2011-07-11 22:46:11 +02:00
|
|
|
|
2013-09-02 22:07:54 +02:00
|
|
|
endif
|
|
|
|
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
config BR2_LINUX_KERNEL_VERSION
|
|
|
|
string
|
2017-03-02 13:33:57 +01:00
|
|
|
default "4.10.1" if BR2_LINUX_KERNEL_LATEST_VERSION
|
2013-09-02 22:07:54 +02:00
|
|
|
default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
|
|
|
|
if BR2_LINUX_KERNEL_CUSTOM_VERSION
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL
|
2013-09-02 22:07:54 +02:00
|
|
|
default BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION \
|
2016-03-29 19:22:58 +02:00
|
|
|
if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Patch selection
|
|
|
|
#
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_PATCH
|
2010-12-05 21:53:18 +01:00
|
|
|
string "Custom kernel patches"
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
help
|
2010-12-05 21:53:18 +01:00
|
|
|
A space-separated list of patches to apply to the
|
|
|
|
kernel. Each patch can be described as an URL, a local file
|
|
|
|
path, or a directory. In the case of a directory, all files
|
2015-03-29 19:33:22 +02:00
|
|
|
matching *.patch in the directory will be applied.
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Configuration selection
|
|
|
|
#
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Kernel configuration"
|
|
|
|
default BR2_LINUX_KERNEL_USE_DEFCONFIG
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_USE_DEFCONFIG
|
2015-03-05 18:55:12 +01:00
|
|
|
bool "Using an in-tree defconfig file"
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
|
linux: allow the selection of the architecture's default configuration
To configure the Linux kernel, we currently provide two options:
1. Passing a defconfig name (for example "multi_v7"), to which we append
"_defconfig" to run "make multi_v7_defconfig".
2. Passing a path to a custom configuration file.
Unfortunately, those two possibilities do not allow to configure the
kernel when you want to use the default configuration built into the
kernel for a given architecture. For example, on ARM64, there is a
single defconfig simply called "defconfig", which you can load by
running "make defconfig".
Using the mechanism (1) above doesn't work because we append
"_defconfig" automatically.
One solution would be to change (1) and require the user to enter the
full defconfig named (i.e "multi_v7_defconfig" instead of "multi_v7"),
but we would break all existing Buildroot configurations.
So instead, we add a third option, which simply tells Buildroot to use
the default configuration for the selected architecture. In this case,
Buildroot will configure the kernel by running "make defconfig".
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-14 12:19:58 +02:00
|
|
|
config BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG
|
|
|
|
bool "Use the architecture default configuration"
|
|
|
|
help
|
|
|
|
This option will use the default configuration for the
|
|
|
|
selected architecture. I.e, it is equivalent to running
|
|
|
|
"make ARCH=<foo> defconfig". This is useful on architectures
|
|
|
|
that have a single defconfig file, such as ARM64.
|
|
|
|
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
config BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG
|
2015-03-05 18:55:12 +01:00
|
|
|
bool "Using a custom (def)config file"
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_DEFCONFIG
|
|
|
|
string "Defconfig name"
|
|
|
|
depends on BR2_LINUX_KERNEL_USE_DEFCONFIG
|
|
|
|
help
|
2013-11-11 17:23:23 +01:00
|
|
|
Name of the kernel defconfig file to use, without the
|
|
|
|
trailing _defconfig. The defconfig is located in
|
|
|
|
arch/<arch>/configs in the kernel tree.
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE
|
|
|
|
string "Configuration file path"
|
|
|
|
depends on BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG
|
|
|
|
help
|
|
|
|
Path to the kernel configuration file
|
|
|
|
|
2015-03-05 18:55:12 +01:00
|
|
|
Note: this can be a defconfig file or a complete .config file,
|
|
|
|
which can later be saved back with make linux-update-(def)config.
|
|
|
|
|
2015-04-28 16:34:32 +02:00
|
|
|
config BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES
|
|
|
|
string "Additional configuration fragment files"
|
|
|
|
help
|
|
|
|
A space-separated list of kernel configuration fragment files,
|
|
|
|
that will be merged to the main kernel configuration file.
|
|
|
|
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
#
|
|
|
|
# Binary format
|
|
|
|
#
|
|
|
|
|
2012-07-30 14:32:46 +02:00
|
|
|
config BR2_LINUX_KERNEL_UBOOT_IMAGE
|
2013-11-11 17:23:23 +01:00
|
|
|
bool
|
2012-07-30 14:32:46 +02:00
|
|
|
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
choice
|
|
|
|
prompt "Kernel binary format"
|
2016-03-31 21:34:26 +02:00
|
|
|
default BR2_LINUX_KERNEL_ZIMAGE if BR2_arm || BR2_armeb
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_UIMAGE
|
|
|
|
bool "uImage"
|
2014-05-09 16:08:42 +02:00
|
|
|
depends on BR2_arc || BR2_arm || BR2_armeb || BR2_bfin || \
|
2015-04-13 23:49:03 +02:00
|
|
|
BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
|
2016-09-08 20:38:57 +02:00
|
|
|
BR2_sh || BR2_mips || BR2_mipsel || \
|
2015-04-13 23:49:03 +02:00
|
|
|
BR2_mips64 || BR2_mips64el
|
2012-07-30 14:32:46 +02:00
|
|
|
select BR2_LINUX_KERNEL_UBOOT_IMAGE
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
|
2012-07-30 14:32:47 +02:00
|
|
|
config BR2_LINUX_KERNEL_APPENDED_UIMAGE
|
|
|
|
bool "uImage with appended DT"
|
|
|
|
depends on BR2_arm || BR2_armeb
|
|
|
|
select BR2_LINUX_KERNEL_DTS_SUPPORT
|
|
|
|
select BR2_LINUX_KERNEL_APPENDED_DTB
|
|
|
|
select BR2_LINUX_KERNEL_UBOOT_IMAGE
|
|
|
|
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
config BR2_LINUX_KERNEL_BZIMAGE
|
|
|
|
bool "bzImage"
|
2010-09-01 15:26:24 +02:00
|
|
|
depends on BR2_i386 || BR2_x86_64
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_ZIMAGE
|
|
|
|
bool "zImage"
|
2014-05-13 07:28:21 +02:00
|
|
|
depends on BR2_arm || BR2_armeb || BR2_powerpc || \
|
|
|
|
BR2_powerpc64 || BR2_powerpc64le || BR2_sparc || \
|
2016-09-08 20:38:57 +02:00
|
|
|
BR2_sh || BR2_xtensa
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
|
2015-10-29 13:52:05 +01:00
|
|
|
config BR2_LINUX_KERNEL_ZIMAGE_EPAPR
|
|
|
|
bool "zImage.epapr"
|
|
|
|
depends on BR2_powerpc64 || BR2_powerpc64le
|
|
|
|
|
2012-07-30 14:32:47 +02:00
|
|
|
config BR2_LINUX_KERNEL_APPENDED_ZIMAGE
|
|
|
|
bool "zImage with appended DT"
|
|
|
|
depends on BR2_arm || BR2_armeb
|
|
|
|
select BR2_LINUX_KERNEL_DTS_SUPPORT
|
|
|
|
select BR2_LINUX_KERNEL_APPENDED_DTB
|
|
|
|
|
2012-07-30 14:32:48 +02:00
|
|
|
config BR2_LINUX_KERNEL_CUIMAGE
|
|
|
|
bool "cuImage"
|
|
|
|
depends on BR2_powerpc
|
|
|
|
select BR2_LINUX_KERNEL_UBOOT_IMAGE
|
|
|
|
select BR2_LINUX_KERNEL_DTS_SUPPORT
|
|
|
|
select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_SIMPLEIMAGE
|
|
|
|
bool "simpleImage"
|
|
|
|
depends on BR2_microblaze
|
|
|
|
select BR2_LINUX_KERNEL_UBOOT_IMAGE
|
|
|
|
select BR2_LINUX_KERNEL_DTS_SUPPORT
|
|
|
|
select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
|
|
|
|
|
2015-10-04 18:28:15 +02:00
|
|
|
config BR2_LINUX_KERNEL_IMAGE
|
|
|
|
bool "Image"
|
|
|
|
depends on BR2_aarch64
|
|
|
|
|
2012-07-30 14:32:48 +02:00
|
|
|
config BR2_LINUX_KERNEL_LINUX_BIN
|
|
|
|
bool "linux.bin"
|
|
|
|
depends on BR2_microblaze
|
|
|
|
select BR2_LINUX_KERNEL_UBOOT_IMAGE
|
|
|
|
|
2010-09-01 15:26:24 +02:00
|
|
|
config BR2_LINUX_KERNEL_VMLINUX_BIN
|
|
|
|
bool "vmlinux.bin"
|
2016-09-08 20:38:57 +02:00
|
|
|
depends on BR2_mips || BR2_mipsel || BR2_sh
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
|
2010-12-05 21:53:23 +01:00
|
|
|
config BR2_LINUX_KERNEL_VMLINUX
|
|
|
|
bool "vmlinux"
|
|
|
|
|
2011-09-20 11:01:26 +02:00
|
|
|
config BR2_LINUX_KERNEL_VMLINUZ
|
|
|
|
bool "vmlinuz"
|
|
|
|
depends on BR2_mips || BR2_mipsel
|
|
|
|
|
2015-12-15 08:34:06 +01:00
|
|
|
config BR2_LINUX_KERNEL_VMLINUZ_BIN
|
|
|
|
bool "vmlinuz.bin"
|
|
|
|
depends on BR2_mips || BR2_mipsel
|
|
|
|
|
2011-03-21 18:39:43 +01:00
|
|
|
config BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
|
|
|
|
bool "custom target"
|
|
|
|
help
|
|
|
|
For certain cases a board-specific target image must be
|
|
|
|
used. For example, on powerPC where the OpenFirmware
|
|
|
|
description is attached in a board-specific kernel image
|
|
|
|
target like 'cuImage.mpc8379_rdb'.
|
|
|
|
|
|
|
|
Select this option and specify the make target in "Kernel
|
|
|
|
image target name".
|
|
|
|
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
endchoice
|
|
|
|
|
2015-07-12 13:43:32 +02:00
|
|
|
#
|
|
|
|
# Kernel compression format
|
|
|
|
#
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Kernel compression format"
|
|
|
|
help
|
|
|
|
This selection will just ensure that the correct host tools are build.
|
|
|
|
The actual compression for the kernel should be selected in the
|
|
|
|
kernel configuration menu.
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_GZIP
|
|
|
|
bool "gzip compression"
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_LZ4
|
|
|
|
bool "lz4 compression"
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_LZMA
|
|
|
|
bool "lzma compression"
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_LZO
|
|
|
|
bool "lzo compression"
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_XZ
|
|
|
|
bool "xz compression"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
2011-03-21 18:39:43 +01:00
|
|
|
config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME
|
|
|
|
string "Kernel image target name"
|
|
|
|
depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
|
|
|
|
help
|
|
|
|
Specify the kernel make target to build the kernel that you
|
|
|
|
need.
|
|
|
|
|
2014-07-11 14:49:22 +02:00
|
|
|
config BR2_LINUX_KERNEL_IMAGE_NAME
|
|
|
|
string "Kernel image name"
|
|
|
|
depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
|
|
|
|
help
|
|
|
|
The filename of the kernel image, if it is different from the
|
|
|
|
make target (above). Only Xtensa uses a filename different from
|
|
|
|
the make target. Defaults to BR2_LINUX_KERNEL_IMAGE_TARGET_NAME.
|
|
|
|
|
|
|
|
If unsure, leave it empty.
|
|
|
|
|
2013-03-13 12:13:24 +01:00
|
|
|
config BR2_LINUX_KERNEL_UIMAGE_LOADADDR
|
|
|
|
string "load address (for 3.7+ multi-platform image)"
|
|
|
|
depends on BR2_arm || BR2_armeb
|
|
|
|
depends on BR2_LINUX_KERNEL_UIMAGE || BR2_LINUX_KERNEL_APPENDED_UIMAGE
|
|
|
|
help
|
|
|
|
If your ARM system's Linux kernel is configured with the new (3.7+)
|
|
|
|
multi-architecture support (CONFIG_ARCH_MULTIPLATFORM=y in your
|
|
|
|
kernel config), then it is necessary to specify a kernel load address
|
|
|
|
when building the uImage. This should be a hexadecimal string
|
|
|
|
beginning with 0x, for example: 0x00008000.
|
|
|
|
|
|
|
|
If unsure, let this option empty.
|
|
|
|
|
2012-07-30 14:32:45 +02:00
|
|
|
config BR2_LINUX_KERNEL_DTS_SUPPORT
|
2015-01-02 13:26:27 +01:00
|
|
|
bool "Build a Device Tree Blob (DTB)"
|
2012-07-30 14:32:45 +02:00
|
|
|
help
|
2015-01-02 13:26:27 +01:00
|
|
|
Compile one or more device tree sources into device tree blobs.
|
|
|
|
Select the dts files to compile in the options below.
|
2012-07-30 14:32:45 +02:00
|
|
|
|
|
|
|
if BR2_LINUX_KERNEL_DTS_SUPPORT
|
|
|
|
|
2012-07-30 14:32:47 +02:00
|
|
|
# We have mainly three cases when it comes to device tree support:
|
|
|
|
# 1) We don't want any support at all. Then the ..DTS_SUPPORT
|
|
|
|
# variable won't be set
|
2015-04-08 02:53:36 +02:00
|
|
|
# 2) We want device tree support, so we need the user to enter the
|
|
|
|
# device tree name or the path to the custom device he uses, but
|
|
|
|
# the kernel abstracts this from us and only build an image that
|
|
|
|
# looks like a regular kernel image. In this case, we only need
|
|
|
|
# to derive the kernel image name from the given device tree
|
|
|
|
# name, and all the rest is as usual
|
2012-07-30 14:32:47 +02:00
|
|
|
# 3) We want device tree support, but the kernel requires us to
|
|
|
|
# build the device tree blob separately. In this case, some
|
|
|
|
# more logic will be needed.
|
|
|
|
# The variable below address the second case, were you only want
|
|
|
|
# limited actions from buildroot.
|
|
|
|
config BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
|
|
|
|
bool
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_APPENDED_DTB
|
|
|
|
bool
|
|
|
|
|
2012-07-30 14:32:45 +02:00
|
|
|
choice
|
|
|
|
prompt "Device tree source"
|
|
|
|
default BR2_LINUX_KERNEL_USE_INTREE_DTS
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_USE_INTREE_DTS
|
|
|
|
bool "Use a device tree present in the kernel."
|
|
|
|
help
|
2013-11-11 17:23:23 +01:00
|
|
|
Use a device tree source distributed with
|
|
|
|
the kernel sources. The dts files are located
|
|
|
|
in the arch/<arch>/boot/dts folder.
|
2012-07-30 14:32:45 +02:00
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_USE_CUSTOM_DTS
|
|
|
|
bool "Use a custom device tree file"
|
|
|
|
help
|
|
|
|
Use a custom device tree file, i.e, a device
|
|
|
|
tree file that does not belong to the kernel
|
|
|
|
source tree.
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_INTREE_DTS_NAME
|
2012-12-19 23:48:09 +01:00
|
|
|
string "Device Tree Source file names"
|
2012-07-30 14:32:45 +02:00
|
|
|
depends on BR2_LINUX_KERNEL_USE_INTREE_DTS
|
|
|
|
help
|
2013-11-11 17:23:23 +01:00
|
|
|
Name of the device tree source file, without
|
|
|
|
the trailing .dts. You can provide a list of
|
|
|
|
dts files to build, separated by spaces.
|
2012-07-30 14:32:45 +02:00
|
|
|
|
|
|
|
config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
|
2014-07-25 23:25:32 +02:00
|
|
|
string "Device Tree Source file paths"
|
2012-07-30 14:32:45 +02:00
|
|
|
depends on BR2_LINUX_KERNEL_USE_CUSTOM_DTS
|
|
|
|
help
|
2014-07-25 23:25:32 +02:00
|
|
|
Path to the device tree source files. You can
|
|
|
|
provide a list of dts paths to copy and build,
|
|
|
|
separated by spaces.
|
2012-07-30 14:32:45 +02:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2011-07-05 21:53:54 +02:00
|
|
|
config BR2_LINUX_KERNEL_INSTALL_TARGET
|
|
|
|
bool "Install kernel image to /boot in target"
|
|
|
|
depends on !BR2_TARGET_ROOTFS_INITRAMFS
|
|
|
|
help
|
|
|
|
Select this option to have the kernel image installed to
|
|
|
|
/boot in the target root filesystem, as is typically done on
|
|
|
|
x86/x86_64 systems.
|
|
|
|
|
2013-08-01 18:07:14 +02:00
|
|
|
Note that this option also installs the Device Tree Blobs to
|
|
|
|
/boot if DTBs have been generated by the kernel build
|
|
|
|
process.
|
2011-09-17 22:22:51 +02:00
|
|
|
|
|
|
|
# Linux extensions
|
|
|
|
source "linux/Config.ext.in"
|
|
|
|
|
2015-07-14 19:35:13 +02:00
|
|
|
# Linux tools
|
linux/tools: make it a real, separate package
The kernel source tree also contains the sources for various userland
tools, of which cpupower, perf or selftests.
Currently, we have support for building those tools as part of the
kernel build procedure. This looked the correct thing to do so far,
because, well, they *are* part of the kernel source tree and some
really have to be the same version as the kernel that will run.
However, this is causing quite a non-trivial-to-break circular
dependency in some configurations. For example, this defconfig fails to
build (similar to the one reported by Paul):
BR2_arm=y
BR2_cortex_a7=y
BR2_ARM_FPU_NEON_VFPV4=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_SYSTEMD=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/raspberrypi/linux.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="26f3b72a9c049be10e6af196252283e1f6ab9d1f"
BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
BR2_PACKAGE_LINUX_TOOLS_CPUPOWER=y
BR2_PACKAGE_CRYPTODEV=y
BR2_PACKAGE_OPENSSL=y
BR2_PACKAGE_LIBCURL=y
This causes a circular dependency, as explained by Thomas:
- When libcurl is enabled, systemd depends on it
- When OpenSSL is enabled, obviously, will use it for SSL support
- When cryptodev-linux is enabled, OpenSSL will depend on it to use
crypto accelerators supported in the kernel via cryptodev-linux.
- cryptodev-linux being a kernel module, it depends on linux
- linux by itself (the kernel) does not depend on pciutils, but the
linux tool "cpupower" (managed in linux-tool-cpupower) depends on
pciutils
- pciutils depends on udev when available
- udev is provided by systemd.
And indeed, during the build, we can see that make warns (it's only
reported as a *warning*, not as an actual error):
[...]
make[1]: Circular /home/ymorin/dev/buildroot/O/build/openssl-1.0.2h/.stamp_configured
<- cryptodev-linux dependency dropped.
>>> openssl 1.0.2h Downloading
[...]
So the build fails later on, when openssl is actually built:
eng_cryptodev.c:57:31: fatal error: crypto/cryptodev.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'eng_cryptodev.o' failed
Furthermore, graph-depends also detects the circular dependency, but
treats it as a hard-error:
Recursion detected for : cryptodev-linux
which is a dependency of: openssl
which is a dependency of: libcurl
which is a dependency of: systemd
which is a dependency of: udev
which is a dependency of: pciutils
which is a dependency of: linux
which is a dependency of: cryptodev-linux
Makefile:738: recipe for target 'graph-depends' failed
Of course, there is no way to break the loop without losing
functionality in either one of the involved packages *and* keep
our infrastructure and packages as-is.
The only solution is to break the loop at the linux-tools level, by
moving them away into their own package, so that the linux package will
no longer have the opportunity to depend on another package via a
dependency of one the tools.
All three linux tools are thus moved away to their own package.
The package infrastructure only knows of three types of packages: those
in package/ , in boot/ , in toolchain/ and the one in linux/ . So we
create that new linux-tools package in package/ so that we don't have to
fiddle with yet another special case in the infra. Still, we want its
configure options to appear in the kernel's sub-menu.
So, we make it a prompt-less package, with only the tools visible as
options of that package, but without the usual dependency on their
master symbol; they only depend on the Linux kernel.
Furthermore, because the kernel is such a huge pile of code, we would
not be very happy to extract it a second time just for the sake of a few
tools. We can't extract only the tools/ sub-directory from the kernel
source either, because some tools have hard-coded path to includes from
the kernel (arch and stuff).
Instead, we just use the linux source tree as our own build tree, and
ensure the linux tree is extracted and patched before linux-tools is
configured and built.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Paul Ashford <paul.ashford@zurria.co.uk>
[Thomas:
- fix typo #(@D) -> $(@D)
- fix the inclusion of the per-tool .mk files.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-09-06 16:29:14 +02:00
|
|
|
source "package/linux-tools/Config.in"
|
2015-07-14 19:35:13 +02:00
|
|
|
|
New, simpler, infrastructure for building the Linux kernel
This patch introduces a single, simple, infrastructure to build the
Linux kernel. The configuration is limited to :
* Kernel version: a fixed recent stable version, same as kernel
headers version (for internal toolchains only), custom stable
version, or custom tarball URL
* Kernel patch: either a local file, directory or an URL
* Kernel configuration: either the name of a defconfig or the
location of a custom configuration file
* Kernel image: either uImage, bzImage, zImage or vmlinux.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-03 18:46:46 +02:00
|
|
|
endif # BR2_LINUX_KERNEL
|
|
|
|
|
|
|
|
endmenu
|