blob: fbb0e4685ab106e8d02e8d61a3956e53e46146dd [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=""
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"
}