add sys-firmware/trusted-firmware-a
This commit is contained in:
parent
1125f78e4b
commit
d3d44536ad
1 changed files with 42 additions and 0 deletions
|
@ -0,0 +1,42 @@
|
|||
# Copyright 2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="Trusted Firmware A's BL31"
|
||||
HOMEPAGE="https://www.trustedfirmware.org/"
|
||||
SRC_URI="https://git.trustedfirmware.org/TF-A/${PN}.git/snapshot/${P}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* arm64"
|
||||
RDEPEND="!sys-firmware/trusted-firmware-a-bin"
|
||||
|
||||
TFA_ALL_PLATFORMS=( rk3288 rk3399 sun50i_a64 )
|
||||
|
||||
IUSE="${TFA_ALL_PLATFORMS[@]/#/tfa_platforms_}"
|
||||
REQUIRED_USE="^^ ( ${IUSE} )"
|
||||
|
||||
tfa_get_plat() {
|
||||
local plat
|
||||
for plat in "${TFA_ALL_PLATFORMS[@]}"; do
|
||||
if use "tfa_platforms_${plat}"; then
|
||||
echo ${plat}
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
die "no tfa_platforms_ set"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
which arm-none-eabi-gcc || die "arm-none-eabi toolchain not found!"
|
||||
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
|
||||
emake PLAT=$(tfa_get_plat)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local plat=$(tfa_get_plat)
|
||||
insinto /usr/share/${PN}/${plat}
|
||||
doins build/${plat}/release/bl31/bl31.elf
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue