How to use Radxa Official Ubuntu | Ubuntu server For ROCKchip | ROCK 5 Ubuntu16 August 2023
Introduction of Rock 5 Ubuntu
This project aims to give Rockchip RK3588 devices a stock Ubuntu 22.04 experience. Use an Ubuntu Server or Desktop image to get started right away in a comfortable setting. This OS especially developed for ROCK 5 SBCs.
ROCK 5 Ubuntu server is an easy to use system. While working with ROCK 5 Ubuntu Server, you will find it do well on playing music, Internet, BT, AI and so on.
ROCK 5 Ubuntu server uses systemd to manage system.
Command prepended by $ means the command may be executed by an unprivileged user. And command prepended by # means the command may be executed by an privileged user. But the symbol, $ or #, is not part of the command.
This Project is available on GitHub : https://github.com/Joshua-Riek/ubuntu-rockchip
- Package management via apt using the official Ubuntu repositories
- Receive kernel, firmware, and bootloader updates through apt
- Desktop first-run wizard for user setup and configuration
- 3D video hardware acceleration support via panfork
- Fully working GNOME desktop using wayland
- Chromium browser with smooth 4k youtube video playback
- MPV video player capable of smooth 4k video playback
- Gstreamer can be used as an alternative 4k video player from the command line
- 5.10.160 Linux kernel
- Orange Pi 5
- Orange Pi 5B
- Orange Pi 5 Plus
- Radxa ROCK 5B
- Radxa ROCK 5A
- Radxa CM5 IO
- NanoPi R6S
- NanoPi R6C
- NanoPC T6
- Mixtile Blade 3
- Indiedroid Nova
How to use Ubuntu in ROCK 5B SBC
Access from the Host PC/Laptop
Option 1: HDMI monitor and Mouse : You would see Desktop on HDMI monitor.
Option 2: Serial console: See Serial Console
Option 3: SSH
SSH server is enabled on port 22 of ROCK 5 default image.
Please use angryip to find your board IP address.
$ ping ip-of-device $ ssh rock@ip-of-device
Default User Account
User Name : rock Password : rock
rock is sudo user and switch to root can be done with the following command as user rock:
rock@rock-5b:~$ rock@rock-5b:~$ sudo su [sudo] password for rock: root@rock-5b:/home/rock#
There is no password for root user by default. You can set the password via ‘passwd root’.
root@rock-5b:/home/rock# passwd root New password: Retype new password: passwd: password updated successfully root@rock-5b:/home/rock#
|(raw)||32KB||loader1||First stage loader|
|1||16MB||boot||Kernel partition, bootable|
Offset when writing using dd
dd if=idbloader.img of=/dev/sdx seek=64 dd if=u-boot.itb of=/dev/sdx seek=16384 dd if=boot.img of=/dev/sdx seek=32768 dd if=rootfs.img of=/dev/sdx seek=1081344
Radxa APT source includes stable one and testing one. Stable source includes stable packages while testing source includes latest but maybe unstable packages.
Radxa APT stable source is added by default while testing source is not added.
You can uncomment line like “deb http://apt.radxa.com/focal-testing/ buster main” in file /etc/apt/sources.list.d/apt-radxa-com.list to add testing source.
See file /etc/apt/sources.list.d/apt-radxa-com.list
deb http://apt.radxa.com/focal-stable/ focal main deb http://apt.radxa.com/focal-testing/ focal main
After adding testing source, you need to update APT and install your needed packages.
$ sudo apt-get update
For more detail about Radxa APT, please see Radxa APT.
Upgrade necessary packages
Here is the example of upgrading rockchip-overlay and kernel packages.
$ sudo apt-get update $ sudo apt-get install -y rockchip-overlay
On the rock5, one LED is configured as LED class device.
You can control it via /sys/class/leds/
The default status of the three on board led is flash
root@rock-5b:/home/rock# echo none > /sys/class/leds/sta/trigger root@rock-5b:/home/rock# echo activity > /sys/class/leds/sta/trigger root@rock-5b:/home/rock# echo timer > /sys/class/leds/sta/trigger
You can use cat on the trigger property to list all the available values.
root@rock-5b:/home/rock# cat /sys/class/leds/sta/trigger none rfkill-any rfkill-none kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock tcpm-source-psy-4-0022-online timer oneshot disk-activity disk-read disk-write ide-disk mtd nand-disk heartbeat backlight gpio cpu cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7 mmc0 mmc2 activity [default- on] transient flash torch panic netdev
Test RTC Device
ROCK 5B is equipped with one RTC IC hym8563.
Firstly, plug in RTC battery to give power to RTC IC. Please note that we should keep the RTC battery in the RTC connector.
Plug in power adaper to power on ROCK 5B.
And confirm that the rtc hym8563 device is created.
root@rock-5b:/home/rock# dmesg | grep rtc [ 6.407133] rtc-hym8563 6-0051: rtc information is valid [ 6.412731] rtc-hym8563 6-0051: registered as rtc0 [ 6.413779] rtc-hym8563 6-0051: setting system clock to 2022-06-22T01:22:26 UTC (1655860946)
Secondly, use the following commands to set the system time and synchronize it to rtc0.
root@rock-5b:/home/rock# hwclock -r 2021-06-12 08:10:02.613381+08:00 root@rock-5b:/home/rock# date Wed Jun 22 10:06:10 CST 2022 root@rock-5b:/home/rock# hwclock -w root@rock-5b:/home/rock# hwclock -r root@rock-5b:/home/rock# poweroff
take the RTC battery off，after 10minute or longer，insert the rtc battery and power on rock5b，check whether the RTC is synchronized with the system clock
root@rock-5b:/home/rock# hwclock -r 2022-06-22 10:09:59.214788+08:00 root@rock-5b:/home/rock# date Wed Jun 22 10:17:01 CST 2022
There is one PWM Fan connector on ROCK 5B.
Execute shell script
test_fan_run.sh to turn on fan.
The content of script test_fan_run.sh is
# cat usr/local/bin/test_fan_run.sh #!/bin/bash echo "Trun on Fan" echo 0 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip*/export echo 10000 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip*/pwm0/period echo 5000 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip*/pwm0/duty_cycle echo normal > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip*/pwm0/polarity echo 1 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip*/pwm0/enable #echo 0 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip*/pwm0/enable
ROCK 5B is equipped with one 2.5G Ethernet port. You can use a network cable (one end connected to the external network port or route) to connect your ROCK 5B to the network. The ROCK 5B will automatically configure the network for your surfing on the Internet.
Ethernet throughput test result table.
To test the Ethernet, we need to follow the steps:
- Switch to super user mode by command
$ sudo su
- Check whether the Ethernet is normal by command, ifconfig, which would show us a network card, eth0 or enP4p65s0 , and the Ethernet IP address. Also, use tool, ping, to connect to a normal domain.
$ ifconfig $ ping www.google.com
- If failed to connect to a normal domain. , try
$ sudo dhclient eth0 or $ sudo dhclient enP4p65s0
- uSD Card: /dev/mmcblk0
- eMMC: /dev/mmcblk1
- NVME M.2 SDD: /dev/nvme0n1
Hi, I’m Harshvardhan Mishra. Tech enthusiast and IT professional with a B.Tech in IT, PG Diploma in IoT from CDAC, and 6 years of industry experience. Founder of HVM Smart Solutions, blending technology for real-world solutions. As a passionate technical author, I simplify complex concepts for diverse audiences. Let’s connect and explore the tech world together!
If you want to help support me on my journey, consider sharing my articles, or Buy me a Coffee!