Jump to content

Orange Pi RV2


Go to solution Solved by sven-ola,

Recommended Posts

Posted

Is it possible to change the boot order?
For my use case, I would like the boot priority to be: eMMC, NVMe, and microSD card.
Can this be configured?

 

Posted

Hi @JamesCL. You cannot change the boot order of the SoC (SD -> eMMC -> MTD / SPI flash), thus i.e. the SD card is always booted if inserted. You can probably change the root file system's UUID, i.e. change the /boot/extlinux/extlinux.conf to give the kernel the command to use eMMC as root file system. HTH // Sven-Ola

Posted

Hi @sven-ola, first of all a huge thank you for maintaining this image — the work you're doing for the Orange Pi RV2 is genuinely appreciated, especially given how early the SpacemiT/K1 ecosystem still is.

 

I'd like to kindly request enabling a few kernel config options in the next build. I'll split them by priority:

 

Request 1 — TechniSat SkyStar USB 2 HD (simple, guaranteed fix)

CONFIG_DVB_B2C2_FLEXCOP_USB=m

The FlexCop core (CONFIG_DVB_B2C2_FLEXCOP=m) and all its dependencies are already enabled in the current kernel. This is a one-line addition that will make this DVB-S2 USB receiver work out of the box with no further changes needed.

 

Request 2 — TBS DVB cards via out-of-tree media_build (best-effort)

CONFIG_DVB_USB=m
CONFIG_DVB_USB_V2=m
CONFIG_MEDIA_CONTROLLER_DVB=y

These are the required kernel-side foundations for the TBS linux_media out-of-tree driver tree to compile and load. All dependencies are already satisfied in the current config (DVB_CORE=y, MEDIA_USB_SUPPORT=y, MEDIA_CONTROLLER=y).

 

I say "best-effort" because the TBS media_build source has compatibility issues with kernel 6.18 APIs that require manual patching regardless of kernel config — so these options are necessary but not the whole story on my end. That part is on me to sort out, not on you.

 

Environment for reference:

  • Board: Orange Pi RV2 (orangepirv2)
  • Kernel: 6.18.33-current-spacemit
  • Armbian: 26.8.0-trunk.61 (BRANCH=current)

Thank you again for your time and effort — genuinely appreciated! 🙏

Posted (edited)

Hello @mBesar, while I can build images with additional kernel modules, the next "apt-get upgrade" may install a newer kernel that discards such additions. Why not build this on your own? There is already a working DKMS build system on the board for the bcmdhd wifi module. On the next kernel update, DKMS will recompile bcmdhd.ko for the new kernel automatically.

 

Sadly, when I tried this for b2c2-flexcop-usb, it was not too easy to do. Armbian does not provide kernel sources with "apt-source", and the mentioned module itself uses an additional "-i include-dir" during build. So as an example, try to do this on your board:


As root:

# Change two times "Types: deb deb-src"
nano /etc/apt/sources.list.d/debian.sources

# Check for avail linux image packages, this time 6.18.5-deb13-parisc
apt-get update
grep linux-image /var/lib/apt/lists/*Sources|grep 6\\.18|less -S

# We are not interested in this image, we just need some source code
cd /usr/src
apt-get source linux-image-6.18.5+deb13-parisc

# Add a new DKMS module (dkms already here b/c bcmdhd wifi driver)
mkdir /usr/src/b2c2-flexcop-usb-6.18
cd /usr/src/b2c2-flexcop-usb-6.18
cat > dkms.conf << "EOF"
PACKAGE_NAME="b2c2-flexcop-usb"
PACKAGE_VERSION="6.18"
BUILT_MODULE_NAME[0]="b2c2-flexcop-usb"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="yes"
MAKE="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build CONFIG_DVB_B2C2_FLEXCOP_USB=m"
EOF

# What subsys do we need? Says: drivers/media/usb/b2c2, then grab that dir
grep DVB_B2C2_FLEXCOP_USB $(find /usr/src/linux-6.18.5 -name Kconfig*)
cp -av /usr/src/linux-6.18.5/drivers/media/usb/b2c2/. .

# The module Makefile uses an additional include dir. We simply copy them here
cp -av /usr/src/linux-6.18.5/drivers/media/common/b2c2/*.h .

# Register, build, and install
dkms add -m b2c2-flexcop-usb -v 6.18
dkms build -m b2c2-flexcop-usb -v 6.18
dkms install -m b2c2-flexcop-usb -v 6.18

HTH // Sven-Ola

Edited by sven-ola
Posted

While I am here: I have a Mediatek Tri-Band Wifi card installed in my RV2 (label reads MT7922A22M). There's a matching driver in OpenWrt created by Felix and friends. This will take some time until pushed upstream. So, why not make it a DKMS module? That's how things started 🤪

 

# Grab bleeding edge Wifi from OpenWrt
cd /usr/src
git clone https://github.com/openwrt/mt76.git mt76-6.18
cd mt76-6.18

# Source code massage (needs OpenWrt kernel patch, missing include)
git revert 9a46d8d2
sed '/^#include <linux\/kernel.h>/i#include <linux/version.h>' mt76.h

# New DKMS config (with more than one module)
cat > dkms.conf << "EOF"
PACKAGE_NAME="mt76"
PACKAGE_VERSION="6.18"
BUILT_MODULE_NAME[0]="mt76"
DEST_MODULE_LOCATION[0]="/updates/dkms"
BUILT_MODULE_NAME[1]="mt76-connac-lib"
DEST_MODULE_LOCATION[1]="/updates/dkms"
BUILT_MODULE_NAME[2]="mt792x-lib"
DEST_MODULE_LOCATION[2]="/updates/dkms"
BUILT_MODULE_NAME[3]="mt7921e"
BUILT_MODULE_LOCATION[3]="mt7921"
DEST_MODULE_LOCATION[3]="/updates/dkms"
BUILT_MODULE_NAME[4]="mt7921-common"
BUILT_MODULE_LOCATION[4]="mt7921"
DEST_MODULE_LOCATION[4]="/updates/dkms"
AUTOINSTALL="yes"
MAKE="make -C ${kernel_source_dir}
  M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build
  CONFIG_WLAN_VENDOR_MEDIATEK=y
  CONFIG_MT76_CORE=m
  CONFIG_MT76_LEDS=y
  CONFIG_MT76_CONNAC_LIB=m
  CONFIG_MT792x_LIB=m
  CONFIG_MT7921_COMMON=m
  CONFIG_MT7921E=m
"
EOF

# Add, build, install, and add matching firmware
dkms add -m mt76 -v 6.18
dkms build -m mt76 -v 6.18
dkms install -m mt76 -v 6.18
cp -av firmware/ /lib/firmware/updates/mediatek

# Give it a try
reboot

 

Posted

Hi @sven-ola thank you so much for the detailed and thoughtful response — and for taking the time to actually try it yourself! The DKMS approach makes perfect sense; it's clean, survives kernel updates automatically, and fits right in with what's already working on the board for bcmdhd.

I'll follow your instructions for b2c2-flexcop-usb. Really appreciate the effort you put into this! 🙏

Posted (edited)

@sven-olaTrying the latest RC2 and RC3 7.1 bundles at https://sven-ola.commando.de/privat-in/ by flashing it to a MicroSD card and booting from it, I get the following boot failure. Booting your 6.18 image works though. Any idea how make it work?

 

By the way, is the U-Boot binary inside Armbian the same in your 7.1 and 6.18 versions?

 

Perhaps I could boot the 6.18 from MicroSD card, use it to flash the SPI, and then try to boot the 7.1 from the SPI?


 

 

Quote

Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems
done.
Begin: Waiting for root file system ... Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
done.
Gave up waiting for root file system device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  UUID=63ee7593-e111-4547-ac2f-6bdb8519ce11 does not exist.  Dropping to a shell!
(initramfs)

 

 

 

Update: I booted the RV2 off MicroSD card via the old 6.18 version.

 

From inside this 6.18, I did "dd if=the-7.1-version of=/dev/nvme0n1 bs=1M status=progress", powered off, took out the MicroSD, and booted, and it worked!

 


Now a question back to you: @sven-ola Now that the boot process works, do I still need to install the latest Armbian-bundled u-boot on the SPI chip via "armbian-install"?

Edited by armfan
Posted

Hey @armfan. UUID=63ee7593-e111-4547-ac2f-6bdb8519ce11 was read from /boot/extlinux/extlinux.conf which is correct for the edge/7.1.0rc3 image. However, something must be wrong with your SD card if u-boot can read UUID from extlinux.conf, but kernel does not find corresponding file system on the same boot media. This is the expected kernel startup :

 

[    0.000000] Booting Linux on hartid 0
[    0.000000] Linux version 7.1.0-rc3-edge-spacemit (build@armbian) (riscv64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0, GNU l
[    0.000000] Machine model: OrangePi RV2
[    0.000000] SBI specification v1.0 detected
[    0.000000] SBI implementation ID=0x1 Version=0x10003
[    0.000000] SBI IPI extension detected
[    0.000000] SBI RFENCE extension detected
[    0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
[    0.000000] printk: legacy bootconsole [sbi0] enabled
Loading, please wait...
Starting systemd-udevd version 257.13-1~deb13u1
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.

HTH // Sven-Ola

Posted

Hello @4A studio. The armbian-config tool may change large parts of the system configuration without a real "undo". I am not sure if I understand your situation correct:

  1. Board does not boot. You see UART output but no UART login prompt?
  2. Board is booting. But you don't see a live picture on your HDMI monitor?
Posted (edited)

@sven-ola About the issue you saw (re. UUID=63ee7593-e111-4547-ac2f-6bdb8519ce11..), what I have done is flash either of the two images at https://sven-ola.commando.de/privat-in/ to a 128GB MicroSD card using Win32DiskImager or Rufus on Windows, and then booted the RV2 with it, that's all.

The RV2 has had two PCI devices connected at boot. This should not affect the boot sequence. I sent you all kinds of weird boot sequences I had especially with the Linux 7.10 Armbian image.

I gave a few hours to try these Armbian images on the RV2, and ultimately it's not stable. The biggest issue is to boot from the M.2 SSD. Then, the 6.18 boots well from MicroSD but the 7.10 not. Finally my SFP+ NIC doesn't work well on the 6.18.

I had more success with the testing in the beginning, e.g. I got the 7.10 image to work booted from the SSD. Could there be an issue with power supply, for example with the 5V to 3.3V converter on the PCB. For power supply I use a good 5V @ 5A USBC power supply.

 


The most successful test I did was, flash a MicroSD card with the 6.18 image, and boot it on the RV2. Then from inside that environment, do dd if=Armbian-unofficial_26.05.0-trunk_Orangepirv2_trixie_edge_7.1.0-rc3_minimal.img of=/dev/nvme0n1 bs=100M status=progress; sync . Booting from that NVMe did work a few times.

 

I installed the u-boot bundled with Armbian to the SPI using armbian-config. I'm not sure this was a good idea, at least it did not make NVMe booting work better.

 

Edited by armfan
Posted (edited)

Hi @armfan. From what I am able to extract from the flood of braindumps you have a non-working NVME with 2TB that is not working for some reason. If it really stops sometimes in the middle of u-boot::nvme::init then you may have some power issue with this NVME.

 

For comparison: I placed my NVME in the lower m.2 and booted via MTD the u-boot armbian-installed from the "current" image downloadable from my site. See attached capture file.

 

HTH // Sven-Ola

nvme-lower-uboot-may-26-2026.cap

Edited by sven-ola
Added UART boot capture
Posted (edited)

@rm_ No, SD and NVME are working with Armbian edge 7.1, while USB does not.

root@orangepirv2:~# uname -a
Linux orangepirv2 7.1.0-rc3-edge-spacemit #3 SMP PREEMPT_DYNAMIC Sun May 10 21:08:09 UTC 2026 riscv64 GNU/Linux
root@orangepirv2:~# blkid
/dev/nvme0n1p1: LABEL="armbi_root" UUID="fdbd4ab2-2238-4a62-a079-74ff0582c8d2" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="00406d4f-01"
/dev/mmcblk0p1: LABEL="armbi_root" UUID="63ee7593-e111-4547-ac2f-6bdb8519ce11" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="9ebf8299-01"
/dev/zram0: UUID="3be872bc-b408-46c3-8ec9-d27500adc1dd" TYPE="swap"
/dev/zram1: LABEL="log2ram" UUID="bace3aba-15ea-4833-a7ad-f7d9e39aa0c5" BLOCK_SIZE="4096" TYPE="ext4"
root@orangepirv2:~# lsusb
root@orangepirv2:~# lspci
0001:00:00.0 PCI bridge: SpacemiT X60 PCIe 2.0 x2 Root Complex (rev 01)
0002:00:00.0 PCI bridge: SpacemiT X60 PCIe 2.0 x2 Root Complex (rev 01)
0002:01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller PM9B1 (DRAM-less) (rev 02)

Anyhow, thanks for the Phoronix link // Sven-Ola

Edited by sven-ola

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