* 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
111 lines
4.0 KiB
Makefile
111 lines
4.0 KiB
Makefile
################################################################################
|
|
# QMake package infrastructure
|
|
#
|
|
# This file implements an infrastructure that eases development of package
|
|
# .mk files for QMake packages. It should be used for all packages that use
|
|
# Qmake as their build system.
|
|
#
|
|
# See the Buildroot documentation for details on the usage of this
|
|
# infrastructure
|
|
#
|
|
# In terms of implementation, this QMake infrastructure requires the .mk file
|
|
# to only specify metadata information about the package: name, version,
|
|
# download URL, etc.
|
|
#
|
|
# We still allow the package .mk file to override what the different steps
|
|
# are doing, if needed. For example, if <PKG>_BUILD_CMDS is already defined,
|
|
# it is used as the list of commands to perform to build the package,
|
|
# instead of the default QMake behaviour. The package can also define some
|
|
# post operation hooks.
|
|
#
|
|
################################################################################
|
|
|
|
################################################################################
|
|
# inner-qmake-package -- defines how the configuration, compilation and
|
|
# installation of a qmake package should be done, implements a few hooks
|
|
# to tune the build process for qmake specifities and calls the generic
|
|
# package infrastructure to generate the necessary make targets
|
|
#
|
|
# argument 1 is the lowercase package name
|
|
# argument 2 is the uppercase package name, including a HOST_ prefix
|
|
# for host packages
|
|
################################################################################
|
|
|
|
define inner-qmake-package
|
|
|
|
$(2)_CONF_ENV ?=
|
|
$(2)_CONF_OPTS ?=
|
|
$(2)_MAKE_ENV ?=
|
|
$(2)_MAKE_OPTS ?=
|
|
$(2)_INSTALL_STAGING_OPTS ?= install
|
|
$(2)_INSTALL_TARGET_OPTS ?= $$($(2)_INSTALL_STAGING_OPTS)
|
|
|
|
ifneq ($(1),qt5base)
|
|
$(2)_DEPENDENCIES += qt5base
|
|
endif
|
|
|
|
#
|
|
# Configure step. Only define it if not already defined by the package
|
|
# .mk file.
|
|
#
|
|
ifndef $(2)_CONFIGURE_CMDS
|
|
define $(2)_CONFIGURE_CMDS
|
|
$$(QT5_QT_CONF_FIXUP)
|
|
cd $$($(2)_BUILDDIR) && \
|
|
$$(TARGET_MAKE_ENV) $$($(2)_CONF_ENV) $$(QT5_QMAKE) $$($(2)_CONF_OPTS)
|
|
endef
|
|
endif
|
|
|
|
#
|
|
# Build step. Only define it if not already defined by the package .mk
|
|
# file.
|
|
#
|
|
ifndef $(2)_BUILD_CMDS
|
|
define $(2)_BUILD_CMDS
|
|
$$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_BUILDDIR) $$($(2)_MAKE_OPTS)
|
|
endef
|
|
endif
|
|
|
|
#
|
|
# Staging installation step. Only define it if not already defined by
|
|
# the package .mk file.
|
|
#
|
|
ifndef $(2)_INSTALL_STAGING_CMDS
|
|
define $(2)_INSTALL_STAGING_CMDS
|
|
$$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_BUILDDIR) $$($(2)_INSTALL_STAGING_OPTS)
|
|
endef
|
|
endif
|
|
|
|
#
|
|
# Target installation step. Only define it if not already defined by
|
|
# the package .mk file.
|
|
#
|
|
# Unfortunately we can't use INSTALL_ROOT to directly install to TARGET_DIR
|
|
# because in a crosscompile setup, the qmake generated install destinations
|
|
# are prefixed with the hardcoded sysroot (=STAGING_DIR) and hostprefix
|
|
# (=HOST_DIR).
|
|
# Instead we set INSTALL_ROOT, which comes before the install path, to a
|
|
# temporary folder inside the build directory and effectively install to
|
|
# $(@D)/tmp-target-install/$(STAGING_DIR) and $(@D)/tmp-target-install/$(HOST_DIR).
|
|
# We subsequently rsync only the files from the temporary staging dir and that
|
|
# way exclude files for the build host from target.
|
|
#
|
|
ifndef $(2)_INSTALL_TARGET_CMDS
|
|
define $(2)_INSTALL_TARGET_CMDS
|
|
$$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_BUILDDIR) INSTALL_ROOT=$$($(2)_BUILDDIR)tmp-target-install $$($(2)_INSTALL_TARGET_OPTS)
|
|
rsync -arv $$($(2)_BUILDDIR)tmp-target-install$$(STAGING_DIR)/ $$(TARGET_DIR)/
|
|
endef
|
|
endif
|
|
|
|
# Call the generic package infrastructure to generate the necessary
|
|
# make targets
|
|
$(call inner-generic-package,$(1),$(2),$(3),$(4))
|
|
|
|
endef
|
|
|
|
################################################################################
|
|
# qmake-package -- the target generator macro for QMake packages
|
|
################################################################################
|
|
|
|
qmake-package = $(call inner-qmake-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
|