blob: 361dd40a61fa656c28fcd2313d3f732d3e772d23 [file] [log] [blame]
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit appid cros-audio-configs udev
DESCRIPTION="Ebuild which pulls in any necessary ebuilds as dependencies
or portage actions."
LICENSE="BSD-Google"
SLOT="0" # TODO(b/144948221): convert this to cros-workon
KEYWORDS="-* arm64 arm"
IUSE="elm-cheets elm-kernelnext"
S="${WORKDIR}"
# Add dependencies on other ebuilds from within this board overlay
DEPEND=""
RDEPEND="${DEPEND}
chromeos-base/chromeos-accelerometer-init
chromeos-base/chromeos-bsp-baseboard-oak
sys-apps/ethtool
"
src_install() {
if use elm-cheets; then
doappid "{3DFF3394-F97E-4971-83C6-2C5C06A9953D}" "CHROMEBOOK"
elif use elm-kernelnext; then
doappid "{5C030156-1D45-11EA-871D-230545999E89}" "CHROMEBOOK"
else
doappid "{5BF597B2-ADE3-52C9-1DDA-95719C914AFF}" "CHROMEBOOK"
fi
# Install audio config files.
local audio_config_dir="${FILESDIR}/audio-config"
install_audio_configs elm "${audio_config_dir}"
# Install platform specific config files for power_manager.
insinto "/usr/share/power_manager/board_specific"
doins "${FILESDIR}"/powerd_prefs/*
# The 4.19 kernel uses a new non linear backlight scale.
# To match the battery default backlight level we change the
# target % using file internal_backlight_no_als_battery_brightness.
# Note the intention is to have the same resulting real world brightness.
# b/149870759
# This should be moved to the main value after kernelnext is merged back.
if use elm-kernelnext; then
doins "${FILESDIR}"/powerd_prefs_kernelnext/*
fi
# Install rules to enable WoWLAN on startup.
udev_dorules "${FILESDIR}/99-mwifiex-wowlan.rules"
# Install rules to detect when DRM HDMI driver is loaded
udev_dorules "${FILESDIR}/99-mtk_drm_hdmi_load.rules"
# Install script called by 99-mtk_drm_hdmi_load.rules
dosbin "${FILESDIR}"/hdcp_pass_key.sh
}