Bump buildroot to 2020.11-rc1 (#985)

* Update buildroot-patches for 2020.11-rc1 buildroot

* Update buildroot to 2020.11-rc1

Signed-off-by: Stefan Agner <stefan@agner.ch>

* Don't rely on sfdisk --list-free output

The --list-free (-F) argument does not allow machine readable mode. And
it seems that the output format changes over time (different spacing,
using size postfixes instead of raw blocks).

Use sfdisk json output and calculate free partition space ourselfs. This
works for 2.35 and 2.36 and is more robust since we rely on output which
is meant for scripts to parse.

* Migrate defconfigs for Buildroot 2020.11-rc1

In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE).

* Rebase/remove systemd patches for systemd 246

* Drop apparmor/libapparmor from buildroot-external

* hassos-persists: use /run as directory for lockfiles

The U-Boot tools use /var/lock by default which is not created any more
by systemd by default (it is under tmpfiles legacy.conf, which we no
longer install).

* Disable systemd-update-done.service

The service is not suited for pure read-only systems. In particular the
service needs to be able to write a file in /etc and /var. Remove the
service. Note: This is a static service and cannot be removed using
systemd-preset.

* Disable apparmor.service for now

The service loads all default profiles. Some might actually cause
problems. E.g. the profile for ping seems not to match our setup for
/etc/resolv.conf:
[85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
This commit is contained in:
Stefan Agner
2020-11-13 18:25:44 +01:00
committed by GitHub
parent 25a0dd3082
commit a0871be6c0
4024 changed files with 68095 additions and 47900 deletions

View File

@@ -2,6 +2,7 @@ menu "Kernel"
config BR2_LINUX_KERNEL
bool "Linux Kernel"
select BR2_PACKAGE_HOST_KMOD # Unconditional, even if modules not enabled
select BR2_PACKAGE_HOST_IMAGEMAGICK if BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH != ""
help
Enable this option if you want to build a Linux kernel for
@@ -27,7 +28,7 @@ choice
prompt "Kernel version"
config BR2_LINUX_KERNEL_LATEST_VERSION
bool "Latest version (5.4)"
bool "Latest version (5.9)"
config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
bool "Latest CIP SLTS version (4.19.132-cip30)"
@@ -113,13 +114,9 @@ if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL
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
help
Revision to use in the typical format used by
Git/Mercurial/Subversion E.G. a sha id, a tag, branch, ..
@@ -128,7 +125,7 @@ endif
config BR2_LINUX_KERNEL_VERSION
string
default "5.4.70" if BR2_LINUX_KERNEL_LATEST_VERSION
default "5.9" if BR2_LINUX_KERNEL_LATEST_VERSION
default "4.19.132-cip30" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION
default "4.19.132-cip30-rt12" if BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
@@ -230,7 +227,7 @@ config BR2_LINUX_KERNEL_APPENDED_UIMAGE
config BR2_LINUX_KERNEL_BZIMAGE
bool "bzImage"
depends on BR2_i386 || BR2_x86_64
depends on BR2_i386 || BR2_x86_64 || BR2_s390x
config BR2_LINUX_KERNEL_ZIMAGE
bool "zImage"
@@ -325,6 +322,9 @@ config BR2_LINUX_KERNEL_LZO
config BR2_LINUX_KERNEL_XZ
bool "xz compression"
config BR2_LINUX_KERNEL_ZSTD
bool "zstd compression"
endchoice
config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME
@@ -407,6 +407,13 @@ config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
You can provide a list of dts paths to copy and
build, separated by spaces.
config BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME
bool "Keep the directory name of the Device Tree"
help
If enabled, the device tree blobs keep their
directory prefixes when they get copied to the
output image directory or the target directory.
config BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT
bool "Build Device Tree with overlay support"
help

View File

@@ -1,4 +1,6 @@
# From https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc
sha256 3239a4ee1250bf2048be988cc8cb46c487b2c8a0de5b1b032d38394d5c6b1a06 linux-5.9.tar.xz
sha256 ee767991808d234ad9acd17f0ba94ba7979d30c528876bee6fba337ea540f0af linux-5.8.14.tar.xz
sha256 c0b3d8085c5ba235df38b00b740e053659709e8a5ca21957a239f6bc22c45007 linux-5.4.70.tar.xz
# From https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc
sha256 067814035c17e77dee84076dcc06a95eb675344cd926b7b79a16b80fee593364 linux-4.4.238.tar.xz
@@ -10,6 +12,6 @@ sha256 c20f9014b89ea3e27f55f1d407aa5a4724ed38ac520c197291e9d644f164c43a linux-
sha256 81dd791d9ad6c3fddaeaffc6d7d8df0e13831283a5fe494c437ac7820d79ca39 linux-cip-4.19.132-cip30-rt12.tar.gz
# Licenses hashes
sha256 ee5808b032a67f587d3541099d46de34f5bec8cd5976114ba07f1299ee6001ff COPYING
sha256 fb5a425bd3b3cd6071a3a9aff9909a859e7c1158d54d32e07658398cd67eb6a0 COPYING
sha256 f6b78c087c3ebdf0f3c13415070dd480a3f35d8fc76f3d02180a407c1c812f79 LICENSES/preferred/GPL-2.0
sha256 8e378ab93586eb55135d3bc119cce787f7324f48394777d00c34fa3d0be3303f LICENSES/exceptions/Linux-syscall-note

View File

@@ -98,12 +98,15 @@ else ifeq ($(BR2_LINUX_KERNEL_LZO),y)
LINUX_DEPENDENCIES += host-lzop
else ifeq ($(BR2_LINUX_KERNEL_XZ),y)
LINUX_DEPENDENCIES += host-xz
else ifeq ($(BR2_LINUX_KERNEL_ZSTD),y)
LINUX_DEPENDENCIES += host-zstd
endif
LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_GZIP) += CONFIG_KERNEL_GZIP
LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZ4) += CONFIG_KERNEL_LZ4
LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZMA) += CONFIG_KERNEL_LZMA
LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZO) += CONFIG_KERNEL_LZO
LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_XZ) += CONFIG_KERNEL_XZ
LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_ZSTD) += CONFIG_KERNEL_ZSTD
ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL),y)
LINUX_DEPENDENCIES += host-openssl
@@ -305,40 +308,40 @@ LINUX_NEEDS_MODULES ?= $(BR2_LINUX_NEEDS_MODULES)
# 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)
$(call KCONFIG_ENABLE_OPT,CONFIG_CPU_BIG_ENDIAN)
endef
else
define LINUX_FIXUP_CONFIG_ENDIANNESS
$(call KCONFIG_ENABLE_OPT,CONFIG_CPU_LITTLE_ENDIAN,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_CPU_LITTLE_ENDIAN)
endef
endif
define LINUX_KCONFIG_FIXUP_CMDS
$(if $(LINUX_NEEDS_MODULES),
$(call KCONFIG_ENABLE_OPT,CONFIG_MODULES,$(@D)/.config))
$(call KCONFIG_ENABLE_OPT,$(strip $(LINUX_COMPRESSION_OPT_y)),$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_MODULES))
$(call KCONFIG_ENABLE_OPT,$(strip $(LINUX_COMPRESSION_OPT_y)))
$(foreach opt, $(LINUX_COMPRESSION_OPT_),
$(call KCONFIG_DISABLE_OPT,$(opt),$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,$(opt))
)
$(LINUX_FIXUP_CONFIG_ENDIANNESS)
$(if $(BR2_arm)$(BR2_armeb),
$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config))
$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI))
$(if $(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),
$(call KCONFIG_ENABLE_OPT,CONFIG_PPC_DISABLE_WERROR,$(@D)/.config))
$(call KCONFIG_ENABLE_OPT,CONFIG_PPC_DISABLE_WERROR))
$(if $(BR2_ARC_PAGE_SIZE_4K),
$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K,$(@D)/.config))
$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K)
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K)
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K))
$(if $(BR2_ARC_PAGE_SIZE_8K),
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K,$(@D)/.config))
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K)
$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K)
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K))
$(if $(BR2_ARC_PAGE_SIZE_16K),
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K,$(@D)/.config))
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K)
$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K)
$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K))
$(if $(BR2_TARGET_ROOTFS_CPIO),
$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config))
$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD))
# As the kernel gets compiled before root filesystems are
# built, we create a fake cpio file. It'll be
# replaced later by the real cpio archive, and the kernel will be
@@ -346,70 +349,24 @@ define LINUX_KCONFIG_FIXUP_CMDS
$(if $(BR2_TARGET_ROOTFS_INITRAMFS),
mkdir -p $(BINARIES_DIR)
touch $(BINARIES_DIR)/rootfs.cpio
$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,"$${BR_BINARIES_DIR}/rootfs.cpio",$(@D)/.config)
$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config)
$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config))
$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,"$${BR_BINARIES_DIR}/rootfs.cpio")
$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0)
$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0))
$(if $(BR2_ROOTFS_DEVICE_CREATION_STATIC),,
$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config))
$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS)
$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT))
$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV),
$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
$(call KCONFIG_ENABLE_OPT,CONFIG_NET,$(@D)/.config))
$(if $(BR2_PACKAGE_AUDIT),
$(call KCONFIG_ENABLE_OPT,CONFIG_NET,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT,$(@D)/.config))
$(if $(BR2_PACKAGE_INTEL_MICROCODE),
$(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE_INTEL,$(@D)/.config))
$(if $(BR2_PACKAGE_KTAP),
$(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_ENABLE_DEFAULT_TRACERS,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER,$(@D)/.config))
$(if $(BR2_PACKAGE_LINUX_TOOLS_PERF),
$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS,$(@D)/.config))
$(if $(BR2_PACKAGE_PCM_TOOLS),
$(call KCONFIG_ENABLE_OPT,CONFIG_X86_MSR,$(@D)/.config))
$(if $(BR2_PACKAGE_SYSTEMD),
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_XATTR,$(@D)/.config))
$(if $(BR2_PACKAGE_SMACK),
$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SMACK,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK,$(@D)/.config))
$(if $(BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER),
$(call KCONFIG_ENABLE_OPT,CONFIG_CMA,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_DMA_CMA,$(@D)/.config))
$(if $(BR2_PACKAGE_IPTABLES),
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XTABLES,$(@D)/.config))
$(if $(BR2_PACKAGE_XTABLES_ADDONS),
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK_MARK,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_NF_NAT,$(@D)/.config))
$(if $(BR2_PACKAGE_WIREGUARD_LINUX_COMPAT),
$(call KCONFIG_ENABLE_OPT,CONFIG_INET,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_FOU,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_MANAGER,$(@D)/.config))
$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
$(if $(BR2_LINUX_KERNEL_APPENDED_DTB),
$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config))
$(if $(BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV),
$(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV,$(@D)/.config))
$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB))
$(if $(LINUX_KERNEL_CUSTOM_LOGO_PATH),
$(call KCONFIG_ENABLE_OPT,CONFIG_FB,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224,$(@D)/.config))
$(call KCONFIG_DISABLE_OPT,CONFIG_GCC_PLUGINS,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_FB)
$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO)
$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224))
$(call KCONFIG_DISABLE_OPT,CONFIG_GCC_PLUGINS)
$(PACKAGES_LINUX_CONFIG_FIXUPS)
endef
ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y)
@@ -425,10 +382,11 @@ endef
ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),)
define LINUX_INSTALL_DTB
# dtbs moved from arch/<ARCH>/boot to arch/<ARCH>/boot/dts since 3.8-rc1
cp $(addprefix \
$(LINUX_ARCH_PATH)/boot/$(if $(wildcard \
$(addprefix $(LINUX_ARCH_PATH)/boot/dts/,$(LINUX_DTBS))),dts/),$(LINUX_DTBS)) \
$(1)
$(foreach dtb,$(LINUX_DTBS), \
install -D \
$(or $(wildcard $(LINUX_ARCH_PATH)/boot/dts/$(dtb)),$(LINUX_ARCH_PATH)/boot/$(dtb)) \
$(1)/$(if $(BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME),$(dtb),$(notdir $(dtb)))
)
endef
endif # BR2_LINUX_KERNEL_APPENDED_DTB
endif # BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
@@ -472,7 +430,7 @@ endif
# The call to disable gcc-plugins is a stop-gap measure:
# http://lists.busybox.net/pipermail/buildroot/2020-May/282727.html
define LINUX_BUILD_CMDS
$(call KCONFIG_DISABLE_OPT,CONFIG_GCC_PLUGINS,$(@D)/.config)
$(call KCONFIG_DISABLE_OPT,CONFIG_GCC_PLUGINS)
$(foreach dts,$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)), \
cp -f $(dts) $(LINUX_ARCH_PATH)/boot/dts/
)