blob: 1a1c35d3aec76023dfa8aabc6bfafaee857372ce [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="9c481ab339b4e5ab063e2c32b1f0a48b521142b2"
CROS_WORKON_TREE="e1f877b5f3ba288aef17a0ffa59d013b3d84dde8"
CROS_WORKON_PROJECT="chromiumos/third_party/coreboot"
CROS_WORKON_LOCALNAME="coreboot"
inherit cros-workon toolchain-funcs
RDEPEND="sys-apps/pciutils"
DEPEND="${RDEPEND}"
DESCRIPTION="Utilities for modifying coreboot firmware images"
HOMEPAGE="http://coreboot.org"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="*"
IUSE="cros_host"
src_configure() {
cros-workon_src_configure
}
is_x86() {
use x86 || use amd64
}
src_compile() {
tc-export CC
if use cros_host; then
emake -C util/cbfstool obj="${PWD}/util/cbfstool"
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}"
emake -C util/inteltool CC="${CC}"
emake -C util/nvramtool CC="${CC}"
fi
fi
}
src_install() {
if use cros_host; then
dobin util/cbfstool/cbfstool
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
fi
}