diff --git a/recipes/renode-cli/build.bat b/recipes/renode-cli/build.bat new file mode 100644 index 0000000000000..a2e62d810ad13 --- /dev/null +++ b/recipes/renode-cli/build.bat @@ -0,0 +1,81 @@ +@echo off +setlocal enabledelayedexpansion + +call powershell "%RECIPE_DIR%\helpers\build.ps1" +if %errorlevel% neq 0 exit /b %errorlevel% + +:: for /f "tokens=1,2 delims=." %%a in ('dotnet --version') do ( +:: set "framework_version=%%a.%%b" +:: ) +:: +:: rem Patch the project files to use the correct .NET version +:: for /f "delims=" %%i in ('find lib src tests -name "*.csproj"') do ( +:: sed -i -E "s/([>;])net6\.0.*([<;])/\1net${framework_version}\2/" "%%i" +:: sed -i -E "s|^((\s+))|\1\n\2\2CS0168;CS0219;CS8981;SYSLIB0050;SYSLIB0051|" "%%i" +:: ) +:: sed -i -E "s/(ReleaseHeadless\|Any .+ = )Debug/\1Release/" Renode_NET.sln +:: if %errorlevel% neq 0 exit /b %errorlevel% +:: +:: :: Update System.Drawing.Common to 5.0.3 +:: sed -i -E "s|||" \ +:: "%SRC_DIR%"\lib\termsharp\TermSharp_NET.csproj \ +:: "%SRC_DIR%"\lib\termsharp\xwt\Xwt.*\Xwt.*.csproj +:: if %errorlevel% neq 0 exit /b %errorlevel% +:: +:: mkdir "%SRC_DIR%\src\Infrastructure\src\Emulator\Cores\bin\Release\lib" +:: copy "%BUILD_PREFIX%\Library\lib\renode-cores\*" "%SRC_DIR%\src\Infrastructure\src\Emulator\Cores\bin\Release\lib" +:: if %errorlevel% neq 0 exit /b %errorlevel% +:: +:: rem Remove the C cores project that are not built in this recipe +:: del "%SRC_DIR%\src\Infrastructure\src\Emulator\Cores\translate*.cproj" +:: +:: rem Build with dotnet +:: call powershell "%RECIPE_DIR%\helpers\renode_build_with_dotnet.ps1" %framework_version% +:: if %errorlevel% neq 0 exit /b %errorlevel% +:: +:: rem Install procedure +:: mkdir "%PREFIX%\libexec\%PKG_NAME%" +:: xcopy /e /i /y "output\bin\Release\net%framework_version%\*" "%PREFIX%\libexec\%PKG_NAME%" +:: if %errorlevel% neq 0 exit /b %errorlevel% +:: +:: mkdir "%PREFIX%\opt\%PKG_NAME%\scripts" +:: mkdir "%PREFIX%\opt\%PKG_NAME%\platforms" +:: mkdir "%PREFIX%\opt\%PKG_NAME%\tests" +:: mkdir "%PREFIX%\opt\%PKG_NAME%\tools" +:: mkdir "%PREFIX%\opt\%PKG_NAME%\licenses" +:: +:: copy ".renode-root" "%PREFIX%\opt\%PKG_NAME%" +:: xcopy /e /i /y "scripts\*" "%PREFIX%\opt\%PKG_NAME%\scripts" +:: xcopy /e /i /y "platforms\*" "%PREFIX%\opt\%PKG_NAME%\platforms" +:: xcopy /e /i /y "tests\*" "%PREFIX%\opt\%PKG_NAME%\tests" +:: xcopy /e /i /y "tools\metrics_analyzer" "%PREFIX%\opt\%PKG_NAME%\tools" +:: xcopy /e /i /y "tools\execution_tracer" "%PREFIX%\opt\%PKG_NAME%\tools" +:: xcopy /e /i /y "tools\gdb_compare" "%PREFIX%\opt\%PKG_NAME%\tools" +:: xcopy /e /i /y "tools\sel4_extensions" "%PREFIX%\opt\%PKG_NAME%\tools" +:: +:: copy "lib\resources\styles\robot.css" "%PREFIX%\opt\%PKG_NAME%\tests" +:: +:: call tools\packaging\common_copy_licenses.bat "%PREFIX%\opt\%PKG_NAME%\licenses" linux +:: xcopy /e /i /y "%PREFIX%\opt\%PKG_NAME%\licenses" "license-files" +:: +:: sed -i.bak "s#os\.path\.join(this_path, '\.\./lib/resources/styles/robot\.css')#os.path.join(this_path,'robot.css')#g" "%PREFIX%\opt\%PKG_NAME%\tests\robot_tests_provider.py" +:: del "%PREFIX%\opt\%PKG_NAME%\tests\robot_tests_provider.py.bak" +:: +:: mkdir "%PREFIX%\bin" +:: ( +:: echo @echo off +:: echo call %%DOTNET_ROOT%%\dotnet exec %%CONDA_PREFIX%%\libexec\renode-cli\Renode.dll %%* +:: ) > "%PREFIX%\bin\renode.cmd" +:: chmod +x "%PREFIX%\bin\renode.cmd" +:: +:: ( +:: echo @echo off +:: echo setlocal enabledelayedexpansion +:: echo set "STTY_CONFIG=%%stty -g 2^>nul%%" +:: echo python3 "%%CONDA_PREFIX%%\opt\renode-cli\tests\run_tests.py" --robot-framework-remote-server-full-directory "%%CONDA_PREFIX%%\libexec\renode-cli" %%* +:: echo set "RESULT_CODE=%%ERRORLEVEL%%" +:: echo if not "%%STTY_CONFIG%%"=="" stty "%%STTY_CONFIG%%" +:: echo exit /b %%RESULT_CODE%% +:: ) > "%PREFIX%\bin\renode-test.cmd" +:: chmod +x "%PREFIX%\bin\renode-test.cmd" +:: \ No newline at end of file diff --git a/recipes/renode-cli/build.sh b/recipes/renode-cli/build.sh new file mode 100644 index 0000000000000..5c2c5dfa45b48 --- /dev/null +++ b/recipes/renode-cli/build.sh @@ -0,0 +1,90 @@ +#!/usr/bin/env bash + +set -o xtrace -o nounset -o pipefail -o errexit + +mkdir -p ${PREFIX}/bin +mkdir -p ${PREFIX}/libexec/${PKG_NAME} +export PATH="${DOTNET_ROOT}/dotnet:${PATH}" + +install_prefix="${PREFIX}/opt/${PKG_NAME}" + +dotnet_version=$(dotnet --version) +framework_version=${dotnet_version%.*} + +# Patch the project files to use the correct .NET version +find lib src tests -name "*.csproj" -exec sed -i -E \ + -e "s/([>;])net6.0([<;])/\1net${framework_version}\2/" \ + -e "s|^((\s+))|\1\n\2\2CS0168;CS0219;CS8981;SYSLIB0050;SYSLIB0051|" \ + -e 's|^(\s+)<(Package)?Reference\s+Include="Mono.Posix".*\n||g' \ + {} \; +find . -type d -name "obj" -exec rm -rf {} + +find . -type d -name "bin" -exec rm -rf {} + +sed -i -E 's/(ReleaseHeadless\|Any .+ = )Debug/\1Release/' Renode_NET.sln + +# Update System.Drawing.Common to 5.0.3 +sed -i -E 's|||' \ + "${SRC_DIR}"/lib/termsharp/TermSharp_NET.csproj \ + "${SRC_DIR}"/lib/termsharp/xwt/Xwt.*/Xwt.*.csproj + +# Prevent CMake build since we provide the binaries +mkdir -p ${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/bin/Release/lib +cp ${BUILD_PREFIX}/lib/renode-cores/* ${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/bin/Release/lib + +# Remove the C cores that are not built in this recipe +rm -f ${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/translate*.cproj + +chmod +x tools/{building,packaging}/*.sh +${RECIPE_DIR}/helpers/renode_build_with_dotnet.sh ${framework_version} + +# Install procedure +mkdir -p $PREFIX/libexec/${PKG_NAME} +cp -r output/bin/Release/net${framework_version}/* $PREFIX/libexec/${PKG_NAME}/ + +mkdir -p $PREFIX/opt/${PKG_NAME}/scripts +mkdir -p $PREFIX/opt/${PKG_NAME}/platforms +mkdir -p $PREFIX/opt/${PKG_NAME}/tests +mkdir -p $PREFIX/opt/${PKG_NAME}/tools +mkdir -p $PREFIX/opt/${PKG_NAME}/licenses + +cp .renode-root $PREFIX/opt/${PKG_NAME}/ +cp -r scripts/* $PREFIX/opt/${PKG_NAME}/scripts/ +cp -r platforms/* $PREFIX/opt/${PKG_NAME}/platforms/ +cp -r tests/* $PREFIX/opt/${PKG_NAME}/tests/ +cp -r tools/metrics_analyzer $PREFIX/opt/${PKG_NAME}/tools +cp -r tools/execution_tracer $PREFIX/opt/${PKG_NAME}/tools +cp -r tools/gdb_compare $PREFIX/opt/${PKG_NAME}/tools +cp -r tools/sel4_extensions $PREFIX/opt/${PKG_NAME}/tools + +cp lib/resources/styles/robot.css $PREFIX/opt/${PKG_NAME}/tests + +tools/packaging/common_copy_licenses.sh $PREFIX/opt/${PKG_NAME}/licenses linux +cp -r $PREFIX/opt/${PKG_NAME}/licenses license-files + +sed -i.bak "s#os\.path\.join(this_path, '\.\./lib/resources/styles/robot\.css')#os.path.join(this_path,'robot.css')#g" $PREFIX/opt/${PKG_NAME}/tests/robot_tests_provider.py +rm $PREFIX/opt/${PKG_NAME}/tests/robot_tests_provider.py.bak + +mkdir -p $PREFIX/bin/ +cat > $PREFIX/bin/renode <<"EOF" +#!/bin/sh +exec "${DOTNET_ROOT}"/dotnet exec "${CONDA_PREFIX}"/libexec/renode-cli/Renode.dll "$@" +EOF +chmod +x ${PREFIX}/bin/renode + +cat > $PREFIX/bin/renode.cmd <<"EOF" +call %DOTNET_ROOT%\dotnet exec %CONDA_PREFIX%\libexec\libexec\renode-cli\Renode.dll %* +EOF +chmod +x ${PREFIX}/bin/renode + +cat > $PREFIX/bin/renode-test <<"EOF" +#!/usr/bin/env bash + +STTY_CONFIG=`stty -g 2>/dev/null` +python3 "${CONDA_PREFIX}"/opt/renode-cli/tests/run_tests.py --robot-framework-remote-server-full-directory "${CONDA_PREFIX}"/libexec/renode-cli "$@" +RESULT_CODE=$? +if [ -n "${STTY_CONFIG:-}" ] +then + stty "$STTY_CONFIG" +fi +exit $RESULT_CODE +EOF +chmod +x ${PREFIX}/bin/renode-test diff --git a/recipes/renode-cli/helpers/build.ps1 b/recipes/renode-cli/helpers/build.ps1 new file mode 100644 index 0000000000000..eb22fe77c5f7c --- /dev/null +++ b/recipes/renode-cli/helpers/build.ps1 @@ -0,0 +1,90 @@ +# Set framework version +$dotnet_version = (dotnet --version) +if ($dotnet_version -match "^(\d+\.\d+)") { + $framework_version = $Matches[1] +} else { + Write-Error "Could not determine .NET version. Using default 8.0." + $framework_version = "8.0" +} + +$SRC_DIR = Resolve-Path "$Env:SRC_DIR" +$BUILD_PREFIX = Resolve-Path "$Env:BUILD_PREFIX" +$PREFIX = Resolve-Path "$Env:PREFIX" +$PKG_NAME = $Env:PKG_NAME + +# Update Renode_NET.sln (replace Debug with Release) +(Get-Content "Renode_NET.sln") | ForEach-Object { $_ -replace "(ReleaseHeadless\|Any CPU\..+ = )Debug", '$1Release' } | Set-Content "Renode_NET.sln" + +$csprojFiles = Get-ChildItem -Path $SRC_DIR -Filter "*.csproj" -Recurse +foreach ($file in $csprojFiles) { + $csprojContent = (Get-Content $file.FullName) + + # Update System.Drawing.Common to 5.0.3 + $csprojContent = $csprojContent -replace "", "" + + # Add package reference only to UI_NET.csproj + if ($file.FullName -match "(UI)_NET\.csproj") { + if ($csprojContent -notmatch "PresentationFramework") { + # $csprojContent = $csprojContent -replace "(<\/Project>)", " `n `n `n`$1" + $csprojContent = $csprojContent -replace "(<\/PropertyGroup>)", " true`n`$1" + } + } + + # Remove excessive warnings .csproj files (TargetFramework and NoWarn) + $csprojContent = $csprojContent -replace "()", "`$1`n`t`tCA1416;CS0649;CS0168;CS0219;CS8981;SYSLIB0050;SYSLIB0051" + Set-Content -Path $file.FullName -Value $csprojContent +} + +# Install renode-cores .so where they are looked for +New-Item -ItemType Directory -Path "$SRC_DIR\src\Infrastructure\src\Emulator\Cores\bin\Release\lib" -Force +Copy-Item -Path "$BUILD_PREFIX\Library\lib\renode-cores\*" -Destination "$SRC_DIR\src\Infrastructure\src\Emulator\Cores\bin\Release\lib" -Force + +# Remove C cores not built in this recipe +Remove-Item -Path "$SRC_DIR\src\Infrastructure\src\Emulator\Cores\translate*.cproj" -Force + +# Build with dotnet +New-Item -ItemType Directory -Path "$PREFIX\Library\lib" -Force +& $Env:RECIPE_DIR\helpers\renode_build_with_dotnet.ps1 $framework_version + +# Install procedure +New-Item -ItemType Directory -Path "$PREFIX\libexec\$PKG_NAME" -Force +Copy-Item -Path "$SRC_DIR\output\bin\Release\net$framework_version-windows\*" -Destination "$PREFIX\libexec\$PKG_NAME\" -Recurse -Force + +New-Item -ItemType Directory -Path "$PREFIX\opt\$PKG_NAME\scripts", "$PREFIX\opt\$PKG_NAME\platforms", "$PREFIX\opt\$PKG_NAME\tests", "$PREFIX\opt\$PKG_NAME\tools", "$PREFIX\opt\$PKG_NAME\licenses" -Force + +Copy-Item -Path "$SRC_DIR\.renode-root" -Destination "$PREFIX\opt\$PKG_NAME" -Force +Copy-Item -Path "$SRC_DIR\scripts\*" -Destination "$PREFIX\opt\$PKG_NAME\scripts" -Recurse -Force +Copy-Item -Path "$SRC_DIR\platforms\*" -Destination "$PREFIX\opt\$PKG_NAME\platforms" -Recurse -Force +Copy-Item -Path "$SRC_DIR\tests\*" -Destination "$PREFIX\opt\$PKG_NAME\tests" -Recurse -Force +Copy-Item -Path "$SRC_DIR\tools\metrics_analyzer", "$SRC_DIR\tools\execution_tracer", "$SRC_DIR\tools\gdb_compare", "$SRC_DIR\tools\sel4_extensions" -Destination "$PREFIX\opt\$PKG_NAME\tools" -Recurse -Force + +Copy-Item "$SRC_DIR\lib\resources\styles\robot.css" "$PREFIX\opt\$PKG_NAME\tests" -Force + +$licensesPath = (Resolve-Path "$PREFIX\opt\$PKG_NAME\licenses").Path -replace '\\', '/' +$scriptPath = (Resolve-Path "$SRC_DIR\tools\packaging\common_copy_licenses.sh").Path -replace '\\', '/' +$command = "'$scriptPath' '$licensesPath' 'linux'" +& "bash.exe" -c $command +Copy-Item -Path "$PREFIX\opt\$PKG_NAME\licenses" -Destination "license-files" -Recurse -Force + +# Update robot_tests_provider.py (replace path to robot.css) +(Get-Content "$PREFIX\opt\$PKG_NAME\tests\robot_tests_provider.py") | ForEach-Object { $_ -replace "os\.path\.join\(this_path, '\.\./lib/resources/styles/robot\.css'\)", "os.path.join(this_path,'robot.css')" } | Set-Content "$PREFIX\opt\$PKG_NAME\tests\robot_tests_provider.py" + +# Create renode.cmd +New-Item -ItemType File -Path "$PREFIX\bin\renode.cmd" -Force +@" +@echo off +call %DOTNET_ROOT%\dotnet exec %CONDA_PREFIX%\libexec\renode-cli\Renode.dll %* +"@ | Out-File -FilePath "$PREFIX\bin\renode.cmd" -Encoding ascii +# No chmod +x needed in PowerShell + +# Create renode-test.cmd +New-Item -ItemType File -Path "$PREFIX\bin\renode-test.cmd" -Force +@" +@echo off +setlocal enabledelayedexpansion +set "STTY_CONFIG=%stty -g 2^>nul%" +python3 "%CONDA_PREFIX%\opt\renode-cli\tests\run_tests.py" --robot-framework-remote-server-full-directory "%CONDA_PREFIX%\libexec\renode-cli" %* +set "RESULT_CODE=%ERRORLEVEL%" +if not "%STTY_CONFIG%"=="" stty "%STTY_CONFIG%" +exit /b %RESULT_CODE% +"@ | Out-File -FilePath "$PREFIX\bin\renode-test.cmd" -Encoding ascii diff --git a/recipes/renode-cli/helpers/renode_build_with_dotnet.ps1 b/recipes/renode-cli/helpers/renode_build_with_dotnet.ps1 new file mode 100755 index 0000000000000..0b851e1a4e377 --- /dev/null +++ b/recipes/renode-cli/helpers/renode_build_with_dotnet.ps1 @@ -0,0 +1,71 @@ +param ( + [string]$framework_version +) + +$SRC_DIR = Resolve-Path "$Env:SRC_DIR" + +$OUTPUT_DIRECTORY = "$SRC_DIR\output" +$CONFIGURATION = "Release" +$BUILD_PLATFORM = "Any CPU" +$HEADLESS = $true +$NET = $true +$TFM = "net$framework_version-windows" +$HOST_ARCH = "i386" +$CMAKE_COMMON = "" + +$PARAMS = @() +if ($Env:CC) { + $PARAMS += "/p:CompilerPath=$Env:CC" + $PARAMS += "/p:LinkerPath=$Env:CC" +} +if ($Env:AR) { + $PARAMS += "/p:ArPath=$Env:AR" +} +$PARAMS += $args + +if ($HEADLESS) { + $BUILD_TARGET = "Headless" + $PARAMS += "/p:GUI_DISABLED=true" +} + +$DirectoryBuildTargetsContent = @" + + + $TFM + ${Env:OS_SPECIFIC_TARGET_OPTS} + + +"@ + +$DirectoryBuildTargetsPath = "$SRC_DIR\Directory.Build.targets" +Set-Content -Path $DirectoryBuildTargetsPath -Value $DirectoryBuildTargetsContent + +$Env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 +$CS_COMPILER = "dotnet build /m" +$TARGET = "$SRC_DIR\Renode_NET.sln" +$BUILD_TYPE = "dotnet" + +$OUT_BIN_DIR = "$SRC_DIR\output\bin\$CONFIGURATION" +$BUILD_TYPE_FILE = "$OUT_BIN_DIR\build_type" + +# Copy properties file according to the running OS +New-Item -ItemType Directory -Force -Path $OUT_BIN_DIR +New-Item -ItemType Directory -Force -Path $OUTPUT_DIRECTORY +# Remove-Item -Force -Path "$OUTPUT_DIRECTORY\properties.csproj" +$PROP_FILE = "$SRC_DIR\src\Infrastructure\src\Emulator\Cores\windows-properties_NET.csproj" +Copy-Item -Path $PROP_FILE -Destination "$OUTPUT_DIRECTORY\properties.csproj" + +$CORES_PATH = "$SRC_DIR\src\Infrastructure\src\Emulator\Cores" + +$PARAMS += "/p:Configuration=${CONFIGURATION}${BUILD_TARGET}" +$PARAMS += "/p:GenerateFullPaths=true" +$PARAMS += "/p:Platform=`"$BUILD_PLATFORM`"" + +# build +Invoke-Expression "$CS_COMPILER @PARAMS $TARGET" +Set-Content -Path $BUILD_TYPE_FILE -Value $BUILD_TYPE + +# copy llvm library +$LLVM_LIB = "libllvm-disas" +$LIB_EXT = "dll" +Copy-Item -Path "$SRC_DIR\lib\resources\llvm\$LLVM_LIB.$LIB_EXT" -Destination "$OUT_BIN_DIR\libllvm-disas.$LIB_EXT" diff --git a/recipes/renode-cli/helpers/renode_build_with_dotnet.sh b/recipes/renode-cli/helpers/renode_build_with_dotnet.sh new file mode 100755 index 0000000000000..03d4ab52b76c9 --- /dev/null +++ b/recipes/renode-cli/helpers/renode_build_with_dotnet.sh @@ -0,0 +1,95 @@ +#!/usr/bin/env bash + +set -uex + +framework_version=$1 +shift 1 + +OUTPUT_DIRECTORY="${SRC_DIR}/output" + +CONFIGURATION="Release" +BUILD_PLATFORM="Any CPU" +HEADLESS=true +NET=true +TFM="net${framework_version}" +HOST_ARCH="i386" +# Common cmake flags +CMAKE_COMMON="" + +PARAMS=( + # By default use CC as Compiler- and LinkerPath, and AR as ArPath + ${CC:+"p:CompilerPath=$CC"} + ${CC:+"p:LinkerPath=$CC"} + ${AR:+"p:ArPath=$AR"} + # But allow users to override it + "$@" +) + +if $HEADLESS +then + BUILD_TARGET=Headless + PARAMS+=(p:GUI_DISABLED=true) +else + BUILD_TARGET=Mono +fi + +cat < "${SRC_DIR}/Directory.Build.targets" + + + $TFM + ${OS_SPECIFIC_TARGET_OPTS:+${OS_SPECIFIC_TARGET_OPTS}} + + +EOF + +export DOTNET_CLI_TELEMETRY_OPTOUT=1 +CS_COMPILER="dotnet build" +TARGET="${SRC_DIR}/Renode_NET.sln" +BUILD_TYPE="dotnet" + +OUT_BIN_DIR="${SRC_DIR}/output/bin/${CONFIGURATION}" +BUILD_TYPE_FILE="${OUT_BIN_DIR}/build_type" + +# Copy properties file according to the running OS +mkdir -p "$OUTPUT_DIRECTORY" +rm -f "$OUTPUT_DIRECTORY/properties.csproj" +if [[ "${target_platform}" == "osx-"* ]]; then + PROP_FILE="${CURRENT_PATH:=.}/src/Infrastructure/src/Emulator/Cores/osx-properties.csproj" +elif [[ "${target_platform}" == "linux-"* ]] || [[ "${target_platform}" == "noarch" ]]; then + PROP_FILE="${CURRENT_PATH:=.}/src/Infrastructure/src/Emulator/Cores/linux-properties.csproj" +else + echo "Unsupported platform: ${target_platform}" + exit 1 +fi +cp "$PROP_FILE" "$OUTPUT_DIRECTORY/properties.csproj" + +CORES_PATH="${SRC_DIR}/src/Infrastructure/src/Emulator/Cores" + +PARAMS+=(p:Configuration=${CONFIGURATION}${BUILD_TARGET} p:GenerateFullPaths=true p:Platform="\"$BUILD_PLATFORM\"") + +# build +function build_args_helper() { + local retStr="" + for p in "$@" ; do + retStr="${retStr} -$p" + done + echo ${retStr} +} + +eval "$CS_COMPILER $(build_args_helper "${PARAMS[@]}") $TARGET" +echo -n "$BUILD_TYPE" > "$BUILD_TYPE_FILE" + +# copy llvm library +LLVM_LIB="libllvm-disas" +if [[ $HOST_ARCH == "aarch64" ]]; then + # aarch64 host binaries have a different name + LLVM_LIB="libllvm-disas-aarch64" +fi +if [[ "${target_platform}" == "linux-"* ]] || [[ "${target_platform}" == "noarch" ]]; then + LIB_EXT="so" +elif [[ "${target_platform}" == "osx-"* ]]; then + LIB_EXT="dylib" +else + LIB_EXT="dll" +fi +cp lib/resources/llvm/$LLVM_LIB.$LIB_EXT $OUT_BIN_DIR/libllvm-disas.$LIB_EXT diff --git a/recipes/renode-cli/patches/resolve-posix-unix.patch b/recipes/renode-cli/patches/resolve-posix-unix.patch new file mode 100644 index 0000000000000..604bfdd3387e0 --- /dev/null +++ b/recipes/renode-cli/patches/resolve-posix-unix.patch @@ -0,0 +1,67 @@ +--- a/src/Plugins/VerilatorPlugin/Connection/SocketVerilatorConnection.cs ++++ b/src/Plugins/VerilatorPlugin/Connection/SocketVerilatorConnection.cs +@@ -7,4 +7,6 @@ + using System; ++using System.IO; + using System.Net; + using System.Net.Sockets; ++using System.Security.AccessControl; + using System.Text; +@@ -19,2 +21,3 @@ + using Antmicro.Renode.Peripherals; ++using Antmicro.Renode.Peripherals.Bus; + using Antmicro.Renode.Peripherals.CPU; +@@ -212,3 +215,7 @@ + #if !PLATFORM_WINDOWS +- Mono.Unix.Native.Syscall.chmod(value, FilePermissions.S_IRWXU); //setting permissions to 0x700 ++ // Use built-in .NET methods for file permissions ++ var fileInfo = new FileInfo(value); ++ var fileSecurity = fileInfo.GetAccessControl(); ++ fileSecurity.AddAccessRule(new FileSystemAccessRule(Environment.UserName, FileSystemRights.FullControl, AccessControlType.Allow)); ++ fileInfo.SetAccessControl(fileSecurity); + #endif +--- a/src/Renode/Backends/Terminals/UartPtyTerminal.cs 2024-09-17 03:09:19.000000000 -0500 ++++ b/src/Renode/Backends/Terminals/UartPtyTerminal.cs 2025-01-25 21:32:28.901091634 -0600 +@@ -10,2 +10,3 @@ + using System; ++using System.IO; + using Antmicro.Renode.Peripherals.UART; +@@ -14,4 +15,2 @@ + using Antmicro.Migrant; +-using Mono.Unix; +-using System.IO; + #endif +@@ -49,3 +48,3 @@ + { +- symlink.Delete(); ++ File.Delete(linkName); + } +@@ -53,3 +52,3 @@ + { +- throw new RecoverableException(string.Format("There was an error when removing symlink `{0}': {1}", symlink.FullName, e.Message)); ++ throw new RecoverableException(string.Format("There was an error when removing symlink `{0}': {1}", symlink, e.Message)); + } +@@ -105,4 +104,4 @@ + { +- var slavePtyFile = new UnixFileInfo(ptyStream.SlaveName); +- symlink = slavePtyFile.CreateSymbolicLink(linkName); ++ symlink = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); ++ File.CreateSymbolicLink(symlink, ptyStream.SlaveName); + } +@@ -114,4 +113,2 @@ + +- private UnixSymbolicLinkInfo symlink; +- + private readonly bool forceCreate; +@@ -122,2 +119,4 @@ + private IOProvider io; ++ [Transient] ++ private string symlink; + } +--- a/src/Renode/Program.cs 2024-09-17 03:09:19.000000000 -0500 ++++ b/src/Renode/Program.cs 2025-01-26 11:07:01.717709447 -0600 +@@ -98,3 +98,3 @@ + ConfigurationManager.Instance.Get("general", "terminal", "Termsharp"); +- ConsoleBackend.Instance.ReportRepeatingLines = !ConfigurationManager.Instance.Get("general", "collapse-repeated-log-entries", true); ++ // Logger.LogEntriesLimit = ConfigurationManager.Instance.Get("general", "log-entries-limit", 10000); + } diff --git a/recipes/renode-cli/patches/update-IronPython-Renode_NET.csproj.patch b/recipes/renode-cli/patches/update-IronPython-Renode_NET.csproj.patch new file mode 100644 index 0000000000000..c2a58810292ab --- /dev/null +++ b/recipes/renode-cli/patches/update-IronPython-Renode_NET.csproj.patch @@ -0,0 +1,5 @@ +--- a/src/Renode/Renode_NET.csproj ++++ b/src/Renode/Renode_NET.csproj +@@ -29 +29 @@ +- ++ diff --git a/recipes/renode-cli/patches/update-IronPython-Unittest_NET.csproj.patch b/recipes/renode-cli/patches/update-IronPython-Unittest_NET.csproj.patch new file mode 100644 index 0000000000000..cfb34811a916d --- /dev/null +++ b/recipes/renode-cli/patches/update-IronPython-Unittest_NET.csproj.patch @@ -0,0 +1,15 @@ +--- a/src/Infrastructure/src/Emulator/Main/Tests/UnitTests/UnitTests_NET.csproj ++++ b/src/Infrastructure/src/Emulator/Main/Tests/UnitTests/UnitTests_NET.csproj +@@ -18,5 +18,4 @@ + +- +- ..\..\..\..\..\..\..\lib\resources\libraries\IronPython.dll +- ++ ++ + +--- a/src/Infrastructure/src/Emulator/Peripherals/Peripherals/Sensors/PAC1934.cs ++++ b/src/Infrastructure/src/Emulator/Peripherals/Peripherals/Sensors/PAC1934.cs +@@ -131,1 +131,1 @@ +- return BitConverter.GetBytes(registers.Read(offset)); ++ return BitConverter.GetBytes((short)registers.Read(offset)); diff --git a/recipes/renode-cli/patches/update-cores.template_NET.csproj.patch b/recipes/renode-cli/patches/update-cores.template_NET.csproj.patch new file mode 100644 index 0000000000000..184654dd4bf06 --- /dev/null +++ b/recipes/renode-cli/patches/update-cores.template_NET.csproj.patch @@ -0,0 +1,46 @@ +--- a/src/Infrastructure/src/Emulator/Cores/cores.template_NET.csproj 2024-09-17 05:29:16.000000000 -0500 ++++ b/src/Infrastructure/src/Emulator/Cores/cores.template_NET.csproj 2025-01-27 21:35:32.396468884 -0600 +@@ -1,4 +1,2 @@ + +- +- + +@@ -17,18 +15,9 @@ + +- +- +- +- 32 +- 0 +- +- +- +- +- +- +- ++ + +- +- Antmicro.Renode.%(Filename)%(Extension) ++ ++ Antmicro.Renode.translate-$(Architecture)-le.so ++ ++ ++ Antmicro.Renode.translate-$(Architecture)-be.so + +@@ -36,11 +25,2 @@ + +- +- +- +- +- +- +- +- ++ +\ No newline at end of file diff --git a/recipes/renode-cli/recipe.yaml b/recipes/renode-cli/recipe.yaml new file mode 100644 index 0000000000000..a7521a6446b99 --- /dev/null +++ b/recipes/renode-cli/recipe.yaml @@ -0,0 +1,74 @@ +context: + name: renode-cli + version: "1.15.3" + python_min: "3.6" + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + - url: https://github.com/renode/renode/releases/download/v${{ version }}/renode_${{ version }}_source.tar.xz + sha256: 40c50afe8db86a9c63f4a86b93116a6babd43bf241cfaac47b2c0d2cbc2b15a8 + patches: + - patches/update-IronPython-Renode_NET.csproj.patch + - patches/update-cores.template_NET.csproj.patch + - patches/update-IronPython-Unittest_NET.csproj.patch + - if: unix + then: + - patches/resolve-posix-unix.patch + +build: + number: 0 + +requirements: + build: + - dotnet + - git + - nuget-license + - renode-cores ==${{ version }} + - if: unix + then: sed + else: m2-sed + host: + - dotnet + run: + - dotnet + +tests: + - package_contents: + bin: + - renode + - renode.cmd + - renode-test + - script: + - renode --help + - renode-test ${PREFIX}/opt/renode-cli/tests/unit-tests + requirements: + run: + - robotframework 6.1 + - psutil 5.9.3 + - python + - pyyaml 6.0 + +about: + homepage: https://github.com/renode/renode + summary: "Antmicro's open source simulation and virtual development framework for complex embedded systems" + description: | + Renode was created by Antmicro as a virtual development tool for multi-node + embedded networks (both wired and wireless) and is intended to enable a scalable + workflow for creating effective, tested and secure IoT systems. + + With Renode, developing, testing, debugging and simulating unmodified software + for IoT devices is fast, cost-effective and reliable. + license: MIT + license_file: + - LICENSE + - licensefiles/ + documentation: https://renode.io/ + repository: https://github.com/renode/renode + +extra: + recipe-maintainers: + - MementoRC + - danielnachun diff --git a/recipes/renode-cli/variants.yaml b/recipes/renode-cli/variants.yaml new file mode 100644 index 0000000000000..3fdfa2f172c02 --- /dev/null +++ b/recipes/renode-cli/variants.yaml @@ -0,0 +1,7 @@ +c_stdlib: + - if: linux + then: sysroot + - if: osx + then: macosx_deployment_target + - if: not unix + then: vs diff --git a/recipes/renode-cores/build.bat b/recipes/renode-cores/build.bat new file mode 100644 index 0000000000000..5ab408c42c169 --- /dev/null +++ b/recipes/renode-cores/build.bat @@ -0,0 +1,48 @@ +@echo off + +setlocal EnableDelayedExpansion + +rem Update the submodule to the latest commit CMakeLists.txt +mkdir %SRC_DIR%\updates +pushd %SRC_DIR%\updates + git clone "https://github.com/renode/renode-infrastructure.git" + pushd renode-infrastructure + git checkout 3fc2d5fe643068e595e875d9408cb4329522b229 + set "CMAKEFILES_TXT=src\Emulator\Cores\CMakeLists.txt" + copy %CMAKEFILES_TXT% "%SRC_DIR%\src\Infrastructure\%CMAKEFILES_TXT%" + popd + + git clone "https://github.com/antmicro/tlib.git" + pushd tlib + git checkout 69fff75a0eba7471283b0b8db2e55e8388e284f6 + copy "CMakeLists.txt" "%SRC_DIR%\src\Infrastructure\src\Emulator\Cores\tlib" + copy "tcg\CMakeLists.txt" "%SRC_DIR%\src\Infrastructure\src\Emulator\Cores\tlib\tcg" + copy LICENSE %RECIPE_DIR%\tlib-LICENSE + popd + if %errorlevel% neq 0 exit /b %errorlevel% +popd + +copy "%SRC_DIR%\src\Infrastructure\src\Emulator\Cores\tlib\softfloat-3\COPYING.txt" "%RECIPE_DIR%\softfloat-3-COPYING.txt" + +powershell -ExecutionPolicy Bypass -File "%RECIPE_DIR%\helpers\renode_build_with_cmake.ps1" +if %errorlevel% neq 0 exit /b %errorlevel% + +rem Install procedure into a conda path that renode-cli can retrieve +set "CONFIGURATION=Release" +set "CORES_PATH=%SRC_DIR%\src\Infrastructure\src\Emulator\Cores" +set "CORES_BIN_PATH=%CORES_PATH%\bin\%CONFIGURATION%" + +mkdir "%PREFIX%\Library\lib\%PKG_NAME%" +icacls "%PREFIX%\Library\lib\%PKG_NAME%" /grant Users:(OI)(CI)F /T +robocopy "%CORES_BIN_PATH%\lib" "%PREFIX%\Library\lib\%PKG_NAME%" /E /COPY:DATSO + +:: Setting conda host environment variables +:: if not exist "%PREFIX%\etc\conda\activate.d\" mkdir "%PREFIX%\etc\conda\activate.d\" +:: if not exist "%PREFIX%\etc\conda\deactivate.d\" mkdir "%PREFIX%\etc\conda\deactivate.d\" +:: +:: copy "%RECIPE_DIR%\scripts\activate.bat" "%PREFIX%\etc\conda\activate.d\%PKG_NAME%-activate.bat" > nul +:: if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% +:: copy "%RECIPE_DIR%\scripts\deactivate.bat" "%PREFIX%\etc\conda\deactivate.d\%PKG_NAME%-deactivate.bat" > nul +:: if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% + +endlocal diff --git a/recipes/renode-cores/build.sh b/recipes/renode-cores/build.sh new file mode 100644 index 0000000000000..90b108189cd96 --- /dev/null +++ b/recipes/renode-cores/build.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +set -o xtrace -o nounset -o pipefail -o errexit + +# Update the submodule CMakeLists.txt with a recent version (post-CMake conversion) +CMAKEFILES_TXT="src/Emulator/Cores/CMakeLists.txt" +cp "cmake-renode-infrastructure/${CMAKEFILES_TXT}" "${SRC_DIR}/src/Infrastructure/${CMAKEFILES_TXT}" +cp cmake-tlib/CMakeLists.txt "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/tlib" +cp cmake-tlib/tcg/CMakeLists.txt "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/tlib/tcg" + +if [[ "${target_platform}" == "osx-arm64" ]]; then + # We use Clang on osx-arm64, which does not support -Wno-error=clobbered/-Wno-clobbered + sed -i -E 's/add_definitions\(-Wno-error=clobbered\)/add_compile_options(-Wno-unknown-warning-option -Wno-clobbered)/' \ + "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/CMakeLists.txt" \ + "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/tlib/CMakeLists.txt" \ + "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/tlib/tcg/CMakeLists.txt" + + # Oddly, it does not find additional.h, trying to add the include path + sed -i -E 's| \$\{CMAKE_SOURCE_DIR\}| \$\{CMAKE_SOURCE_DIR\} \$\{CMAKE_SOURCE_DIR\}/tlib/tcg|' \ + "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/tlib/tcg/CMakeLists.txt" +fi + +cp cmake-tlib/LICENSE "${RECIPE_DIR}/tlib-LICENSE" +cp "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/tlib/softfloat-3/COPYING.txt" "${RECIPE_DIR}/softfloat-3-COPYING.txt" + +chmod +x build.sh tools/building/check_weak_implementations.sh +${RECIPE_DIR}/helpers/renode_build_with_cmake.sh + +# Install procedure into a conda path that renode-cli can retrieve +CONFIGURATION="Release" +CORES_PATH="${SRC_DIR}/src/Infrastructure/src/Emulator/Cores" +CORES_BIN_PATH="$CORES_PATH/bin/$CONFIGURATION" + +mkdir -p "${PREFIX}/lib/${PKG_NAME}" +tar -c -C "${CORES_BIN_PATH}/lib" . | tar -x -C "${PREFIX}/lib/${PKG_NAME}" + +# Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. +# This will allow them to be run on environment activation. +# for CHANGE in "activate" "deactivate" +# do +# mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" +# cp "${RECIPE_DIR}/scripts/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}-${CHANGE}.sh" +# done \ No newline at end of file diff --git a/recipes/renode-cores/helpers/renode_build_with_cmake.ps1 b/recipes/renode-cores/helpers/renode_build_with_cmake.ps1 new file mode 100755 index 0000000000000..749b3e2ccc347 --- /dev/null +++ b/recipes/renode-cores/helpers/renode_build_with_cmake.ps1 @@ -0,0 +1,68 @@ +$ErrorActionPreference = "Stop" + +$cpuCount = (Get-CimInstance Win32_Processor).NumberOfLogicalProcessors + +$env:PATH = "${env:BUILD_PREFIX}/Library/mingw-w64/bin;${env:BUILD_PREFIX}/Library/bin;${env:PREFIX}/Library/bin;${env:PREFIX}/bin;${env:PATH}" +$env:SRC_DIR = $env:SRC_DIR + +$CMAKE = (Get-Command cmake).Source + +$CONFIGURATION = "Release" +$HOST_ARCH = "i386" +$CMAKE_COMMON = "" + +$CORES_PATH = Join-Path -Path $env:SRC_DIR -ChildPath "src\Infrastructure\src\Emulator\Cores" + +Push-Location "$env:SRC_DIR\tools\building" + bash .\check_weak_implementations.sh +Pop-Location + +$CORES_BUILD_PATH = Join-Path -Path $CORES_PATH -ChildPath "obj\$CONFIGURATION" +$CORES_BIN_PATH = Join-Path -Path $CORES_PATH -ChildPath "bin\$CONFIGURATION" + +$CMAKE_GEN = "-GNinja" + +$CORES = @("arm.le", "arm.be", "arm64.le", "arm-m.le", "arm-m.be", "ppc.le", "ppc.be", "ppc64.le", "ppc64.be", "i386.le", "x86_64.le", "riscv.le", "riscv64.le", "sparc.le", "sparc.be", "xtensa.le") + +function Update-CMakeLists { + param ( + [string]$filePath, + [string]$flagToRemove, + [string]$flagToAdd + ) + (gc $filePath) -replace $flagToRemove,$flagToAdd | sc $filePath +} + +Update-CMakeLists "$CORES_PATH\tlib\CMakeLists.txt" "-fPIC" "-Wno-unused-function -Wno-maybe-uninitialized" +Update-CMakeLists "$CORES_PATH\tlib\tcg\CMakeLists.txt" "-fPIC" "-Wno-unused-function -Wno-maybe-uninitialized" + +foreach ($core_config in $CORES) { + Write-Host "Building $core_config" + + $CORE = $core_config.Split('.')[0] + $ENDIAN = $core_config.Split('.')[1] + $BITS = if ($CORE -match "64") { 64 } else { 32 } + + $CMAKE_CONF_FLAGS = @( + "-DTARGET_ARCH=$CORE" + "-DTARGET_WORD_SIZE=$BITS" + "-DCMAKE_BUILD_TYPE=$CONFIGURATION" + ) + + $CORE_DIR = Join-Path -Path $CORES_BUILD_PATH -ChildPath "$CORE\$ENDIAN" + New-Item -ItemType Directory -Path $CORE_DIR -Force | Out-Null + Push-Location $CORE_DIR + if ($ENDIAN -eq "be") { + $CMAKE_CONF_FLAGS += @("-DTARGET_BIG_ENDIAN=1") + } + + & $CMAKE $CMAKE_GEN $CMAKE_COMMON @CMAKE_CONF_FLAGS -DHOST_ARCH="$HOST_ARCH" $CORES_PATH -DCMAKE_VERBOSE_MAKEFILE=ON + & $CMAKE --build . -j $cpuCount + + $CORE_BIN_DIR = Join-Path -Path $CORES_BIN_PATH -ChildPath "lib" + New-Item -ItemType Directory -Path $CORE_BIN_DIR -Force | Out-Null + Copy-Item -Path "tlib\*.so" -Destination $CORE_BIN_DIR -Force -Verbose + Pop-Location +} + +exit 0 \ No newline at end of file diff --git a/recipes/renode-cores/helpers/renode_build_with_cmake.sh b/recipes/renode-cores/helpers/renode_build_with_cmake.sh new file mode 100755 index 0000000000000..759d14393d4e8 --- /dev/null +++ b/recipes/renode-cores/helpers/renode_build_with_cmake.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash + +set -o xtrace -o nounset -o pipefail -o errexit + +CONFIGURATION="Release" +HOST_ARCH="i386" +CMAKE_COMMON="" + +# check weak implementations of core libraries +pushd "${SRC_DIR}/tools/building" > /dev/null + ./check_weak_implementations.sh +popd > /dev/null + +# Paths for tlib +CORES_PATH="${SRC_DIR}/src/Infrastructure/src/Emulator/Cores" +CORES_BUILD_PATH="$CORES_PATH/obj/$CONFIGURATION" +CORES_BIN_PATH="$CORES_PATH/bin/$CONFIGURATION" + +CMAKE_GEN="-GUnix Makefiles" + +# Macos architecture flags, to make rosetta work properly +if [[ "${target_platform}" == "osx-64" ]]; then + CMAKE_COMMON+=" -DCMAKE_OSX_ARCHITECTURES=x86_64" +fi +if [[ "${target_platform}" == "osx-arm64" ]]; then + HOST_ARCH="aarch64" + CMAKE_COMMON+=" -DCMAKE_OSX_ARCHITECTURES=arm64" +fi + +# This list contains all cores that will be built. +# If you are adding a new core or endianness add it here to have the correct tlib built +CORES=(arm.le arm.be arm64.le arm-m.le arm-m.be ppc.le ppc.be ppc64.le ppc64.be i386.le x86_64.le riscv.le riscv64.le sparc.le sparc.be xtensa.le) + +# build tlib +for core_config in "${CORES[@]}" +do + CORE="$(echo $core_config | cut -d '.' -f 1)" + ENDIAN="$(echo $core_config | cut -d '.' -f 2)" + BITS=32 + # Check if core is 64-bit + if [[ $CORE =~ "64" ]]; then + BITS=64 + fi + # Core specific flags to cmake + CMAKE_CONF_FLAGS="-DTARGET_ARCH=$CORE -DTARGET_WORD_SIZE=$BITS -DCMAKE_BUILD_TYPE=$CONFIGURATION" + CORE_DIR=$CORES_BUILD_PATH/$CORE/$ENDIAN + + mkdir -p $CORE_DIR + pushd "$CORE_DIR" > /dev/null + if [[ $ENDIAN == "be" ]]; then + CMAKE_CONF_FLAGS+=" -DTARGET_BIG_ENDIAN=1" + fi + + cmake "$CMAKE_GEN" $CMAKE_COMMON $CMAKE_CONF_FLAGS -DHOST_ARCH=$HOST_ARCH $CORES_PATH + cmake --build . + + CORE_BIN_DIR=$CORES_BIN_PATH/lib + mkdir -p $CORE_BIN_DIR + if [[ "${target_platform}" == "osx-"* ]]; then + # macos `cp` does not have the -u flag + cp -v tlib/*.so $CORE_BIN_DIR/ + else + cp -u -v tlib/*.so $CORE_BIN_DIR/ + fi + popd > /dev/null +done + +exit 0 diff --git a/recipes/renode-cores/recipe.yaml b/recipes/renode-cores/recipe.yaml new file mode 100644 index 0000000000000..26664f1b272ab --- /dev/null +++ b/recipes/renode-cores/recipe.yaml @@ -0,0 +1,89 @@ +context: + name: renode-cores + version: "1.15.3" + python_min: "3.6" + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + - url: https://github.com/renode/renode/releases/download/v${{ version }}/renode_${{ version }}_source.tar.xz + sha256: 40c50afe8db86a9c63f4a86b93116a6babd43bf241cfaac47b2c0d2cbc2b15a8 + - if: unix + then: + - git: https://github.com/renode/renode-infrastructure.git + rev: "3fc2d5fe643068e595e875d9408cb4329522b229" + target_directory: cmake-renode-infrastructure + - git: https://github.com/antmicro/tlib.git + rev: "69fff75a0eba7471283b0b8db2e55e8388e284f6" + target_directory: cmake-tlib + +build: + number: 0 + +requirements: + build: + - cmake + - if: unix + then: + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - ${{ stdlib('c') }} + - make + - sed + - tar + else: + - ${{ compiler('m2w64_c') }} + - ${{ compiler('m2w64_cxx') }} + - ${{ stdlib('m2w64_c') }} + - git + - m2-base + - m2-bash + - m2-findutils + - m2-sed + - m2-tar + - ninja + +tests: + - package_contents: + files: + - ${{ "Library/" if not unix }}lib/renode-cores/translate-arm-be.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-arm-le.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-arm-m-be.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-arm-m-le.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-arm64-le.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-i386-le.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-ppc-be.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-ppc-le.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-ppc64-be.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-ppc64-le.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-riscv-le.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-riscv64-le.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-sparc-be.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-sparc-le.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-x86_64-le.so + - ${{ "Library/" if not unix }}lib/renode-cores/translate-xtensa-le.so + +about: + homepage: https://github.com/renode/renode + summary: "Antmicro's open source simulation and virtual development framework for complex embedded systems" + description: | + Renode was created by Antmicro as a virtual development tool for multi-node + embedded networks (both wired and wireless) and is intended to enable a scalable + workflow for creating effective, tested and secure IoT systems. + + With Renode, developing, testing, debugging and simulating unmodified software + for IoT devices is fast, cost-effective and reliable. + license: MIT + license_file: + - LICENSE + - tlib-LICENSE + - softfloat-3-COPYING.txt + documentation: https://renode.io/ + repository: https://github.com/renode/renode + +extra: + recipe-maintainers: + - MementoRC + - danielnachun diff --git a/recipes/renode-cores/variants.yaml b/recipes/renode-cores/variants.yaml new file mode 100644 index 0000000000000..342fc500c7ec6 --- /dev/null +++ b/recipes/renode-cores/variants.yaml @@ -0,0 +1,12 @@ +c_stdlib: + - if: linux + then: sysroot + - if: osx + then: macosx_deployment_target + +m2w64_c_compiler: + - m2w64-toolchain +m2w64_cxx_compiler: + - m2w64-toolchain +m2w64_c_stdlib: + - m2w64-toolchain