请问复现ruyisdk官网文档示例时编译coremark失败怎么办

  • 硬件环境:Licheepi 4A 开发板(th1520)
  • 软件环境:Linux revyos-lpi4a 5.10.113-th1520 #2024.07.20.13.28+d8f77de53 SMP PREEMPT Sat Jul 20 13:29:42 UTC riscv64 GNU/Linux

ruyi 包管理器的安装

下载 ruyi 工具并为其赋可执行权限并配置到环境变量中:从 ruyi GitHub ReleasesISCAS 镜像源下载最新的 ruyi 工具。

# 下载 riscv64 版本的 ruyi 包管理器,将其放到 PATH 路径下,并赋予其可执行权限
wget https://github.com/ruyisdk/ruyi/releases/download/0.25.0/ruyi-0.25.0.riscv64
sudo chmod +x ruyi-0.25.0.riscv64 
sudo cp ruyi-0.25.0.riscv64 /usr/local/bin/ruyi

验证 ruyi 包管理器可否使用

ruyi --version

sipeed@revyos-lpi4a:~$ ruyi --version
Enumerating objects: 2530, done.
Counting objects: 100% (406/406), done.
Compressing objects: 100% (148/148), done.
Total 2530 (delta 326), reused 263 (delta 258), pack-reused 2124 (from 2)
transferring objects ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% 0:00:00
processing deltas    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
warn: this ruyi installation has telemetry mode set to on, and will upload non-tracking usage information to RuyiSDK-managed servers every Thursday
info: the next upload will happen today if not already
info: in order to hide this banner:
info: - opt out with ruyi telemetry optout
info: - or give consent with ruyi telemetry consent
Ruyi 0.25.0

Running on linux/riscv64.

Copyright (C) 2023 Institute of Software, Chinese Academy of Sciences (ISCAS).
All rights reserved.
License: Apache-2.0 <https://www.apache.org/licenses/LICENSE-2.0>

This distribution of ruyi contains code licensed under the Mozilla Public
License 2.0 (https://mozilla.org/MPL/2.0/). You can get the respective
project's sources from the project's official website:

* certifi: https://github.com/certifi/python-certifi

更新最新的软件源索引

ruyi update

安装 gnu:ruyi install <package-name>

#安装适用于 Licheepi 4A 的编译工具链 gnu-plct-xthead 
ruyi install gnu-plct-xthead 

查看预置编译环境

ruyi list profiles
# 创建虚拟环境 venv-sipeed
ruyi venv -t gnu-plct-xthead sipeed-lpi4a venv-sipeed 

ls venv-sipeed/bin/ 

. venv-sipeed/bin/ruyi-activate 

riscv64-plctxthead-linux-gnu-gcc --version 

«Ruyi venv-sipeed» sipeed@revyos-lpi4a:~$ riscv64-plctxthead-linux-gnu-gcc --version
riscv64-plctxthead-linux-gnu-gcc (RuyiSDK 20250526 Xuantie-Sources Xuantie-binutils-8ee62aac8606 Xuantie-gcc-c2e0bcc86d1f Xuantie-glibc-29dd660835c5) 14.1.1 20240710
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

下载解压 coremark 源码作为编译对象

git clone https://github.com/eembc/coremark.git && cd coremark
ruyi extract coremark
ls -al

交叉编译 coremark

设置 coremark 源码中的编译配置信息(参考 coremark 仓库自述文档)

sed -i 's/\bgcc\b/riscv64-plctxthead-linux-gnu-gcc/g' linux64/core_portme.mak

执行交叉编译和构建,得到可执行程序 coremark.exe

make PORT_DIR=linux64 link

3 个赞

使用ruyi0.36版本可以成功,应该是文档老了。

7 个赞

感谢反馈!
@phebe 看看文档方面如何更新下?

3 个赞

hi , 感谢您使用Ruyi并反馈遇到的问题。

根据您提供的详细的使用记录,我们发现您当前使用的是 0.25.0 版本。由于 Ruyi 目前处于快速迭代阶段,我们专注于功能开发和优化,暂未提供对历史版本的兼容性支持。建议您升级至 最新版本(当前为0.38.1),近期的版本中该功能均正常。

为了确保您有较好的使用体验,我们强烈推荐您始终使用最新的 Release 版本。目前 Ruyi 的质量保障体系主要以最新版本的功能可用性,兼容性测试目前覆盖了三架构支持、部分linux系统支持,暂不包含对历史版本的兼容性支持。待产品功能趋于稳定后,我们将进一步完善版本兼容性策略,为您提供更全面的服务支持。

2 个赞

我们同时也发现,文档中给出的示例中使用了具体的版本号0.25.0,这种表达方式确实容易带来了一些错误的引导,后续我们的文档可能会进行调整,不再以具体的版本号提供示范,改为<ruyi-latest-version>这种方式,并强调建议使用最新版本。

希望这种表达方式能让您理解起来更加轻松。

3 个赞

文档已经更新,直接链接到 ruyi 安装章节。

2 个赞

没看到你所说的更新,如果你说的是这个https://github.com/ruyisdk/docs/commit/8d74e93f2e9c5100821bf28be215f70cc31481c9

我觉得把docs独立出来作为一个submodule是一个不错的选择,前提是你们能够及时的更新submodule。我看submodule已经3周没有更新了 :sweat_smile:

check一下是否有什么明显的错误?

2 个赞

You don’t need to rush to fix one mistake and introduce another careless mistake then rush to show off that you fixed it.

5 个赞

哈哈哈,尴尬了 :sweat_smile:

2 个赞