chromeos-bsp-veyron-0.0.1.ebuild 2.26 KB
Newer Older
ZhengShunQian's avatar
ZhengShunQian committed
1 2 3
# Copyright 2014 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2

4
EAPI=5
ZhengShunQian's avatar
ZhengShunQian committed
5

6 7
inherit udev

ZhengShunQian's avatar
ZhengShunQian committed
8 9 10 11 12
DESCRIPTION="Veyron bsp (meta package to pull in driver/tool dependencies)"

LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="-* arm"
13 14 15 16 17 18 19 20 21 22 23 24
IUSE="
	ac_only
	bluetooth
	cheets
	cros_ec
	kernel-3_14
	kernel-4_19
	+veyron-brcmfmac-nvram
"

# Must specify one of 3.14 or 4.19, but not both
REQUIRED_USE="^^ ( kernel-3_14 kernel-4_19 )"
ZhengShunQian's avatar
ZhengShunQian committed
25 26

# Add dependencies on other ebuilds from within this board overlay
27 28 29
DEPEND="
	!media-libs/media-rules
	"
30
RDEPEND="${DEPEND}
31
	net-wireless/marvell_sd8787
32
"
33 34 35 36 37 38

S=${WORKDIR}

src_install() {
	# Install platform specific config files for power_manager.
	insinto "/usr/share/power_manager/board_specific"
39
	doins "${FILESDIR}"/powerd_prefs/*
40

Dylan Reid's avatar
Dylan Reid committed
41
	# Override default CPU clock speed governor
42 43 44 45 46 47 48 49 50 51 52 53 54 55
	if use kernel-3_14; then
		insinto "/etc"
		doins "${FILESDIR}/cpufreq-314/cpufreq.conf"
	else
		insinto "/etc"
		doins "${FILESDIR}/cpufreq-419/cpufreq.conf"
		insinto "/etc/init"
		doins "${FILESDIR}/cpufreq-419/platform-cpusets.conf"

		if use cheets; then
			insinto "/opt/google/containers/android/vendor/etc/init/"
			doins "${FILESDIR}/cpufreq-419/init.cpusets.rc"
		fi
	fi
Dylan Reid's avatar
Dylan Reid committed
56

57
	# Install platform specific files for bcm4354 bluetooth.
58 59 60 61
	if use bluetooth ; then
		insinto "/etc/modprobe.d"
		doins "${FILESDIR}"/blacklist-btsdio.conf
	fi
62

63 64
	# Install platform specific files to enable persist on ehci-platform
	udev_dorules "${FILESDIR}/99-rk3288-ehci-persist.rules"
65 66
	# Install platform specific files to avoid wakeup system by gpio-charger
	udev_dorules "${FILESDIR}/99-rk3288-gpio-charger.rules"
67

68 69 70 71
	# Disable autosuspend for ac_only to make webcams work a bit
	# better on boxes
	use ac_only && udev_dorules "${FILESDIR}/99-rk3288-no-dwc2-autosuspend.rules"

72 73 74
	# On non-ac_only at least make hubs behave a little better
	use ac_only || udev_dorules "${FILESDIR}/99-rk3288-delay-hub-autosuspend.rules"

75 76 77 78 79
	# Install platform specific NVRAM files for brcmfmac.
	if use veyron-brcmfmac-nvram ; then
		insinto "/lib/firmware/brcm"
		doins "${FILESDIR}/firmware/brcmfmac4354-sdio.txt"
	fi
80 81 82 83 84

	# Install platform specific triggers and udev rules for codecs.
	insinto "/etc/init"
	doins "${FILESDIR}/udev-trigger-codec.conf"
	udev_dorules "${FILESDIR}/50-media.rules"
85
}