Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions emulators/renode/Portfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

Check warning on line 1 in emulators/renode/Portfile

View workflow job for this annotation

GitHub Actions / macos-26

port test renode: Warning: renode is configured to build for the architecture(s) 'arm64', but installed Mach-O files built for the following archs: Warning: x86_64: Warning: /opt/local/libexec/renode/lib/resources/llvm/libllvm-disas.dylib Warning: /opt/local/libexec/renode/output/bin/Release/runtimes/osx-x64/native/libMono.Unix.dylib Warning: /opt/local/libexec/renode/tests/unit-tests/RenodeTests/bin/Release/net8.0/runtimes/osx-x64/native/libMono.Unix.dylib Warning:

Check warning on line 1 in emulators/renode/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port test renode: Warning: renode is configured to build for the architecture(s) 'arm64', but installed Mach-O files built for the following archs: Warning: x86_64: Warning: /opt/local/libexec/renode/lib/resources/llvm/libllvm-disas.dylib Warning: /opt/local/libexec/renode/output/bin/Release/runtimes/osx-x64/native/libMono.Unix.dylib Warning: /opt/local/libexec/renode/tests/unit-tests/RenodeTests/bin/Release/net8.0/runtimes/osx-x64/native/libMono.Unix.dylib Warning:

Check warning on line 1 in emulators/renode/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port test renode: Warning: renode is configured to build for the architecture(s) 'arm64', but installed Mach-O files built for the following archs: Warning: x86_64: Warning: /opt/local/libexec/renode/lib/resources/llvm/libllvm-disas.dylib Warning: /opt/local/libexec/renode/output/bin/Release/runtimes/osx-x64/native/libMono.Unix.dylib Warning: /opt/local/libexec/renode/tests/unit-tests/RenodeTests/bin/Release/net8.0/runtimes/osx-x64/native/libMono.Unix.dylib Warning:

PortSystem 1.0
PortGroup github 1.0
PortGroup makefile 1.0

github.setup renode renode 1.16.1 v
github.tarball_from releases

revision 0
categories emulators devel
license MIT
maintainers {pguyot @pguyot} openmaintainer

description Virtual development framework for embedded systems

long_description Renode is an open source virtual development framework \
for complex embedded systems. It simulates SoCs, sensors, \
and other hardware, letting you run unmodified firmware \
binaries on your workstation. Supports ARM, RISC-V, \
SPARC, x86, Xtensa, POWER and more.

homepage https://renode.io

distname renode_${version}_source
use_xz yes

checksums rmd160 1162c3be17e823c83a1460a3963b8703f76b683e \
sha256 fefe9a495cb54af09f13a93a863b6cad027f7ddc8854921efa6e42d9fbcd9888 \
size 240071476

platforms {darwin >= 21}
supported_archs x86_64 arm64

depends_build-append \
port:dotnet-sdk-8 \
path:bin/cmake:cmake \
port:coreutils

depends_run-append port:dotnet-cli \
port:dotnet-runtime-8

makefile.override {}
makefile.has_destdir no

build.env-append "PATH=${prefix}/libexec/gnubin:$env(PATH)" \
DOTNET_CLI_TELEMETRY_OPTOUT=1 \
PLATFORM=

build.cmd ./build.sh
build.target
build.args --host-arch ${configure.build_arch}

destroot {
set renode_dir ${prefix}/libexec/${name}

# Create directory structure
xinstall -d ${destroot}${renode_dir}
xinstall -d ${destroot}${renode_dir}/output

# Install build output
copy ${worksrcpath}/output/bin ${destroot}${renode_dir}/output/bin

# Install tools (needed by the launcher scripts)
copy ${worksrcpath}/tools ${destroot}${renode_dir}/tools

# Install scripts, platforms, tests
copy ${worksrcpath}/scripts ${destroot}${renode_dir}/scripts
copy ${worksrcpath}/platforms ${destroot}${renode_dir}/platforms
copy ${worksrcpath}/tests ${destroot}${renode_dir}/tests

# Install lib resources (e.g. robot.css used by renode-test)
copy ${worksrcpath}/lib ${destroot}${renode_dir}/lib

# Install the root marker file used by TryGetRootDirectory to locate built-in platforms
xinstall -m 0644 ${worksrcpath}/.renode-root ${destroot}${renode_dir}/.renode-root

# Install the original launcher scripts
xinstall -m 0755 ${worksrcpath}/renode \
${destroot}${renode_dir}/renode
xinstall -m 0755 ${worksrcpath}/renode-test \
${destroot}${renode_dir}/renode-test

# The upstream renode-test hardcodes the test results directory below
# ${renode_dir}/output, which is read-only once installed. Default to /tmp
reinplace "s|TESTS_RESULTS=\"\$ROOT_PATH/output/tests\"|TESTS_RESULTS=\"/tmp/renode/output/tests\"|" \
${destroot}${renode_dir}/renode-test

# Create CLI wrapper for renode
xinstall -m 0755 ${filespath}/renode.sh \
${destroot}${prefix}/bin/renode
reinplace "s|@RENODE_DIR@|${renode_dir}|g" \
${destroot}${prefix}/bin/renode

# Create CLI wrapper for renode-test
xinstall -m 0755 ${filespath}/renode-test.sh \
${destroot}${prefix}/bin/renode-test
reinplace "s|@RENODE_DIR@|${renode_dir}|g" \
${destroot}${prefix}/bin/renode-test
}

notes "
Renode has been installed as a CLI tool.

Usage:
renode # launch with Monitor in the terminal
renode --disable-gui # headless mode
renode script.resc # run a Renode script
renode-test test.robot # run Robot Framework tests
"
2 changes: 2 additions & 0 deletions emulators/renode/files/renode-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec "@RENODE_DIR@/renode-test" "$@"
2 changes: 2 additions & 0 deletions emulators/renode/files/renode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec "@RENODE_DIR@/renode" "$@"