blob: f2ed489f752a40dc8ee44ea06ad8205b9b6b4304 [file] [log] [blame]
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE.makefile file.
# Increment the "eclass bug workaround count" below when you change
# "cros-ec.eclass" to work around http://crbug.com/220902.
#
# eclass bug workaround count: 1
EAPI=7
CROS_WORKON_COMMIT=("6f576e6f0bb61752885b09a1553b36416f435e6b" "846da80c11b64f9a02dfa4f21ef705221ca955b7")
CROS_WORKON_TREE=("dac0e32f12538901e2a504a7cf184a980cd4cf56" "7a7c22e6b3fdbfb8b227551cca4b63dbf0f3b997")
CROS_WORKON_PROJECT=(
"chromiumos/platform/ec"
"chromiumos/third_party/cryptoc"
)
CROS_WORKON_LOCALNAME=(
"platform/ec"
"third_party/cryptoc"
)
CROS_WORKON_DESTDIR=(
"${S}/platform/ec"
"${S}/third_party/cryptoc"
)
inherit coreboot-sdk cros-ec cros-workon
DESCRIPTION="ChromeOS fingerprint MCU unittest binaries"
KEYWORDS="*"
# Make sure config tools use the latest schema.
BDEPEND=">=chromeos-base/chromeos-config-host-0.0.2"
get_target_boards() {
# TODO(yichengli): Add other FPMCUs once the test lab has them.
EC_BOARDS=("bloonchipper")
}
src_compile() {
cros-ec_set_build_env
get_target_boards
# TODO(yichengli): Add other FPMCU boards once the test lab has them.
# NOTE: Any changes here must also be reflected in
# platform/ec/firmware_builder.py which is used for the ec cq
local target
einfo "Building FPMCU unittest binary for targets: ${EC_BOARDS[*]}"
for target in "${EC_BOARDS[@]}"; do
emake CROSS_COMPILE="${COREBOOT_SDK_PREFIX_arm}" BOARD="${target}" \
"${EC_OPTS[@]}" clean
emake CROSS_COMPILE="${COREBOOT_SDK_PREFIX_arm}" BOARD="${target}" \
"${EC_OPTS[@]}" tests
done
}
src_install() {
local target
for target in "${EC_BOARDS[@]}"; do
insinto /firmware/chromeos-fpmcu-unittests/"${target}"
doins build/"${target}"/*.bin
done
}
# Do not run cros-ec's tests.
src_test() {
:
}