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

RockpiS/Debian

< RockpiS
Revision as of 03:27, 29 September 2022 by RadxaYuntian (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
    ROCK Pi S >  Debian

Work with ROCK Pi S Debian

Introduction to ROCK Pi S Debian

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

ROCK Pi S Debian uses systemd to manage system.

Access from the Host PC/Laptop

Option 1: USB access(adb)

By default, the ROCK Pi S Linux image enables adbd services, which is a debug bridge from Android now ported on Linux. With one USB A to C cable you can power and access the board, very handy.

To use adb, you need to install adb tool on the PC/Laptop. Check instructions for Windows and Linux.

After you have adb installed successfully, run the following command on console to login the shell of ROCK Pi S:

   adb shell

Check Using adb.

Option 2: Serial console

Check Serial Console

Option 3: SSH

SSH server is enabled on port 22 of ROCK Pi S default image.

Check SSH page for details.

Note: You can also get the IP of ROCK Pi S from option 1 or option 2 if you can not access network administrator page.

Default user account

Non-root User:

   User Name : rock
   Password  : rock

Update necessary packages

Add Radxa APT, see Radxa APT.

Install packages:

 $ sudo apt-get update
 $ sudo apt-get install -y rockchip-overlay
 $ sudo apt-get install -y linux-4.4-rockpis-latest rockpis-dtbo
 $ sudo apt-get install -y rtl8723ds-firmware rockchip-adb resize-assistant
 $ sudo apt-get install -y rockpis-dtbo # For those ROCK Pi S system images released before March 1st, 2020

Network Connection

There are two methods for network connection. One is Ethernet and the other is WIFI.

Ethernet Connection

You can use a network cable (one end connected to the external network port or route) to connect your ROCK Pi S to the network. The ROCK Pi S will automatically configure the network for your surfing on the Internet.

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, 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

WIFI Connection

When there is not a network cable for your ROCK Pi S the WIFI connection is another good choice. ROCK Pi S supports 2.4G WIFI wireless network.

To test the WIFI performance, we need to follow the steps:
  • Switch to super user mode
 $ sudo su
  • Open the WIFI
 $ nmcli r wifi on
  • Scan WIFI
 $ nmcli dev wifi
  • Connect to WIFI network
 $ nmcli dev wifi connect "wifi_name" password "wifi_password"
  • Test WIFI perpormance by tool iperf.

BT

Update necessary packages.

 root@rockpis:~# apt-get update
 root@rockpis:~# apt-get install -y rockchip-overlay
 root@rockpis:~# apt-get install -y linux-4.4-rockpis-latest # kernel version(>=4.4.143.27)
 root@rockpis:~# apt-get install -y rtl8723ds-firmware # rtl8723ds-firmware(>=0.5)
 root@rockpis:~# apt-get install bluez

Check BT service.

 root@rockpis:~# systemctl status bluetooth

Run BT service if the BT service is inactive.

 root@rockpis:~# systemctl start bluetooth

Check BT device.

 root@rockpis:~# hciconfig
 hci0:   Type: Primary  Bus: UART
         BD Address: 22:22:70:B2:10:6F  ACL MTU: 1021:8  SCO MTU: 255:12
         UP RUNNING 
         RX bytes:1399 acl:0 sco:0 events:45 errors:0
         TX bytes:3458 acl:0 sco:0 commands:45 errors:0

Specify the BT MAC address and reboot ROCK Pi S.

 root@rockpis:~# cat /opt/bdaddr 
 22:22:0B:93:80:AB

Make The ROCK Pi S BT discoverable.

 root@rockpis:~# hciconfig hci0 piscan

To change BT name, just need to change the ROCK Pi S hostname and reboot ROCK Pi S.

 root@rockpis:~# cat /etc/hostname 
 rockpis

View more details about BT adapter.

 root@rockpis:~# hciconfig -a
 hci0:   Type: Primary  Bus: UART
         BD Address: 22:22:0B:93:80:AB  ACL MTU: 1021:8  SCO MTU: 255:12
         UP RUNNING PSCAN ISCAN 
         RX bytes:2698 acl:0 sco:0 events:57 errors:0
         TX bytes:3261 acl:0 sco:0 commands:61 errors:0
         Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87
         Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
         Link policy: RSWITCH HOLD SNIFF PARK 
         Link mode: SLAVE ACCEPT 
         Name: 'rockpis'
         Class: 0x000000
         Service Classes: Unspecified
         Device Class: Miscellaneous, 
         HCI Version: 4.1 (0x7)  Revision: 0xaa7b
         LMP Version: 4.1 (0x7)  Subversion: 0x5645
         Manufacturer: Realtek Semiconductor Corporation (93)

Example: Connect to BT Speaker.

Install pulseaudio packages.

 root@rockpis:~# apt-get install -y pulseaudio-module-bluetooth pulseaudio

Run pulseaudio.

 root@rockpis:~# pulseaudio --start

Connect using bluetoothctl.

 # bluetoothctl
 [bluetooth]# default-agent 
 [bluetooth]# power on
 [bluetooth]# scan on
 [bluetooth]# trust 77:EC:79:4F:6B:AC
 [bluetooth]# pair 77:EC:79:4F:6B:AC
 [bluetooth]# connect 77:EC:79:4F:6B:AC

Play songs and enjoy it.

Resize root filesystem to fit available disk space

Execute command resize-helper

 $ sudo /usr/sbin/resize-helper                                                                   

Type Yes

 Yes/No? Yes

Type -1M

 End?  [1010MB]?-1M

Common Hardware Interfaces, I2C, PWM, SPI, UART, etc

The ROCK Pi S system images released before March 1st, 2020 use hw_intfc.conf to configure interfaces while those which released after March 1st, 2020 use uEnv.txt. We suggest that you use the latest system images.

Warning: Remember there is only one line including item "overlays=" in file /boot/uEnv.txt.

For more details about device tree overlays, see Device Tree Overlays and ROCK Pi S Libmraa.

I2C

To enable I2C-0 (/dev/i2c-0), add item "rk3308-i2c0" to the "overlays=" line.

 overlays=rk3308-i2c0

To enable I2C-1 (/dev/i2c-1), add item "rk3308-i2c1" to the "overlays=" line.

 overlays=rk3308-i2c1

To enable I2C-2 (/dev/i2c-2), add item "rk3308-i2c2" to the "overlays=" line.

 overlays=rk3308-i2c2

To enable I2C-2 (/dev/i2c-3), add item "rk3308-i2c3" to the "overlays=" line.

 overlays=rk3308-i2c3

PWM

To enable PWM1, add item "rk3308-pwm1" to the "overlays=" line.

 overlays=rk3308-pwm1

To enable PWM2, add item "rk3308-pwm2" to the "overlays=" line.

 overlays=rk3308-pwm2

To enable PWM3, add item "rk3308-pwm3" to the "overlays=" line.

 overlays=rk3308-pwm3

SPI

To enable SPI2, add item "rk3308-spi-spidev" to the "overlays=" line.

 overlays=rk3308-spi-spidev
 param_spidev_spi_bus=2
 param_spidev_spi_cs=0
 param_spidev_max_freq=10000000

UART

The debugger console baud rate options: 1500000n8 and 115200n8.

To disable debugger console, just need to delete "console=" line in file /boot/uEnv.txt.

To set ttyS0 as debugger console, add item "rk3308-uart0" to the "overlays=" line. Also need to set console value.

 console=ttyS0,1500000n8
 overlays=rk3308-uart0

To set ttyS1 as debugger console, add item "rk3308-uart1" to the "overlays=" line. Also need to set console value.

 console=ttyS1,1500000n8
 overlays=rk3308-uart1

To set ttyS2 as debugger console, add item "rk3308-uart2" to the "overlays=" line. Also need to set console value.

 console=ttyS2,1500000n8
 overlays=rk3308-uart2

To set ttyS0, ttyS1 and ttyS2 as common serial communication devices, add these items "rk3328-uart0", "rk3328-uart1" and "rk3328-uart2" to the "overlays=" line. The device /dev/ttyS0, /dev/ttyS1, /dev/ttyS2, are available.

 overlays=rk3308-uart0 rk3308-uart1 rk3308-uart2

USB

USB port, working in host mode, enables the attachment of peripherals such U Disk, keyboards, mice, USB dongle like USB camera, etc.

USB port, working in OTG mode, supports USB gadget function including adb, USB RNDIS, USB subnet etc.

There are two USB ports on ROCK Pi S. One is Type-A port and the other is Type-C port. By default, on Debian system Type-A port is working in host mode. Type-C port is configured in OTG mode. With software configuration, Type-C port can also work in host mode.

Use USB Camera

Check ROCK Pi S Camera module.

Use USB Device Network

Check ROCK Pi S USB Device Network.

Type-C port in host mode

To configure Type-C port in host mode, add item "rk3308-usb20-host" to the "overlays=" line in file /boot/uEnv.txt.

Kernel version: >=4.4.143.51

 overlays=rk3308-usb20-host

Use Array Microphones with ROCK Pi S PoE

Display and Desktop

See ROCK Pi S Display.

Use xfce4 desktop

 $ sudo apt-get install -y xfce4
 $ sudo apt-get install -y xfce4-goodies task-xfce-desktop lightdm dialog tango-icon-theme

Power Management

With Desktop

Click the suspend button to enter suspend mode.

Without Desktop

Suspend

   # systemctl suspend

Power off

   # systemctl poweroff

Reboot

   # systemctl reboot

Storage Device

  • uSD Card: /dev/mmcblk0
  • SD Nand: /dev/mmcblk1

Boot Device Order

USB Disk -> uSD Card -> SD NAND

When you are trying to boot ROCK Pi S from USB Disk, you also need one uSD card or SD NAND on board, which include U-Boot image.

Changelogs

2021.09.24

rockpis_debian_buster_server_arm64_20210924_0412-gpt.img

  • Kernel version: 4.4.143-65-rockchip-g58431d38f8f3
  • U-Boot version: 2017.09-02389-gc93a0fc709

2020.08.10

rockpis_debian_buster_minimal_arm64_20200809_0853-gpt.img

  • Add support for booting from USB
  • Change boot order: USB -> SD Card -> SD NAND
  • Kernel version: 4.4.143-55-rockchip-g6b7accbc999b
  • U-boot version: 2017.09-02383-g233a23e3ed

2020.06.16

rockpis_debian_buster_minimal_arm64_20200615_1225-gpt.img

  • Fix the issue of failing to find root device. System boot log may show like this.
 [    1.478059] RAMDISK: gzip image found at block 0
 [    1.581744] RAMDISK: incomplete write (23864 != 32768)
 [    1.581801] write error
 [    1.581895] Waiting for root device UUID=37055840-4ec4-444f-979b-9e47ee4bd848...
  • Kernel version: 4.4.143-52-rockchip-g7ed61b60d176

2020.05.28

rockpis_debian_buster_minimal_arm64_20200528_1227-gpt.img

  • Kernel version: 4.4.143-48-rockchip-geacd15ae244f
  • Rename rockchip-adb package to rockchip-adbd.
  • U-boot version: 2017.09-02378-g6de46245e6
  • Update uEnv and boot.scr.
  • Use ttySx as debuger console instead of ttyFIQ0.

2020.03.16

rockpis_debian_buster_minimal_arm64_20200315_1123-gpt.img

  • Available for at least 256 MB DDR SDRAM
  • Kernel version: 4.4.143-39-rockchip-gdaf243b9655a
  • Support uEnv and boot.scr
  • U-boot version: 2017.09-02377-gc3d3bc84be

2019.12.19

rockpis_debian_buster_minimal_arm64_191219_0406-gpt.img

  • U-boot version: 2017.09-02370-g6d65a50f1e
  • Kernel version: 4.4.143-34-rockchip-g3c9d2019dba7
  • systemd version: 241
  • System partitions: boot and rootfs
  • Default serial console: UART0
  • Default non-root user: rock (password: rock)
  • Hostname: rockpis
  • Support adb by default.
  • Support SSH by default.
  • Resize root filesystem to fit available disk space for the first boot
  • Automatically load Bluetooth firmware after system startup.

2019.11.18

rockpis_debian_buster_minimal_arm64_191118_1217-gpt.img

  • U-boot version: 2017.09-02370-g6d65a50f1e
  • Kernel version: 4.4.143-34-rockchip-g3c9d2019dba7
  • Default serial console: UART0
  • Default non-root user: rock (password: rock)
  • Hostname: rockpis
  • Support adb by default.

2019.10.29

rockpis_debian_buster_minimal_arm64_191029_1055-gpt.img

  • U-boot version updated to 2017.09-02370-g6d65a50f1e
    • Add patch to make LAN MAC address stable based on CPUID
  • Kernel version updated to 4.4.143-28-rockchip-g8dbafd783043
  • Default serial console: UART0
  • Default non-root user: rock (password: rock)
  • Hostname: rockpis
  • Support SSH
  • Do not need to install rockchip-fstab package since /boot partition is auto mounted by systemd.


2019.08.06

rockpis_debian_stretch_minimal_arm64_190806_0115-gpt.img

  • Kernel version updated to 4.4.143-23-rockchip-g394d86b2b38b
    • Support 3.5inch waveshare model B and C LCD
  • Default serial console: UART0
  • Default non-root user: rock (password: rock)
  • Hostname: rockpis
  • Support SSH