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
36 changes: 24 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,30 @@ jobs:
with:
targets: riscv64gc-unknown-linux-gnu

- name: Install cross-compilation toolchain
- name: Install zig
uses: mlugg/setup-zig@v2
with:
version: 0.16.0

- name: Install cargo-zigbuild
run: cargo install cargo-zigbuild --locked

# zig may print "ignoring deprecated linker optimization setting" — harmless, build still succeeds
- name: Build for RISC-V (glibc 2.31 floor)
run: cargo zigbuild --release --target riscv64gc-unknown-linux-gnu.2.31 --package riscfetch

- name: Verify glibc floor
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y gcc-riscv64-linux-gnu
sudo apt-get install -y binutils-riscv64-linux-gnu
max=$(riscv64-linux-gnu-objdump -T target/riscv64gc-unknown-linux-gnu/release/riscfetch | grep -o 'GLIBC_[0-9.]*' | sort -uV | tail -1)
echo "max glibc symbol: $max"
test "$(printf 'GLIBC_2.31\n%s\n' "$max" | sort -V | tail -1)" = "GLIBC_2.31"

- name: Configure cargo for cross-compilation
run: |
mkdir -p .cargo
cat >> .cargo/config.toml << 'EOF'
[target.riscv64gc-unknown-linux-gnu]
linker = "riscv64-linux-gnu-gcc"
EOF

- name: Build for RISC-V
run: cargo build --workspace --target riscv64gc-unknown-linux-gnu
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: riscfetch-linux-riscv64
path: target/riscv64gc-unknown-linux-gnu/release/riscfetch
if-no-files-found: error
31 changes: 18 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,26 @@ jobs:
with:
targets: riscv64gc-unknown-linux-gnu

- name: Install cross-compilation toolchain
run: |
sudo apt-get update
sudo apt-get install -y gcc-riscv64-linux-gnu
- name: Install zig
uses: mlugg/setup-zig@v2
with:
version: 0.16.0

- name: Configure cargo for cross-compilation
run: |
mkdir -p .cargo
cat >> .cargo/config.toml << 'EOF'
[target.riscv64gc-unknown-linux-gnu]
linker = "riscv64-linux-gnu-gcc"
EOF
- name: Install cargo-zigbuild
run: cargo install cargo-zigbuild --locked

- name: Build for RISC-V
run: cargo build --release --target riscv64gc-unknown-linux-gnu --package riscfetch
# zig may print "ignoring deprecated linker optimization setting" — harmless, build still succeeds
- name: Build for RISC-V (glibc 2.31 floor)
run: cargo zigbuild --release --target riscv64gc-unknown-linux-gnu.2.31 --package riscfetch

- name: Verify glibc floor
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y binutils-riscv64-linux-gnu
max=$(riscv64-linux-gnu-objdump -T target/riscv64gc-unknown-linux-gnu/release/riscfetch | grep -o 'GLIBC_[0-9.]*' | sort -uV | tail -1)
echo "max glibc symbol: $max"
test "$(printf 'GLIBC_2.31\n%s\n' "$max" | sort -V | tail -1)" = "GLIBC_2.31"

- name: Package artifact
run: |
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ All notable changes to this project will be documented in this file.
- Extension count: 147 → 151 (103 Z + 48 S)
- Detection keywords reorganized into 3 explicit tiers (SoC identifiers → board names → vendor names) so a board name shipped across multiple SoC generations resolves to the correct SoC vendor instead of a stale one (e.g. DeepComputing DC-ROMA shipped on StarFive JH7110, then SpacemiT K3 silicon; Milk-V/Banana Pi/Sipeed ship both SpacemiT K1 and K3 boards). 5 new SoC-identifier keywords added (`spacemit,k1`, `spacemit,k3`, `sg2044`, `sg2380`, `sun20i`); detection keyword count: 42 → 47

### Fixed
- Prebuilt riscv64 binary now targets glibc 2.31 (built with cargo-zigbuild); v2.3.1's binary required glibc 2.39 and failed on Ubuntu 22.04 boards (#18)

## [2.3.1] - 2026-04-27

### Fixed
Expand Down
2 changes: 2 additions & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ chmod +x riscfetch-linux-riscv64
sudo mv riscfetch-linux-riscv64 /usr/local/bin/riscfetch
```

glibc 2.31 以上が必要です。

## 使い方

```bash
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ chmod +x riscfetch-linux-riscv64
sudo mv riscfetch-linux-riscv64 /usr/local/bin/riscfetch
```

Requires glibc >= 2.31.

## Usage

```bash
Expand Down
2 changes: 2 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ chmod +x riscfetch-linux-riscv64
sudo mv riscfetch-linux-riscv64 /usr/local/bin/riscfetch
```

需要 glibc >= 2.31。

## 使用方法

```bash
Expand Down
Loading