blob: b01f81f17acac9aa19e8c7e023e82e12be1e22e1 [file] [log] [blame]
# Copyright 2012 The Chromium OS Authors
# Distributed under the terms of the GNU General Public License v2
# $Header:
EAPI="4"
CROS_WORKON_COMMIT=("f2b28230e3dbf4f15ea0dbda0242c53e8540c6e5" "3abb4fe45e0e25d203c77d1a5ed1afd49a5a594c")
CROS_WORKON_TREE=("692cfc29e43df0b4df4a5ecf9260d384668f69bb" "6719bec34cef6cd4b99df90e057ce9a1a222fc8a")
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"
)
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"
RDEPEND="pci? ( sys-apps/pciutils )"
DEPEND="${RDEPEND}"
src_configure() {
cros-workon_src_configure
}
is_x86() {
use x86 || use amd64
}
src_compile() {
tc-export CC
emake -C util/cbfstool obj="${PWD}/util/cbfstool"
if use cros_host; then
emake -C util/archive CC="${CC}"
else
emake -C util/cbmem CC="${CC}"
fi
if is_x86; then
if use cros_host; then
emake -C util/ifdtool
else
emake -C util/superiotool CC="${CC}" \
CONFIG_PCI=$(usex pci)
emake -C util/inteltool CC="${CC}"
emake -C util/nvramtool CC="${CC}"
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
}