Jump to content

Orange Pi RV2


Go to solution Solved by sven-ola,

Recommended Posts

Posted (edited)

Hello @JamesCL! The current image from https://privat-in.de/ should work. I will upload new images any minute now. However: if you only need Ethernet, Orange Pi R2S [1] is a better choice probably, b/c you got extra 2 times 2.5 gbit with that...

 

Best // Sven-Ola

 

[1] http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-R2S.html

Edited by sven-ola
Typo. Mention Ethernet IFs
Posted

Already got answer from upstream programmer❣️ That kernel thread in RPMSG was removed due to excessive CPU usage. I got the impression that this is true: edge:desktop is nearly un-usable. Also they say: there is kernel 6.19 from upstream/upstream in the make. For now, I'm reverting HDMI audio (and all other rCPU funcs) for edge.

 

LG // Sven-Ola

Posted

Hi @sven-ola  I downloaded this version, "Armbian-unofficial_26.02.0-trunk_Orangepirv2_trixie_current_6.6.99_minimal.img", and it's working on an SD card without problems... Is it possible for the OPI RV2 to boot from the eMMC with this image? Thanks.

Posted

Hello @sven-ola! Yesterday, everything built fine for me using your git orangepi-rv2 branch with the EDGE kernel. After making the changes,

8 часов назад, sven-ola сказал:

For now, I'm reverting HDMI audio (and all other rCPU funcs) for edge.

  Today, when applying the latest fixes I got an error while compiling the image. I used this build config

./compile.sh CPUTHREADS=$(nproc) BOARD=orangepirv2 BRANCH=edge RELEASE=trixie KERNEL_CONFIGURE=no BUILD_DESKTOP=yes DESKTOP_APPGROUPS_SELECTED= DESKTOP_ENVIRONMENT_CONFIG_NAME=config BUILD_MINIMAL=no DESKTOP_ENVIRONMENT=xfce KERNEL_GIT=shallow

The error log is like this

[🌱] SHA1 of commit bfeeda1491b5366aa5798a86cf6f3621536b171c [ 'bfeeda1491b5366aa5798a86cf6f3621536b171c' ]
[🌱] Reversioning package [ re-version 'armbian-zsh(deb)::1-SAbfee-B07a9-R448a' to '26.02.0-trunk' ]
[🌱] artifact [ armbian-plymouth-theme :: armbian-plymouth-theme() ]
[🌱] Reversioning package [ re-version 'armbian-plymouth-theme(deb)::1-B5bd9-R448a' to '26.02.0-trunk' ]
[🌱] artifact [ armbian-bsp-cli :: armbian-bsp-cli() ]
[🌱] Using extlinux, regular bootscripts ignored [ SRC_EXTLINUX=yes ]
[🌱] Reversioning package [ re-version 'armbian-bsp-cli-orangepirv2-edge(deb-tar)::1-PC0cac-Vfcc4-Hba69-B8122-R756d' to '26.02.0-trunk' ]
[🌱] artifact [ armbian-desktop :: armbian-desktop() ]
[🌱] Getting ORAS manifest [ ORAS manifest from ghcr.io/armbian/os/armbian-trixie-desktop-xfce:1-Vce3b-B333f-R448a ]
Error response from registry: failed to fetch the content of "ghcr.io/armbian/os/armbian-trixie-desktop-xfce:1-Vce3b-B333f-R448a": ghcr.io/armbian/os/armbian-trixie-desktop-xfce:1-Vce3b-B333f-R448a: not found
[🌱] Artifact is not available in remote cache [ ghcr.io/armbian/os/armbian-trixie-desktop-xfce:1-Vce3b-B333f-R448a ]
/root/orangepi-rv2/lib/functions/compilation/packages/armbian-desktop-deb.sh: line 25: AGGREGATED_PACKAGES_DESKTOP_COMMA: AGGREGATED_PACKAGES_DESKTOP_COMMA is not set
[💥] Exiting with error 1 [ at /root/orangepi-rv2/lib/functions/compilation/packages/armbian-desktop-deb.sh:1
        compile_armbian-desktop() --> lib/functions/compilation/packages/armbian-desktop-deb.sh:1
                do_with_logging() --> lib/functions/logging/section-logging.sh:81
   artifact_armbian-desktop_build_from_sources() --> lib/functions/artifacts/artifact-armbian-desktop.sh:71
    artifact_build_from_sources() --> lib/functions/artifacts/artifacts-obtain.sh:34
       obtain_complete_artifact() --> lib/functions/artifacts/artifacts-obtain.sh:280
       build_artifact_for_image() --> lib/functions/artifacts/artifacts-obtain.sh:392
    main_default_build_packages() --> lib/functions/main/build-packages.sh:102
   full_build_packages_rootfs_and_image() --> lib/functions/main/default-build.sh:31
          do_with_default_build() --> lib/functions/main/default-build.sh:42
         cli_standard_build_run() --> lib/functions/cli/cli-build.sh:25
        armbian_cli_run_command() --> lib/functions/cli/utils-cli.sh:136
                 cli_entrypoint() --> lib/functions/cli/entrypoint.sh:208
                           main() --> ./compile.sh:50
 ]
[💥] Cleaning up [ please wait for cleanups to finish ]
[] Repeat Build Options [ ./compile.sh BOARD=orangepirv2 BRANCH=edge BUILD_DESKTOP=yes BUILD_MINIMAL=no CPUTHREADS=8 DESKTOP_APPGROUPS_SELECTED= DESKTOP_ENVIRONMENT=xfce DESKTOP_ENVIRONMENT_CONFIG_NAME=config KERNEL_CONFIGURE=no KERNEL_GIT=shallow RELEASE=trixie ]
[🌿] ANSI log file built; inspect it by running: [ less -RS output/logs/log-build-436f72e6-3064-4b72-8a4a-64d579c2ea1f.log.ans ]

Do I need to clear all previous build data? Or how can I fix this error? Thank you.

Posted

Hello @JamesCL! I got the same error. You need to select at least one desktop package - error shows up with empty DESKTOP_APPGROUPS_SELECTED= 

 

Hello @Malay: That was on my todo list. I grabbed an eMMC from an old Odroid. It tried to boot if inserted. Thus boot sequence is: SD/TF, then eMMC, then MTD. So I booted with SD. eMMC showed up in /dev/mmcblk2. I started armbian-install, selected "Install on eMMC". Now it tries to boot that old Odroid image. So boot0, uboot, and SBI are there. Should work if you copy an image to /dev/mmcblk2.

 

@All others: if that kernel thread for realtime-CPU (and HDMI audio) is active, the board always reports a load=2.0 or higher. This does not cause a very un-responsive Wayland-Gnome3-Desktop, this has other causes. Anyhow, this desires more investigation, since running a polling process to grab data from a realtime CPU does not sound right, there has to be an Interrupt or so, so I may again revert the reverted reversion (of the RPMSG kthread). Also I learned, that the Fedora project has an even larger esos.elf (rCPU firmware). I am curious what additional stuff may be in there 🤔

 

LG // Sven-Ola

Posted

In the meantime, I fixed internal audio for "edge" (was: missing headphone GPIO). And also investigated around the esos.elf RTOS firmware. There's a license for that, which I added to my tree. The license basically says: use but do not infect with GPL: https://gitee.com/spacemit-buildroot/buildroot-ext/blob/k1-bl-v2.2.y/board/spacemit/k1/target_overlay/lib/firmware/LICENSE.spacemit_esos. Continuing on kthread issue. LG // Sven-Ola

Posted

Sven,

I stumbled across this thread last night and have created this account to thank you. After purchasing this board some time ago, it was quite disappointing to discover how lacking software support was.

Again, thank you for your fantastic work so far. 

Posted

🦀 Rust PiCalculator on Orange Pi RV2 (riscv64, Armbian Trixie)

Compiled and ran a high-precision Pi calculator in Rust on my Orange Pi RV2 (K1X, 8-core @ 1.6 GHz) running Armbian-unofficial Trixie riscv64. The goal: test rustc performance and validate big-integer workloads on RISC-V.

Environment

OS: Armbian-unofficial 26.02.0-trunk (Debian Trixie)

Kernel: Linux 6.18.5-edge-spacemit

Rust: rustc 1.85.0, cargo 1.85.0 (built from source)

Display: EZCAP28X @ 1920×1080

Memory: 3.7 GiB RAM, 1.3 GiB used

Disk: ext4, 28.96 GiB total

GPU: Mesa llvmpipe (LLVM 19.1.7)

🧮 Project: PiCalculator

Rust implementation using rug (GMP-backed) to compute 1000 digits of π:

rust

use rug::{float::Constant, Float}; fn main() { let digits: usize = 1000; let bits: u32 = ((digits as f64) * 3.321928).ceil() as u32 + 10; let pi = Float::with_val(bits, Constant::Pi); let s = pi.to_string_radix(10, Some(digits)); println!("{s}"); }

🧩 Build Notes

Needed libgmp-dev and m4 to compile rug cleanly.

cargo build --release succeeded without patching.

Output verified against known π digits.

⚖️ Performance Comparison

Board CPU Time (ms) Real Time (ms) Pi 400 Faster (1.8 GHz, fewer cores) Lower latency RV2 (K1X) Slower per-core, but stable Good throughput

Despite having 8 cores, the RV2’s in-order K1X is slower than the Pi 400’s Cortex-A72 for single-threaded math. Still, the build was smooth and the output correct — a great stress test for rustc on riscv64.

 

  • Solution
Posted (edited)

I uploaded fresh images, that includes a trixie-edge-desktop-mate image I tested with my Hardware. Mate looks good and working, but switching between internal / HDMI audio needs some fiddling with the audio setting widget (may be a misunderstanding between pulseaudio and drivers). Changeing Sound-Pref:HW:profiles seems to do the trick. There is no chromium for RISCV, thus you need to install firefox-esr or netsurf-gtk manually. 

 

I think this is ready for primetime now, so I clicked on the "Pull-Request" button (see https://github.com/armbian/build/pull/9299). Got lots of auto email from the Github robots, will check tomorrow.

 

LG // Sven-Ola

Edited by sven-ola
Posted (edited)

Hello, sven-ola!
First of all, thank you very much for your work! HDMI audio now works well on the Edge.
Secondly, I'm not particularly knowledgeable about this, so please forgive me in advance for this possibly stupid question 🙂 
It's impossible to implement video hardware acceleration support in the firmware, from here - https://sdk.spacemit.com/en/faqs/ ?

If I understand correctly, patched versions of FFmpeg and GStreamer are needed, and they should also be integrated in firmware into the k1x-vpu-firmware and mpp . Is this possible?
When playing any video (even at very low resolution), there is terrible lag. The board should easily support 4K HEVC, but it can't play 720p video properly.

At the same time, the Banana Pi BPI-F3 board with similar technical characteristics copes with video 4K HEVC https://docs.banana-pi.org/en/BPI-F3/BananaPi_BPI-F3.

Edited by Malay
Posted

Hello @Malay, et.al, after submitting my PullRQ to the Armbian repo, I think it's best to cope first with the annotations I received from that. It complains about missing board photos, and some LLM generated blurb partly valid suggestions, partly not.

 

The current status of Armbian's Spacemit support does not make the RV2 board a good video player: GPU support is missing and I'm pretty unsure if it's possible to include the HW video encoding / decoding feature that is in the chip. Which is 4k@30 with diverse codecs according to the chip description PDF. I am glad, that X11 framebuffer video runs and I am unsure if I can proceed here b/c I am not a video / GPU / EGL / vulkan specialist.

 

Anyhow, thank you for the pointer to the Spacemit FAQ I did not recognize until now. While the PowerVR page from mesa3d states: "no IMG BXE-2-32" (https://docs.mesa3d.org/drivers/powervr.html), the respective Gitee repo contains closed-source BSD licensed Risc64 compiled shard objects (*.so), probably similar to the Nvida binary user space closed drivers that does the GPU support for the big videos cards. This may be worth a look, but as I wrote above, prio task is to bring the support into the Armbian tree.

 

Best // Sven-Ola

Posted

This is fantastic work! Thank you so much. I was able to build from source. Tested it on RV2 and R2S and both work great. Your changes are patched on to the 6.6.99 kernel as far as I can tell. Are these going to be merged upstream and make their way into 6.17?

Thanks again for your amazing work.

 

Posted (edited)

Hello @maxsub! Thank you for testing this. Especially on the R2S, since I do not have this device at hand. I am in the final spurt to get this merged into Armbian, but there are one or two rabbits to be hunted down (aka coding quirks). You compiled BRANCH=current and kernel=6.6.99. Can you repeat and recompile with BRANCH=edge, which is the same u-boot but should give you kernel 6.18.7? LG // Sven-Ola

Edited by sven-ola
Posted

@sven-ola I did try the BRANCH=edge build and got an ELF error:
 

🐳|🔨]   libbpf: failed to find '.BTF' ELF section in vmlinux.unstripped

[🐳|🔨]   FAILED: load BTF from vmlinux.unstripped: No data available

[🐳|🔨]   make[2]: *** [scripts/Makefile.vmlinux:72: vmlinux.unstripped] Error 255

[🐳|🔨]   make[2]: *** Deleting file 'vmlinux.unstripped'

[🐳|🔨]   make[1]: *** [/armbian/cache/sources/linux-kernel-worktree/6.18__spacemit__riscv64/Makefile:1242: vmlinux] Error 2

[🐳|🔨]   make: *** [Makefile:248: __sub-make] Error 2

Posted

Hello @maxsub Compiling without Docker? You probably need apt-get install pahole, since ./compile.sh docker-shell shows:

Zitat

root@588763cb8d04:/armbian# dpkg -l pahole

...
ii  pahole         1.25-0ubuntu3 amd64        set of advanced DWARF utilities

From the relevant kernel Kconfig: 

Zitat

CONFIG_DEBUG_INFO_BTF: Generate deduplicated BTF type information from DWARF debug info. Turning this on requires pahole v1.16 or later (v1.21 or later to support DWARF 5), which will convert DWARF type info into equivalent deduplicated BTF type info.

HTH // Sven-Ola

Posted

The try ./compile.sh docker-shell to start the Armbian compile environment. In the VM, check the pahole package version. If it's missing, you probably need to re-create by removing all from docker images|grep armbian which should be re-created on the next round.

 

<whisper><small><hidden>And if nothing helps, docker system prune --force --all?</hidden></small></whisper> 

 

HTH // Sven-Ola

Posted

Next idea: run ./compile.sh kernel-config and switch off DEBUG_INFO_BTF. But this should not happen. Also (probably) this BTF stuff now pops up here and there anyhow...

Posted

pahole is current. The build fails inside the docker-shell when manually invoked as well.
Looks like the BTF invocation is getting killed (maybe needs more RAM)?

 

🐳|🔨]     BTF     .tmp_vmlinux1.btf.o

[🐳|🔨]   Killed

 

root@c408bbb4ccde:/armbian# apt show pahole

Package: pahole

Version: 1.25-0ubuntu3

Priority: optional

Section: universe/utils

Source: dwarves

Origin: Ubuntu

Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>

Original-Maintainer: Thomas Girard <thomas.g.girard@free.fr>

Bugs: https://bugs.launchpad.net/ubuntu/+filebug

Installed-Size: 2012 kB

Depends: libbpf1 (>= 1:1.0.0), libc6 (>= 2.38), libdw1t64 (>= 0.157), libelf1t64 (>= 0.142), zlib1g (>= 1:1.1.4)

Breaks: dwarves (<< 1.22)

Replaces: dwarves (<< 1.22)

Homepage: https://git.kernel.org/pub/scm/devel/pahole/pahole.git

Download-Size: 275 kB

APT-Manual-Installed: no

APT-Sources: http://ports.ubuntu.com/ubuntu-ports noble/universe arm64 Packages

Description: set of advanced DWARF utilities

 

Posted

@maxsubOut-of-RAM may be possible if it simply spits out "killed". My machine has 32 Gb RAM and 16 Gb swap, does not encountered the OOM-killer lately. Until now, but exhausting RAM is probably kernel-dev-hobby 😗

Posted

I found the problem:
 

[ 2299.766819] Out of memory: Killed process 43216 (pahole) total-vm:8235296kB, anon-rss:4667816kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:12912kB oom_score_adj:0

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines