Jump to content

Orange Pi RV2


Go to solution Solved by sven-ola,

Recommended Posts

Posted

@sven-ola

Have you tried booting from a microSD card?

I downloaded Armbian-unofficial_26.02.0-trunk_Orangepirv2_trixie_current_6.18.18_gnome_desktop.img and flashed it to my microSD card, but it won't boot.

 

log:

sys: 0x200
try sd...
bm:3
j...

U-Boot SPL 2022.10_armbian-2022.10-Sd61c-P155c-H452d-V4161-B61c5-R448a (Mar 17 2026 - 03:52:17 +0000)
[   0.381] DDR type LPDDR4X
[   0.383] set ddr tx odt to 80ohm!
[   0.393] lpddr silicon init consume 11ms
[   0.394] Change DDR data rate to 2400MT/s
[   0.633] Boot from fit configuration x1_orangepi-rv2
[   0.635] ## Checking hash(es) for config conf_18 ... OK
[   0.641] ## Checking hash(es) for Image uboot ... crc32+ OK
[   0.652] ## Checking hash(es) for Image fdt_18 ... crc32+ OK
[   0.674] ## Checking hash(es) for config config_1 ... OK
[   0.677] ## Checking hash(es) for Image opensbi ... crc32+ OK
[   0.725] 

U-Boot 2022.10_armbian-2022.10-Sd61c-P155c-H452d-V4161-B61c5-R448a (Mar 17 2026 - 03:52:17 +0000)

[   0.732] CPU:   rv64imafdcv
[   0.734] Model: ky x1 orangepi-rv2 board
[   0.738] DRAM:  2 GiB
[   0.830] Core:  414 devices, 29 uclasses, devicetree: board
[   0.843] WDT:   Started PMIC_WDT with servicing (60s timeout)
[   0.848] WDT:   Started watchdog@D4080000 with servicing (60s timeout)
[   0.857] MMC:    
[   0.956] *** Warning - bad CRC, using default environment

[   0.961] initialize_console_log_buffer
[   0.962] Have allocated memory for console log buffer
[   0.967] In:    serial
[   0.969] Out:   serial
[   0.971] Err:   serial
[   1.116] k1x_qspi spi@d420c000: qspi iobase:0x0x00000000d420c000, ahb_addr:0x0x00000000b8000000, max_hz:26500000Hz
[   1.124] k1x_qspi spi@d420c000: rx buf size:128, tx buf size:256, ahb buf size=512
[   1.131] k1x_qspi spi@d420c000: AHB read enabled
[   1.136] k1x_qspi spi@d420c000: bus clock: 26500000Hz, PMUap reg[0xd4282860]:0x0000075b
[   1.143] k1x_qspi spi@d420c000: AHB buf size: 512
[   1.148] SF: Detected XM25QU128C with page size 256 Bytes, erase size 64 KiB, total 16 MiB
List of MTD devices:
[   1.159] * nor0
[   1.160]   - device: flash@0
[   1.163]   - parent: spi@d420c000
[   1.166]   - driver: jedec_spi_nor
[   1.170]   - path: /soc/spi@d420c000/flash@0
[   1.173]   - type: NOR flash
[   1.176]   - block size: 0x10000 bytes
[   1.180]   - min I/O: 0x1 bytes
[   1.183]   - 0x000000000000-0x000001000000 : "nor0"
[   1.188] 	  - 0x000000000000-0x000000010000 : "bootinfo"
[   1.193] 	  - 0x000000010000-0x000000020000 : "private"
[   1.198] 	  - 0x000000020000-0x000000060000 : "fsbl"
[   1.203] 	  - 0x000000060000-0x000000070000 : "env"
[   1.208] 	  - 0x000000070000-0x0000000a0000 : "opensbi"
[   1.213] 	  - 0x0000000a0000-0x000001000000 : "uboot"
[   1.219] Failed to get fastboot key config: -19
[   1.222] Failed to probe HUSB239: -19
[   1.227] RGMII interface
[   1.228] eth0: ethernet@cac80000
[   1.231] MAC mapping file path not set in environment
[   1.236] K1X: :_load_env_from_blk
[   1.247] Can't set block device
[   1.248] Net:   eth0: ethernet@cac80000
[   1.254] Hit any key to stop autoboot:  0 
Loading K1-X Environment ...
[   2.260] 
[   2.261] Running NVMe Scan ...
[   2.272] pcie_dw_k1x pcie@ca400000: has no power-on-status flag, use default.
[   2.277] Now init Rterm...
[   2.279] pcie prot id = 1, porta_init_done = 0
[   2.283] Now waiting portA resister tuning done...
[   2.288] porta redonly_reg2: 00005d37
[   2.292] pcie_rcal = 0x00005d37
[   2.295] pcie port id = 1, lane num = 2
[   2.298] Now int init_puphy...
[   2.301] waiting pll lock...
[   2.304] Now finish init_puphy....
[   2.307] pcie_dw_k1x pcie@ca400000: Unable to get phy0
[   2.312] pcie_dw_k1x pcie@ca400000: Unable to get phy1
[   2.317] pcie_dw_k1x pcie@ca400000: PCIe interface power on, set gpio 116 to 1
[   3.426] PCIE-0: Link down
[   3.438] pcie_dw_k1x pcie@ca800000: has no power on gpio.
[   3.441] pcie_dw_k1x pcie@ca800000: has no power-on-status flag, use default.
[   3.448] Now init Rterm...
[   3.450] pcie prot id = 2, porta_init_done = 0
[   3.455] Now waiting portA resister tuning done...
[   3.459] porta redonly_reg2: 00005d37
[   3.463] pcie_rcal = 0x00005d37
[   3.466] pcie port id = 2, lane num = 2
[   3.470] Now int init_puphy...
[   3.472] waiting pll lock...
[   3.475] Now finish init_puphy....
[   3.479] pcie_dw_k1x pcie@ca800000: Unable to get phy0
[   3.484] pcie_dw_k1x pcie@ca800000: Unable to get phy1
[   4.590] PCIE-1: Link down
[   4.642] pcie_dw_k1x pcie@ca400000: has no power-on-status flag, use default.
[   4.646] Now init Rterm...
[   4.648] pcie prot id = 1, porta_init_done = 0
[   4.653] Now waiting portA resister tuning done...
[   4.657] porta redonly_reg2: 00005d37
[   4.661] pcie_rcal = 0x00005d37
[   4.664] pcie port id = 1, lane num = 2
[   4.668] Now int init_puphy...
[   4.671] waiting pll lock...
[   4.673] Now finish init_puphy....
[   4.677] pcie_dw_k1x pcie@ca400000: Unable to get phy0
[   4.682] pcie_dw_k1x pcie@ca400000: Unable to get phy1
[   4.687] pcie_dw_k1x pcie@ca400000: PCIe interface power on, set gpio 116 to 1
[   5.795] PCIE-0: Link down
[   5.807] pcie_dw_k1x pcie@ca800000: has no power on gpio.
[   5.810] pcie_dw_k1x pcie@ca800000: has no power-on-status flag, use default.
[   5.817] Now init Rterm...
[   5.819] pcie prot id = 2, porta_init_done = 0
[   5.824] Now waiting portA resister tuning done...
[   5.828] porta redonly_reg2: 00005d37
[   5.832] pcie_rcal = 0x00005d37
[   5.835] pcie port id = 2, lane num = 2
[   5.839] Now int init_puphy...
[   5.841] waiting pll lock...
[   5.844] Now finish init_puphy....
[   5.848] pcie_dw_k1x pcie@ca800000: Unable to get phy0
[   5.853] pcie_dw_k1x pcie@ca800000: Unable to get phy1
[   6.959] PCIE-1: Link down
[   6.963] 
no nvme partition table available
[   6.964] Couldn't find partition nvme 0:1
[   6.968] Couldn't find partition nvme 0:1
[   6.972] Couldn't find partition nvme 0:1
[   6.976] Couldn't find partition nvme 0:1
[   6.980] Couldn't find partition nvme 0:1
=>

 

Posted
vor 3 Stunden schrieb 1111Windows:
U-Boot SPL 2022.10_armbian-2022.10-Sd61c-P155c-H452d-V4161-B61c5-R448a (Mar 17 2026 - 03:52:17 +0000)

Hello @1111Windows, you are booting an unknown u-boot from NVME that does not find any meaningful data stored on the NVME. You may need to re-insert the SD card or swap to a working SD card or so. I attach the (timestamp stripped for better diff) version from you (forum.txt) and the expected UART output on my RV2 (minicom.txt). The latter I have captured after re-downloading and SD-flashing the mentioned trixie-gnome img which has a root file system with UUID=8f6e5f9c-3108-4e4d-8fbd-10a8295d396e. HTH // Sven-Ola

 

Bildschirmfoto vom 2026-03-20 09-44-29.png

forum.txt minicom.txt

Posted

Hello @sven-ola, big thank you for all you work on RV2 support!

I was wondering, is it possible to enable CONFIG_DRM_POWERVR for 6.18 and up? I guess more than that is required to actually use it though.

Posted

The R2S has an internal eMMC and a USB port. After debugging the default u-boot scripts I found that it does not boot from USB once you have Armbian installed on eMMC. To reinstall a fresh copy of Armbian or any other OS, you have to use the fastboot based KyTool which does not usually work on a modern Windows PC with USB 3.0 ports.

So you could end up in a state where you have to manually interrupt U-boot, or worse if you corrupt the eMMC.

 

I rewrote the u-boot flow on the R2S. I also cleaned up the nand-sata-install and added a lot of safety checks. It will look at USB and boot from there. After that you can safely install to eMMC. Below is the link. Please let me know if it is worth submitting a PR. The changes will not touch anything in the main system, it adds these scripts to /usr/local/lib and /usr/local/sbin.

 

https://github.com/arvindmaxar/u-boot-tools

 

 

 

Posted

Hello@sven-ola

After flashing the image correctly, I found that running `sudo apt upgrade` to update the system caused the kernel to fail to load; the issue appears to stem from the kernel update.

 

Installing the `linux-image-current-spacemit 26.2.1` update causes the kernel to fail to load.

 

I noticed that the kernel version in the image is 6.18.18-current-spacemit, while the kernel version in the Armbian repository is 6.6.99-current-spacemit.

 

I think this is likely the root of the problem; I should not have used apt to update the kernel.

 

In any case, thank you for porting Armbian to the OrangePi RV2.

Posted
vor 11 Stunden schrieb lewa_j:

is it possible to enable CONFIG_DRM_POWERVR for 6.18 and up

Hello @lewa_j, there already is a CONFIG_POWERVR_ROGUE=y in the 6.18 kernel. This was required for Wayland and subsequently for Spacemit-GPU-Binary-Support (see https://github.com/armbian/build/pull/9515). What exactly will work additionally with this option (I am not a GPU expert)?

 

Hello @1111Windows, doing "apt-get upgrade" on my GPU demo image this will downgrade the kernel from 6.18.18 to 6.6.99. Probably b/c recently the 6.6.99 was changed "current->legacy" and the 6.18 changed "edge->current". Also, OpiRV2 is not a really / full official Armbian image right now. So we probably need to wait until build pipelines catch up. I'll place a "apt-mark hold linux-image*" on my todo for those images.

 

@maxsub The R2S does not have a NOR flash (or "MTD") that it boots from in the first place? That little project of yours does not look like an Armbian fork ready to be merged in. I may need some time to dig in and understand how it works. Have you considered changing the u-boot enviroment (...that can be save with "env save")?

Posted

@sven-ola there are 3 ways to boot the R2S:

 

1. Press the boot button before applying power. White USB port connected to a PC. Apply power. It goes into fastboot mode like an android. Theoretically this should let you flash the on-board eMMC. I can successfully put it in fastboot mode but the flashing has not worked.

 

2. Boot from eMMC

 

3. Boot from USB. 

The eMMC has two boot partitions that are fixed size and one large main partition. 

My project uses the u-boot environment but also does a few minor things. It prioritizes USB if it finds a bootable medium there. It also safely flashes the boot blocks on the eMMC and then the main blocks. It adds some safety checks before flashing. Nothing else. 
 

Posted (edited)

@Łukasz Żywczyk Currently no prebuild nightly images. You are on your own. Grab a Debian Trixie on 64 bit PC (8G RAM, 16G Disk), then

sudo apt-get install docker.io qemu-user git
# add yourself to group docker, logout && login
git clone https://github.com/armbian/build.git
cd build && ./compile.sh BOARD=orangepirv2 BRANCH=current RELEASE=trixie \
  BUILD_MINIMAL=yes KERNEL_CONFIGURE=no KERNEL_BTF=no KERNEL_GIT=shallow

should build your image in output/images/*.img ready to be used...

Edited by sven-ola
qemu-system -> qemu-user
Posted (edited)

@sven-ola CONFIG_POWERVR_ROGUE is for proprietary blob userspace drivers. CONFIG_DRM_POWERVR is new mainlined kerner driver (drivers/gpu/drm/imagination) for use with opensource mesa driver (main/src/imagination)

Edited by lewa_j
Posted

Hi @sven-ola , I'm having an issue where my portrait-oriented monitor isn't displaying anything properly.

 

I have a portrait-oriented monitor, and when I try to connect it via HDMI, it doesn't display anything—the screen remains blank.

 

I found this in dmesg:

 

[drm] spacemit_hdmi_connector_detect() hdmi status connected
[drm] Initialized spacemit 1.0.0 for c0440000.display-subsystem-hdmi on minor 1
[drm] spacemit_hdmi_connector_detect() hdmi status connected
[drm] spacemit_hdmi_get_edid_block() len 128
[drm] spacemit_hdmi_get_edid_block() len 128
spacemit-drm-drv c0440000.display-subsystem-hdmi: [drm] Cannot find any crtc or sizes

 

I added `video=1080x1920@60` to the kernel parameters.

Now it outputs:

 

[    4.162834] spacemit-drm-drv c0440000.display-subsystem-hdmi: [drm] User-defined mode not supported: "1080x1920": 60 137020 1080 1152 1160 1176 1920 1934 1936 1942 0x68 0x5
[    4.162871] spacemit-drm-drv c0440000.display-subsystem-hdmi: [drm] Cannot find any crtc or sizes

 

I think this is because the driver only supports a resolution of 1920x1080, but not 1080x1920.

dmesg.txt

Posted

Hello everyone! Hi @sven-ola
How could I finally set up my minimal image on lower M.2 SSD only and use SBC without SD-card?
I tried official dev image from Armbian Imager and compiled one by myself but armbian-installer always asking me to wipefs just `/dev/` for some reason and also system (booted from SD-card) just can't work with /dev/nvme0n1 (always Invalid Operation). I tried many ways but no luck. I just need minimal system image run on my lower M.2 SSD :(

Posted

The armbian boot loader is diff than the vendors.

 

It checks for specific things in a particular order.

 

nvme_devtype=nvme
nvme_devnum=0
nvme_bootpart=1

autoboot=if test -e ${devtype} ${devnum}:${distro_bootpart} /extlinux/extlinux.conf; then \
		sysboot ${devtype} ${devnum}:${distro_bootpart} any 0x2000000 /extlinux/extlinux.conf; \
	elif test -e ${devtype} ${devnum}:${distro_bootpart} /boot/extlinux/extlinux.conf; then \
		sysboot ${devtype} ${devnum}:${distro_bootpart} any 0x2000000 /boot/extlinux/extlinux.conf; \
	elif test -e ${devtype} ${devnum}:${distro_bootpart} /boot.scr; then \
		load ${devtype} ${devnum}:${distro_bootpart} 0x2000000 /boot.scr; source 0x2000000; \
	elif test -e ${devtype} ${devnum}:${distro_bootpart} /boot/boot.scr; then \
		load ${devtype} ${devnum}:${distro_bootpart} 0x2000000 /boot/boot.scr; source 0x2000000; \
	elif test -e ${devtype} ${devnum}:${distro_bootpart} EFI/BOOT/BOOTRISCV64.EFI; then \
		load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} EFI/BOOT/BOOTRISCV64.EFI; bootefi ${kernel_addr_r}; \
	fi;
	nvme part; \
	setenv devtype $nvme_devtype; \
	setenv devnum $nvme_devnum; \
	setenv distro_bootpart $nvme_bootpart; \
	if test -e ${devtype} ${devnum}:${distro_bootpart} /extlinux/extlinux.conf; then \
		sysboot ${devtype} ${devnum}:${distro_bootpart} any 0x2000000 /extlinux/extlinux.conf; \
	elif test -e ${devtype} ${devnum}:${distro_bootpart} /boot/extlinux/extlinux.conf; then \
		sysboot ${devtype} ${devnum}:${distro_bootpart} any 0x2000000 /boot/extlinux/extlinux.conf; \
	elif test -e ${devtype} ${devnum}:${distro_bootpart} /boot.scr; then \
		load ${devtype} ${devnum}:${distro_bootpart} 0x2000000 /boot.scr; source 0x2000000; \
	elif test -e ${devtype} ${devnum}:${distro_bootpart} /boot/boot.scr; then \
		load ${devtype} ${devnum}:${distro_bootpart} 0x2000000 /boot/boot.scr; source 0x2000000; \
	elif test -e ${devtype} ${devnum}:${distro_bootpart} EFI/BOOT/BOOTRISCV64.EFI; then \
		load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} EFI/BOOT/BOOTRISCV64.EFI; bootefi ${kernel_addr_r}; \
	fi;

bootcmd=echo "Loading K1-X Environment ..."; \
	echo ""; \
	echo "Running NVMe Scan ..."; \
	nvme scan; \
	run autoboot

 

SD takes priority. After that it checks for an eMMC and if nothing on the eMMC is found it can use, it then moves on to check the NVMe.

 

What this means? If the unit has an SPI, it needs to be updated with the Armbian boot loader. If the bootloader finds an extlinux.conf, boot.scr or *.EFI on the eMMC it will attempt to boot from it.

 

I have a BPI-F3 which has no SPI. What I do in that case is boot from SD, format the eMMC and transfer the install to the NVMe. I then flash u-boot to the eMMC and wham oh. System boots from NVMe. In the case of an SPI, its the same. As long as it doesn't find anything of use on the eMMC your good.

Posted

Hello @1111Windows! Having a portrait HDMI display is rather unusual. Normally, one can buy landscape HDMI displays and simply rotate them via software or video card hardware. However: if reading out the EDID via I2C / HDMI cable does not work correctly, the HDMI display driver may simply fallback to 1920x1080@60 using the compiled-in EDID. You can try to get the EDID from the display with the apt install read-edid tool. If I recall correctly, one can provide a custom EDID binary as file to the kernel via some boot cmd parameter, see https://www.marcusfolkesson.se/blog/custom-edid-in-linux/ for details. Simply configure some mode via video= when the mode is not available in the EDID will not work (as you already found out). It should also be possible to add a custom modeline, but this is deep dive as stated here: https://nyanpasu64.gitlab.io/blog/crt-modeline-cvt-interlacing HTH // Sven-Ola 

Posted

Hello @savznkvo and @Logan. Directly booting from NVME is not supported by the ROM software burned in the RISCV chip. Instead, the OrangePi RV2 chip is able to boot from SD, eMMC, and Flash / MTD (in this order). You need to prepare the board's internal flash for NVME boot with

  1. Boot Armbian from SD card.
  2. As root, start armbian-install and select "Install to MTD".
  3. Transfer a fresh Armbian image to your NVME.

If you do not have the "armbianized" MTD boot config installed, @c0rnelius above hints on booting apply. HTH // Sven-Ola

Posted

@savznkvo Installing headless (blind / via network) on a board this new will fail probably. Get a TV and connect an HDMI display or get a serial adapter and connect that for debug. I'll check later with a spare NVME, but I am pretty sure it works (provided, that you compiled the correct firmware). HTH // Sven-Ola

Posted (edited)

@savznkvo if you followed my compile.sh steps from above, you should have a file Armbian-unofficial_26.05.0-trunk_Orangepirv2_trixie_current_6.18.21_minimal.img in ./output/images ready to be flashed to your SD card. Insert and boot. At this point you need TV / Kbd or UART to finish the wizard (set root PW etc). Now start armbian-install (see screen shot). Transfer *.img to /dev/nvme0n1, use netcat or similar. Then power down, remove SD and eMMC (if plugged). Restart from NVME, now you have to complete first time wizard again. Tested with current main and it works flawlessly.

 

Addon: if you apt-get dist-upgrade, a newer kernel package from Armbian nightly builds is installed and the bcmdhd wifi kernel driver module is recompiled - which needs some time. This will DOWNGRADE from 6.18.21 to 6.18.20 currently - this works as designed.

 

HTH // Sven-Ola

Bildschirmfoto vom 2026-04-10 20-30-33.png

Edited by sven-ola
Added dist-upgrade info

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