blob: a709d6e3f161c3f3f33098f42c4f70d40f6d776c [file] [log] [blame]
# Copyright 2023 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE.makefile file.
EAPI=7
inherit cros-workon cros-zephyr-utils coreboot-sdk coreboot-sdk-ec-dependencies
CROS_WORKON_USE_VCSID=1
CROS_WORKON_PROJECT=(
"chromiumos/third_party/zephyr"
"chromiumos/third_party/zephyr/cmsis"
"chromiumos/third_party/zephyr/hal_intel"
"chromiumos/third_party/zephyr/nanopb"
"chromiumos/third_party/pigweed/pigweed"
"chromiumos/platform/ec"
)
CROS_WORKON_LOCALNAME=(
"third_party/zephyr/main"
"third_party/zephyr/cmsis"
"third_party/zephyr/hal_intel_public"
"third_party/zephyr/nanopb"
"third_party/pigweed"
"platform/ec"
)
CROS_WORKON_DESTDIR=(
"${S}/zephyr-base"
"${S}/modules/cmsis"
"${S}/modules/hal_intel_public"
"${S}/modules/nanopb"
"${S}/modules/pigweed"
"${S}/modules/ec"
)
CROS_WORKON_REPO=${CROS_GIT_INT_HOST_URL}
DESCRIPTION="Zephyr based firmware for ISH enabled boards"
KEYWORDS="~*"
IUSE="zephyr_ish_pinned"
coreboot-sdk_enable i386-elf
coreboot-sdk_enable libstdcxx-i386-elf
coreboot-sdk_enable picolibc-i386-elf
src_compile() {
cros-zephyr-compile ish
}
src_install() {
local project
local output_name
local firmware_name
while read -r firmware_name && read -r project; do
if [[ -z "${project}" ]]; then
continue
fi
# Install into firmware directory so it gets uploaded
insinto "/firmware/${firmware_name}/${project}"
doins "build/${project}"/output/*
if use !zephyr_ish_pinned; then
output_name=${project//-/_}
insinto "/lib/firmware/intel/"
newins "build/${project}/output/ish_fw.bin" "${output_name}.bin"
fi
done < <(cros_config_host "get-firmware-build-combinations" ish || die)
}
OSZAR »