Update buidlroot to version 2016.08.1
This commit is contained in:
@@ -18,16 +18,15 @@ config BR2_LINUX_NEEDS_MODULES
|
||||
# Version selection. We provide the choice between:
|
||||
#
|
||||
# 1. A single fairly recent stable kernel version
|
||||
# 2. In case an internal toolchain has been built, the same kernel
|
||||
# version as the kernel headers
|
||||
# 3. A custom stable version
|
||||
# 4. A custom tarball
|
||||
# 2. A custom stable version
|
||||
# 3. A custom tarball
|
||||
# 4. A set of custom repository locations
|
||||
#
|
||||
choice
|
||||
prompt "Kernel version"
|
||||
|
||||
config BR2_LINUX_KERNEL_LATEST_VERSION
|
||||
bool "4.4.3"
|
||||
bool "Latest version (4.7.2)"
|
||||
|
||||
config BR2_LINUX_KERNEL_CUSTOM_VERSION
|
||||
bool "Custom version"
|
||||
@@ -63,6 +62,12 @@ config BR2_LINUX_KERNEL_CUSTOM_HG
|
||||
This option allows Buildroot to get the Linux kernel source
|
||||
code from a Mercurial repository.
|
||||
|
||||
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.
|
||||
|
||||
config BR2_LINUX_KERNEL_CUSTOM_LOCAL
|
||||
bool "Local directory"
|
||||
help
|
||||
@@ -79,7 +84,7 @@ config BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION
|
||||
string "URL of custom kernel tarball"
|
||||
depends on BR2_LINUX_KERNEL_CUSTOM_TARBALL
|
||||
|
||||
if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG
|
||||
if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN
|
||||
|
||||
config BR2_LINUX_KERNEL_CUSTOM_REPO_URL
|
||||
string "URL of custom repository"
|
||||
@@ -91,7 +96,7 @@ config BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION
|
||||
default BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION \
|
||||
if BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION != "" # legacy
|
||||
help
|
||||
Revision to use in the typical format used by Git/Mercurial
|
||||
Revision to use in the typical format used by Git/Mercurial/Subversion
|
||||
E.G. a sha id, a tag, branch, ..
|
||||
|
||||
endif
|
||||
@@ -104,12 +109,12 @@ config BR2_LINUX_KERNEL_CUSTOM_LOCAL_PATH
|
||||
|
||||
config BR2_LINUX_KERNEL_VERSION
|
||||
string
|
||||
default "4.4.3" if BR2_LINUX_KERNEL_LATEST_VERSION
|
||||
default "4.7.2" if BR2_LINUX_KERNEL_LATEST_VERSION
|
||||
default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
|
||||
if BR2_LINUX_KERNEL_CUSTOM_VERSION
|
||||
default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL
|
||||
default BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION \
|
||||
if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG
|
||||
if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN
|
||||
default "custom" if BR2_LINUX_KERNEL_CUSTOM_LOCAL
|
||||
|
||||
#
|
||||
@@ -136,6 +141,14 @@ choice
|
||||
config BR2_LINUX_KERNEL_USE_DEFCONFIG
|
||||
bool "Using an in-tree defconfig file"
|
||||
|
||||
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.
|
||||
|
||||
config BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG
|
||||
bool "Using a custom (def)config file"
|
||||
|
||||
@@ -173,6 +186,7 @@ config BR2_LINUX_KERNEL_UBOOT_IMAGE
|
||||
|
||||
choice
|
||||
prompt "Kernel binary format"
|
||||
default BR2_LINUX_KERNEL_ZIMAGE if BR2_arm || BR2_armeb
|
||||
|
||||
config BR2_LINUX_KERNEL_UIMAGE
|
||||
bool "uImage"
|
||||
|
||||
@@ -3,11 +3,17 @@ menu "Linux Kernel Tools"
|
||||
config BR2_LINUX_KERNEL_TOOL_CPUPOWER
|
||||
bool "cpupower"
|
||||
depends on !BR2_bfin # pciutils
|
||||
depends on BR2_USE_WCHAR || !BR2_NEEDS_GETTEXT # gettext
|
||||
select BR2_PACKAGE_PCIUTILS
|
||||
select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
|
||||
help
|
||||
cpupower is a collection of tools to examine and tune power
|
||||
saving related features of your processor.
|
||||
|
||||
comment "cpupower needs a toolchain w/ wchar"
|
||||
depends on !BR2_bfin
|
||||
depends on !BR2_USE_WCHAR && BR2_NEEDS_GETTEXT
|
||||
|
||||
config BR2_LINUX_KERNEL_TOOL_PERF
|
||||
bool "perf"
|
||||
help
|
||||
@@ -26,4 +32,26 @@ config BR2_LINUX_KERNEL_TOOL_PERF
|
||||
|
||||
https://perf.wiki.kernel.org/
|
||||
|
||||
config BR2_LINUX_KERNEL_TOOL_SELFTESTS
|
||||
bool"selftests"
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
|
||||
depends on BR2_USE_MMU # bash
|
||||
select BR2_PACKAGE_BASH # runtime
|
||||
select BR2_PACKAGE_POPT
|
||||
select BR2_PACKAGE_LIBCAP_NG
|
||||
help
|
||||
Build and install (to /usr/lib/kselftests) kernel selftests.
|
||||
|
||||
Use of this option implies you know the process of using and
|
||||
compiling the kernel selftests. The Makefile to build and
|
||||
install these is very noisy and may appear to cause your
|
||||
build to fail for strange reasons.
|
||||
|
||||
This is very much a use at your risk option and may not work
|
||||
for every setup or every architecture.
|
||||
|
||||
comment "selftests needs BR2_PACKAGE_BUSYBOX_SHOW_OTHERS"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
|
||||
LINUX_TOOLS += cpupower
|
||||
|
||||
CPUPOWER_DEPENDENCIES = pciutils
|
||||
CPUPOWER_DEPENDENCIES = pciutils $(if $(BR2_NEEDS_GETTEXT),gettext)
|
||||
|
||||
CPUPOWER_MAKE_OPTS = CROSS=$(TARGET_CROSS) \
|
||||
CPUFREQ_BENCH=false \
|
||||
NLS=false \
|
||||
$(if $(BR2_NEEDS_GETTEXT),LDFLAGS=-lintl) \
|
||||
DEBUG=false
|
||||
|
||||
define CPUPOWER_BUILD_CMDS
|
||||
|
||||
@@ -16,16 +16,17 @@ endif
|
||||
|
||||
PERF_MAKE_FLAGS = \
|
||||
$(LINUX_MAKE_FLAGS) \
|
||||
JOBS=$(PARALLEL_JOBS) \
|
||||
ARCH=$(PERF_ARCH) \
|
||||
DESTDIR=$(TARGET_DIR) \
|
||||
prefix=/usr \
|
||||
WERROR=0 \
|
||||
NO_LIBAUDIT=1 \
|
||||
NO_NEWT=1 \
|
||||
NO_GTK2=1 \
|
||||
NO_LIBPERL=1 \
|
||||
NO_LIBPYTHON=1 \
|
||||
DESTDIR=$(TARGET_DIR) \
|
||||
prefix=/usr \
|
||||
WERROR=0 \
|
||||
ASCIIDOC=
|
||||
NO_LIBBIONIC=1
|
||||
|
||||
# We need to pass an argument to ld for setting the endianness when
|
||||
# building it for MIPS architecture, otherwise the default one will
|
||||
@@ -52,14 +53,20 @@ endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SLANG),y)
|
||||
PERF_DEPENDENCIES += slang
|
||||
else
|
||||
PERF_MAKE_FLAGS += NO_SLANG=1
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
|
||||
PERF_DEPENDENCIES += libunwind
|
||||
else
|
||||
PERF_MAKE_FLAGS += NO_LIBUNWIND=1
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NUMACTL),y)
|
||||
PERF_DEPENDENCIES += numactl
|
||||
else
|
||||
PERF_MAKE_FLAGS += NO_LIBNUMA=1
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ELFUTILS),y)
|
||||
@@ -68,6 +75,32 @@ else
|
||||
PERF_MAKE_FLAGS += NO_LIBELF=1 NO_DWARF=1
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||
PERF_DEPENDENCIES += zlib
|
||||
else
|
||||
PERF_MAKE_FLAGS += NO_ZLIB=1
|
||||
endif
|
||||
|
||||
# lzma is provided by xz
|
||||
ifeq ($(BR2_PACKAGE_XZ),y)
|
||||
PERF_DEPENDENCIES += xz
|
||||
else
|
||||
PERF_MAKE_FLAGS += NO_LZMA=1
|
||||
endif
|
||||
|
||||
# We really do not want to build the perf documentation, because it
|
||||
# has stringent requirement on the documentation generation tools,
|
||||
# like xmlto and asciidoc), which may be lagging behind on some
|
||||
# distributions.
|
||||
# We name it 'GNUmakefile' so that GNU make will use it instead of
|
||||
# the existing 'Makefile'.
|
||||
define PERF_DISABLE_DOCUMENTATION
|
||||
if [ -f $(@D)/tools/perf/Documentation/Makefile ]; then \
|
||||
printf "%%:\n\t@:\n" >$(@D)/tools/perf/Documentation/GNUmakefile; \
|
||||
fi
|
||||
endef
|
||||
LINUX_POST_PATCH_HOOKS += PERF_DISABLE_DOCUMENTATION
|
||||
|
||||
# O must be redefined here to overwrite the one used by Buildroot for
|
||||
# out of tree build. We build perf in $(@D)/tools/perf/ and not just
|
||||
# $(@D) so that it isn't built in the root directory of the kernel
|
||||
|
||||
46
bsp/buildroot/linux/linux-tool-selftests.mk
Normal file
46
bsp/buildroot/linux/linux-tool-selftests.mk
Normal file
@@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
#
|
||||
# selftests
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LINUX_TOOLS += selftests
|
||||
|
||||
ifeq ($(KERNEL_ARCH),x86_64)
|
||||
SELFTESTS_ARCH=x86
|
||||
else
|
||||
ifeq ($(KERNEL_ARCH),i386)
|
||||
SELFTESTS_ARCH=x86
|
||||
else
|
||||
SELFTESTS_ARCH=$(KERNEL_ARCH)
|
||||
endif
|
||||
endif
|
||||
|
||||
SELFTESTS_DEPENDENCIES = libcap-ng popt
|
||||
|
||||
SELFTESTS_MAKE_FLAGS = \
|
||||
$(LINUX_MAKE_FLAGS) \
|
||||
ARCH=$(SELFTESTS_ARCH)
|
||||
|
||||
# O must be redefined here to overwrite the one used by Buildroot for
|
||||
# out of tree build. We build the selftests in $(@D)/tools/selftests and
|
||||
# not just $(@D) so that it isn't built in the root directory of the kernel
|
||||
# sources.
|
||||
#
|
||||
# The headers_install step here is important as some kernel selftests use a
|
||||
# hardcoded CFLAGS to find kernel headers e.g:
|
||||
# CFLAGS += -I../../../../usr/include/
|
||||
# The headers_install target will install the kernel headers locally inside
|
||||
# the Linux build dir
|
||||
define SELFTESTS_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) $(SELFTESTS_MAKE_FLAGS) \
|
||||
headers_install
|
||||
$(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)/tools/testing/selftests \
|
||||
$(SELFTESTS_MAKE_FLAGS) O=$(@D)/tools/testing/selftests
|
||||
endef
|
||||
|
||||
define SELFTESTS_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)/tools/testing/selftests \
|
||||
$(SELFTESTS_MAKE_FLAGS) O=$(@D)/tools/testing/selftests \
|
||||
INSTALL_PATH=$(TARGET_DIR)/usr/lib/kselftests install
|
||||
endef
|
||||
@@ -8,6 +8,13 @@ LINUX_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
|
||||
LINUX_LICENSE = GPLv2
|
||||
LINUX_LICENSE_FILES = COPYING
|
||||
|
||||
define LINUX_HELP_CMDS
|
||||
@echo ' linux-menuconfig - Run Linux kernel menuconfig'
|
||||
@echo ' linux-savedefconfig - Run Linux kernel savedefconfig'
|
||||
@echo ' linux-update-defconfig - Save the Linux configuration to the path specified'
|
||||
@echo ' by BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE'
|
||||
endef
|
||||
|
||||
# Compute LINUX_SOURCE and LINUX_SITE from the configuration
|
||||
ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y)
|
||||
LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
|
||||
@@ -23,6 +30,9 @@ LINUX_SITE_METHOD = git
|
||||
else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_HG),y)
|
||||
LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL))
|
||||
LINUX_SITE_METHOD = hg
|
||||
else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_SVN),y)
|
||||
LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL))
|
||||
LINUX_SITE_METHOD = svn
|
||||
else
|
||||
LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz
|
||||
ifeq ($(BR2_LINUX_KERNEL_CUSTOM_VERSION),y)
|
||||
@@ -196,6 +206,8 @@ LINUX_POST_PATCH_HOOKS += LINUX_TRY_PATCH_TIMECONST
|
||||
|
||||
ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
|
||||
LINUX_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig
|
||||
else ifeq ($(BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG),y)
|
||||
LINUX_KCONFIG_DEFCONFIG = defconfig
|
||||
else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
|
||||
LINUX_KCONFIG_FILE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE))
|
||||
endif
|
||||
@@ -206,6 +218,20 @@ LINUX_KCONFIG_OPTS = $(LINUX_MAKE_FLAGS)
|
||||
# If no package has yet set it, set it from the Kconfig option
|
||||
LINUX_NEEDS_MODULES ?= $(BR2_LINUX_NEEDS_MODULES)
|
||||
|
||||
# Make sure the Linux kernel is built with the right endianness. Not
|
||||
# all architectures support
|
||||
# CONFIG_CPU_BIG_ENDIAN/CONFIG_CPU_LITTLE_ENDIAN in Linux, but the
|
||||
# option will be thrown away and ignored if it doesn't exist.
|
||||
ifeq ($(BR2_ENDIAN),"BIG")
|
||||
define LINUX_FIXUP_CONFIG_ENDIANNESS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CPU_BIG_ENDIAN,$(@D)/.config)
|
||||
endef
|
||||
else
|
||||
define LINUX_FIXUP_CONFIG_ENDIANNESS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CPU_LITTLE_ENDIAN,$(@D)/.config)
|
||||
endef
|
||||
endif
|
||||
|
||||
define LINUX_KCONFIG_FIXUP_CMDS
|
||||
$(if $(LINUX_NEEDS_MODULES),
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_MODULES,$(@D)/.config))
|
||||
@@ -213,6 +239,7 @@ define LINUX_KCONFIG_FIXUP_CMDS
|
||||
$(foreach opt, $(LINUX_COMPRESSION_OPT_),
|
||||
$(call KCONFIG_DISABLE_OPT,$(opt),$(@D)/.config)
|
||||
)
|
||||
$(LINUX_FIXUP_CONFIG_ENDIANNESS)
|
||||
$(if $(BR2_arm)$(BR2_armeb),
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config))
|
||||
$(if $(BR2_TARGET_ROOTFS_CPIO),
|
||||
@@ -348,6 +375,9 @@ define LINUX_INSTALL_HOST_TOOLS
|
||||
# Installing dtc (device tree compiler) as host tool, if selected
|
||||
if grep -q "CONFIG_DTC=y" $(@D)/.config; then \
|
||||
$(INSTALL) -D -m 0755 $(@D)/scripts/dtc/dtc $(HOST_DIR)/usr/bin/linux-dtc ; \
|
||||
if [ ! -e $(HOST_DIR)/usr/bin/dtc ]; then \
|
||||
ln -sf linux-dtc $(HOST_DIR)/usr/bin/dtc ; \
|
||||
fi \
|
||||
fi
|
||||
endef
|
||||
|
||||
@@ -444,8 +474,8 @@ $(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LI
|
||||
# Build the kernel.
|
||||
$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
|
||||
$(LINUX_APPEND_DTB)
|
||||
# Copy the kernel image to its final destination
|
||||
cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)
|
||||
# Copy the kernel image(s) to its(their) final destination
|
||||
$(call LINUX_INSTALL_IMAGE,$(BINARIES_DIR))
|
||||
# If there is a .ub file copy it to the final destination
|
||||
test ! -f $(LINUX_IMAGE_PATH).ub || cp $(LINUX_IMAGE_PATH).ub $(BINARIES_DIR)
|
||||
$(Q)touch $@
|
||||
|
||||
Reference in New Issue
Block a user