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:
@@ -55,62 +55,6 @@ define step_time
|
||||
endef
|
||||
GLOBAL_INSTRUMENTATION_HOOKS += step_time
|
||||
|
||||
# Hooks to collect statistics about installed files
|
||||
|
||||
# $(1): package name
|
||||
# $(2): base directory to search in
|
||||
# $(3): suffix of file (optional)
|
||||
define step_pkg_size_before
|
||||
cd $(2); \
|
||||
LC_ALL=C find . \( -type f -o -type l \) -printf '%T@:%i:%#m:%y:%s,%p\n' \
|
||||
| LC_ALL=C sort > $($(PKG)_DIR)/.files-list$(3).before
|
||||
endef
|
||||
|
||||
# $(1): package name
|
||||
# $(2): base directory to search in
|
||||
# $(3): suffix of file (optional)
|
||||
define step_pkg_size_after
|
||||
cd $(2); \
|
||||
LC_ALL=C find . \( -type f -o -type l \) -printf '%T@:%i:%#m:%y:%s,%p\n' \
|
||||
| LC_ALL=C sort > $($(PKG)_DIR)/.files-list$(3).after
|
||||
LC_ALL=C comm -13 \
|
||||
$($(PKG)_DIR)/.files-list$(3).before \
|
||||
$($(PKG)_DIR)/.files-list$(3).after \
|
||||
| sed -r -e 's/^[^,]+/$(1)/' \
|
||||
> $($(PKG)_DIR)/.files-list$(3).txt
|
||||
rm -f $($(PKG)_DIR)/.files-list$(3).before
|
||||
rm -f $($(PKG)_DIR)/.files-list$(3).after
|
||||
endef
|
||||
|
||||
define step_pkg_size
|
||||
$(if $(filter start-install-target,$(1)-$(2)),\
|
||||
$(call step_pkg_size_before,$(3),$(TARGET_DIR)))
|
||||
$(if $(filter start-install-staging,$(1)-$(2)),\
|
||||
$(call step_pkg_size_before,$(3),$(STAGING_DIR),-staging))
|
||||
$(if $(filter start-install-host,$(1)-$(2)),\
|
||||
$(call step_pkg_size_before,$(3),$(HOST_DIR),-host))
|
||||
|
||||
$(if $(filter end-install-target,$(1)-$(2)),\
|
||||
$(call step_pkg_size_after,$(3),$(TARGET_DIR)))
|
||||
$(if $(filter end-install-staging,$(1)-$(2)),\
|
||||
$(call step_pkg_size_after,$(3),$(STAGING_DIR),-staging))
|
||||
$(if $(filter end-install-host,$(1)-$(2)),\
|
||||
$(call step_pkg_size_after,$(3),$(HOST_DIR),-host))
|
||||
endef
|
||||
GLOBAL_INSTRUMENTATION_HOOKS += step_pkg_size
|
||||
|
||||
# Relies on step_pkg_size, so must be after
|
||||
define check_bin_arch
|
||||
$(if $(filter end-install-target,$(1)-$(2)),\
|
||||
support/scripts/check-bin-arch -p $(3) \
|
||||
-l $($(PKG)_DIR)/.files-list.txt \
|
||||
$(foreach i,$($(PKG)_BIN_ARCH_EXCLUDE),-i "$(i)") \
|
||||
-r $(TARGET_READELF) \
|
||||
-a $(BR2_READELF_ARCH_NAME))
|
||||
endef
|
||||
|
||||
GLOBAL_INSTRUMENTATION_HOOKS += check_bin_arch
|
||||
|
||||
# This hook checks that host packages that need libraries that we build
|
||||
# have a proper DT_RPATH or DT_RUNPATH tag
|
||||
define check_host_rpath
|
||||
@@ -158,6 +102,39 @@ define fixup-libtool-files
|
||||
endef
|
||||
endif
|
||||
|
||||
# Functions to collect statistics about installed files
|
||||
|
||||
# $(1): base directory to search in
|
||||
# $(2): suffix of file (optional)
|
||||
define pkg_size_before
|
||||
cd $(1); \
|
||||
LC_ALL=C find . -not -path './$(STAGING_SUBDIR)/*' \( -type f -o -type l \) -printf '%T@:%i:%#m:%y:%s,%p\n' \
|
||||
| LC_ALL=C sort > $($(PKG)_DIR)/.files-list$(2).before
|
||||
endef
|
||||
|
||||
# $(1): base directory to search in
|
||||
# $(2): suffix of file (optional)
|
||||
define pkg_size_after
|
||||
cd $(1); \
|
||||
LC_ALL=C find . -not -path './$(STAGING_SUBDIR)/*' \( -type f -o -type l \) -printf '%T@:%i:%#m:%y:%s,%p\n' \
|
||||
| LC_ALL=C sort > $($(PKG)_DIR)/.files-list$(2).after
|
||||
LC_ALL=C comm -13 \
|
||||
$($(PKG)_DIR)/.files-list$(2).before \
|
||||
$($(PKG)_DIR)/.files-list$(2).after \
|
||||
| sed -r -e 's/^[^,]+/$($(PKG)_NAME)/' \
|
||||
> $($(PKG)_DIR)/.files-list$(2).txt
|
||||
rm -f $($(PKG)_DIR)/.files-list$(2).before
|
||||
rm -f $($(PKG)_DIR)/.files-list$(2).after
|
||||
endef
|
||||
|
||||
define check_bin_arch
|
||||
support/scripts/check-bin-arch -p $($(PKG)_NAME) \
|
||||
-l $($(PKG)_DIR)/.files-list.txt \
|
||||
$(foreach i,$($(PKG)_BIN_ARCH_EXCLUDE),-i "$(i)") \
|
||||
-r $(TARGET_READELF) \
|
||||
-a $(BR2_READELF_ARCH_NAME)
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Implicit targets -- produce a stamp file for each step of a package build
|
||||
################################################################################
|
||||
@@ -253,7 +230,11 @@ $(foreach dir,$(call qstrip,$(BR2_GLOBAL_PATCH_DIR)),\
|
||||
$(BUILD_DIR)/%/.stamp_configured:
|
||||
@$(call step_start,configure)
|
||||
@$(call MESSAGE,"Configuring")
|
||||
$(Q)mkdir -p $(HOST_DIR) $(TARGET_DIR) $(STAGING_DIR) $(BINARIES_DIR)
|
||||
$(call prepare-per-package-directory,$($(PKG)_FINAL_DEPENDENCIES))
|
||||
@$(call pkg_size_before,$(TARGET_DIR))
|
||||
@$(call pkg_size_before,$(STAGING_DIR),-staging)
|
||||
@$(call pkg_size_before,$(HOST_DIR),-host)
|
||||
$(call fixup-libtool-files,$(NAME),$(STAGING_DIR))
|
||||
$(foreach hook,$($(PKG)_PRE_CONFIGURE_HOOKS),$(call $(hook))$(sep))
|
||||
$($(PKG)_CONFIGURE_CMDS)
|
||||
@@ -273,7 +254,6 @@ $(BUILD_DIR)/%/.stamp_built::
|
||||
|
||||
# Install to host dir
|
||||
$(BUILD_DIR)/%/.stamp_host_installed:
|
||||
@mkdir -p $(HOST_DIR)
|
||||
@$(call step_start,install-host)
|
||||
@$(call MESSAGE,"Installing to host directory")
|
||||
$(foreach hook,$($(PKG)_PRE_INSTALL_HOOKS),$(call $(hook))$(sep))
|
||||
@@ -303,7 +283,6 @@ $(BUILD_DIR)/%/.stamp_host_installed:
|
||||
# empty when we use an internal toolchain.
|
||||
#
|
||||
$(BUILD_DIR)/%/.stamp_staging_installed:
|
||||
@mkdir -p $(STAGING_DIR)
|
||||
@$(call step_start,install-staging)
|
||||
@$(call MESSAGE,"Installing to staging directory")
|
||||
$(foreach hook,$($(PKG)_PRE_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep))
|
||||
@@ -346,7 +325,6 @@ $(BUILD_DIR)/%/.stamp_staging_installed:
|
||||
|
||||
# Install to images dir
|
||||
$(BUILD_DIR)/%/.stamp_images_installed:
|
||||
@mkdir -p $(BINARIES_DIR)
|
||||
@$(call step_start,install-image)
|
||||
@$(call MESSAGE,"Installing to images directory")
|
||||
$(foreach hook,$($(PKG)_PRE_INSTALL_IMAGES_HOOKS),$(call $(hook))$(sep))
|
||||
@@ -357,7 +335,6 @@ $(BUILD_DIR)/%/.stamp_images_installed:
|
||||
|
||||
# Install to target dir
|
||||
$(BUILD_DIR)/%/.stamp_target_installed:
|
||||
@mkdir -p $(TARGET_DIR)
|
||||
@$(call step_start,install-target)
|
||||
@$(call MESSAGE,"Installing to target")
|
||||
$(foreach hook,$($(PKG)_PRE_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep))
|
||||
@@ -376,6 +353,15 @@ $(BUILD_DIR)/%/.stamp_target_installed:
|
||||
@$(call step_end,install-target)
|
||||
$(Q)touch $@
|
||||
|
||||
# Final installation step, completed when all installation steps
|
||||
# (host, images, staging, target) have completed
|
||||
$(BUILD_DIR)/%/.stamp_installed:
|
||||
@$(call pkg_size_after,$(TARGET_DIR))
|
||||
@$(call pkg_size_after,$(STAGING_DIR),-staging)
|
||||
@$(call pkg_size_after,$(HOST_DIR),-host)
|
||||
@$(call check_bin_arch)
|
||||
$(Q)touch $@
|
||||
|
||||
# Remove package sources
|
||||
$(BUILD_DIR)/%/.stamp_dircleaned:
|
||||
$(if $(BR2_PER_PACKAGE_DIRECTORIES),rm -Rf $(PER_PACKAGE_DIR)/$(NAME))
|
||||
@@ -577,7 +563,7 @@ ifndef $(2)_DL_OPTS
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($$(filter bzr cvs hg svn,$$($(2)_SITE_METHOD)),)
|
||||
ifneq ($$(filter bzr cvs hg,$$($(2)_SITE_METHOD)),)
|
||||
BR_NO_CHECK_HASH_FOR += $$($(2)_SOURCE)
|
||||
endif
|
||||
|
||||
@@ -706,11 +692,8 @@ $(2)_FINAL_RECURSIVE_RDEPENDENCIES = $$(sort \
|
||||
) \
|
||||
$$($(2)_FINAL_RECURSIVE_RDEPENDENCIES__X))
|
||||
|
||||
$(2)_INSTALL_STAGING ?= NO
|
||||
$(2)_INSTALL_IMAGES ?= NO
|
||||
$(2)_INSTALL_TARGET ?= YES
|
||||
|
||||
# define sub-target stamps
|
||||
$(2)_TARGET_INSTALL = $$($(2)_DIR)/.stamp_installed
|
||||
$(2)_TARGET_INSTALL_TARGET = $$($(2)_DIR)/.stamp_target_installed
|
||||
$(2)_TARGET_INSTALL_STAGING = $$($(2)_DIR)/.stamp_staging_installed
|
||||
$(2)_TARGET_INSTALL_IMAGES = $$($(2)_DIR)/.stamp_images_installed
|
||||
@@ -766,11 +749,23 @@ endif
|
||||
|
||||
# human-friendly targets and target sequencing
|
||||
$(1): $(1)-install
|
||||
$(1)-install: $$($(2)_TARGET_INSTALL)
|
||||
|
||||
ifeq ($$($(2)_TYPE),host)
|
||||
$(1)-install: $(1)-install-host
|
||||
$$($(2)_TARGET_INSTALL): $$($(2)_TARGET_INSTALL_HOST)
|
||||
else
|
||||
$(1)-install: $(1)-install-staging $(1)-install-target $(1)-install-images
|
||||
$(2)_INSTALL_STAGING ?= NO
|
||||
$(2)_INSTALL_IMAGES ?= NO
|
||||
$(2)_INSTALL_TARGET ?= YES
|
||||
ifeq ($$($(2)_INSTALL_TARGET),YES)
|
||||
$$($(2)_TARGET_INSTALL): $$($(2)_TARGET_INSTALL_TARGET)
|
||||
endif
|
||||
ifeq ($$($(2)_INSTALL_STAGING),YES)
|
||||
$$($(2)_TARGET_INSTALL): $$($(2)_TARGET_INSTALL_STAGING)
|
||||
endif
|
||||
ifeq ($$($(2)_INSTALL_IMAGES),YES)
|
||||
$$($(2)_TARGET_INSTALL): $$($(2)_TARGET_INSTALL_IMAGES)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$($(2)_INSTALL_TARGET),YES)
|
||||
@@ -920,6 +915,7 @@ $(1)-clean-for-reinstall:
|
||||
ifneq ($$($(2)_OVERRIDE_SRCDIR),)
|
||||
rm -f $$($(2)_TARGET_RSYNC)
|
||||
endif
|
||||
rm -f $$($(2)_TARGET_INSTALL)
|
||||
rm -f $$($(2)_TARGET_INSTALL_STAGING)
|
||||
rm -f $$($(2)_TARGET_INSTALL_TARGET)
|
||||
rm -f $$($(2)_TARGET_INSTALL_IMAGES)
|
||||
@@ -939,6 +935,7 @@ $(1)-reconfigure: $(1)-clean-for-reconfigure $(1)
|
||||
|
||||
# define the PKG variable for all targets, containing the
|
||||
# uppercase package variable prefix
|
||||
$$($(2)_TARGET_INSTALL): PKG=$(2)
|
||||
$$($(2)_TARGET_INSTALL_TARGET): PKG=$(2)
|
||||
$$($(2)_TARGET_INSTALL_STAGING): PKG=$(2)
|
||||
$$($(2)_TARGET_INSTALL_IMAGES): PKG=$(2)
|
||||
@@ -962,6 +959,7 @@ $$($(2)_TARGET_DIRCLEAN): NAME=$(1)
|
||||
# Compute the name of the Kconfig option that correspond to the
|
||||
# package being enabled. We handle three cases: the special Linux
|
||||
# kernel case, the bootloaders case, and the normal packages case.
|
||||
# Virtual packages are handled separately (see below).
|
||||
ifeq ($(1),linux)
|
||||
$(2)_KCONFIG_VAR = BR2_LINUX_KERNEL
|
||||
else ifneq ($$(filter boot/% $$(foreach dir,$$(BR2_EXTERNAL_DIRS),$$(dir)/boot/%),$(pkgdir)),)
|
||||
@@ -1084,10 +1082,19 @@ endif
|
||||
ifneq ($$($(2)_USERS),)
|
||||
PACKAGES_USERS += $$($(2)_USERS)$$(sep)
|
||||
endif
|
||||
ifneq ($$($(2)_LINUX_CONFIG_FIXUPS),)
|
||||
PACKAGES_LINUX_CONFIG_FIXUPS += $$($(2)_LINUX_CONFIG_FIXUPS)$$(sep)
|
||||
endif
|
||||
TARGET_FINALIZE_HOOKS += $$($(2)_TARGET_FINALIZE_HOOKS)
|
||||
ROOTFS_PRE_CMD_HOOKS += $$($(2)_ROOTFS_PRE_CMD_HOOKS)
|
||||
KEEP_PYTHON_PY_FILES += $$($(2)_KEEP_PY_FILES)
|
||||
|
||||
ifneq ($$($(2)_SELINUX_MODULES),)
|
||||
PACKAGES_SELINUX_MODULES += $$($(2)_SELINUX_MODULES)
|
||||
endif
|
||||
PACKAGES_SELINUX_EXTRA_MODULES_DIRS += \
|
||||
$$(if $$(wildcard $$($(2)_PKGDIR)/selinux),$$($(2)_PKGDIR)/selinux)
|
||||
|
||||
ifeq ($$($(2)_SITE_METHOD),svn)
|
||||
DL_TOOLS_DEPENDENCIES += svn
|
||||
else ifeq ($$($(2)_SITE_METHOD),git)
|
||||
@@ -1151,6 +1158,22 @@ ifneq ($$($(2)_HELP_CMDS),)
|
||||
HELP_PACKAGES += $(2)
|
||||
endif
|
||||
|
||||
# Virtual packages are not built but it's useful to allow them to have
|
||||
# permission/device/user tables and target-finalize/rootfs-pre-cmd hooks.
|
||||
else ifeq ($$(BR2_PACKAGE_HAS_$(2)),y) # $(2)_KCONFIG_VAR
|
||||
|
||||
ifneq ($$($(2)_PERMISSIONS),)
|
||||
PACKAGES_PERMISSIONS_TABLE += $$($(2)_PERMISSIONS)$$(sep)
|
||||
endif
|
||||
ifneq ($$($(2)_DEVICES),)
|
||||
PACKAGES_DEVICES_TABLE += $$($(2)_DEVICES)$$(sep)
|
||||
endif
|
||||
ifneq ($$($(2)_USERS),)
|
||||
PACKAGES_USERS += $$($(2)_USERS)$$(sep)
|
||||
endif
|
||||
TARGET_FINALIZE_HOOKS += $$($(2)_TARGET_FINALIZE_HOOKS)
|
||||
ROOTFS_PRE_CMD_HOOKS += $$($(2)_ROOTFS_PRE_CMD_HOOKS)
|
||||
|
||||
endif # $(2)_KCONFIG_VAR
|
||||
endef # inner-generic-package
|
||||
|
||||
|
||||
Reference in New Issue
Block a user