blob: 3f7c84c59ec922593ac2f41ce04f1a5743552a9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
OPENSBI_COMMIT="5d025eb2353550eadbd2fa9b8083a92fe9b07bd9"
DESCRIPTION="RISC-V Supervisor Binary Interface (SBI)"
HOMEPAGE="https://github.com/riscv/${PN}/tree/v${PV}"
SRC_URI="https://github.com/riscv-software-src/${PN}/archive/${OPENSBI_COMMIT}.zip -> ${P}.zip"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~riscv"
DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""
src_unpack() {
unpack ${P}.zip
mv "${WORKDIR}/opensbi-${OPENSBI_COMMIT}" "${WORKDIR}/${P}"
}
src_prepare() {
default
}
src_compile() {
emake PLATFORM=generic FW_PIC=n
}
src_install() {
mkdir -p "${D}/usr/share/${P}"
cp "${WORKDIR}/${P}/build/platform/generic/firmware/fw_dynamic.bin" "${D}/usr/share/${P}"
elog "Installed OpenSBI at /usr/share/${P}/fw_dynamic.bin"
dodoc CONTRIBUTORS.md
dodoc COPYING.BSD
dodoc README.md
dodoc ThirdPartyNotices.md
}
|