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

Difference between revisions of "Rock5/install/spi"

< Rock5‎ | install
(Undo revision 8439 by Nasca (talk))
Line 1: Line 1:
 
{{rock5_header}}
 
{{rock5_header}}
 
{{Languages|rock5/dev/usb-install}}
 
{{Languages|rock5/dev/usb-install}}
     [[rock5 | ROCK 5]] > [[rock5/dev | Installation]] > [[rock5/dev/usb-install | Install the Image to SPI Nor Flash]]
+
     [[rock5 | ROCK 5]] > [[rock5/install | Installation]] > [[rock5/install/spi | Install the Image to SPI Nor Flash]]
  
 
== Install the image to SPI Nor Flash from USB port ==
 
== Install the image to SPI Nor Flash from USB port ==
 +
 
Rock 5 supports Maskrom mode, which is a special operation mode for CPU to wait for USB OTG port command.
 
Rock 5 supports Maskrom mode, which is a special operation mode for CPU to wait for USB OTG port command.
 
The PC tools we use to communicate with rock 5 in Maskrom mode are the '''rkdeveloptool''' and '''RKDevTool'''.  
 
The PC tools we use to communicate with rock 5 in Maskrom mode are the '''rkdeveloptool''' and '''RKDevTool'''.  
Line 19: Line 20:
 
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC]].
 
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC]].
  
=== Boot the board to maskrom mode ===
+
=== Boot the board to Maskrom mode ===
  
insert the type-c cable into the power interface(or the usb type-c OTG port),and the other side to  PC
+
[[File:Rock-5b-typec-maskrom.jpeg|400px]]
  
[[File:boot5b.png|400px]]
+
To boot ROCK 5B to Maskrom mode is simple:
 +
 
 +
* Power off the board.
 +
* Remove bootable device like MicroSD card, eMMC module, etc.
 +
* Press the golden button and hold it.
 +
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.
 +
* Release the golded button.
 +
* Check usb device
 +
** For macOS host: lsusb result: '''Bus 002 Device 032: ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device'''
 +
** For Linux host: lsusb result: '''Bus 001 Device 112: ID 2207:350b Fuzhou Rockchip Electronics Company'''
 +
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''.
 +
 
 +
=== Get RK3588 loader and U-Boot images ===
 +
 
 +
==== ROCK 5B ====
 +
 
 +
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader]
 +
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/idbloader-rock-5b-g61c7b9bbea05.img ROCK 5B idbloader]
 +
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/u-boot-rock-5b-g61c7b9bbea05.itb ROCK 5B u-boot.itb]
  
 
=== Write U-Boot images to SPI Nor Flash or erase SPI Nor Flash ===
 
=== Write U-Boot images to SPI Nor Flash or erase SPI Nor Flash ===
Line 34: Line 53:
 
  DevNo=1 Vid=0x2207,Pid=0x350b,LocationID=106 Maskrom
 
  DevNo=1 Vid=0x2207,Pid=0x350b,LocationID=106 Maskrom
  
Download the loader (flash helper) to init the ram and prepare the flashing environment etc.  If you don't have it, you can download it from [https://dl.radxa.com/rock5/sw/images/loader/rk3588_spl_loader_v1.07.111.bin here]
+
Download the loader (flash helper) to init the ram and prepare the flashing environment etc.  If you don't have it, you can download it from [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin here]
  
  sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.07.111.bin # will output:
+
  sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin # will output:
 
  Downloading bootloader succeeded.
 
  Downloading bootloader succeeded.
  
Write bootloader. The idbloader.img and the u-boot.itb ,mentioned bellow, can be generated by [Rockchip Debian SDK](https://wiki.radxa.com/Rock5/dev/Debian), and if you don't generate them by yourself , just use what we provide .  
+
Write bootloader. The idbloader.img and the u-boot.itb ,mentioned bellow, can be generated by [Rockchip Debian SDK](https://wiki.radxa.com/Rock5/dev/Debian), and if you don't generate them by yourself , just use what we provide.
[https://dl.radxa.com/rockpi5/images/  idbloader.img] [https://dl.radxa.com/rockpi5/images/  u-boot.itb]
+
  
 
  sudo rkdeveloptool wl 64 idbloader.img
 
  sudo rkdeveloptool wl 64 idbloader.img
 
  Write LBA from file (100%)
 
  Write LBA from file (100%)
  
  sudo rkdeveloptool wl 64 idbloader.img
+
  sudo rkdeveloptool wl 16384 u-boot.itb
 
  Write LBA from file (100%)
 
  Write LBA from file (100%)
  
Line 51: Line 69:
 
  rkdeveloptool rd
 
  rkdeveloptool rd
  
now , the device should boot on SPI Nor Flash
+
now, the device should boot on SPI Nor Flash
  
 
==== Windows ====
 
==== Windows ====
 +
 
Double click the RKDevTool.exe and you will see the following interface:
 
Double click the RKDevTool.exe and you will see the following interface:
 
Double click the '''RKDevTool.exe''' and you will see the following interface:
 
Double click the '''RKDevTool.exe''' and you will see the following interface:
  
===== Step 1: comfirm that rock pi 5b is in maskrom mode =====
+
===== Step 1: comfirm that ROCK 5B is in Maskrom mode =====
  
If your ROCK Pi 4 is in maskrom mode and connects to PC, you can see that the program detect it, as the red arrow below
+
If your ROCK 5B is in maskrom mode and connects to PC, you can see that the program detects it, as the red arrow below
  
 
===== Step 2: Select Loader =====
 
===== Step 2: Select Loader =====
  
Next, click  the right last columns in the "Loader" row to select rk3588_spl_loader_v1.07.111.bin  
+
Next, click  the right last columns in the "Loader" row to select rk3588_spl_loader_v1.08.111.bin
  
 
===== Step 3: Select idbloader =====
 
===== Step 3: Select idbloader =====
 
  
 
Next, click  the right last columns in the "idbloader" row to select idbloader.img
 
Next, click  the right last columns in the "idbloader" row to select idbloader.img
Line 81: Line 99:
  
 
[[File: complete.png |700px]]
 
[[File: complete.png |700px]]
 
  
 
== Erase SPI Nor Flash ==
 
== Erase SPI Nor Flash ==
Line 87: Line 104:
 
=== Linux/MacOS ===
 
=== Linux/MacOS ===
  
Please notice that when you want to erase SPI Nor Flash, fire these commands. If you don't have zero.img, just use what we provide. [https://dl.radxa.com/rockpi5/images/ zero.img]  
+
Please notice that when you want to erase SPI Nor Flash, fire these commands. If you don't have zero.img, download this one please. [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz zero.img]
 +
And extract it.
  
  rkdeveloptool db rk356x_spl_loader_ddr1056_v1.10.111.bin
+
  rkdeveloptool db rk3588_spl_loader_v1.08.111.bin
 
  rkdeveloptool wl 0 zero.img
 
  rkdeveloptool wl 0 zero.img
 
  rkdeveloptool rd
 
  rkdeveloptool rd
Line 95: Line 113:
 
=== Windows ===
 
=== Windows ===
  
Before Erasing, please comfirm that rock pi 5b is in MASKROM mode
+
Before Erasing, please comfirm that ROCK 5B is in Maskrom mode
  
 
==== Step 1: Download ====
 
==== Step 1: Download ====
Choose the "Advanced features" button, then select rk3588_spl_loader_v1.07.111.bin, next click the "Download" button
+
Choose the "Advanced features" button, then select rk3588_spl_loader_v1.08.111.bin, next click the "Download" button
 
+
  
 
==== Step 2: Erase all  ====
 
==== Step 2: Erase all  ====
Line 107: Line 124:
  
 
[[File: erase.png |700px]]
 
[[File: erase.png |700px]]
 
 
  
 
=== Troubleshooting ===
 
=== Troubleshooting ===
  
 
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.
 
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.

Revision as of 12:31, 6 September 2022

    ROCK 5 >  Installation >  Install the Image to SPI Nor Flash

Install the image to SPI Nor Flash from USB port

Rock 5 supports Maskrom mode, which is a special operation mode for CPU to wait for USB OTG port command. The PC tools we use to communicate with rock 5 in Maskrom mode are the rkdeveloptool and RKDevTool. We use the rkdeveloptool in Linux/macOS and the RKDevTool under Windows.

Requirement

  • Rock 5B
  • type-c cable
  • emmc module
  • Windows/linux/macOS PC

Install Tools&Drivers

Please check this guide, Install rockchip flash tools under Windows/Linux/MacOS PC.

Boot the board to Maskrom mode

Rock-5b-typec-maskrom.jpeg

To boot ROCK 5B to Maskrom mode is simple:

  • Power off the board.
  • Remove bootable device like MicroSD card, eMMC module, etc.
  • Press the golden button and hold it.
  • Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.
  • Release the golded button.
  • Check usb device
    • For macOS host: lsusb result: Bus 002 Device 032: ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device
    • For Linux host: lsusb result: Bus 001 Device 112: ID 2207:350b Fuzhou Rockchip Electronics Company
    • For Windows host: Open RKDevTool and you would see the device is in Found One MASKROM Device.

Get RK3588 loader and U-Boot images

ROCK 5B

Write U-Boot images to SPI Nor Flash or erase SPI Nor Flash

Linux/MacOS

On your PC, run the rkdeveloptool

sudo rkdeveloptool ld
DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom

Download the loader (flash helper) to init the ram and prepare the flashing environment etc. If you don't have it, you can download it from here

sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:
Downloading bootloader succeeded.

Write bootloader. The idbloader.img and the u-boot.itb ,mentioned bellow, can be generated by [Rockchip Debian SDK](https://wiki.radxa.com/Rock5/dev/Debian), and if you don't generate them by yourself , just use what we provide.

sudo rkdeveloptool wl 64 idbloader.img								
Write LBA from file (100%)
sudo rkdeveloptool wl 16384 u-boot.itb			
Write LBA from file (100%)

Reboot the device

rkdeveloptool rd

now, the device should boot on SPI Nor Flash

Windows

Double click the RKDevTool.exe and you will see the following interface: Double click the RKDevTool.exe and you will see the following interface:

Step 1: comfirm that ROCK 5B is in Maskrom mode

If your ROCK 5B is in maskrom mode and connects to PC, you can see that the program detects it, as the red arrow below

Step 2: Select Loader

Next, click the right last columns in the "Loader" row to select rk3588_spl_loader_v1.08.111.bin

Step 3: Select idbloader

Next, click the right last columns in the "idbloader" row to select idbloader.img

Step 4: Select U-boot

Then, click the right last columns in the "u-boot.itb" row to select u-boot.itb

Select.png

Step 5: Excute

Finally, click the "Excute" button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.

Complete.png

Erase SPI Nor Flash

Linux/MacOS

Please notice that when you want to erase SPI Nor Flash, fire these commands. If you don't have zero.img, download this one please. zero.img And extract it.

rkdeveloptool db rk3588_spl_loader_v1.08.111.bin
rkdeveloptool wl 0 zero.img
rkdeveloptool rd

Windows

Before Erasing, please comfirm that ROCK 5B is in Maskrom mode

Step 1: Download

Choose the "Advanced features" button, then select rk3588_spl_loader_v1.08.111.bin, next click the "Download" button

Step 2: Erase all

Click the "erase all" button

Step 3: Reboot device

Erase.png

Troubleshooting