Skip to main content

Blog

See important news from the RuyiSDK team at any time

RV64ILP32 bare-metal toolchain & profile now available

· 2 min read
xen0n
ruyi 包管理器负责人

For your convenience following bleeding-edge development, the RuyiSDK team has packaged a bare-metal toolchain targetting the experimental RV64ILP32 ABI. Because this is a bare-metal toolchain, no sysroot is provided, and multilib is not enabled: the ABI to use is ilp32d.

Usage example

Given the following C program:

// test.c
long long add(long long *a, long long b)
{
return *a + b; // Should be realized with `ld` and `add`
}

void check(int);

void check_sizes(void)
{
check(sizeof(int)); // a0 should be 4
check(sizeof(long)); // a0 should be 4
check(sizeof(long long)); // a0 should be 8
check(sizeof(void *)); // a0 should be 4
}

We can now build object code conforming to the RV64ILP32 ABI with the proper toolchain package and profile:

$ ruyi update
$ ruyi install gnu-plct-rv64ilp32-elf
$ ruyi venv -t gnu-plct-rv64ilp32-elf --without-sysroot baremetal-rv64ilp32 /tmp/venv
$ source /tmp/venv/bin/ruyi-activate
$ /tmp/venv11/bin/riscv64-plct-elf-gcc -O2 -c -o test.o test.c

Checking that everything works as intended:

$ riscv64-plct-elf-readelf -h test.o | grep 32
Class: ELF32
Flags: 0x25, RVC, X32, double-float ABI
$ riscv64-plct-elf-objdump -dw test.o

test.o: file format elf32-littleriscv


Disassembly of section .text:

00000000 <add>:
0: 6108 ld a0,0(a0)
2: 952e add a0,a0,a1
4: 8082 ret

00000006 <check_sizes>:
6: 3141 addiw sp,sp,-16
8: 4511 li a0,4
a: e406 sd ra,8(sp)
c: 00000097 auipc ra,0x0
10: 000080e7 jalr ra # c <check_sizes+0x6>
14: 4511 li a0,4
16: 00000097 auipc ra,0x0
1a: 000080e7 jalr ra # 16 <check_sizes+0x10>
1e: 4521 li a0,8
20: 00000097 auipc ra,0x0
24: 000080e7 jalr ra # 20 <check_sizes+0x1a>
28: 60a2 ld ra,8(sp)
2a: 4511 li a0,4
2c: 2141 addiw sp,sp,16
2e: 00000317 auipc t1,0x0
32: 00030067 jr t1 # 2e <check_sizes+0x28>

It can thus be shown that the toolchain indeed generates object code with 32-bit pointer width, but also leveraging RV64 capabilities.

New board images available (2024-01-29)

· One min read
xen0n
ruyi 包管理器负责人

Image packages are now available for the following boards.

You can have your device automatically provisioned with the RuyiSDK Device Provisioning Wizard ruyi device provision. Or you can still manually install with ruyi install: files will be automatically unpacked or symlinked to ~/.local/share/ruyi/blobs/<package name>-<version>.

Thank you for supporting RuyiSDK!

Sipeed LicheeRV & Allwinner Nezha D1

The two models are largely compatible from a hardware perspective, but there are still slight differences that only shows up in the device trees.

  • board-image/oerv-awol-d1-base: openEuler RISC-V, base system
  • board-image/oerv-awol-d1-xfce: openEuler RISC-V, with XFCE GUI

StarFive VisionFive

  • board-image/oerv-starfive-visionfive-base: openEuler RISC-V, base system
  • board-image/oerv-starfive-visionfive-xfce: openEuler RISC-V, with XFCE GUI

StarFive VisionFive2

  • board-image/oerv-starfive-visionfive2-base: openEuler RISC-V, base system
  • board-image/oerv-starfive-visionfive2-xfce: openEuler RISC-V, with XFCE GUI

Release notes for RuyiSDK 0.4

· One min read
xen0n
ruyi 包管理器负责人

RuyiSDK 0.4 is now released. The corresponding package manager version is also 0.4. You can download the RuyiSDK package manager from the GitHub Releases page: https://github.com/ruyisdk/ruyi/releases .

This update mainly consists of the following changes. Happy hacking!

RuyiSDK Package Manager

  • ruyi device provision now wraps invocations of fastboot with sudo.
  • ruyi self uninstall --purge now does not forget to remove the ~/.local/state/ruyi directory.
  • Some hints are now provided when ruyi fails to download from the repo, for aiding the user's troubleshooting.
  • The RuyiSDK software repository is now migrated to GitHub for stability of service. You may have to take additional measures to continue syncing if your region/organization have network access restrictions in place.

The repo at the original location will stop being regularly updated from 2024-02-01 on. Please upgrade your ruyi installation as soon as possible to automatically migrate to the latest configuration defaults.

RuyiSDK Software Repository

  • Added the DynamoRIO suite analyzer/dynamorio-riscv for RISC-V hosts.
  • Added system-level QEMU package emulator/qemu-system-riscv-upstream for AMD64 hosts.
  • The upstream QEMU build is now bumped to 8.2.0.

New board images available (2024-01-15)

· One min read
xen0n
ruyi 包管理器负责人

Image packages are now available for the following boards.

You can install them with ruyi install: files will be automatically unpacked or symlinked to ~/.local/share/ruyi/blobs/<package name>-<version>.

Thank you for supporting RuyiSDK!

Milk-V Duo

64M RAM variant

  • board-image/buildroot-sdk-milkv-duo: official Buildroot SDK
  • board-image/buildroot-sdk-milkv-duo-python: official Buildroot SDK, with Python environment

256M RAM variant

  • board-image/buildroot-sdk-milkv-duo256m: official Buildroot SDK
  • board-image/buildroot-sdk-milkv-duo256m-python: official Buildroot SDK, with Python environment

Milk-V Pioneer

  • board-image/oerv-sg2042-milkv-pioneer-base: openEuler RISC-V, base system
  • board-image/oerv-sg2042-milkv-pioneer-xfce: openEuler RISC-V, with XFCE GUI
  • board-image/revyos-sg2042-milkv-pioneer: RevyOS

Sipeed LicheePi 4A

System images:

  • board-image/oerv-sipeed-lpi4a-headless: openEuler RISC-V, without GUI
  • board-image/oerv-sipeed-lpi4a-xfce: openEuler RISC-V, with XFCE GUI
  • board-image/revyos-sipeed-lpi4a: RevyOS

Bootloader (U-Boot):

  • board-image/uboot-oerv-sipeed-lpi4a-16g: for use with openEuler on Sipeed LicheePi 4A (16G RAM)
  • board-image/uboot-oerv-sipeed-lpi4a-8g: for use with openEuler on Sipeed LicheePi 4A (8G RAM)
  • board-image/uboot-revyos-sipeed-lpi4a-16g: for use with RevyOS on Sipeed LicheePi 4A (16G RAM)
  • board-image/uboot-revyos-sipeed-lpi4a-8g: for use with RevyOS on Sipeed LicheePi 4A (8G RAM)

RuyiSDK now supports displaying news

· One min read
xen0n
ruyi 包管理器负责人

We have added support for news items to ruyi for you to follow RuyiSDK development more easily.

If you are on ruyi 0.3 or greater, any incoming news item will appear after a successful ruyi update. You can list all news items with ruyi news list, and read with ruyi news read.

Thank you for supporting RuyiSDK!