import OpenSBI 0.9

The RISC-V Supervisor Binary Interface (SBI) allows supervisor-mode
software to be portable across all RISC-V implementations by defining
an abstraction for platform (or hypervisor) specific functionality.
See https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc
for more information.

OpenSBI provides an open-source reference implementation of the RISC-V
SBI specifications which can be easily extended by RISC-V platform and
system-on-chip vendors to fit a particular hardware configuration.

feedback and ok sthen@
This commit is contained in:
jsg 2021-05-15 10:31:44 +00:00
parent 5113106201
commit 65647d569f
4 changed files with 60 additions and 0 deletions

45
sysutils/opensbi/Makefile Normal file
View File

@ -0,0 +1,45 @@
# $OpenBSD: Makefile,v 1.1.1.1 2021/05/15 10:31:44 jsg Exp $
PKG_ARCH= *
COMMENT= RISC-V Supervisor Binary Interface
GH_ACCOUNT= riscv
GH_PROJECT= opensbi
GH_TAGNAME= v0.9
CATEGORIES= sysutils
# BSD
PERMIT_PACKAGE= Yes
BUILD_DEPENDS+= devel/riscv-elf/gcc
MAKE_ENV+= CROSS_COMPILE="riscv64-unknown-elf-"
NO_TEST= Yes
USE_GMAKE= Yes
# Disable passing CFLAGS to allow the build to use various
# optimization levels. Allowing ports to override CFLAGS
# causes the build to fail.
CFLAGS=
PLATFORMS=\
generic
do-build:
.for P in ${PLATFORMS}
cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \
V=1 PLATFORM=${P}
.endfor
do-install:
.for P in ${PLATFORMS}
${INSTALL_DATA_DIR} ${PREFIX}/share/opensbi/${P}
${INSTALL_DATA} ${WRKBUILD}/build/platform/${P}/firmware/fw_jump.bin \
${PREFIX}/share/opensbi/${P}
.endfor
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (opensbi-0.9.tar.gz) = YPmVyzzQPjz15kkZTTOV0P5nSZ/ZYKNs9wWKTv3mhvA=
SIZE (opensbi-0.9.tar.gz) = 189688

View File

@ -0,0 +1,9 @@
The RISC-V Supervisor Binary Interface (SBI) allows supervisor-mode
software to be portable across all RISC-V implementations by defining
an abstraction for platform (or hypervisor) specific functionality.
See https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc
for more information.
OpenSBI provides an open-source reference implementation of the RISC-V
SBI specifications which can be easily extended by RISC-V platform and
system-on-chip vendors to fit a particular hardware configuration.

View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2021/05/15 10:31:44 jsg Exp $
share/opensbi/
share/opensbi/generic/
share/opensbi/generic/fw_jump.bin