svn commit: r515947 - in head/sysutils/opensbi: . files
Mitchell Horne
mhorne at FreeBSD.org
Tue Oct 29 01:10:33 UTC 2019
Author: mhorne (src committer)
Date: Tue Oct 29 01:10:32 2019
New Revision: 515947
URL: https://svnweb.freebsd.org/changeset/ports/515947
Log:
New port: sysutils/opensbi: OpenSBI, a RISC-V bootloader and firmware
OpenSBI is a RISC-V bootloader and set of firmware libraries that
implement the RISC-V Supervisor Binary Interface (SBI) required for
supervisor targets, such as the FreeBSD kernel.
This port installs the OpenSBI libraries that can be used for
development of custom firmwares, as well as the firmware files for the
QEMU virt and SiFive U540 platforms.
Reviewed by: lwhsu, philip (earlier version)
Approved by: lwhsu
Differential Revision: https://reviews.freebsd.org/D22164
Added:
head/sysutils/opensbi/
head/sysutils/opensbi/Makefile (contents, props changed)
head/sysutils/opensbi/distinfo (contents, props changed)
head/sysutils/opensbi/files/
head/sysutils/opensbi/files/patch-Makefile (contents, props changed)
head/sysutils/opensbi/pkg-descr (contents, props changed)
head/sysutils/opensbi/pkg-plist (contents, props changed)
Added: head/sysutils/opensbi/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/opensbi/Makefile Tue Oct 29 01:10:32 2019 (r515947)
@@ -0,0 +1,56 @@
+# $FreeBSD$
+
+PORTNAME= opensbi
+DISTVERSIONPREFIX=v
+DISTVERSION= 0.5
+CATEGORIES= sysutils
+
+MAINTAINER= mhorne at FreeBSD.org
+COMMENT= RISC-V SBI bootloader and firmware
+
+LICENSE= BSD2CLAUSE
+
+USES= gmake
+
+USE_GITHUB= yes
+GH_ACCOUNT= riscv
+
+RISCV_PREFIX= riscv64-unknown-${OPSYS:tl}${OSREL}-
+BUILD_DEPENDS= ${RISCV_PREFIX}gcc:devel/riscv64-xtoolchain-gcc
+
+MAKE_ARGS= CROSS_COMPILE=${RISCV_PREFIX} I=${STAGEDIR}${PREFIX}
+
+OPTIONS_GROUP= PLATFORMS
+OPTIONS_GROUP_PLATFORMS=QEMU_VIRT SIFIVE_FU540
+OPTIONS_SUB= yes
+OPTIONS_DEFAULT= QEMU_VIRT SIFIVE_FU540
+
+QEMU_VIRT_DESC= Support for QEMU Virt platform
+QEMU_VIRT_PLATFORM= qemu/virt
+
+SIFIVE_FU540_DESC= Support for SiFive U540 platform
+SIFIVE_FU540_PLATFORM= sifive/fu540
+
+INSTALL_TARGET= install
+
+.for platform in ${OPTIONS_GROUP_PLATFORMS}
+
+post-build-${platform}-on:
+ ${MAKE_CMD} -C ${WRKSRC} ${MAKE_ARGS} PLATFORM=${${platform}_PLATFORM}
+
+do-install-${platform}-on:
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${MAKE_CMD} -C ${WRKSRC} PLATFORM=${${platform}_PLATFORM} \
+ I=${STAGEDIR}${DATADIR} install_firmwares
+ ${MAKE_CMD} -C ${WRKSRC} PLATFORM=${${platform}_PLATFORM} \
+ I=${STAGEDIR}${DATADIR} install_libplatsbi
+
+post-install-${platform}-on:
+.for i in dynamic jump payload
+ ${STRIP_CMD} ${STAGEDIR}${DATADIR}/platform/${${platform}_PLATFORM}/firmware/fw_${i}.elf
+.endfor
+ ${STRIP_CMD} ${STAGEDIR}${DATADIR}/platform/${${platform}_PLATFORM}/firmware/payloads/test.elf
+
+.endfor # OPTIONS_GROUP_PLATFORMS
+
+.include <bsd.port.mk>
Added: head/sysutils/opensbi/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/opensbi/distinfo Tue Oct 29 01:10:32 2019 (r515947)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1571500133
+SHA256 (riscv-opensbi-v0.5_GH0.tar.gz) = bc82f1e63663cafb7976b324d8a01263510cfd816063dc89e0ccffb9763fb1dd
+SIZE (riscv-opensbi-v0.5_GH0.tar.gz) = 138745
Added: head/sysutils/opensbi/files/patch-Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/opensbi/files/patch-Makefile Tue Oct 29 01:10:32 2019 (r515947)
@@ -0,0 +1,11 @@
+--- Makefile.orig 2019-10-09 02:45:51 UTC
++++ Makefile
+@@ -180,7 +180,7 @@ ASFLAGS += $(firmware-asflags-y)
+
+ ARFLAGS = rcs
+
+-ELFFLAGS += -Wl,--build-id=none -N -static-libgcc -lgcc
++ELFFLAGS += -Wl,--build-id=none -N -static-libgcc
+ ELFFLAGS += $(platform-ldflags-y)
+ ELFFLAGS += $(firmware-ldflags-y)
+
Added: head/sysutils/opensbi/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/opensbi/pkg-descr Tue Oct 29 01:10:32 2019 (r515947)
@@ -0,0 +1,18 @@
+The RISC-V Supervisor Binary Interface (SBI) is the recommended interface
+between:
+
+1. A platform-specific firmware running in M-mode and a bootloader, a
+ hypervisor or a general-purpose OS executing in S-mode or HS-mode.
+2. A hypervisor running in HS-mode and a bootloader or a general-purpose OS
+ executing in VS-mode.
+
+The RISC-V SBI specification is maintained as an independent project by the
+RISC-V Foundation at https://github.com/riscv/riscv-sbi-doc.
+
+The goal of the OpenSBI project is to provide an open-source reference
+implementation of the RISC-V SBI specifications for platform-specific firmwares
+executing in M-mode (case 1 mentioned above). An OpenSBI implementation can be
+easily extended by RISC-V platform and system-on-chip vendors to fit a
+particular hardware configuration.
+
+WWW: https://github.com/riscv/opensbi
Added: head/sysutils/opensbi/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/opensbi/pkg-plist Tue Oct 29 01:10:32 2019 (r515947)
@@ -0,0 +1,56 @@
+include/sbi/fw_dynamic.h
+include/sbi/riscv_asm.h
+include/sbi/riscv_atomic.h
+include/sbi/riscv_barrier.h
+include/sbi/riscv_encoding.h
+include/sbi/riscv_fp.h
+include/sbi/riscv_io.h
+include/sbi/riscv_locks.h
+include/sbi/riscv_unpriv.h
+include/sbi/sbi_bitops.h
+include/sbi/sbi_bits.h
+include/sbi/sbi_console.h
+include/sbi/sbi_const.h
+include/sbi/sbi_ecall.h
+include/sbi/sbi_ecall_interface.h
+include/sbi/sbi_emulate_csr.h
+include/sbi/sbi_error.h
+include/sbi/sbi_fifo.h
+include/sbi/sbi_hart.h
+include/sbi/sbi_illegal_insn.h
+include/sbi/sbi_init.h
+include/sbi/sbi_ipi.h
+include/sbi/sbi_misaligned_ldst.h
+include/sbi/sbi_platform.h
+include/sbi/sbi_scratch.h
+include/sbi/sbi_string.h
+include/sbi/sbi_system.h
+include/sbi/sbi_timer.h
+include/sbi/sbi_tlb.h
+include/sbi/sbi_trap.h
+include/sbi/sbi_types.h
+include/sbi/sbi_version.h
+include/sbi_utils/irqchip/plic.h
+include/sbi_utils/serial/sifive-uart.h
+include/sbi_utils/serial/uart8250.h
+include/sbi_utils/sys/clint.h
+lib/libsbi.a
+lib/libsbiutils.a
+%%QEMU_VIRT%%%%DATADIR%%/platform/qemu/virt/firmware/fw_dynamic.bin
+%%QEMU_VIRT%%%%DATADIR%%/platform/qemu/virt/firmware/fw_dynamic.elf
+%%QEMU_VIRT%%%%DATADIR%%/platform/qemu/virt/firmware/fw_jump.bin
+%%QEMU_VIRT%%%%DATADIR%%/platform/qemu/virt/firmware/fw_jump.elf
+%%QEMU_VIRT%%%%DATADIR%%/platform/qemu/virt/firmware/fw_payload.bin
+%%QEMU_VIRT%%%%DATADIR%%/platform/qemu/virt/firmware/fw_payload.elf
+%%QEMU_VIRT%%%%DATADIR%%/platform/qemu/virt/firmware/payloads/test.bin
+%%QEMU_VIRT%%%%DATADIR%%/platform/qemu/virt/firmware/payloads/test.elf
+%%QEMU_VIRT%%%%DATADIR%%/platform/qemu/virt/lib/libplatsbi.a
+%%SIFIVE_FU540%%%%DATADIR%%/platform/sifive/fu540/firmware/fw_dynamic.bin
+%%SIFIVE_FU540%%%%DATADIR%%/platform/sifive/fu540/firmware/fw_dynamic.elf
+%%SIFIVE_FU540%%%%DATADIR%%/platform/sifive/fu540/firmware/fw_jump.bin
+%%SIFIVE_FU540%%%%DATADIR%%/platform/sifive/fu540/firmware/fw_jump.elf
+%%SIFIVE_FU540%%%%DATADIR%%/platform/sifive/fu540/firmware/fw_payload.bin
+%%SIFIVE_FU540%%%%DATADIR%%/platform/sifive/fu540/firmware/fw_payload.elf
+%%SIFIVE_FU540%%%%DATADIR%%/platform/sifive/fu540/firmware/payloads/test.bin
+%%SIFIVE_FU540%%%%DATADIR%%/platform/sifive/fu540/firmware/payloads/test.elf
+%%SIFIVE_FU540%%%%DATADIR%%/platform/sifive/fu540/lib/libplatsbi.a
More information about the svn-ports-head
mailing list