Everything posted by sven-ola
-
Orange Pi RV2
Wrote a script to change an Armbian desktop system for Spacemit GPU drivers and Chromium (attached). Tested with the two pre-installed Gnome images on my site (see https://privat-in.de/ goto Downloads). Some testing results: Spacemit offers Ubuntu noble and Debian trixie *.deb from their Bianbu site http://archive.spacemit.com/ For us, main diff here is Noble=chromium (Spacemit customized version) and Trixie=chromium-browser-stable (older and not customized). We need Wayland for the GPU, X11 does not work. With lightdm, each Wayland login freezes. Thus use gdm3. With gdm3, Xfce4 exits immediately, Kde-plasma shows drawing errors, Cinnamon works to some extend, e.g has video placing and window sizing problems. So the only useable GUI is Gnome. With Chromium under Gnome we can watch Youtube with 1080p (video / audio sync should stablize after some seconds). When doing this, CPU temperature is up to 75°C from the ususal 65°C, power is 4 Watts from the ususal 3 Watts. Script should work on other Spacemit K1 boards as well. If you miss some package from Bianbu, write a wishlist or make an PR on https://codeberg.org/sven-ola/spacemit-mirror spacemit-gpu-addon.sh
-
Orange Pi RV2
Addon for @maxsub and the bricked R2S: I tested USB boot from u-boot cmdline on my RV2, and it works. Here's how: usb start setenv devtype usb setenv devnum 0:1 setenv prefix boot/ #setenv fdtfile spacemit/x1_orangepi-r2s.dtb setenv fdtfile spacemit/k1-orangepi-rv2.dtb setenv bootargs "console=ttyS0,115200 root=/dev/sda1" ls ${devtype} ${devnum} ${prefix} load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile} booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} In case you have a blank u-boot-env, here's mine attached // HTH printenv.cap
- Orange Pi RV2
-
Orange Pi RV2
@maxsub I was not even aware, that boot from USB is a thing. The RV2 boots from SD via extlinux, here is the relevant uboot output. HTH [ 3.458] Retrieving file: /boot/extlinux/extlinux.conf [ 3.490] 1: Armbian-unofficial [ 3.490] Retrieving file: /boot/uInitrd [ 4.772] Retrieving file: /boot/Image [ 5.767] append: root=UUID=c79489b6-9fea-4a53-a334-d91a0f30843a earlycon=sbi console=tty1 console=ttyS0,115200 logleve l=1 rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consol es [ 5.785] Retrieving file: /boot/dtb/spacemit/k1-orangepi-rv2.dtb [ 5.838] Uncompressing Kernel Image [ 6.218] Moving Image from 0x10000000 to 0x200000, end=2c90000 [ 6.245] ## Loading init Ramdisk from Legacy Image at 21000000 ... [ 6.248] Image Name: uInitrd [ 6.251] Image Type: RISC-V Linux RAMDisk Image (gzip compressed) [ 6.258] Data Size: 20347839 Bytes = 19.4 MiB [ 6.263] Load Address: 00000000 [ 6.266] Entry Point: 00000000 Verifying Checksum ... OK [ 6.363] ## Flattened Device Tree blob at 31000000 [ 6.365] Booting using the fdt blob at 0x31000000 [ 6.370] Loading Ramdisk to 7ca0b000, end 7dd72bbf ... OK [ 6.391] Loading Device Tree to 000000007c9eb000, end 000000007ca0a097 ... OK Starting kernel ...
-
Orange Pi RV2
Success: tested RV2 with GPU on Armbian-noble-nightly. It's a bit hacky but should work. I created a mirror of the relevant packages from Spacmit/Bianbu. Only packages with source, specific to k1x / video / gpu plus chromium. Mirror project is here, in case you want to mirror yourself or miss a package: https://codeberg.org/sven-ola/spacemit-mirror After getting up Armbian-noble-xfce4-nightly on your Spacemit/K1 board (that includes Ky X1) Add mirror repo to /etc/apt/sources.list.d/sven-ola.sources (Note: this is experimental) Types: deb deb-src URIs: https://privat-in.de/armbian Suites: noble Components: main Signed-By: /etc/apt/trusted.gpg.d/sven-ola.gpg Get my repo key with wget -O /etc/apt/trusted.gpg.d/sven-ola.gpg https://privat-in.de/armbian/key.gpg Give the mirror some weight, add an /etc/apt/preferences.d/sven-ola file Package: * Pin: release o=Sven-Ola Pin-Priority: 1000 Install GPU support apt-get update apt-get install img-gpu-powervr apt-get dist-upgrade Note: this will downgrade mesa-25.x to mesa-24.x from Bianbu/Spacemit Install a Wayland-enabled GUI (tested: gnome) apt-get install gnome-core systemctl disable lightdm If asked, select gdm from gnome instead of lightdm from xfce4. After rebooting, click on your user, then stop and select Gnome with the lower right gearwheel icon. I also installed glmark2-es2-wayland to check if that runs. It shows 417@800x600 which is faster than software mesa...
-
Orange Pi RV2
Found the "no Wayland on current kernel" (see new PR https://github.com/armbian/build/pull/9515). glmark2-es2-wayland still reports a 462 score on 800x600. Thus I updated and renamed the image mentioned in previous post with a current 6.18 kernel. You need to switch from 6.6 with /boot/switch-6.18.16-current script, anything else described in the post still is valid. @maxsub Alternatively install a M2(m)-to-M2(e) adapter in the larger bottom M.2 slot and use a NGFF Wifi card, for example RTL8822CE should run
-
Orange Pi RV2
@c0rnelius: Thanks for the info, I'll fiddle with the GPU in the meantime. @Cristian Apas: that hack above is necessary if you use the Xunlong Ubuntu userspace. They have replaced every hint on the OEM, which includes the GPU driver name. Hack not necessary if we simply use the Spacemit Bianbu Ubuntu userspace. I hacked an image together with this (see my site https://privat-in.de goto Downloads). It has a glmark2 score of 424 (not very fast). This is not for everybody. I compiled a standard OrangepiRv2 Armbian image with a legacy kernel and put in a Bianbu 3.01 minimal userspace as root. Details from my notes: # Image creation starts with Armbian-Orangepirv2_trixie_legacy_6.6.99_minimal.img Root from https://archive.spacemit.com/image/k1/version/bianbu/v3.0.1/ -> minimal.img -- Default LANG=zh_CN.UTF-8, change: dpkg-reconfigure locales -> en_US.UTF-8 Copy from Armbian: /etc/netplan/10-dhcp-all-interfaces.yaml, /etc/fstab, /boot/*, /lib/modules/*, /etc/modprobe.d/orangepirv2.conf /etc/modules-load.d/orangepirv2.conf Purge spacemit-flash-dtbs (and thereby remove linux-image-6.6.63*) Uploaded this image to https://privat-in.de/ (Downloads) First steps after flashing UART login as root / bianbu apt-get install parted parted /dev/mmcblk0 (or /dev/nvme0n1): resizepart 1 100% resize2fs /dev/mmcblk0p1 (or /dev/nvme0n1p1) apt-get install gnome-core glmark2-es2-wayland adduser a-new-user adduser a-new-user sudo Reboot and login Click on Terminal, run glmark2-es2-wayland Notes: other Spacemit K1 boards can run Bianbu without any changes, this is exclusively for OpiRV2. Expect oopses at every corner... You can install cinnamon-core and use that. Make sure to run cinnamon under gdm3 b/c starting via lightdm does not work well (e.g. menu open freezes). Also, KDE plasma only with screen artifacts and xfce4-wayland simply exits immediately. No other wayland DE tested...
-
Orange Pi RV2
Hi @maxsub, two annotations. Firstly, it's not the Wifi driver but the firmware. Thus echo "options bcmdhd firmware_path=brcm/ nvram_path=brcm/" > /etc/modprobe.d/orangepirv2.conf will get you going. And secondly no, there is no GPU change currently. GPU not working in "current" but may work with dirty tricks using "legacy". That's why it may pay to do some maintenance on the ancient 6.6 kernel.
-
Orange Pi RV2
Status Update: There is already a suitable FW file for Wifi AP mode. It's located in the /lib/firmware/brcm subdir: the newer fw_bcm43456c5_ag.bin can be used by adding firmware_path=brcm/ nvram_path=brcm/ when loading the bcmdhd.ko kernel module. The necessary change is now in Armbian::main. Also, the RV2 legacy 6.6.99 kernel has an advantage: with the Xunlong Ubuntu userspace (from Xunlong image downloads) it supports Wayland and thus GPU when applying the following hack: diff --git a/drivers/gpu/drm/spacemit/spacemit_drm.c b/drivers/gpu/drm/spacemit/spacemit_drm.c index da25ec8b3f..073de3c7ca 100644 --- a/drivers/gpu/drm/spacemit/spacemit_drm.c +++ b/drivers/gpu/drm/spacemit/spacemit_drm.c @@ -23,7 +23,7 @@ #include "spacemit_dmmu.h" #include "spacemit_gem.h" -#define DRIVER_NAME "spacemit" +#define DRIVER_NAME "rvdisplay" #define DRIVER_DESC "Spacemit SoCs' DRM Driver" #define DRIVER_DATE "20231115" #define DRIVER_MAJOR 1 For that reason, we added the LOAD fix also to the legacy/6.6 kernel (thus the uptime output shows a reassuring 0.00). Wayland support for current/6.18 kernel is still under investigation. Also, the edge/7.0 kernel does not boot on the RV2 currently.
- Orange Pi RV2
-
Orange Pi RV2
@maxsub: the sad truth is: nearly any non-primitive hardware component needs some sort of firmware these days, you should live with that... Anyhow, as I told earlier, just replace the FW for the bcmdhd. Here's how (make sure do disabled any /etc/netplan/wifi-this-and-that.yaml, my device has inet via eth) apt-get install hostapd cat > /etc/hostapd.conf << EOF interface=wlan0 driver=nl80211 ssid=test channel=1 EOF wget -O /lib/firmware/fw_bcm43456c5_ag.bin https://github.com/orangepi-xunlong/firmware/raw/refs/heads/master/fw_bcm43456c5_ag.bin hostapd -d /etc/hostapd.conf This works, tested on the Forky-minimal linked above. HTH // Sven-Ola
-
Orange Pi RV2
Hello @maxsub! The RV2 is a bit overpowered CPU-wise for an access point while underpowered Wifi-wise. I am pretty sure, that AP mode works with 6.6 if you overwrite fw_bcm43456c5_ag.bin from https://github.com/orangepi-xunlong/firmware As a note: to build a Wifi-Router/AP, you can use OpenWrt which is available for the RV2 and may be better up to the task... HTH // Sven-Ola
- Orange Pi RV2
-
Orange Pi RV2
Good news: this is merged in Armbian main now, many thanks to @c0rnelius and @Igor for reviewing this. So no more need to grab my fork, just clone Armbian/build:main. I was able to build and quick-test orangepirv2/edge-kernel and this looks fine including Wifi. There are of course unsolved quirks currently. With edge-kernel, Wayland does not work, we need to use Xorg. And with the current bcmdhd Wifi driver, AP mode is not possible. This is caused by outdated file in armbian-firmware for bcmdhd and may be the same on OrangePi5. There is a mechanism to load a different fw_bcm43456c5_ag.bin (the one downloadable from github/xunlong seems to work). LG // Sven-Ola
-
Orange Pi RV2
@brunorro What a read! That's cool stuff - hopefully those guys'n'gals visit the next station on their journey soon: from TH1520, via JH7110, then (hopefully) X1. At least that mailbox communication sounds similar with the SpacemiT SoC: power management via extra rCPU is also a thing here. Thank you for the link // Sven-Ola
-
Orange Pi RV2
@cal5582 Hav you plugged in your Oculink/Intel Arc combination to a standard PC's M.2 slot? Just to make sure, it's not the power supply for our power hungry graphical friends. If it is not the power supply (5V, 12V) then there is one difference from PC to OpiRV2: the OpiRV2's M.2 slot has only 2 PCIe lanes connected, while a standard PC has M.2/M-key connectors with 4 lanes normally. A graphics card may be used to a high number of lanes, so not only hungry for power but also for lanes. Also: there seems to exist Oculink adapters with an optical link between PC/board and card. In that case, I would expect an extra PCIe bridge to be shown with lspci.
- Orange Pi RV2
-
Orange Pi RV2
That "rvdisplay" string is found in the following files: libVK_IMG.so, libsutu_display.so, and libpvr_dri_support.so. When comparing the OpiRV2 versions of these files with https://gitee.com/spacemit-buildroot/img-gpu-powervr I got 9a640=spacemit vs 9a2d0=rvdisplay. Thus, Xunlong has source code for these (different offsets, rvdisplay is one char longer). So no need to hack Armbian kernel, I presume GPU works if we use *.so from gitee repo. HTH // Sven-Ola
- Orange Pi RV2
- Orange Pi RV2
-
Orange Pi RV2
Continued GPU hacks. I uploaded a medley from Armbian (uboot,kernel) plus OrangePi-Ubuntu-Noble (userspace) from downloaded Xunlong image to my https://privat-in.de site (-> Downloads, grab Armbian+OrangePi.img.xz). Root PW is "orangepi" and it has 3 scripts /boot/boot-6.x.x to switch kernels between 6.6.36-ky, 6.6.99 and 6.18.x (both from Armbian). While the original "ky" kernel has GPU support (instantly visible with the Gnome GUI reacting < 2 seconds), the Armbian kernels have no GPU. Turns out: the kernel DRM driver name needs to be "rvdisplay" instead of "spacemit". This works at least with Armbian-Stable-6.6.99, while Armbian-Edge-6.18.x probably needs further kicking. The Armbian kernels have the following (prelim) change: --- a/drivers/gpu/drm/spacemit/spacemit_drm.c +++ b/drivers/gpu/drm/spacemit/spacemit_drm.c @@ -24,7 +24,7 @@ #include "spacemit_dmmu.h" #include "spacemit_gem.h" -#define DRIVER_NAME "spacemit" +#define DRIVER_NAME "rvdisplay" #define DRIVER_DESC "Spacemit SoCs' DRM Driver" #define DRIVER_MAJOR 1 #define DRIVER_MINOR 0 Note, that Xorg has no GPU, the GPU stuff only works with Wayland (gnome-shell + mutter). Also: no luck with that Bianbu-Linux. It's damn slow Gnome (slower that OrangePi with Software rendering) and none of the kernels brings the GPU to live (even the original Bianbu kernel with a orangepirv2 DTB does not work). @c0rnelius Bananapi R3 and Musepi Pro have working GPU? HTH // Sven-Ola
- Orange Pi RV2
- Orange Pi RV2
- Orange Pi RV2
-
Orange Pi RV2
Yes, I more or less thought about that orangepi.org Ubuntu from their downloads. At least this Ubuntu image shows some OpenGL capabilities with the preinstalled glmark2. I also tried that "Bianbu" image from Spacemit with my kernel, but that Gnome3/Wayland is slower than a slug probably because in case you want to play with that: I've uploaded that image to https://privat-in.de as a playground, root password is "bianbu" and you may need to resize the root partition to your SD card or so. Also I've overlooked that there is a "bianbu 3.0.1" so this is 3.0