kumquat-buildroot/package/vboot-utils/vboot-utils.mk
Alex Suykov bbb25c3ad7 vboot-utils: fix ARCH detection
The package includes some target-specific code that is irrelevant
in a host package but gets built anyway. The target for this code
must be one of the supported ChromeOS targets.

Supplied Makefile apparently relies on the environment to provide
a valid target, with a simple fallback to host arch. This breaks
the build if no value is provided and the host arch is not among
the supported ones.

Should fix
http://autobuild.buildroot.net/results/d118a83b6c4f7f910d0d44c279f36251d7ba29e8/
and similar failures.

Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-11-11 23:38:49 +01:00

44 lines
1.4 KiB
Makefile

################################################################################
#
# vboot-utils
#
################################################################################
VBOOT_UTILS_VERSION = bbdd62f9b030db7ad8eef789aaf58a7ff9a25656
VBOOT_UTILS_SITE = https://chromium.googlesource.com/chromiumos/platform/vboot_reference
VBOOT_UTILS_SITE_METHOD = git
VBOOT_UTILS_LICENSE = BSD-3-Clause
VBOOT_UTILS_LICENSE_FILES = LICENSE
HOST_VBOOT_UTILS_DEPENDENCIES = host-openssl host-util-linux host-pkgconf
# vboot_reference contains code that goes into bootloaders,
# utilities intended for the target system, and a bunch of scripts
# for Chromium OS build system. Most of that does not make sense
# in a buildroot host-package.
#
# We only need futility for signing images, the keys, and cgpt for boot
# media partitioning.
#
# make target for futility is "futil".
#
# The value of ARCH is only relevant for crossystem (a target tool) and
# does not affect futil or cgpt in any way as long as it is one of the
# supported targets.
define HOST_VBOOT_UTILS_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
CC="$(HOSTCC)" \
CFLAGS="$(HOST_CFLAGS) -D_LARGEFILE64_SOURCE -D_GNU_SOURCE" \
LDFLAGS="$(HOST_LDFLAGS)" \
ARCH=arm \
futil cgpt
endef
define HOST_VBOOT_UTILS_INSTALL_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) \
futil_install cgpt_install devkeys_install
endef
$(eval $(host-generic-package))