aboutsummaryrefslogtreecommitdiffstats
path: root/sys-boot/opensbi/opensbi-0.9_p3.ebuild
diff options
context:
space:
mode:
authorPA4WDH2022-02-19 11:10:33 +0100
committerPA4WDH2022-02-19 11:10:33 +0100
commita22bbb90c16ff6a38e9d9ac6b31d751bd3fbf92a (patch)
treecf280090af6ea7c472ea15dde24e7385e15ee5e5 /sys-boot/opensbi/opensbi-0.9_p3.ebuild
parentUpdate mplayer ebuild (diff)
downloadunmatched-patchwork-a22bbb90c16ff6a38e9d9ac6b31d751bd3fbf92a.tar.gz
unmatched-patchwork-a22bbb90c16ff6a38e9d9ac6b31d751bd3fbf92a.tar.bz2
unmatched-patchwork-a22bbb90c16ff6a38e9d9ac6b31d751bd3fbf92a.zip
Add sys-boot/opensbi-0.9_p3
Diffstat (limited to 'sys-boot/opensbi/opensbi-0.9_p3.ebuild')
-rw-r--r--sys-boot/opensbi/opensbi-0.9_p3.ebuild41
1 files changed, 41 insertions, 0 deletions
diff --git a/sys-boot/opensbi/opensbi-0.9_p3.ebuild b/sys-boot/opensbi/opensbi-0.9_p3.ebuild
new file mode 100644
index 0000000..3f7c84c
--- /dev/null
+++ b/sys-boot/opensbi/opensbi-0.9_p3.ebuild
@@ -0,0 +1,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
+}