SBC-3.5-RK3399 (C31)
This page contains the instructions to flash the eMMC/internal SSD on a SBC-3.5-RK3399 (C31) SECO board.
Hardware Requirements
-
USB type-C to USB type-A cable to connect the CN9 connector (USB-C) of the SBC-3.5-RK339 (C31) to the host PC.
-
Linux or Windows Host PC.
Linux OS
Download the necessary software from the following links:
-
Rockchip Upgrade_tool: this guide uses the official Rockchip
Upgrade_tool
package. Here you can find more info about Rockchip flashing tools, while in this github page you can find more useful info about theUpgrade_tool
usage from a third party contributor. -
Rockchip RK3399 Loader: official Rockchip
loader
for RK3399. -
The OS image file for SBC-3.5-RK3399 (C31) (in
.wic
format), e.g. the pre-compiled one provided in the Clea OS Release page.
Instructions for an empty device
These are the instructions to be followed in case the device that needs to be flashed does not either have a bootloader:
-
Connect USB type-C to USB type-A cable to the CN9 connector (USB-C) of the SBC-3.5-RK339 (C31) on one side and to the host PC on the other side.
-
Short circuit the two pins on the CN58 connector, i.e connect ADKEY_IN signal to ground.
When the key is pressed and the level of ADKEY_IN is lower than 100mV at system power-up, RK3399 enters firmware download mode. When the PC recognizes the USB device, the key is released, then the firmware can be downloaded to SOC.
- Power-On the board and check that the device is detected via
lsusb
command. Something like this should appear, with a reference to “Rockchip”:
$ lsusb | grep Rockchip
Bus 003 Device 014: ID 2207:330c Fuzhou Rockchip Electronics Company RK3399 in Mask ROM mode
In alternative, you can use the upgrade_tool
command to list the compatible devices:
$ sudo ./upgrade_tool ld
List of rockusb connected(1)
DevNo=1 Vid=0x2207,Pid=0x330c,LocationID=31 Mode=Maskrom SerialNo=rockchip
-
Open in the terminal your preferred serial port communication tool (e.g. minicom or gtkterm).
-
Flash the loader on the SBC-3.5-RK3399 device via the following command:
$ sudo ./upgrade_tool UL rk3399_loader_v1.30.126.bin
- If you have downloaded the full image file from the Clea OS release page, it may be compressed into a
.bz2
archive, in which case you will need to extract the image, e.g. by running the command
$ bunzip2 <image-file>.wic.bz2
- Flash the
.wic
image in the board via the following command. Remember to substitute the<image-file>.wic
with the file name of the image (e.gseco_rk3399_c31_clea-os-embedded-full-image-wayland_5-10-x_kirkstone_1-02-00_20240202.wic
):
$ sudo ./upgrade_tool WL 0 <image-file>.wic
- Now is it possible to restart the board running the new image.
Instructions for a device already flashed
These are the instruction to be followed in case the device that needs to be flashed has already a bootloader installed:
-
Connect USB type-C to USB type-A cable to the CN9 connector (USB-C) of the SBC-3.5-RK339 (C31) on one side and to the host PC on the other side.
-
Open in the terminal your preferred serial port communication tool (e.g. minicom or gtkterm).
-
Power on the board and stop boot process within boot delay (5 seconds), using combination of the keys Ctrl+C.
-
in U-Boot shell write command:
> mmc erase 0x4000 0x2000
Starting from Clea OS version kirkstone_1-03-00
the command became:
> mmc erase 0x4000 0x4000
-
This command will erase U-Boot from eMMC.
-
Repeat the instructions in the previous section to flash the bootloader and image.
Windows
The instructions below are based on the Rockchip guide available at this link, so please consult it for further details on how to flash RK3399 CPU-based boards in a Windows environment.
Software Requirements
Download the necessary software from the following links:
-
Rockchip Driver Assistant: Rockchip tool that helps install the driver on your Windows PC.
-
RKDevTool: Rockchip flashing tool for Windows.
-
Rockchip RK3399 loader: official Rockchip
loader
for RK3399. -
The OS image file for SBC-3.5-RK3399 (C31) (in
.wic
format), e.g. the pre-compiled one provided in the Clea OS Release page.
Driver Installation
First, use the Rockchip driver assistant tool to install the driver. There's no need to connect your Rockchip device during this procedure, just download and extract RKDriverAssistant.zip
compressed archive. Then, double click on DriverInstall.exe
in the RKDriverAssistant directory to start the utility.
If you installed the Rockchip USB drivers for any other Rockchip devices already, make sure you click Uninstall Driver
first.
Change language
Once the drivers are installed, RKDevTool
tool can be unpacked. However, before running the tool, the config file must be modified by changing the Selected
field under the [Language]
section to 2 in order to select English language (otherwise, the default one is Chinese).
Instructions for an empty device
These are the instructions to be followed in case the device that needs to be flashed does not either have a bootloader:
-
Connect USB type-C to USB type-A cable to the CN9 connector (USB-C) of the SBC-3.5-RK339 (C31) on one side and to the host PC on the other side.
-
Short circuit the two pins on the CN58 connector, i.e connect ADKEY_IN signal to ground.
NOTE: When the key is pressed and the level of ADKEY_IN is lower than 100mV at system power-up, RK3399 enters firmware download mode. When the PC recognizes the USB device, the key is released, then the firmware can be downloaded to SOC.
-
Power-On the board and check that the device is detected.
-
Open in the terminal your preferred serial port communication tool (e.g. teraterm).
-
Run
RKDevTool
and load the RK3399 loader file, e.g.rk3399_loader_v1.30.126.bin
, into theLoader
field and<image-file>.wic
into theImage
field (see an example image below). -
Press
Run
and wait for the flashing procedure to finish. -
Now is it possible to restart the board running the new image.
Instructions for a device already flashed
These are the instruction to be followed in case the device that needs to be flashed has already a bootloader installed:
-
Connect USB type-C to USB type-A cable to the CN9 connector (USB-C) of the SBC-3.5-RK339 (C31) on one side and to the host PC on the other side.
-
Open in the terminal your preferred serial port communication program (e.g. teraterm).
-
Power on the board and stop boot process within boot delay (5 seconds), using combination of the keys Ctrl+C.
-
in U-Boot shell write command:
> mmc erase 0x4000 0x2000
Starting from Clea OS version kirkstone_1-03-00
the command became:
> mmc erase 0x4000 0x4000
-
This command will erase U-Boot from eMMC.
-
Repeat the instructions in the previous section to flash the bootloader and image.