Orange pi
Jump to navigation
Jump to search
Orange Pi 5 family
Orange Pi 5 Ultra is an RK3588 single-board PC with HDMI input
Orange pi 5 plus
- Orange Pi 5 Plus (4GB/8GB/16GB)
- Wiki for Orange Pi 5 Plus.
- Orange pi 5 plus vs Orange pi 5. Orange pi 5 uses RK3588S & Gigabit ethernet but Orange Pi 5 plus uses RK3588 & 2.5G ethernet.
- RK3588 vs RK3588S
Booting from eMMC
- Enable to boot from eMMC is more convenient since it asks to clear SPIflash. Therefore, we can easily to switch to boot from eMMC or SD card.
- By default SD card has a higher priority to boot than eMMC.
- I can use eMMC as the main OS storage and use SD card to play with different OSs.
- Even I follow the instruction to use RKDevTool to put a Linux image onto eMMC, I still cannot boot from eMMC until I clear SPIflash.
- eMMC is /dev/mmcblk1, speed is 271 MB/s (sudo hdparm -t --direct /dev/mmcblk1p2 )
- SD is /dev/mmcblk0, speed is 62 MB/s (sudo hdparm -t --direct /dev/mmcblk0p2 )
- From Linux
$ ls -l /dev/mtdblock0 brw-rw---- 1 root disk 31, 0 Dec 10 06:00 /dev/mtdblock0
sudo dd bs=1M if=/dev/zero of=/dev/mmcblk1 count=1000 status=progress sudo sync sudo dd bs=1M if=Orangepi5plus_x.x.x_debian_bullseye_desktop_xfce_linux5.10.110.img \ of=/dev/mmcblk1 status=progress sudo sync
- If you want to boot from eMMC on the Orange Pi 5 Plus, you would need to clear the /dev/mtdblock0 partition. This is because the /dev/mtdblock0 partition typically contains the bootloader, and clearing it allows you to install a new bootloader that can boot from the eMMC.
- Here is a general guide on how you can do this: Boot Armbian from an SD card.
- Clear the SPI flash memory by running the following command in the terminal: sudo dd if=/dev/zero of=/dev/mtdblock0 bs=1M count=1
- Need help with Orange Pi 5 Plus emmc
- Need help with orange pi 5 plus emmc boot. Use Josha's image. No Maskrom. rkdeveloptool & MiniLoaderAll.bin
- NEW Orange Pi 5B. Installing Custom Ubuntu to eMMC drive. Windows OS is required. RKDevTool is needed. 1. install a driver (DriverAssistant). Run DriverInstall.exe, 2. Run RKDevTool.exe. Full list of videos from leepsvideo.
- Armbian Orangepi 5B can not boot from emmc
- Using Windows VM on a Linux
- RKDevTool/rkdeveloptool by radxa.com.
- Batocera case is the same.
Booting from NVME
- The instruction on wiki How to burn Linux image to SPIFlash+NVMe SSD->The method of using the dd command to burn works when I tested on Debian 11 KDE Plasma installed on a SD card.
- burn the u-boot image into the SPI Flash
sudo nand-sata-install # select 7 Install/Update ther bootloader on SPI Flash
- use 'dd' to clear the NVMe SSD & burn the linux image to NVME SSD
- burn the u-boot image into the SPI Flash
- The NVME speed is 2046 MB/s by using the command sudo hdparm -t --direct /dev/nvme0n1p2 . The NVME is inland TN450 (500GB).
- What is /dev/mtdblock0
- In the context of the Orange Pi 5 Plus, the /dev/mtdblock0 partition is used to store the bootloader.
- Booting directly from a USB or NVMe requires flashing U-Boot to the SPI.
- How to boot Orange pi 5 from SATA m.2 SSD (for Orange pi OS and Armbian)
- Change SD card’s rootfs UUID method. Orange Pi 5 NVMe/SATA SSD Boot Guide.
SPI flash, non-volatile memory
- Prime for SPI flash
- SPI Flash in a Single Board Computer (SBC) refers to a type of flash memory that uses the Serial Peripheral Interface (SPI) for communication. This is a common type of non-volatile memory used in SBCs and other embedded systems.
- Many embedded systems, including SBCs, use non-volatile memory to store boot code, configuration parameters, and other data that persist when the system is powered down. Common Flash technologies include Parallel or SPI NOR flash, SLC NAND, and eMMC devices.
- In the context of system booting, the processor starts executing at the reset vector and attempts to execute the first code. Some processors have a small internal boot ROM that can be programmed at manufacturing time. The boot ROM can also detect where the bootloader was stored; for example, in an external NOR or NAND flash device.
- If a NOR Flash device is used to store the bootloader, the processor can directly run off the Flash device. This method is commonly called eXecute In Place (XIP). If a NAND or eMMC device is used, boot code first needs to be copied to the system’s RAM. Then the processor can jump to the RAM space and execute. This method is called shadowing or Store-and-Download (SnD).
- For example, the ROCKPro64 SBC has a 128Mbit SPI Flash, and the Odroid N2+ SBC features an 8MB SPI flash with a boot select switch and Petitboot app.
- Orange Pi 5
# Put Armbian onto SD card lsblk sudo dd if=/dev/zero of=/dev/sdd bs=4M count=5 sudo sync sudo dd if=Armbian*.img of=/dev/sdd bs=1M status=progress sudo sync lsblk sudo eject /dev/sdd lsblk # Back up img files to a flash drive sudo dd if=/dev/zero of=/dev/sdc bs=4M count=5 sudo sync sudo fdisk /dev/sdc # g, n, ENTER, ENTER, ENTER, w sudo sync sudo mkfs.ext4 /dev/sdc1 sudo sync lsblk mkdir hey sudo mount /dev/sdc1 hey sudo cp *.img hey/ sudo umount /dev/sdc1 sudo eject /dev/sdc # Mount a flash drive, back up SPI firmware (optional) lsblk mkdir hey sudo mount /dev/sda1 hey cd hey lsblk sudo dd if=/dev/mtdblock0 of=orangepi5_SPI.img status=progress sudo sync sudo cp /usr/lib/linux-u-boot-legacy-orangepi5_23.05.0-trunk_arm64/rkspi_loader.img ./ sync # Upgrade SPI sudo dd if=rkspi_loader.img of=/dev/mtdblock0 status=progress sudo sync lsblk # look at the size of mtdblock0
- At this point, we are ready to put images (Batocera, Orange Pi OS (Droid)) onto nvme
lsblk sudo dd if=/dev/zero of=/dev/nvme0n1 bs=4M count=5 sudo sync sudo dd if=batocera.img of=/dev/nvme0n1 bs=4M status=progress sudo sync
- How to install Android to Nvme. Orange Pi 5 5/19/2023. SPIflashTool. Boot Orange Pi OS (Droid) from NVME Ok. Boot Debian from NVME failed. Boot Armbian from SD. Run armbian-config - install/update boot loader on MTD flash. Remove SD. Boot Debian from NVME worked. Switch to Orange Pi OS (Droid) but failed. If you flash the MTD with the boot loader of a specific Linux distro, it won't work with another distro (or android for that matter).
- Orange Pi 5 plus Armbian and Ubuntu NVMe 6/30/2023. Install KDE plasma using armbian-config.
startx # not found, a hint was given to run 'apt install xinit' sudo apt install xinit # Choose ssdm sudo reboot
- My experience: suppose my NVME has Debian image from Orange Pi. I booted Armbian ubuntu legacy. Use armbian-config - System - Install - Install/Update the bootloader on MTD Flash. Now I can boot from NVME if there is no SD card or boot from SD card if there is no NVME.
LEDs
Onboard LED Light Test Instructions
Android OS
- For enhanced security, it is recommended to install the SDDiskTool on a virtual machine or a non-critical Windows system. This precautionary measure can help mitigate potential security risks. I experienced a blue screen error during my initial use of the software, which underscores the importance of this safety advice..
- The instructions provided for installing onto an SD card work. However, to successfully boot from the SD card, it is necessary to remove the eMMC first.
- The Android OS image is not optimized for a large screen. So it is better to use Orange Pi OS (Droid) instead.
- Orange Pi 5: Android 12 Operating System Basic Tutorial 3/31/2023. SD_Firmware_Tool & SD card. Simple walkthrough.
- Orange Pi 5: AetherSX2 Playstation 2 Emulator for Android 12. Use an older version of AetherSX2 apk instead of Play Store's one. Nice walkthrough. Orange Pi 5: Sony Playstation 2 Emulation Comparisons with Batocera on i5-4570 and RetroArch on i5-4790K.
- Orange Pi 5: Dolphin Emulator Tutorial and Test for Gamecube & Wii on Android.
- Orange Pi 5: Retroarch for Android 12 Basic Tutorial.
- Download and install the 64bit apk from retroarch.com.
- Open the "Files" app. There is a folder "RetroArch" created under the main folder (parallel to Alarms, Android, DCIM, Documents, Download, ...). Create a new directory called 'Roms' under RetroArch. Go ahead and create different folders for different game systems; e.g. NES, PS1, SNES. Ctrl +c/ Ctrl+v works under the "Files" app.
- Open RetroArch again. Set up the controller under Settings: Port 1 controls. Press and hold a button. Then set up hotkeys (Menu Toggle). A = go back.
- Import content. Box arts will be downloaded automatically.
- Load Core. Download a core. PS (PCSX-reArmed). NES (NES/Famicon Nestopia UE), SNES (SNES/SFC Snes9x 2005), N64 (Mupen64plus - Next GLES2)
- Select+Start to go to a quick menu.
- Files app -> RetroArch -> System (place bios files).
Batocera
- Batocera on an Orange Pi 5 Plus. Sound will come out from 3.5mm, not HDMI.
- Orange Pi 5 SBC Review and Test 3/29/2023. The description part of the video has lots of links to different tests/tutorials.
- The first boot of Batocera may take 5-10 minutes.
- We can use any file manager and go to the IP of Orange Pi running Batocera. From there we may copy bios/roms to Batocera (batocera/share/{bios,roms}).
Armbian
- Orange Pi 5 Plus review with Armbian (4k) 12/13/2023
- How to build armbian
- Use 'Disks' utility to write an image to SD card
- Setting - Audio - 'Analog Output - HDMI0 Audio'. For some reason, this does not work. But after I inserted a USB audio adapter, that adapter worked right away and for some reason from now on the audio from HDMI0 works. Note in Armbian, the HDMI audio options are HDMI0 and HDMI1. HDMI0 is located between HDMI1 and HDMI-in on the board. The setting will be lost after we reboot Armbian.
- Game testing
- box64 was used to run x86_64 Linux programs (such as games) on non-x86_64 Linux systems, like ARM. H-craft, Colin McRae Rally, GTA3.
- wine, TrackMania Nations Forever
- RetroPie/emulationstation
Ubuntu by Joshua Riek
https://github.com/Joshua-Riek/ubuntu-rockchip/releases.
JELOS
- https://jelos.org/devices/orange-pi/orange-pi-5/. But after I burned the image, the SD card (label as 'STORAGE') is EMPTY??
- Orange Pi 5: JELOS Basic Tutorial Ace1000ks1975, 4/12/2023
Windows
- WoR: Windows on R
- ARM Windows 11 on RK3588 SBC (Orange Pi 5)
- How to install Windows 11 on a Raspberry Pi 5
UEFI
LLM
Resources
- GPU-Accelerated LLM on a $100 Orange Pi. Orange Pi 5 Plus running Llama-2-7B at 3.5 tok/sec.
- Oobabooga webui, Phi-2, and Mistral on Raspberry Pi 5, Orange Pi 5 Plus, and Jetson Orin Nano
- How I used the NPU on my Orange Pi 5 Pro to run LLMs
- LLM Performance Test Between Raspberry Pi 5 and Orange Pi 5 and the video.
- https://github.com/Pelochus/ezrknn-llm
- npu (rknn-llm sdk) is faster than cpu.
- LLM inference is largely I/O bound, so any boost in speed from storage helps a lot.
- Check Rockchip NPU Usage on Linux. Orange Pi 5 Plus has NPU up to 6Tops of computing power.
- (Video) How to Install the C01zaut WebUI for running LLM's on the RK3588 NPU
My experience (my device is 8GB RAM Orange Pi 5+). I cannot test models that work on 3588 devices with 16GB or larger memory. 2024/12/25.
- Install Ubuntu 24.04 image to ensure rknpu is new (0.9.6). We can check rknpu version later by using sudo cat /sys/kernel/debug/rknpu/version or sudo dmesg | grep "rknpu 0."
- However the python version is 3.12 on Ubuntu 24.04. The instruction on ezrknn-llm repository said it works only on Python 3.8 and 3.10.
sudo apt update && sudo apt upgrade sudo add-apt-repository ppa:deadsnakes/ppa -y sudo apt update sudo apt install python3.10 python3.10-venv cmake build-essential python3.10 -m venv ezrknn-llm # this will create ezrknn-llm directory source ezrknn-llm/bin/activate # Run the commands in the next step deactivate
- Go to https://github.com/Pelochus/ezrknn-llm?tab=readme-ov-file to download v1.0.1 source file
tar xzvf ezrknn-llm-1.0.1.tar.gz cd ezrknn-llm-1.0.1 sudo bash install.sh which rkllm # should be in /usr/bin directory
- Go to https://huggingface.co/jxke/qwen-chat-1_8B_rkllm 2.16 GB and click on 'Files' and download RKLLM format file based on runtime 1.0.1. Another choices are https://huggingface.co/Pelochus/ezrkllm-collection. We need to click each Links and check if the RKLLM runtime is 1.0.1. For example Gemma 2B and Phi-3 mini are using RKLLM runtime 1.0.1.
- According to https://docs.radxa.com/en/rock5/rock5c/app-development/rkllm_usage, we shall run the command ulimit -n 102400 first. Note that we don't need to in the python virtual environment to run the rkllm command.
ulimit -n 102400 rkllm qwen-chat-1_8B.rkllm
- Go to https://huggingface.co/jxke. Download models for rkllm runtime 1.0.1. For example, https://huggingface.co/jxke/chatglm3-6b-rkllm/tree/main file size is 6.52GB and https://huggingface.co/jxke/Qwen1.5-4B-chat-rkllm/tree/main file size is 4.35 GB.
- Very small CPU activity (core usage is 10-20%, not any core reached 50%) when I chat with any models.
- My summary of tested models, RAM (Ubuntu 24.04 desktop), and the response if I asked the latest R version. Note the answers are random.
Model RAM Latest R qwen-chat-1_8B (alibaba) 3.44GB 3.6.3 Qwen1.5-4B-Chat (alibaba) 5.79GB 4.1.2 qwen2-1.8B-rk3588.rkllm 3.68GB 4.0.2 chatglm3-6b (Tsinghua) 7.27GB 4.1.0 gemma-2b-it (google) 5.56GB 4.0 phi-3-mini-4k-rk3588 (microsoft) 4.94GB 4.1.2 (<|user_end|><|assistant|><|im_start|> ) tinyllama-v1.0-1.1B-rk3588.rkllm 2.45GB 4.1.0 Tips