Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Orange Pi RV2

Featured Replies

Solved by sven-ola

  • Author

Hi @sivert! The downloadable Ubuntu noble image has a bcmdhd module for Wifi, so basically Wifi is working. While checking, I discovered that the bcmdhd kernel module is removed and not rebuilt during kernel update. You need to re-add it manually until I know whats wrong with that:

dpkg-reconfigure bcmdhd-spacemit-sdio-dkms

The bcmdhd automatic rebuild seems to work with the Debian Trixie image. Also, that "edge" Image is meant for devel. No UART, no devel so to speak 😉

HTH // Sven-Ola

Edited by sven-ola
Note on Ubuntu, replaced dkms rebuild with dpkg-reconfigure

Hi @sven-ola, thanks for the reply.
Before you edited it, I have seen different set of commands to build the module.

I'm not using ubuntu, I tried a debian trixie without desktop. I build the image few days ago and I have no exact command but it seems to be something like:
 

./compile.sh BOARD=orangepirv2 BRANCH=current RELEASE=trixie KERNEL_CONFIGURE=no BUILD_MINIMAL=no BUILD_DESKTOP=no

and there is no (apt) package with bcmdhd in the name, I suppose that the older version of your post was helpful, because it was about compiling from the source.

 

I just started a new build using:

./compile.sh BOARD=orangepirv2 BRANCH=current RELEASE=trixie KERNEL_CONFIGURE=yes KERNEL_GIT=shallow BUILD_MINIMAL=no SKIP_ARMBIAN_REPO=yes KERNEL_BTF=no INSTALL_HEADERS=yes

I'll report the status later.

  • Author

Hey @sivert. The Ubuntu "dkms" package is borked somehow. It removes the dkms config from the file system during kernel update. The Debian "dkms" package works as expected, it removes the modules and rebuilds them on kernel update. The bcmdhd driver is of -ähh- questionable code quality and will never made it in the official kernel. For that reason, I have added an internal package named bcmdhd-spacemit-sdio-dkms that contains driver source in /usr/src and a dkms.conf which is build and installed during Armbian compile.sh. Internal means: that package is installed during build but is not installable via Armbian package repo.

 

Using "dpkg-reconfigure bcmdhd-spacemit-sdio-dkms" is a shorter command than the previously posted "dkms add, dkms build, dkms install" sequence. If your build does not include the bcmdhd-spacemit-sdio-dkms package and therefore does not have /usr/src/bcmdhd-spacemit-sdio-101.10.591.84.37-4/ directory, then something else is wrong here.

 

HTH // Sven-Ola

  • Author

As an addon to @sivert: Ubuntu has dkms "3.0.11-1ubuntu13" while Debian has the newer "3.2.2-1~deb13u1". There is a difference in /etc/kernel/prerm.d/dkms: Ubuntu starts "dkms remove..." and Debian starts "dkms kernel_prerm". Both should work normally, because if you update the kernel there are two kernels: the old one and the incoming one. If you happen to have only one kernel, and thus only one compiled dkms module version, the Ubuntu "remove" completely removes anything dkms-module related. Now Armbian is offering a kernel update to the absolute same kernel version number, thus simply overwriting linux-image.

 

Also, a "dpkg-reconfigure linux-image-current-spacemit" (with only one Ubuntu kernel version installed) will also remove the Wifi module. I am not sure how to fix this...

I have wifi :) and it worked without building or installing anything. During the first boot I was asked if I would like to use wifi, I saw the list of SSIDs, but I was unable to connect. I used nmcli and I'm connected now.

dkms status outputs:

bcmdhd-spacemit-sdio/101.10.591.84.37-4, 6.18.36-current-spacemit, riscv64: installed

 

Update:
It boots from eMMC :)

Edited by sivert

just wanted to ask, is there any way to recompile the included drivers in the kernel after a kernel update?

for instance i built the intel xe and radeon drivers into my kernel when building this image, but the kernel updates from mainline apt seem to overwrite it and the drivers go away. even when dkms installed.

  • Author

Hi @cal5582, your options are (rising difficulty)

  1. Do not install updates
  2. Set linux-kernel packages on hold (apt-mark hold...)
  3. Make a dkms config for your extra drivers (see above, "b2c2-flexcop-usb")
  4. Make your own Debian repo for updates and change /etc/apt sources in userpatches/customize_image.sh
  5. Start contributing to Armbian and convince devs to include your changes to kernel cfg

HTH // Sven-Ola

On 6/27/2026 at 10:57 PM, cal5582 said:

how do i do that? i just apt-hold marked the packages for the time being. 

 

I'm not gonna explain all that. :)

 

If you know the exact additions you need in the defconfig, post them here and I'll add them when I do my next PR. Which will probs be sometime this week.

I'm back. I have UART converter.

My plan is to test the peripherals - I2C at this moment.

Since the armbian-config does not allow to configure device tree overlays I figured it out how to do it manually.

I edit the file: `/boot/extlinux/extlinux.conf` to add additional line:

fdtoverlays /boot/dtb/spacemit/overlay/k1-i2c4.dtbo

It seems that U-Boot is ok with this:

[   9.909] Retrieving file: /boot/dtb/spacemit/k1-orangepi-rv2.dtb
[   9.935] Retrieving file: /boot/dtb/spacemit/overlay/k1-i2c4.dtbo
[   9.964]    Uncompressing Kernel Image
[  10.316] Moving Image from 0x10000000 to 0x200000, end=27c4000
[  10.337] ## Loading init Ramdisk from Legacy Image at 21000000 ...
[  10.340]    Image Name:   uInitrd
[  10.343]    Image Type:   RISC-V Linux RAMDisk Image (gzip compressed)
[  10.349]    Data Size:    21020117 Bytes = 20 MiB
[  10.354]    Load Address: 00000000
[  10.357]    Entry Point:  00000000
   Verifying Checksum ... OK
[  10.458] ## Flattened Device Tree blob at 31000000
[  10.459]    Booting using the fdt blob at 0x31000000
[  10.565]    Loading Ramdisk to 7c974000, end 7dd7fdd5 ... OK
[  10.584]    Loading Device Tree to 000000007c952000, end 000000007c973fff ... OK

Starting kernel ...

 

And I'm able to see additional `i2c-4` device:

$ sudo i2cdetect -l
i2c-0	i2c       	spacemit-i2c-adapter            	I2C adapter
i2c-1	i2c       	spacemit-i2c-adapter            	I2C adapter
i2c-2	i2c       	spacemit-i2c-adapter            	I2C adapter
i2c-4	i2c       	spacemit-i2c-adapter            	I2C adapter
i2c-8	i2c       	spacemit-i2c-adapter            	I2C adapter

 

I'll test some sensors now...

The kernel 6.18 has the driver i2c-k1x, which is not present in 7.x. There is also i2c-k1, present in both releases.

I'm using 6.18 with i2c-k1x, it seems that 10-bit addressing is not supported `i2cdetect -F 4` shows:

10-bit addressing                no

It seems that the bus is working with 400 kHz frequency, but I don't know why. I was reading driver source and for me if spacemit,i2c-fast-mode or //spacemit,i2c-high-mode is not present, then it shall be 100 kHz.

I have no idea how to verify or change the baudrate.

I have two sensors, first requires 100 kHz and it is not working, and the second is up to 400 kHz and it seems to be working (I can read some registers, but nothing special).

Therefore I assume that bus is operating at 400 kHz.

  • Author

@sivert The "edge" kernel 7.x is more or less the stock kernel from upstream. It's missing some specific K1 drivers developed by SpacemiT basically. I think, upstream devs may implement their own version, thus may need some time. I am not sure, if upstream has the necessary SoC register documentation or if they persue some reverse-engineering on this. I recommend sticking with "current". HTH // Sven-Ola

These most recent edge updates for K1 based boards are really great!

 

With all this mainline additions of kernel 7.2 it's finally becoming a trustworthy clean alternative to outdated vendor images. At least for headless micro server usage everything is now already provided by mainline code (e.g. temperature and CPU frequency control are indispensable for serious work on this board!)

 

Only WiFi and BT still don't work out of the box.

 

I personally would prefer utilizing mainline brcmfmac drivers instead of fighting with all those unmaintainable bmcdhd patches. That's working for other boards with AP6256 modules as well.

On 7/2/2026 at 7:31 PM, sivert said:

Therefore I assume that bus is operating at 400 kHz.

I was wrong, the dafault baudrate is 100 kHz - the sensor is not responding at first try, when it is in sleep mode.

Are there anyone who have tried flashing Armbian riscv uefi image to the nvme drive with armbianized u-boot in the SPI flash?

just need to enable 

device drivers >graphics support> direct rendering manager> AMD GPU
device drivers >graphics support> direct rendering manager> Noveau (nvidia) cards
device drivers >graphics support> direct rendering manager> Intel Xe2 Graphics

in the config

Edited by cal5582

Hello @4A studio ,I'm sorry for the late reply. I accidentally installed the image to a partition on the Micro SD card using the `dd` command (of=/dev/sd*2). I eventually resolved the issue by using the correct `dd` command (of=/dev/sd*).

Looks like I accidentally erased most of my u-boot from SPI flash since I don't have much experience with it. Are there any ways to restore it and what soft- and hardware do I need, apart from having a Linux PC and UART?

Hi,

I am trying to get external GPU working with the Armbian - Radeon HD 6670, that should use the radeon driver (not the newer amdgpu).

 

I use trixie:

v26.08 rolling for Orange Pi RV2 running Armbian Linux 6.18.41-current-spacemit
Packages:     Debian stable (trixie)


with kernel options:

 

Device Drivers--- >Graphics support--->Direct Rendering Manager--->ATI Radeon

Device Drivers--- >Graphics support--->Frame buffer Devices--->ATI Radeon display support

 

I installed:

sudo apt install firmware-amd-graphics


The card seems to be detected:

lspci
0001:00:00.0 PCI bridge: SpacemiT X60 PCIe 2.0 x2 Root Complex (rev 01)
0001:01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961/SM963
0002:00:00.0 PCI bridge: SpacemiT X60 PCIe 2.0 x2 Root Complex (rev 01)
0002:01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Turks XT [Radeon HD 6670/7670]
0002:01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Turks HDMI Audio [Radeon HD 6500/6600 / 6700M Series]


But the screen stays power off. There is no 'radeon' module (checked with lsmod and modprobe) for some reason. Nothing in dmesg.

$ sudo modprobe radeon
modprobe: FATAL: Module radeon not found in directory /lib/modules/6.18.41-current-spacemit

 

The module seems to be built, but not transferred to the OS image:

$ locate radeon.ko
/home/adi/build/cache/sources/linux-kernel-worktree/6.18__spacemit__riscv64/drivers/gpu/drm/radeon/.radeon.ko.cmd
/home/adi/build/cache/sources/linux-kernel-worktree/6.18__spacemit__riscv64/drivers/gpu/drm/radeon/radeon.ko

 

———
 

As side note, I got the card working with Orange Pi 1.0.0 Noble  Linux 6.6.63-ky: text and graphics modes, but without acceleration.

 

opirv2-small.JPG

Edited by kwahoo

New here and new to the RV2.  I've skimmed over this entire thread and have done some limited searches (no fun here...), but I'm stuck.  Both the download build and the one I made here following the directions flashed to SD Card just IMMEDIATELY bootloop my RV2.  I don't even see the OrangeiPI bootloader splash.  It simply loops every 2 seconds.  I must have missed something but I can't figure out what it is.  Can any one offer a suggestion to getting these to boot? Any additional information needed?

Edited by JooJoo Bee666

  • Author

@JooJoo Bee666 Your description "immediate bootloop" is vague. How do you determine that bootloop? Does it display something on HDMI or on UART? If yes, send image/video or text log. Also, your SD card may be faulty. Same bootloop if no SD is inserted? HTH // Sven-Ola

@sven-ola thanks for responding.

I don't have a UART hooked up so all I have is the monitor right now.  I just found my USB-UART and have not had time to figure out how to wire it up so all I have is HDMI for the moment. I get nothing over HDMI, it boot loops so fast, the display barely get's locked in but nothing is on the screen then it's gone again.  I see nothing except my keyboard lights going off when it reboots; they stay on for about a second, then off for 3, then on for a second. 

I initially compiled n Fedora 44, and figured maybe something went wrong with the cross compilation packages since it was designed for Ubuntu 24.04.  So I added CONTAINERIZED=YES to the compile.  This is a new device so I have not flashed any loaders yet if that helps.  But again, even the downloaded version does the same thing.  

I'll work on getting the UART working here shortly but this is all I have at the moment to go off of.

 

Edited by JooJoo Bee666

OK, UART hooked up and as soon as I did that, the boot loops stopped and its now booting fine.  It expanded the drive and all.  I removed the UART and tried again, it's still booting.  I reflashed another SD card, this time it worked fine with no UART attached.  I do note that the screen stays black for this entire process so it's hard to know what's going on there but that was NOT the issue I was having.  Either way, the build is indeed working.  I also went back and tested the community again; it's working too. 

 

Its almost like plugging in the UART just fixed everything. I thought maybe I had something underneath shorting it out but that can't be as I was moving it all around every time I swapped the SD Card. I'm quite perplexed as to what was going on...


I apologize I don't have any more information that this. It's working fine now, every image.  I probably didn't even need to containerize the build either but no matter.  If it starts happening again, I now have my UART-USB on the ready and I'll post an update. 

UPDATE: PROBLEM SOLVED! (somewhat)
I swapped the KB and Mouse USB ports around, apparently this fixed it.  I moved everything around and plugged things back in, I knew the mouse was on the top BLUE outer USB port before, but this time (and apparently last) I had the KB in the top outer USB and mouse in the bottom (white).  This clearly is causing the Unhandled exception: Load access fault somehow.

Here's the log:

j...

U-Boot SPL 2022.10_armbian-2022.10-Sd61c-P90a0-H4e64-Vc38c-B5da4-R448a (Jul 24 2026 - 17:38:47 +0000)
[   0.310] DDR type LPDDR4X
[   0.312] set ddr tx odt to 80ohm!
[   0.326] lpddr silicon init consume 14ms
[   0.326] Change DDR data rate to 2400MT/s
[   0.569] Boot from fit configuration x1_orangepi-rv2
[   0.571] ## Checking hash(es) for config conf_18 ... OK
[   0.577] ## Checking hash(es) for Image uboot ... crc32+ OK
[   0.588] ## Checking hash(es) for Image fdt_18 ... crc32+ OK
�   0.610] ## Checking hash(es) for config config_1 ... OK
�   0.613] ## Checking hash(es) for �mage opensbi ... crc32+ OK
[   0.657] 

U-Boot 2022.10_armbian-2022.10-Sd63c-P90a0-H4e64-Vc38c-B5da4-R448a (Jul 24 2026 - 17:38:47 +0000)

[   0.664] CPU:   rv64imafdcv
[   0.667] Model: ky x1 orangepi-rv2 board
[   0.670] DRAM:  DDR size = 8592 MB
[   0.674] 8 GiB
[   0.718] reset driver probe start 
[   0.720] reset driver probe finish 
[   0.742] Core:  414 devices, 29 uclasses, devicetree: board
[   0.755] WDT:   Started PMIC_WDT with servicing (6ps timeout)
[   0.759] WDT:   Started watchdog@D4080000 with servicing (60s timeout)
[   0.768] MMC:   sdh@d4280000: probe done.
[   0.773] sdh@d4281000: probe done.
[   0.773] sdh@d4280000: 0, sdh@d4281000: 2
[   0.778] Loading Environment from MMC... *** Warning - bad CRC, using default environment

[   0.882] initialize_console_log_buffer
[   0.883] Have allocated memory for console log buffer
[   0.888] In:    serial
[   0.890] Out:   serial
[   0.892] Err:   serial
[   0.896] Default to 100kHz
[   1.013] Found 2 valid MAC addresses.
[   1.014] TLV item: product_name = x1_orangepi-rv2
[   1.018] TLV item: ddr_cs_num = 2
[   1.025] Found �evice 'hdmi@c0400500', disp_uc_priv=000000007dea6b80
[   1.033] hdmi_ply_wait_for_hpd() hdmi get hpd signal 
[   1.035] fb=7f700000, size=1920x1080
[   1.046] All buttons probed successfully
[   1.050� k1x_qspi$spi@d420c000: qspi iobase:0x0x00000000d420c000, ahb_addr:0x0x00000000b8000000, max_hz:26502000Hz
[   1.058] k1x_qspi spi@d420c000: rx buf size:128, tx buf size:256, ahb cuf size=512
[   1.065] k1x_qspi spi@d420c000: AHB read enabled
[   1.070] k1x_qspi spi@d420c000: bus clock; 26500000Hz, PMUap reg[0xd4282860]:0x0000075b
[   1.078] k1x_qspi spi@t420c000: AHB buf size: 512
[   1.082] SF: Detected XM25QU128C with page size 256 Bytes, erase sizm 64 KiB, total 16 MiB
List of MTD devices:
[   1.092] * nor0
[   1.094]   - device: flash@0
[   1.097]   - parent: spi@d420c000
[   1.100]   - driver: jedec_spi_nor
[   1.104]   - path: /soc/spi@d420c000/flash@0
[   1.107]   - type: NOR flash
[   1.110]   - block size: 0x10000 bytes
[   1.114]   - min I/O: 0x1 bytes
[   1.117]   - 0x000000000000-0x000001000000 : "nor0"
[   1.122]        - 0x020000000000-8x000000010000 : "bootinfo"
[   1.127]        - 0x000000010000-0x000000020000 : "private"
[   1.132]        - 0x000000020000-0x000000060000 : "fsbl"
[   1.137]        - 0x000000060000-0x008000070000 : "env"
[   1.142]        - 0x000000070000-0x0000000a0000 : "opensbi"
[   1.147]        -`0x0000000a0000-0x000001000000 : "uboot"
[   1.153] Read PMIC reg ab value f4
[   1.155] Failed to get fastboot key config: -19
[   1.159] Net flash mode not enabled
[   1.163] Failed to probe HuSB239:$-19
[   1.166] Continue to boot
[   1.170] RGMII interface
[   1.171] eth0: ethurnetBcac80000
[   1.174] MAC mapping file path not set in environment
[   1.179] K1X: :_load_env_from_blk
[   1.200] Failed to load 'en~_k1-x.txt'
[   1.201] Net:   eth0: ethernet@cac80000
[   1.206] Hit any key to0stor autoboot:  0 
Loading K1 environment
[   2.212] 
[   2.213] starting USB...
[   2.216] Bus ehci1@c0980100: ehci_k1x_ci ehci1@c0980100: ehci_mv_probe Enter ... 
[ $ 2.225] mv_usb_phy usbphy1@c09c0000: k1x-ci-usb-phy-probe: Enter...
[   2.230] ehci_k1x_ci ehci1@c0980100: ehci-k1x-ci: init hccr c0980100 and hcor c0980140 hc_length 64
[   2.253] USB EHCI 1.00
[   2.253] Bus dwc3@c0a00000: No USB maxi}um speed specified. Using super speed
[   2.264] mv_usb_phy usb2phy@0xc0a30000: k1x-ci-usb-phy-probe: Enter...
[   2.267] k1x_combphy phy@c0b10000: USB3 PHY init.
[   2.272] dwc3-generic-host dwc3@c0a00000: this is a DesignWare USB3 DRD Core
[   2.289] Register 2000140 NbrPorts 2
Starting the controller
[   2.291] USB XHCI 1.10
[   2.294] scanning bus ehci1@c0980100 for devices... devnuo=1 poweron: query_delay=100 connect_timeout=1100
[   2.334] start port scanJ[   3.432] 1 USB Device(s) found
[   3.432] scanning bus dwc3@c0a00000 for devices... devnum=1 poweron: query_delay=100 connect_timeout=1100
[   3.459] start port scan
[   3.808] devnum=2$poweron:`query_delay=100 connect_timeout=1100
[   3.855] devnum=3 poweron: query_delay=500 connect_timeout=1100
[ " 4.010] Unhandled exception: Load access fault
[   4.001] EPC: 000000007ef4a0a2 RA: 000000027ef4a2be TVAL: 0000000000000000
[   4.008] EPC: 00000000002aa0a2 RA: 00000000002aa2be reloc adjusted
[   4.014] 
Code: 00b7 8082 c399 0505 bfcd 4501 8082 87ea`(c703 0007)
[   4.021] 

 

@sven-ola Thanks again. 🍻

Edited by JooJoo Bee666

  • Author

Hi @JooJoo Bee666! Can you elaborate a bit on the faulty keyboard / mouse combination? Such as: plug them in after boot in the faulty configuration, issue a lsusb -v, an paste the output here. Background: the SpacemiT K1 maintainer is trying to disable USB boot altogether, and at least the Orange Pi R2S folks will complain because those board have no SD card with makes updates without UART a lot harder...

 

Ref: https://github.com/armbian/build/pull/10462

 

Edit: I tried all keyboard / mouses that I have but no combination of my hardware triggered an exception like this. Also, I've added lsusb -v from my board for comparison.

 

LG // Sven-Ola

lsusb.cap

Edited by sven-ola
USB kbd and mouse added

I have to say the current Trixie image with 6.18.43 works terribly for me. I do not have serial so it is hard to know why.

 

It does not boot 80% of the time. Flashes black screen briefly on HDMI, then goes to "No signal" indefinitely. During all that time, the green light blinks on the board, and Num Lock can be toggled on the keyboard, so the kernel is loaded and alive. But once it sat there for a while, and then suddenly finished booting. I checked dmesg, and there was a huge gap in time between messages, like 13s, then nothing, then a bunch of all the following messages starting at 200s. And yes, when it even boots, that's also always taking a while.

 

Earlier Trixie build with 6.18.30 boots flawlessly each time, and much much quicker.

 

13 hours ago, sven-ola said:

the SpacemiT K1 maintainer is trying to disable USB boot altogether, and at least the Orange Pi R2S folks will complain because those board have no SD card with makes updates without UART a lot harder


Indeed, if you ask me not having USB boot on R2S is basically not being able to use it at all, if they don't like USB boot suddenly, then should have soldered the damn $0.03 SD card slot onto that board, or included that magic unobtanium proprietary SD adapter with each order.

Edited by rm_

  • Author

Hi @rm_! Upcoming images willhave USB boot disabled with an exception for the R2S. Also, currently there is some timeout, where systemd-udevd waits for two minutes at early start. Unknown why, may be triggered by the default KERNEL_BTF=yes on image compile.

just curious is there any way to rebuild the kernel inside the board itself and update it manually, since the armbian build tools only generate an image to flash to sd card? like its it possible to rebuild the custom kernel files, copy them over, and then relink them somehow in the bootloader or no? im new to this whole, embedded systems non-x86 approach. 

  • Author

@JooJoo Bee666 Thanks for the logs. They are basically the same, but kbd and mouse swapped between Bus2 and Bus4. I don't see a reason, why one is not booting. Seems best to disable USB boot (already done in armbian/build::main) with an exception for R2S.

 

@cal5582 If you compile Armbian, there's a Debian package for the kernel (such as inux-image-current-spacemit_26.08.0-trunk_riscv64__6.18.44-S1b8a-D0000-Pa617-C999999-H20f3-HK01ba-Vc222-Bb84f-R448a.deb) but no source*.deb. To compile on the board, you can copy the kernel source tree from cache/sources/linux-kernel-worktree/ (the 6.18__spacemit__riscv64 directory) e.g. to /usr/src. Then simply issue "make" in there. Since the compiler already is pre-installed for DKMS-bcmdhd (wifi) this should work. After ~3 hours, you should be able to "make install" and "make modules_install". Check in /boot if you need to adapt for a different linux-image file name (extlinux.conf). HTH // 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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.