| # Copyright 2012 The Chromium OS Authors |
| # Distributed under the terms of the GNU General Public License v2 |
| # $Header: |
| |
| EAPI=7 |
| CROS_WORKON_COMMIT=("08aff2250e3b459da8094f03e5bea60ed78c413a" "600c679cd66265a54ee63b1747abfff6f94a25ad") |
| CROS_WORKON_TREE=("799331977582570b4553d5b8ecf53f17828b8175" "0e26966d3f2069b8ac7134030bcdf1022620e54b" "68a5efcfa8adcf49f7e7b213e8693b754999b180" "7970bef34ce4d0b3023def52ff72e1c4cd2eca85" "1f141a99a47f4c9edd8fdf11508f24cee865b31e" "2928430a62aab173b801749223f89a315b2f5e1c" "c4524c42dcd8ee9f61dc34d99e71983e065c591c" "181b7ecc670fb8b8481356d96e48592587a73c68" "e03866d9ecdf3529248f3d4bd0b63499a092f2c3" "974edbc79de4f730edf8c9d01bc9186f97417f1d" "bfef75f3a17da232f402e1799b42c25c2b1c5176" "327b75387dd5fa21a18900c37c6017c6378024be" "f0e6fefacbfcbd78417e52a97ba25032cf8fa1ed" "357d07fc1526ad76c1a186e437b7736e3a254d65" "2d58e3830d3fc4159e3f127522d8f7b1bee5c8d7" "362eda536c1c8032f60673bd7943efd3bd9dfb7a") |
| CROS_WORKON_PROJECT=( |
| "chromiumos/third_party/coreboot" |
| "chromiumos/platform/vboot_reference" |
| ) |
| CROS_WORKON_LOCALNAME=( |
| "coreboot" |
| "../platform/vboot_reference" |
| ) |
| CROS_WORKON_DESTDIR=( |
| "${S}" |
| "${S}/3rdparty/vboot" |
| ) |
| CROS_WORKON_EGIT_BRANCH=( |
| "chromeos-2016.05" |
| "main" |
| ) |
| |
| # coreboot:src/arch/x85/include/arch: used by inteltool, x86 only |
| # coreboot:src/commonlib: used by cbfstool |
| # coreboot:src/vendorcode/intel: used by cbfstool |
| # coreboot:util/*: tools built by this ebuild |
| # vboot: minimum set of files and directories to build vboot_lib for cbfstool |
| CROS_WORKON_SUBTREE=( |
| "src/arch/x86/include/arch src/commonlib src/vendorcode/intel util/archive util/cbmem util/cbfstool util/ifdtool util/inteltool util/mma util/nvramtool util/superiotool" |
| "Makefile cgpt host firmware futility" |
| ) |
| |
| inherit cros-workon toolchain-funcs |
| |
| DESCRIPTION="Utilities for modifying coreboot firmware images" |
| HOMEPAGE="http://coreboot.org" |
| LICENSE="GPL-2" |
| SLOT="0" |
| KEYWORDS="*" |
| IUSE="cros_host mma +pci static" |
| |
| LIB_DEPEND="sys-apps/pciutils[static-libs(+)]" |
| RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" |
| DEPEND="${RDEPEND} |
| static? ( ${LIB_DEPEND} ) |
| " |
| |
| _emake() { |
| emake \ |
| TOOLLDFLAGS="${LDFLAGS}" \ |
| CC="${CC}" \ |
| STRIP="true" \ |
| "$@" |
| } |
| |
| src_configure() { |
| use static && append-ldflags -static |
| tc-export CC PKG_CONFIG |
| } |
| |
| is_x86() { |
| use x86 || use amd64 |
| } |
| |
| src_compile() { |
| _emake -C util/cbfstool obj="${PWD}/util/cbfstool" |
| if use cros_host; then |
| _emake -C util/archive HOSTCC="${CC}" |
| else |
| _emake -C util/cbmem |
| fi |
| if is_x86; then |
| if use cros_host; then |
| _emake -C util/ifdtool |
| else |
| _emake -C util/superiotool \ |
| CONFIG_PCI=$(usex pci) |
| _emake -C util/inteltool |
| _emake -C util/nvramtool |
| fi |
| fi |
| } |
| |
| src_install() { |
| dobin util/cbfstool/cbfstool |
| if use cros_host; then |
| dobin util/cbfstool/fmaptool |
| dobin util/cbfstool/cbfs-compression-tool |
| dobin util/archive/archive |
| else |
| dobin util/cbmem/cbmem |
| fi |
| if is_x86; then |
| if use cros_host; then |
| dobin util/ifdtool/ifdtool |
| else |
| dobin util/superiotool/superiotool |
| dobin util/inteltool/inteltool |
| dobin util/nvramtool/nvramtool |
| fi |
| if use mma; then |
| dobin util/mma/mma_setup_test.sh |
| dobin util/mma/mma_get_result.sh |
| dobin util/mma/mma_automated_test.sh |
| insinto /etc/init |
| doins util/mma/mma.conf |
| fi |
| fi |
| } |