Difference between revisions of "RockpiE/Debian"
RadxaYuntian (Talk | contribs) |
|||
(20 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
{{Languages|rockpiE/Debian}} | {{Languages|rockpiE/Debian}} | ||
− | [[rockpiE | ROCK Pi E]] > [[ | + | [[rockpiE | ROCK Pi E]] > [[rockpiE/Debian | Debian]] |
__TOC__ | __TOC__ | ||
Line 11: | Line 11: | ||
=== Introduction to ROCK Pi E Debian === | === Introduction to ROCK Pi E Debian === | ||
− | ROCK Pi E Debian is an easy to use desktop system. While working with ROCK Pi E Debian, you will find it do well on playing music, playing video, Internet, | + | ROCK Pi E Debian is an easy to use desktop system. While working with ROCK Pi E Debian, you will find it do well on playing music, playing video, Internet, BT and so on. |
ROCK Pi E Debian uses '''systemd''' to manage system. | ROCK Pi E Debian uses '''systemd''' to manage system. | ||
− | Here Need | + | Here Need one '''USB to TTL serial cable'''. Or use '''SSH'''. |
=== Debian Default User Account === | === Debian Default User Account === | ||
Line 31: | Line 31: | ||
$ sudo apt-get update | $ sudo apt-get update | ||
$ sudo apt-get install -y rockchip-overlay | $ sudo apt-get install -y rockchip-overlay | ||
− | $ sudo apt-get install -y linux-4.4-latest | + | $ sudo apt-get install -y linux-4.4-rockpie-latest |
=== Install xfce4 desktop === | === Install xfce4 desktop === | ||
Line 76: | Line 76: | ||
* Test WIFI perpormance by tool iperf. | * Test WIFI perpormance by tool iperf. | ||
+ | |||
+ | === BT === | ||
+ | |||
+ | To gain a stronger signal, you need an antenna attached to the antenna socket on board. | ||
+ | |||
+ | Update necessary packages | ||
+ | |||
+ | $ sudo apt-get update | ||
+ | $ sudp apt-get install -y rockchip-overlay | ||
+ | $ sudo apt-get install -y linux-4.4-rockpie-latest # kernel version(>=4.4.194-7-rockchip) | ||
+ | $ sudo apt-get install -y realtek-bt-firmware bluez | ||
+ | |||
+ | Check BT service | ||
+ | |||
+ | $ systemctl status bluetooth | ||
+ | |||
+ | Run BT service if the BT service is inactive. | ||
+ | |||
+ | $ systemctl start bluetooth | ||
+ | |||
+ | Start realtek-btfw-load service | ||
+ | |||
+ | $ systemctl start realtek-btfw-load | ||
+ | |||
+ | Check BT device | ||
+ | |||
+ | $ hciconfig | ||
+ | hci0: Type: Primary Bus: USB | ||
+ | BD Address: 74:EE:2A:55:23:F7 ACL MTU: 1021:8 SCO MTU: 255:12 | ||
+ | UP RUNNING | ||
+ | RX bytes:40357 acl:34 sco:0 events:814 errors:0 | ||
+ | TX bytes:216782 acl:379 sco:0 commands:101 errors:0 | ||
+ | |||
+ | Example: Connect to BT Speaker. | ||
+ | |||
+ | Change to root mode. | ||
+ | |||
+ | $ sudo su | ||
+ | |||
+ | Install pulseaudio packages | ||
+ | |||
+ | # apt-get install -y pulseaudio-module-bluetooth pulseaudio | ||
+ | |||
+ | Run pulseaudio | ||
+ | |||
+ | # 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. | ||
+ | |||
+ | === <span id="common_hardware_interface">Common Hardware Interfaces, I2C, SPI, UART, etc</span> === | ||
+ | |||
+ | The ROCK Pi E system images use /boot/uEnv.txt to configure hardware interfaces. | ||
+ | |||
+ | 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 | Device Tree Overlays]]. | ||
+ | |||
+ | ==== I2C ==== | ||
+ | |||
+ | To enable I2C-1 (/dev/i2c-1), add item "rk3328-i2c1" to the "overlays=" line. | ||
+ | |||
+ | overlays=rk3328-i2c1 | ||
+ | |||
+ | ==== SPI ==== | ||
+ | |||
+ | To enable SPI0, add item "rk3328-spi-spidev" to the "overlays=" line. | ||
+ | |||
+ | overlays=rk3328-spi-spidev | ||
+ | param_spidev_spi_bus=0 | ||
+ | param_spidev_spi_cs=0 | ||
+ | param_spidev_max_freq=10000000 | ||
+ | |||
+ | ==== UART ==== | ||
+ | |||
+ | The debugger console baud rate options: 1500000n8 and 115200n8. | ||
+ | |||
+ | To set ttyS1 as debugger console, add item "rk3328-uart1" to the "overlays=" line. Also need to set console value. | ||
+ | |||
+ | console=ttyS1,1500000n8 | ||
+ | overlays=rk3328-uart1 | ||
+ | |||
+ | To set ttyS2 as debugger console, add item "rk3328-uart2" to the "overlays=" line. Also need to set console value. | ||
+ | |||
+ | console=ttyS2,1500000n8 | ||
+ | overlays=rk3328-uart2 | ||
+ | |||
+ | To set ttyS1 as common serial communication, add item "rk3328-uart1" to the "overlays=" line. The device /dev/ttyS1 is available. | ||
+ | |||
+ | overlays=rk3328-uart1 | ||
+ | |||
+ | To set ttyS2 as common serial communication, add item "rk3328-uart2" to the "overlays=" line. The device /dev/ttyS2 is available. | ||
+ | |||
+ | overlays=rk3328-uart2 | ||
+ | |||
+ | ===== Example for UART communication ===== | ||
+ | |||
+ | Step one. Hardware connection. | ||
+ | |||
+ | UART1_TXD <---> UART2_RXD | ||
+ | UART1_RXD <---> UART2_TXD | ||
+ | |||
+ | Step two. Use ssh to access ROCK Pi E. | ||
+ | |||
+ | Step three. Enable UART1 and UART2 via adding the following line to file /boot/uEnv.txt. | ||
+ | |||
+ | overlays=rk3328-uart1 rk3328-uart2 | ||
+ | |||
+ | Also disable console via removing the following line in file /boot/uEnv.txt. | ||
+ | |||
+ | console=ttyS2,1500000n8 | ||
+ | |||
+ | Step four. Reboot the device. | ||
+ | |||
+ | Step five. Use ssh to access ROCK Pi E. Set up SSH terminal one and two. | ||
+ | |||
+ | In terminal one. | ||
+ | |||
+ | $ sudo su | ||
+ | # stty -F /dev/ttyS1 9600 | ||
+ | # cat /dev/ttyS1 | ||
+ | |||
+ | In terminal two. | ||
+ | |||
+ | $ sudo su | ||
+ | # stty -F /dev/ttyS2 9600 | ||
+ | # echo "hello rock pi e" > /dev/ttyS2 | ||
+ | |||
+ | In terminal one, we would see the following string. | ||
+ | |||
+ | hello rock pi e | ||
=== Changelogs === | === Changelogs === | ||
+ | |||
+ | ==== 2021.01.26 ==== | ||
+ | |||
+ | '''rockpie_debian_buster_server_arm64_20210126_0056-gpt.img''' | ||
+ | |||
+ | * Kernel version: 4.4.194-17-rockchip-g07288d4ebac7 | ||
+ | * U-Boot version: 2019.10-11661-g46695f4700 | ||
+ | |||
+ | ==== 2020.07.17 ==== | ||
+ | |||
+ | '''rockpie_debian_buster_minimal_arm64_20200717_0219-gpt.img''' | ||
+ | |||
+ | * Rename Wi-Fi interface to wlan0 | ||
+ | |||
+ | ==== 2020.06.16 ==== | ||
+ | |||
+ | '''rockpie_debian_buster_minimal_arm64_20200615_1232-gpt.img''' | ||
+ | |||
+ | * Fix the issue of failing to find root device. System boot log may show like this. | ||
+ | |||
+ | [ 3.345451] RAMDISK: incomplete write (3154 != 27844) | ||
+ | [ 3.345455] write error | ||
+ | [ 3.345526] Waiting for root device UUID=f19f09a0-c5b2-4753-853b-584c9e6c27c6... | ||
+ | |||
+ | * Update rockchip-overlay package | ||
+ | |||
+ | ==== 2020.05.28 ==== | ||
+ | |||
+ | '''rockpie_debian_buster_minimal_arm64_20200528_0716-gpt.img''' | ||
+ | |||
+ | * Kernel version: 4.4.194-12-rockchip-g615ae7431150 | ||
+ | |||
+ | ==== 2020.03.16 ==== | ||
+ | |||
+ | '''rockpie_debian_buster_minimal_arm64_20200315_1132-gpt.img''' | ||
+ | |||
+ | * Automatically load Bluetooth firmware after system startup. | ||
+ | * Available for at least 256 MB DDR SDRAM | ||
+ | * Default non-root user: rock (password: rock) | ||
+ | * Default serial console: UART2 | ||
+ | * Hostname: rockpie | ||
+ | * Kernel version: 4.4.194-8-rockchip-g2a05ddc265cf | ||
+ | * Resize root filesystem to fit available disk space for the first boot | ||
+ | * System partitions: boot and rootfs | ||
+ | * Support SSH by default. | ||
+ | * Support uEnv and boot.scr | ||
+ | * The version of systemd: 241 | ||
+ | * U-boot version: 2019.10-11661-g46695f4700 |
Latest revision as of 03:32, 29 September 2022
ROCK Pi E > Debian
Contents
Work with ROCK Pi E Debian
Introduction to ROCK Pi E Debian
ROCK Pi E Debian is an easy to use desktop system. While working with ROCK Pi E Debian, you will find it do well on playing music, playing video, Internet, BT and so on.
ROCK Pi E Debian uses systemd to manage system.
Here Need one USB to TTL serial cable. Or use SSH.
Debian Default User Account
Non-root User:
User Name : rock Password : rock
Install and 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-rockpie-latest
Install xfce4 desktop
$ sudo apt-get install -y xfce4 $ sudo apt-get install -y xfce4-goodies task-xfce-desktop lightdm dialog tango-icon-theme
Network Connection
There are two methods for network connection. One is Ethernet and the other is WIFI.
Ethernet Connection
ROCK Pi E provides dual ethernets. You can use two network cables at the same time to connect your ROCK Pi E to the network. The ROCK Pi E 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 two network cards, eth0 and eth1, and the Ethernet IP address. Also, use tool, ping, to connect to a normal domain.
$ ifconfig $ ping -I eth0 www.baidu.com $ ping -I eth1 www.baidu.com
WIFI Connection
When there is not a network cable for your ROCK Pi E the WIFI connection is another good choice. ROCK Pi E 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
To gain a stronger signal, you need an antenna attached to the antenna socket on board.
Update necessary packages
$ sudo apt-get update $ sudp apt-get install -y rockchip-overlay $ sudo apt-get install -y linux-4.4-rockpie-latest # kernel version(>=4.4.194-7-rockchip) $ sudo apt-get install -y realtek-bt-firmware bluez
Check BT service
$ systemctl status bluetooth
Run BT service if the BT service is inactive.
$ systemctl start bluetooth
Start realtek-btfw-load service
$ systemctl start realtek-btfw-load
Check BT device
$ hciconfig hci0: Type: Primary Bus: USB BD Address: 74:EE:2A:55:23:F7 ACL MTU: 1021:8 SCO MTU: 255:12 UP RUNNING RX bytes:40357 acl:34 sco:0 events:814 errors:0 TX bytes:216782 acl:379 sco:0 commands:101 errors:0
Example: Connect to BT Speaker.
Change to root mode.
$ sudo su
Install pulseaudio packages
# apt-get install -y pulseaudio-module-bluetooth pulseaudio
Run pulseaudio
# 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.
Common Hardware Interfaces, I2C, SPI, UART, etc
The ROCK Pi E system images use /boot/uEnv.txt to configure hardware interfaces.
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.
I2C
To enable I2C-1 (/dev/i2c-1), add item "rk3328-i2c1" to the "overlays=" line.
overlays=rk3328-i2c1
SPI
To enable SPI0, add item "rk3328-spi-spidev" to the "overlays=" line.
overlays=rk3328-spi-spidev param_spidev_spi_bus=0 param_spidev_spi_cs=0 param_spidev_max_freq=10000000
UART
The debugger console baud rate options: 1500000n8 and 115200n8.
To set ttyS1 as debugger console, add item "rk3328-uart1" to the "overlays=" line. Also need to set console value.
console=ttyS1,1500000n8 overlays=rk3328-uart1
To set ttyS2 as debugger console, add item "rk3328-uart2" to the "overlays=" line. Also need to set console value.
console=ttyS2,1500000n8 overlays=rk3328-uart2
To set ttyS1 as common serial communication, add item "rk3328-uart1" to the "overlays=" line. The device /dev/ttyS1 is available.
overlays=rk3328-uart1
To set ttyS2 as common serial communication, add item "rk3328-uart2" to the "overlays=" line. The device /dev/ttyS2 is available.
overlays=rk3328-uart2
Example for UART communication
Step one. Hardware connection.
UART1_TXD <---> UART2_RXD UART1_RXD <---> UART2_TXD
Step two. Use ssh to access ROCK Pi E.
Step three. Enable UART1 and UART2 via adding the following line to file /boot/uEnv.txt.
overlays=rk3328-uart1 rk3328-uart2
Also disable console via removing the following line in file /boot/uEnv.txt.
console=ttyS2,1500000n8
Step four. Reboot the device.
Step five. Use ssh to access ROCK Pi E. Set up SSH terminal one and two.
In terminal one.
$ sudo su # stty -F /dev/ttyS1 9600 # cat /dev/ttyS1
In terminal two.
$ sudo su # stty -F /dev/ttyS2 9600 # echo "hello rock pi e" > /dev/ttyS2
In terminal one, we would see the following string.
hello rock pi e
Changelogs
2021.01.26
rockpie_debian_buster_server_arm64_20210126_0056-gpt.img
- Kernel version: 4.4.194-17-rockchip-g07288d4ebac7
- U-Boot version: 2019.10-11661-g46695f4700
2020.07.17
rockpie_debian_buster_minimal_arm64_20200717_0219-gpt.img
- Rename Wi-Fi interface to wlan0
2020.06.16
rockpie_debian_buster_minimal_arm64_20200615_1232-gpt.img
- Fix the issue of failing to find root device. System boot log may show like this.
[ 3.345451] RAMDISK: incomplete write (3154 != 27844) [ 3.345455] write error [ 3.345526] Waiting for root device UUID=f19f09a0-c5b2-4753-853b-584c9e6c27c6...
- Update rockchip-overlay package
2020.05.28
rockpie_debian_buster_minimal_arm64_20200528_0716-gpt.img
- Kernel version: 4.4.194-12-rockchip-g615ae7431150
2020.03.16
rockpie_debian_buster_minimal_arm64_20200315_1132-gpt.img
- Automatically load Bluetooth firmware after system startup.
- Available for at least 256 MB DDR SDRAM
- Default non-root user: rock (password: rock)
- Default serial console: UART2
- Hostname: rockpie
- Kernel version: 4.4.194-8-rockchip-g2a05ddc265cf
- Resize root filesystem to fit available disk space for the first boot
- System partitions: boot and rootfs
- Support SSH by default.
- Support uEnv and boot.scr
- The version of systemd: 241
- U-boot version: 2019.10-11661-g46695f4700