blob: 9b590c32c21148c85a3c37771087f31299ff2ea4 [file] [log] [blame]
# Copyright 2014 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI="4"
CROS_WORKON_COMMIT="44adcf4dd75c553b3b11720693a3f7f07e26d9d4"
CROS_WORKON_TREE="23b4952d0e9003b733f6044a2e06b834e18b2015"
CROS_WORKON_PROJECT="chromiumos/platform/ec"
CROS_WORKON_LOCALNAME="ec"
inherit cros-workon
DESCRIPTION="Host development utilities for Chromium OS EC"
HOMEPAGE="http://www.chromium.org/"
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
ISUE=""
RDEPEND="sys-apps/flashrom"
DEPEND=""
set_board() {
# Pick a board that compile basic ec_tool.
export BOARD="bds"
}
src_configure() {
cros-workon_src_configure
}
src_compile() {
tc-export AR CC RANLIB
# In platform/ec Makefile, it uses "CC" to specify target chipset and
# "HOSTCC" to compile the utility program because it assumes developers
# want to run the utility from same host (build machine).
# In this ebuild file, we only build utility
# and we may want to build it so it can
# be executed on target devices (i.e., arm/x86/amd64), not the build
# host (BUILDCC, amd64). So we need to override HOSTCC by target "CC".
export HOSTCC="${CC}"
set_board
emake utils
}
src_install() {
set_board
dobin "util/flash_ec"
dobin "build/${BOARD}/util/stm32mon"
insinto /usr/bin/lib
doins chip/lm4/openocd/*
}