Date: Sun, 08 Mar 2026 22:25:21 +0000 From: Robert Clausecker <fuz@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 56ce17a57a84 - main - emulators/rvvm-devel: RISC-V Virtual Machine (development version) Message-ID: <69adf751.3f2b6.421728c@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=56ce17a57a84d3de205162ba1ad2a64bd91ae18a commit 56ce17a57a84d3de205162ba1ad2a64bd91ae18a Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2026-03-08 19:47:58 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2026-03-08 22:24:50 +0000 emulators/rvvm-devel: RISC-V Virtual Machine (development version) RVVM is a virtual machine / emulator for RISC-V guests, which emphasizes on performance, security, lean code and portability. It already runs a lot of guest operating systems, including Linux, Haiku, FreeBSD, OpenBSD, etc. It also aims to run RISC-V applications on a foreign-arch host without full OS guest & isolation (Userland emulation). This port holds a version of the project that is close to what is currently in development. Requested by: siva See also: https://reviews.freebsd.org/D55356 --- emulators/Makefile | 1 + emulators/rvvm-devel/Makefile | 93 +++++++++++++++++++++++++++++ emulators/rvvm-devel/distinfo | 9 +++ emulators/rvvm-devel/files/patch-Makefile | 12 ++++ emulators/rvvm-devel/files/patch-project.mk | 11 ++++ emulators/rvvm-devel/files/pkg-message.in | 11 ++++ emulators/rvvm-devel/pkg-descr | 8 +++ emulators/rvvm-devel/pkg-plist | 11 ++++ 8 files changed, 156 insertions(+) diff --git a/emulators/Makefile b/emulators/Makefile index cd2b408b1ddd..e8c2bbf70a68 100644 --- a/emulators/Makefile +++ b/emulators/Makefile @@ -129,6 +129,7 @@ SUBDIR += rpcs3 SUBDIR += rubygem-fission SUBDIR += rvvm + SUBDIR += rvvm-devel SUBDIR += sameboy SUBDIR += simh SUBDIR += simh-hp2100 diff --git a/emulators/rvvm-devel/Makefile b/emulators/rvvm-devel/Makefile new file mode 100644 index 000000000000..55cc23e8e8c8 --- /dev/null +++ b/emulators/rvvm-devel/Makefile @@ -0,0 +1,93 @@ +PORTNAME= RVVM +PORTVERSION= 0.7.g20260226 +CATEGORIES= emulators +MASTER_SITES= https://github.com/LekKit/patches-misc/releases/download/rvvm-uboot-2024.7/:fw \ + https://github.com/LekKit/riscv-tests/releases/download/rvvm-tests/:tests +DISTFILES= ${FWFILES:.bin=.bin:fw} riscv-tests.tar.gz:tests +DIST_SUBDIR= rvvm-${DISTVERSION} +EXTRACT_ONLY= ${DISTFILE_DEFAULT} + +MAINTAINER= fuz@FreeBSD.org +COMMENT= RISC-V Virtual Machine (development version) + +LICENSE= GPLv2 GPLv3 MPL20 +LICENSE_COMB= multi +LICENSE_FILE_GPLv3= ${WRKSRC}/LICENSE-GPL +LICENSE_FILE_MPL20= ${WRKSRC}/LICENSE-MPL +LICENSE_DISTFILES_GPLv2= ${FWFILES} +LICENSE_DISTFILES_GPLv3= ${DISTFILE_DEFAULT} +LICENSE_DISTFILES_MPL20= ${DISTFILE_DEFAULT} + +FLAVORS= x11 nox11 +FLAVOR?= ${FLAVORS:[1]} +x11_PKGNAMESUFFIX= -devel +nox11_PKGNAMESUFFIX= -devel-nox11 + +USES= gmake pkgconfig +USE_GITHUB= yes +GH_ACCOUNT= LekKit +GH_TAGNAME= 44b1f500987041d07a8f313ad524b8509868997b +USE_LDCONFIG= yes + +BUILDDIR= ${WRKDIR}/.build +MAKE_ENV+= BUILDDIR=${BUILDDIR} \ + VERBOSE=1 \ + GIT_DESCRIBE="v${PKGVERSION} (FreeBSD ports)" \ + USE_LIB_SHARING=1 +TEST_TARGET= test +SUB_FILES= pkg-message + +OPTIONS_DEFINE= FDT FPU GDBSTUB JIT JNI LOCK_DEBUG NET PCI RV64 RVV SOUND +OPTIONS_DEFAULT= FDT FPU JIT JNI LOCK_DEBUG NET PCI RV64 +FDT_DESC= enable automatic FDT generation +FPU_DESC= enable floating point (F/D) CPU extension +GDBSTUB_DESC= enable GDB remote protocol support +JIT_DESC= enable RVJIT accelerator +JNI_DESC= include native JNI bindings in shared librvvm +LOCK_DEBUG_DESC= enable deadlock debugging (minimal runtime overhead) +NET_DESC= enable unprivileged userland networking stack +PCI_DESC= enable PCI support in ATA, etc devices +RV64_DESC= enable riscv64 CPU support +RVV_DESC= enable vector (V) CPU extension + +# opened via dlopen() +SOUND_LIB_DEPENDS= libasound.so:audio/alsa-lib + +FWFILES= fw_jump.bin fw_payload.bin + +.for o in ${OPTIONS_DEFINE} +$o_MAKE_ENV= USE_$o=1 +$o_MAKE_ENV_OFF= USE_$o=0 +.endfor + +.if ${FLAVOR} == x11 +MAKE_ENV+= USE_GUI=1 USE_X11=1 +OPTIONS_DEFAULT+= SOUND +USES+= xorg +USE_XORG+= x11 xext +.else +MAKE_ENV+= USE_GUI=0 USE_X11=0 +.endif + +.include <bsd.port.pre.mk> + +.if defined(WITH_DEBUG) +MAKE_ENV+= USE_DEBUG=1 +.endif + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/rvvm + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/librvvm.so + ${MV} ${STAGEDIR}${PREFIX}/lib/librvvm.so ${STAGEDIR}${PREFIX}/lib/librvvm.so.0 + ${RLN} ${STAGEDIR}${PREFIX}/lib/librvvm.so.0 ${STAGEDIR}${PREFIX}/lib/librvvm.so + ${MKDIR} ${STAGEDIR}${DATADIR} +.for f in ${FWFILES} + ${INSTALL_DATA} ${_DISTDIR}/$f ${STAGEDIR}${DATADIR}/ +.endfor + +pre-test: + @${ECHO_MSG} "=====> Make sure the port is installed before the test suite is run!" + @${RM} -r ${BUILDDIR}/riscv-tests + @${TAR} -C ${BUILDDIR} -xf ${_DISTDIR}/riscv-tests.tar.gz + +.include <bsd.port.post.mk> diff --git a/emulators/rvvm-devel/distinfo b/emulators/rvvm-devel/distinfo new file mode 100644 index 000000000000..4c0fde2fdf15 --- /dev/null +++ b/emulators/rvvm-devel/distinfo @@ -0,0 +1,9 @@ +TIMESTAMP = 1772998518 +SHA256 (rvvm-0.7.g20260226/fw_jump.bin) = 60f5aedaf90be271eef9e4f1a479171c183987f97f86208811e9212b121d5b45 +SIZE (rvvm-0.7.g20260226/fw_jump.bin) = 136776 +SHA256 (rvvm-0.7.g20260226/fw_payload.bin) = d97321ca71be85a98dcc1757b721616d6ed68304afe853336273cb19b424da6c +SIZE (rvvm-0.7.g20260226/fw_payload.bin) = 2958016 +SHA256 (rvvm-0.7.g20260226/riscv-tests.tar.gz) = 8ae000badcadc883f46572e75895cc4d2d05f2c07fac3e5f86896ab51888de39 +SIZE (rvvm-0.7.g20260226/riscv-tests.tar.gz) = 151450 +SHA256 (rvvm-0.7.g20260226/LekKit-RVVM-0.7.g20260226-44b1f500987041d07a8f313ad524b8509868997b_GH0.tar.gz) = 5ab16413cbd4a3c74c627878be66c8b258476885a7118932ed5d1554c62dfb10 +SIZE (rvvm-0.7.g20260226/LekKit-RVVM-0.7.g20260226-44b1f500987041d07a8f313ad524b8509868997b_GH0.tar.gz) = 526332 diff --git a/emulators/rvvm-devel/files/patch-Makefile b/emulators/rvvm-devel/files/patch-Makefile new file mode 100644 index 000000000000..e186f70c8a32 --- /dev/null +++ b/emulators/rvvm-devel/files/patch-Makefile @@ -0,0 +1,12 @@ +--- Makefile.orig 2026-03-08 19:25:25 UTC ++++ Makefile +@@ -1033,7 +1033,8 @@ $(call path_shell,$(BIN_TARGETS): $(BIN_OBJ) $(BIN_LIB + + + # Set -Wl,--out-implib,$@.a for Windows libraries +-override shared_extra = $(if $(filter windows,$(OS)),-Wl$(COMMA)--out-implib$(COMMA)$(patsubst %$(LIB_EXT),%.a,$1)) ++#override shared_extra = $(if $(filter windows,$(OS)),-Wl$(COMMA)--out-implib$(COMMA)$(patsubst %$(LIB_EXT),%.a,$1)) ++override shared_extra = -Wl$(COMMA)-soname$(COMMA)$(notdir $1).0 + + # Shared libraries + $(call path_shell,$(LIB_TARGETS): $(LIB_OBJ) $(CC_TRIGGER) $(LD_TRIGGER)) diff --git a/emulators/rvvm-devel/files/patch-project.mk b/emulators/rvvm-devel/files/patch-project.mk new file mode 100644 index 000000000000..9993b68d62c6 --- /dev/null +++ b/emulators/rvvm-devel/files/patch-project.mk @@ -0,0 +1,11 @@ +--- project.mk.orig 2026-03-08 19:32:28 UTC ++++ project.mk +@@ -1,7 +1,7 @@ override URL := https://github.com/LekKit/RVVM + override NAME := RVVM + override DESC := The RVVM Project + override URL := https://github.com/LekKit/RVVM +-override VERSION := v0.7-git ++#override VERSION := v0.7-git + + override define LOGO + $(BLUE) 🭥█████🭐 ██ ██ ██ ██🭢█🭌🬿 🭊🭁█🭚 diff --git a/emulators/rvvm-devel/files/pkg-message.in b/emulators/rvvm-devel/files/pkg-message.in new file mode 100644 index 000000000000..114244484781 --- /dev/null +++ b/emulators/rvvm-devel/files/pkg-message.in @@ -0,0 +1,11 @@ +RVVM has been installed. + +To execute a disk image, run + + rvvm %%DATADIR%%/fw_payload.bin [flags] -i $disk.img + +To execute a custom kernel payload, run + + rvvm %%DATADIR%%/fw_jump.bin [flags] -k $kernel.bin + +For further details, execute rvvm --help. diff --git a/emulators/rvvm-devel/pkg-descr b/emulators/rvvm-devel/pkg-descr new file mode 100644 index 000000000000..ea1852c76deb --- /dev/null +++ b/emulators/rvvm-devel/pkg-descr @@ -0,0 +1,8 @@ +RVVM is a virtual machine / emulator for RISC-V guests, which emphasizes +on performance, security, lean code and portability. It already runs a +lot of guest operating systems, including Linux, Haiku, FreeBSD, +OpenBSD, etc. It also aims to run RISC-V applications on a foreign-arch +host without full OS guest & isolation (Userland emulation). + +This port holds a version of the project that is close to what is +currently in development. diff --git a/emulators/rvvm-devel/pkg-plist b/emulators/rvvm-devel/pkg-plist new file mode 100644 index 000000000000..7e328ef46035 --- /dev/null +++ b/emulators/rvvm-devel/pkg-plist @@ -0,0 +1,11 @@ +bin/rvvm +include/rvvm/rvvm.h +include/rvvm/rvvm_blk.h +include/rvvm/rvvm_char.h +include/rvvm/rvvm_fb.h +include/rvvm/rvvm_gpio.h +lib/librvvm.so +lib/librvvm.so.0 +libdata/pkgconfig/rvvm.pc +%%DATADIR%%/fw_jump.bin +%%DATADIR%%/fw_payload.binhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69adf751.3f2b6.421728c>
