Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rock5/guide/radxa-debian"

< Rock5‎ | guide
Line 47: Line 47:
 
  Password  : rock
 
  Password  : rock
  
=== Root mode ===
+
=== Switch to root user ===
  
 
rock is sudo user and switch to root can be done with the following command as user rock:
 
rock is sudo user and switch to root can be done with the following command as user rock:
Line 67: Line 67:
 
  passwd: password updated successfully
 
  passwd: password updated successfully
 
  root@rock-5b:/home/rock#
 
  root@rock-5b:/home/rock#
 
=== Build ===
 
 
{| class="wikitable"
 
|-
 
! XFCE4 Desktop
 
|-
 
| * ROCK 5B
 
|}
 
  
 
=== Partition table ===
 
=== Partition table ===
Line 97: Line 88:
 
  dd if=boot.img        of=/dev/sdx seek=32768  
 
  dd if=boot.img        of=/dev/sdx seek=32768  
 
  dd if=rootfs.img      of=/dev/sdx seek=1081344
 
  dd if=rootfs.img      of=/dev/sdx seek=1081344
 
=== Radxa APT ===
 
 
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/bullseye-testing/ bullseye 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/bullseye-stable/ bullseye main
 
deb http://apt.radxa.com/bullseye-testing/ bullseye 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 [[rock5/linux/radxa-apt | Radxa APT]].
 
 
=== Upgrade necessary packages ===
 
 
Here is the example of upgrading rockchip-overlay and kernel packages.
 
 
$ sudo apt-get update -y && sudo apt-get install -y rockchip-overlay
 
 
 
 
  
 
=== LED ===
 
=== LED ===
Line 136: Line 99:
  
 
             <div class="tab-pane active" id="5b-ethernet">
 
             <div class="tab-pane active" id="5b-ethernet">
=== 5B LED ===
+
==== 5B LED ====
 
On the rock5,  one LED is configured as LED class device.
 
On the rock5,  one LED is configured as LED class device.
  
Line 152: Line 115:
 
  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-  
 
  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
 
  on] transient flash torch panic netdev
 
 
 
 
             </div> <!--  id="5b-leds" end-->
 
             </div> <!--  id="5b-leds" end-->
 
         </div>
 
         </div>
  
 
+
=== RTC Device ===
=== Test RTC Device ===
+
 
ROCK 5B is equipped with one RTC IC hym8563.  
 
ROCK 5B is equipped with one RTC IC hym8563.  
  
Line 186: Line 145:
 
  Wed Jun 22 10:17:01 CST 2022
 
  Wed Jun 22 10:17:01 CST 2022
  
=== FAN test ===
+
=== FAN ===
 
Control PWM Fan
 
Control PWM Fan
 
There is one  PWM Fan header on ROCK 5B.
 
There is one  PWM Fan header on ROCK 5B.
Line 228: Line 187:
  
 
             <div class="tab-pane active" id="5b-ethernet">
 
             <div class="tab-pane active" id="5b-ethernet">
=== 5B Ethernet ===
+
==== 5B Ethernet ====
  
 
ROCK 5B is equipped with one 2.5G Ethernet port.
 
ROCK 5B is equipped with one 2.5G Ethernet port.
Line 234: Line 193:
 
The ROCK 5B will automatically configure the network for your surfing on the Internet.
 
The ROCK 5B will automatically configure the network for your surfing on the Internet.
  
Ethernet throughput test result table.
+
===== Manually configure Ethernet =====
 
+
{| class="wikitable" border="1"
+
|-
+
! Direction
+
! Bitrate
+
|-
+
| Upstream
+
| 2.34 Gbits/sec
+
|-
+
| Downstream
+
| 2.35 Gbits/sec
+
|}
+
 
+
===== To test the Ethernet, we need to follow the steps: =====
+
  
 
* Switch to super user mode by command
 
* Switch to super user mode by command
Line 273: Line 218:
 
* NVME M.2 SDD:  /dev/nvme0n1
 
* NVME M.2 SDD:  /dev/nvme0n1
  
==== Test microSD card ====
+
=== Benchmark ===
 +
 
 +
==== Ethernet ====
 +
 
 +
Ethernet throughput test result table.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Direction
 +
! Bitrate
 +
|-
 +
| Upstream
 +
| 2.34 Gbits/sec
 +
|-
 +
| Downstream
 +
| 2.35 Gbits/sec
 +
|}
 +
 
 +
==== SD card ====
  
 
This is the test result of 128GB Sandisk card on ROCK 5B.
 
This is the test result of 128GB Sandisk card on ROCK 5B.
Line 289: Line 252:
 
|}
 
|}
  
=== Device Serial Number ===
+
=== Acceries Configuration ===
 +
 
 +
==== HDMI 8K ====
 +
 
 +
==== Radxa Display 8HD ====
 +
 
 +
==== Radxa Camera 4K ====
 +
 
 +
==== Radxa Wireless Module A8 ====
 +
 
 +
==== Wireless Module Intel AX210 ====
 +
 
 +
=== OS ===
 +
 
 +
==== Device Serial Number ====
  
 
<pre>
 
<pre>
Line 296: Line 273:
 
</pre>
 
</pre>
  
=== Hardware Configuration ===
+
==== System update ====
 +
 
 +
===== Radxa APT =====
 +
 
 +
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/bullseye-testing/ bullseye 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/bullseye-stable/ bullseye main
 +
deb http://apt.radxa.com/bullseye-testing/ bullseye 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 [[rock5/linux/radxa-apt | Radxa APT]].
  
=== Display Power Management ===
+
==== Display Power Management ====
  
 
Add the following lines to file /etc/X11/xorg.conf.d/10-monitor.conf
 
Add the following lines to file /etc/X11/xorg.conf.d/10-monitor.conf
Line 310: Line 306:
 
EndSection
 
EndSection
 
</pre>
 
</pre>
=== Changelog ===
 

Revision as of 13:08, 23 September 2022

    ROCK 5 >  Guide >  How to use Debian

Introduction to ROCK 5 Debian

This guide is available for official ROCK 5 Debian images.

ROCK 5 Debian is an easy to use desktop system. While working with ROCK 5 Debian, you will find it do well on playing music, Internet, Bluetooth, AI and so on.

ROCK 5 Debian 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.

List of boards supported

  • ROCK 5B

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

Non-root User:

User Name : rock
Password  : rock

Switch to root user

rock is sudo user and switch to root can be done with the following command as user rock:

sudo su

For example:

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#

Partition table

Part Number Offset Name Description
(raw) 32KB loader1 First stage loader
(raw) 8MB loader2 U-boot image
1 16MB boot Kernel partition, bootable
2 528MB rootfs Rootfs

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

LED

5B LED

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

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

FAN

Control PWM Fan There is one PWM Fan header on ROCK 5B.

To control it, try the following codes:

root@rock-5b:/home/rock# ls /sys/devices/platform/fd8b0010.pwm/
driver	driver_override  modalias  of_node  power  pwm	subsystem  supplier:platform:pinctrl  uevent
root@rock-5b:/home/rock# echo 0 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip1/export 
root@rock-5b:/home/rock# echo 10000 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip1/pwm0/period 
root@rock-5b:/home/rock# echo 5000 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip1/pwm0/duty_cycle 
root@rock-5b:/home/rock# echo normal > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip1/pwm0/polarity 
root@rock-5b:/home/rock#  echo 1 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip1/pwm0/enable   //  Turn on fan
root@rock-5b:/home/rock#  echo 0 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip1/pwm0/enable   //Turn off fan

use the bash script to Set PWM period, duty_cycle, polarity and enable with root permission

#! /bin/bash
echo 0 > /sys/class/pwm/pwmchip1/export
sleep 0.2
echo 40000 > /sys/class/pwm/pwmchip1/pwm0/period
sleep 0.2 
echo 40000 > /sys/class/pwm/pwmchip1/pwm0/duty_cycle
sleep 0.2
echo normal >  /sys/class/pwm/pwmchip1/pwm0/polarity
sleep 0.2
echo 1 > /sys/class/pwm/pwmchip1/pwm0/enable
sleep 0.2

turn off the fan

root@rock-5b:/home/rock# echo 0 > /sys/class/pwm/pwmchip1/pwm0/enable

Ethernet

5B Ethernet

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.

Manually configure Ethernet
  • 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.baidu.com
  • If failed to connect to a normal domain. , try
$ sudo dhclient eth0
or
$ sudo dhclient enP4p65s0

Storage device

  • microSD card: /dev/mmcblk0
  • eMMC: /dev/mmcblk1
  • NVME M.2 SDD: /dev/nvme0n1

Benchmark

Ethernet

Ethernet throughput test result table.

Direction Bitrate
Upstream 2.34 Gbits/sec
Downstream 2.35 Gbits/sec

SD card

This is the test result of 128GB Sandisk card on ROCK 5B.

Operation Speed
Read 87.9MB/s
Write 66.3MB/s

Acceries Configuration

HDMI 8K

Radxa Display 8HD

Radxa Camera 4K

Radxa Wireless Module A8

Wireless Module Intel AX210

OS

Device Serial Number

root@rock-5b:~# cat /proc/cpuinfo | grep Serial
Serial		: 099b83b055b47b27

System update

Radxa APT

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/bullseye-testing/ bullseye 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/bullseye-stable/ bullseye main
deb http://apt.radxa.com/bullseye-testing/ bullseye 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.

Display Power Management

Add the following lines to file /etc/X11/xorg.conf.d/10-monitor.conf

Section "ServerLayout"
    Option "BlankTime" "0" # Disable blank Screen
    Option "StandbyTime" "0" # Disable standby
    Option "SuspendTime" "0" # Disable syspend
    Option "OffTime" "0"
EndSection