godot-riscv:基于 openKylin 生态的 RISC-V 架构 Godot 引擎支持项目

用户可借助此项目在 RISC-V 架构上便捷使用 Godot 引擎,包含版本管理工具 RVGDVM 用于安装卸载编辑器及导出模板,提供预编译二进制包与构建脚本,确保与 openKylin RISC-V 发行版兼容。【此简介由AI生成】

分支1Tags8

Godot RISC-V 构建计划 & RVGDVM

项目简介

Godot RISC-V 构建计划,由openKylin RISC-V SIG维护,旨在为 RISC-V 架构提供 Godot 引擎的构建和安装支持,并确保其与 openKylin RISC-V 发行版的兼容性。

RVGDVM(RISC-V Godot 版本管理工具)是一个用于管理 RISC-V 架构下 Godot 引擎版本的命令行工具。它支持编辑器、导出模板的安装和卸载。

项目分为以下几部分:

  • RVGDVM:RISC-V Godot 版本管理工具,用于管理 Godot 引擎的安装和卸载。
  • Godot RISC-V 二进制包:在Release提供预编译的Godot引擎二进制包,用于openKylin RISC-V发行版。
  • Godot RISC-V 构建脚本:在项目的build_scripts目录下,包含用于构建 Godot 引擎的脚本和配置文件,针对部分CPU优化。

RVGDVM 使用方法

安装依赖

一般情况下,openKylin 2.0已经包含了所需的依赖,如果没有,请执行以下命令安装:

sudo apt install curl p7zip-full

如果使用其他Linux发行版,请使用发行版包管理器安装相应的依赖。

安装和卸载

安装RVGDVM:

curl -fsSL https://gitee.com/openkylin/godot-riscv/raw/master/install.sh | bash && source ~/.bashrc

卸载RVGDVM:

curl -fsSL https://gitee.com/openkylin/godot-riscv/raw/master/uninstall.sh | bash && source ~/.bashrc

命令用法

RVGDM 提供了以下命令:

安装 Godot 版本

rvgdvm install <version>

<version> 替换为你想要安装的 Godot 版本号,例如 4.4.1

卸载 Godot 版本

rvgdvm uninstall <version>

<version> 替换为你想要卸载的 Godot 版本号。

启动 Godot 版本

rvgdvm start <version>

<version> 替换为你想要启动的 Godot 版本号。

列出本地安装的版本

rvgdvm list

列出远程可用的版本

rvgdvm list-remote

安装导出模板

rvgdvm install-template <version>

<version> 替换为你想要安装导出模板的 Godot 版本号。

卸载导出模板

rvgdvm uninstall-template <version>

<version> 替换为你想要卸载导出模板的 Godot 版本号。

显示信息

rvgdvm info

构建脚本使用方法

构建脚本

该项目提供构建脚本 build_xxx.sh 用于构建 Godot 的 编辑器以及导出模板。请确保在构建之前已经安装了所有必需的依赖项。

默认请使用 ./build_xxx_riscv64_universal.sh 构建编辑器和导出模板,带有架构后缀的表示针对对应处理器架构的构建,只能在对应处理器上运行。

cross_build_xxx.sh 表示交叉编译,可以在非目标处理器上运行,但需要安装目标处理器架构的交叉编译工具链。

使用方法

  1. 克隆 Godot 源代码仓库到本地。

  2. 进入 Godot 源代码目录。

  3. cp build_xxx.sh 到 Godot 源代码目录,并赋予执行权限。

     ```bash
     cp build_xxx.sh ../godot-source-dir/
     chmod +x ../godot-source-dir/build_xxx.sh
     ./../godot-source-dir/build_xxx.sh
     ```
    

添加更多 Godot 版本

如果你想要的 Godot 版本没有在列表中,但是想向 rvgdvm 添加它,欢迎提交 issue 或 pull request。

PR规范如下:

  1. 编译好可以正常运行的 Godot 版本(编辑器、Release导出模板、Debug导出模板),并上传到可公开访问的存储库。

  2. release.json 文件中添加新版本的条目,请按照版本从高到低的顺序添加。

     "4.2.3": {
         "download_url": "https://gitee.com/openkylin/godot-riscv/releases/download/4.2/godot.linuxbsd.editor.rv64.llvm.7z",
         "release_template_url": "https://gitee.com/openkylin/godot-riscv/releases/download/4.2/godot.linuxbsd.template_release.rv64.llvm.7z",
         "debug_template_url": "https://gitee.com/openkylin/godot-riscv/releases/download/4.2/godot.linuxbsd.template_debug.rv64.llvm.7z"
       },
    
  3. 提交 pull request,并在 PR 中提供编译环境信息。

手动安装 Godot

下载openKylin RISC-V镜像

下载对应板卡的RISC-V镜像:https://www.openkylin.top/downloads/index-cn.html

待补充

Godot 版本支持

我们为 RISC-V 架构维护以下 Godot 版本,对于 Godot官方已经停止维护的版本,我们不再维护。如果您需要特定版本的 Godot,请提issue告知我们,我们将尽力提供支持。

版本号 发布时间 官方状态 openKylin RISC-V SIG 维护的版本
Godot 4.5 2025 年 9月 受支持的 https://gitee.com/openkylin/godot-riscv/releases/tag/4.5
Godot 4.4 2025 年 3月 受支持的 https://gitee.com/openkylin/godot-riscv/releases/tag/4.4
Godot 4.3 2024 年 8 月 受支持的 https://gitee.com/openkylin/godot-riscv/releases/tag/4.3
Godot 4.2 2023 年 11 月 受支持的 https://gitee.com/openkylin/godot-riscv/releases/tag/4.2
Godot 4.1 2023 年 7 月 受支持的 https://gitee.com/openkylin/godot-riscv/releases/tag/4.1
Godot 4.0 2023 年 3 月 生命结束 https://gitee.com/openkylin/godot-riscv/releases/tag/4.0

以下是3.x以下的旧版本,Godot 3.4版本开始支持RISC-V架构:

版本号 发布时间 官方状态 openKylin RISC-V SIG 维护的版本
Godot 3.7 暂无预计时间 受支持的 测试版 无构建计划
Godot 3.6 2024 年 9 月 受支持的 https://gitee.com/openkylin/godot-riscv/releases/tag/3.6 (无法正常使用)
Godot 3.5 2022 年 8 月 受支持的 无构建计划
Godot 3.4 2021 年 11 月 生命结束 无构建计划
Godot 3.3 2021 年 4 月 生命结束 无构建计划
Godot 3.2 2020 年 1 月 生命结束 无构建计划
Godot 3.1 2019 年 3 月 生命结束 无构建计划
Godot 3.0 2018 年 1 月 生命结束 无构建计划
Godot 2.1 2016 年 7 月 生命结束 无构建计划
Godot 2.0 2016 年 2 月 生命结束 无构建计划
Godot 1.1 2015 年 5 月 生命结束 无构建计划
Godot 1.0 2014 年 12 月 生命结束 无构建计划

暂时没有.NET版本的计划,由于.NET Core 截止目前还没有正式支持RISC-V架构,无法正常运行Godot .NET版本,需要等待后续上游支持,当然如果您有兴趣,可以自行尝试编译。

设置项目启动参数

在调试项目时,Godot仍会使用默认的软渲染管线,因此需要将--display-driver wayland opengl_es3添加到项目设置中,以启用硬件渲染。

有AMD GPU的机器,可以忽略上述设置,直接使用默认的OpenGL渲染管线。

硬件支持

以下版本的处理器以及板卡通过了运行验证:

  • UR-DP1000 系列
  • SG2042(C910) 系列
  • Spacemit K1/M1(Spacemit x60)系列
  • StarFive JH7110 系列
  • TH1520(C910)系列

构建宿主机环境

以下是环境参考,可以使用最新的openKylin 2.0版本RISC-V镜像,也可以使用x86_64版本镜像,然后自行安装RISC-V交叉编译工具链(工具链使用详见对应板卡厂商文档)。

openKylin 2.0

Linux openkylin 6.1.22 #11 SMP Mon Apr 10 10:16:05 CST 2023 riscv64 riscv64 riscv64 GNU/Linux

Clang Version 17.0.6 (9ok4)

Openkylin clang version 17.0.6 (9ok4)
Target: riscv64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/riscv64-linux-gnu/12
Found candidate GCC installation: /usr/bin/../lib/gcc/riscv64-linux-gnu/14
Found candidate GCC installation: /usr/bin/../lib/gcc/riscv64-linux-gnu/8
Selected GCC installation: /usr/bin/../lib/gcc/riscv64-linux-gnu/14

GCC Version 14.2.0 (openKylin 14.2.0-5)

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/riscv64-linux-gnu/14/lto-wrapper
Target: riscv64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='openKylin 14.2.0-5' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr --with-gcc-major-version-only --program-suffix=-14 --program-prefix=riscv64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-multilib --with-arch=rv64gc --with-abi=lp64d --enable-checking=release --build=riscv64-linux-gnu --host=riscv64-linux-gnu --target=riscv64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=4
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.0 (openKylin 14.2.0-5)

SCons Version 4.9.1

SCons by Steven Knight et al.:
        SCons: v4.9.1.39a12f34d532ab2493e78a7b73aeab2250852790, Thu, 27 Mar 2025 11:44:24 -0700, by bdbaddog on M1Dog2021
        SCons path: ['/usr/local/lib/python3.12/dist-packages/SCons']
Copyright (c) 2001 - 2025 The SCons Foundation

Mold Version 2.4.1

mold 2.4.1 (compatible with GNU ld)

编译指南请参考 Compile

开源许可

Godot 引擎遵循 MIT 许可证 发布。

该仓库遵循 MIT 许可证发布。

项目介绍

用户可借助此项目在 RISC-V 架构上便捷使用 Godot 引擎,包含版本管理工具 RVGDVM 用于安装卸载编辑器及导出模板,提供预编译二进制包与构建脚本,确保与 openKylin RISC-V 发行版兼容。【此简介由AI生成】

定制我的领域

下载使用量

0

项目总下载次数(含Clone、Pull、 zip 包及 release 下载),每日凌晨更新

语言类型

Python78.14%
Shell21.86%