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

Difference between revisions of "Rock5/linux/ubuntu"

< Rock5‎ | linux
 
(4 intermediate revisions by one other user not shown)
Line 13: Line 13:
 
This guide is available for official ROCK 5 (ROCK 5B, etc) Ubuntu images.
 
This guide is available for official ROCK 5 (ROCK 5B, etc) Ubuntu images.
  
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, Bluetooth, AI and so on.
+
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.
 
ROCK 5 Ubuntu server uses '''systemd''' to manage system.
Line 25: Line 25:
 
=== Access from the Host PC/Laptop ===
 
=== Access from the Host PC/Laptop ===
  
==== Option 1: Serial console ====
+
==== Option 1: HDMI monitor and Mouse ====
 +
 
 +
You would see Desktop on HDMI monitor.
 +
 
 +
==== Option 2: Serial console ====
  
 
See [[rock5/dev/serial-console | Serial Console]]
 
See [[rock5/dev/serial-console | Serial Console]]
  
==== Option 2: SSH ====
+
==== Option 3: SSH ====
  
 
SSH server  is enabled on port 22 of ROCK 5 default image.  
 
SSH server  is enabled on port 22 of ROCK 5 default image.  
Line 38: Line 42:
 
  $ ssh rock@ip-of-device
 
  $ ssh rock@ip-of-device
  
=== Debian Default User Account ===
+
=== Default User Account ===
  
 
Non-root User:
 
Non-root User:
Line 44: Line 48:
 
  User Name : rock
 
  User Name : rock
 
  Password  : rock
 
  Password  : rock
 +
 +
=== Root mode ===
 +
 +
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 ===
 +
 +
{| class="wikitable"
 +
! 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
  
 
=== Radxa APT ===
 
=== Radxa APT ===

Latest revision as of 03:38, 29 September 2022

    ROCK 5 >  Working With Linux >  ubuntu

Work with ROCK 5 Ubuntu

Introduction to ROCK 5 Ubuntu

This guide is available for official ROCK 5 (ROCK 5B, etc) Ubuntu images.

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.

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

Root mode

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

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

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.

Ethernet throughput test result table.

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

  • uSD Card: /dev/mmcblk0
  • eMMC: /dev/mmcblk1
  • NVME M.2 SDD: /dev/nvme0n1

Changelog