blob: 87a3a1f3e307e81daf6a6115fd9c5d6b72c8676c [file] [log] [blame]
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6..9} )
CROS_WORKON_LOCALNAME="../../chromite"
CROS_WORKON_PROJECT="chromiumos/chromite"
CROS_WORKON_DESTDIR="${S}/chromite"
CROS_WORKON_SUBTREE="lib bin scripts PRESUBMIT.cfg"
inherit cros-workon python-any-r1
DESCRIPTION="Exports JSON config from chromite/lib/firmware/ap_firmware_config"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/chromite/+/refs/heads/main/lib/firmware/README.md"
LICENSE="BSD-Google"
KEYWORDS="~*"
IUSE=""
python_check_deps() {
has_version -b "chromeos-base/chromite-sdk[${PYTHON_USEDEP}]"
}
src_compile() {
"${S}/chromite/bin/cros" ap dump-config -o "${T}/fw-config.json" \
|| die "cros ap dump-config failed"
}
src_install() {
insinto "/usr/share/ap_firmware_config/"
doins "${T}/fw-config.json"
}