<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.radxa.com/mw/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.radxa.com/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Potter-91</id>
		<title>Radxa Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.radxa.com/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Potter-91"/>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Special:Contributions/Potter-91"/>
		<updated>2026-06-04T08:29:38Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.3</generator>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-06-09T22:06:50Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with maskrom mode and an external computer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Additional:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - &amp;lt;i&amp;gt;(Android images are not supported yet)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADLINK&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Download the required files&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the latest spi bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-gbf47e81-20230607.img normal bootloader], recommend for everything except armbian - &amp;lt;i&amp;gt;(for advanced users: this has the u-boot serial console disabled)&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
''A better approach for armbian is to flash the spi with help of the armbian-install command like discribed here: https://fieldday.io/armbian-rock5b/''&lt;br /&gt;
&lt;br /&gt;
or for advanced users the &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-gbf47e81-20230607-debug.img debuging bootloader] with u-boot serial console enabled &amp;lt;i&amp;gt;(This is an debug bootloader if you need to troubleshoot booting issue with serial)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Check the integrity of the downloaded files:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img.gz &lt;br /&gt;
it should report back:&lt;br /&gt;
 ac581b250fda7a10d07ad11884a16834  zero.img.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the previous downloaded spi clearing file &amp;lt;i&amp;gt;(gzip should already be installed otherwise install it):&amp;lt;/i&amp;gt;&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img&lt;br /&gt;
it should report back:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally check your desired bootloader image: &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-gbf47e81-20230607.img&amp;lt;/code&amp;gt; for the normal bootloader):&amp;lt;/i&amp;gt;&lt;br /&gt;
 md5sum spi-image.img&lt;br /&gt;
&lt;br /&gt;
it should report back one of the following lines:&lt;br /&gt;
&lt;br /&gt;
 f91ee74f4e429067a0281c9399537f8d  rock-5b-spi-image-gbf47e81-20230607-debug.img&lt;br /&gt;
 bd21a6459ad33b8189782e4c904d99b3  rock-5b-spi-image-gbf47e81-20230607.img&lt;br /&gt;
 1b83982a5979008b4407552152732156  rkspi_loader.img&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the spi flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
it should report back:&lt;br /&gt;
 /dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
completely clear the spi flash: &amp;lt;i&amp;gt;(be patient the flash can take 5mins)&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully cleared&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 zero.img&lt;br /&gt;
&lt;br /&gt;
the result should look exactly like this:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  /dev/mtdblock0&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the spi flash &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 spi-image.img&lt;br /&gt;
the checksums should be the same again - if not &amp;lt;b&amp;gt;flash the bootloader again&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should boot now from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-gbf47e81-20230607.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-gbf47e81-20230607-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
''A better approach for armbian is to flash the spi with help of the armbian-install command like discribed here: https://fieldday.io/armbian-rock5b/''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Additional: erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-06-09T21:48:19Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with maskrom mode and an external computer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Additional:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - &amp;lt;i&amp;gt;(Android images are not supported yet)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADLINK&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Download the required files&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the latest spi bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-gbf47e81-20230607.img normal bootloader], recommend for everything except armbian - &amp;lt;i&amp;gt;(for advanced users: this has the u-boot serial console disabled)&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
''A better approach for armbian is to flash the spi with help of the armbian-install command like discribed here: https://fieldday.io/armbian-rock5b/''&lt;br /&gt;
&lt;br /&gt;
or for advanced users the &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-gbf47e81-20230607-debug.img debuging bootloader] with u-boot serial console enabled &amp;lt;i&amp;gt;(This is an debug bootloader if you need to troubleshoot booting issue with serial)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Check the integrity of the downloaded files:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img.gz &lt;br /&gt;
it should report back:&lt;br /&gt;
 ac581b250fda7a10d07ad11884a16834  zero.img.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the previous downloaded spi clearing file &amp;lt;i&amp;gt;(gzip should already be installed otherwise install it):&amp;lt;/i&amp;gt;&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img&lt;br /&gt;
it should report back:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally check your desired bootloader image: &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader):&amp;lt;/i&amp;gt;&lt;br /&gt;
 md5sum spi-image.img&lt;br /&gt;
&lt;br /&gt;
it should report back one of the following lines:&lt;br /&gt;
&lt;br /&gt;
 46de85de37b8e670883e6f6a8bb95776  rock-5b-spi-image-g49da44e116d.img&lt;br /&gt;
 958cbdb6cf9b2e0841fd76c26930db8f  rock-5b-spi-image-g3caf61a44c2-debug.img&lt;br /&gt;
 1b83982a5979008b4407552152732156  rkspi_loader.img&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the spi flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
it should report back:&lt;br /&gt;
 /dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
completely clear the spi flash: &amp;lt;i&amp;gt;(be patient the flash can take 5mins)&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully cleared&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 zero.img&lt;br /&gt;
&lt;br /&gt;
the result should look exactly like this:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  /dev/mtdblock0&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the spi flash &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 spi-image.img&lt;br /&gt;
the checksums should be the same again - if not &amp;lt;b&amp;gt;flash the bootloader again&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should boot now from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-gbf47e81-20230607.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-gbf47e81-20230607-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
''A better approach for armbian is to flash the spi with help of the armbian-install command like discribed here: https://fieldday.io/armbian-rock5b/''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Additional: erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-02T15:28:49Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with maskrom mode and an external computer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Additional:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - &amp;lt;i&amp;gt;(Android images are not supported yet)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADLINK&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Download the required files&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the latest spi bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - &amp;lt;i&amp;gt;(for advanced users: this has the u-boot serial console disabled)&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
or for advanced users the &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled &amp;lt;i&amp;gt;(This is an debug bootloader if you need to troubleshoot booting issue with serial)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Check the integrity of the downloaded files:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img.gz &lt;br /&gt;
it should report back:&lt;br /&gt;
 ac581b250fda7a10d07ad11884a16834  zero.img.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the previous downloaded spi clearing file &amp;lt;i&amp;gt;(gzip should already be installed otherwise install it):&amp;lt;/i&amp;gt;&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img&lt;br /&gt;
it should report back:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally check your desired bootloader image: &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader):&amp;lt;/i&amp;gt;&lt;br /&gt;
 md5sum spi-image.img&lt;br /&gt;
&lt;br /&gt;
it should report back one of the following lines:&lt;br /&gt;
&lt;br /&gt;
 46de85de37b8e670883e6f6a8bb95776  rock-5b-spi-image-g49da44e116d.img&lt;br /&gt;
 958cbdb6cf9b2e0841fd76c26930db8f  rock-5b-spi-image-g3caf61a44c2-debug.img&lt;br /&gt;
 1b83982a5979008b4407552152732156  rkspi_loader.img&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the spi flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
it should report back:&lt;br /&gt;
 /dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
completely clear the spi flash: &amp;lt;i&amp;gt;(be patient the flash can take 5mins)&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully cleared&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 zero.img&lt;br /&gt;
&lt;br /&gt;
the result should look exactly like this:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  /dev/mtdblock0&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the spi flash &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 spi-image.img&lt;br /&gt;
the checksums should be the same again - if not &amp;lt;b&amp;gt;flash the bootloader again&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should boot now from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Additional: erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-02T15:26:24Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with maskrom mode and an external computer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Additional:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - &amp;lt;i&amp;gt;(Android images are not supported yet)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADLINK&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Download the required files&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the latest spi bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - &amp;lt;i&amp;gt;(for advanced users: this has the u-boot serial console disabled)&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
or for advanced users the &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled &amp;lt;i&amp;gt;(This is an debug bootloader if you need to troubleshoot booting issue with serial)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Check the integrity of the downloaded files:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img.gz &lt;br /&gt;
should give back:&lt;br /&gt;
 ac581b250fda7a10d07ad11884a16834  zero.img.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the previous downloaded spi clearing file &amp;lt;i&amp;gt;(gzip should already be installed otherwise install it):&amp;lt;/i&amp;gt;&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img&lt;br /&gt;
should give back:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally check your desired bootloader image: &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader):&amp;lt;/i&amp;gt;&lt;br /&gt;
 md5sum spi-image.img&lt;br /&gt;
&lt;br /&gt;
it should give back one of the following lines:&lt;br /&gt;
&lt;br /&gt;
 46de85de37b8e670883e6f6a8bb95776  rock-5b-spi-image-g49da44e116d.img&lt;br /&gt;
 958cbdb6cf9b2e0841fd76c26930db8f  rock-5b-spi-image-g3caf61a44c2-debug.img&lt;br /&gt;
 1b83982a5979008b4407552152732156  rkspi_loader.img&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the spi flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
completely clear the spi flash: &amp;lt;i&amp;gt;(be patient the flash can take 5mins)&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully cleared&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 zero.img&lt;br /&gt;
&lt;br /&gt;
the result should look exactly like this:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  /dev/mtdblock0&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the spi flash &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 spi-image.img&lt;br /&gt;
the checksums should be the same again - if not &amp;lt;b&amp;gt;flash the bootloader again&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should boot now from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Additional: erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-02T15:06:52Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with maskrom mode and an external computer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Additional:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - &amp;lt;i&amp;gt;(Android images are not supported yet)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADLINK&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Download the required files&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the latest spi bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - &amp;lt;7&amp;gt;(for advanced users: this has the u-boot serial console disabled)&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
or for advanced users the &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled &amp;lt;i&amp;gt;(This is an debug bootloader if you need to troubleshoot booting issue with serial)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Check the integrity of the downloaded files:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img.gz &lt;br /&gt;
should give back:&lt;br /&gt;
 ac581b250fda7a10d07ad11884a16834  zero.img.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the previous downloaded spi clearing file &amp;lt;i&amp;gt;(gzip should already be installed otherwise install it):&amp;lt;/i&amp;gt;&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img&lt;br /&gt;
should give back:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally check your desired bootloader image: &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader):&amp;lt;/i&amp;gt;&lt;br /&gt;
 md5sum spi-image.img&lt;br /&gt;
&lt;br /&gt;
it should give back one of the following lines:&lt;br /&gt;
&lt;br /&gt;
 46de85de37b8e670883e6f6a8bb95776  rock-5b-spi-image-g49da44e116d.img&lt;br /&gt;
 958cbdb6cf9b2e0841fd76c26930db8f  rock-5b-spi-image-g3caf61a44c2-debug.img&lt;br /&gt;
 1b83982a5979008b4407552152732156  rkspi_loader.img&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the spi flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
completely clear the spi flash: &amp;lt;i&amp;gt;(be patient the flash can take 5mins)&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully cleared&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 zero.img&lt;br /&gt;
&lt;br /&gt;
the result should look exactly like this:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  /dev/mtdblock0&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the spi flash &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 spi-image.img&lt;br /&gt;
the checksums should be the same again - if not &amp;lt;b&amp;gt;flash the bootloader again&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should boot now from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Additional: erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-02T15:04:25Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with maskrom mode and an external computer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - &amp;lt;i&amp;gt;(Android images are not supported yet)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADLINK&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Download the required files&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the latest spi bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - &amp;lt;7&amp;gt;(for advanced users: this has the u-boot serial console disabled)&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
or for advanced users the &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled &amp;lt;i&amp;gt;(This is an debug bootloader if you need to troubleshoot booting issue with serial)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Check the integrity of the downloaded files:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img.gz &lt;br /&gt;
should give back:&lt;br /&gt;
 ac581b250fda7a10d07ad11884a16834  zero.img.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the previous downloaded spi clearing file &amp;lt;i&amp;gt;(gzip should already be installed otherwise install it):&amp;lt;/i&amp;gt;&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img&lt;br /&gt;
should give back:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally check your desired bootloader image: &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader):&amp;lt;/i&amp;gt;&lt;br /&gt;
 md5sum spi-image.img&lt;br /&gt;
&lt;br /&gt;
it should give back one of the following lines:&lt;br /&gt;
&lt;br /&gt;
 46de85de37b8e670883e6f6a8bb95776  rock-5b-spi-image-g49da44e116d.img&lt;br /&gt;
 958cbdb6cf9b2e0841fd76c26930db8f  rock-5b-spi-image-g3caf61a44c2-debug.img&lt;br /&gt;
 1b83982a5979008b4407552152732156  rkspi_loader.img&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the spi flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
completely clear the spi flash: &amp;lt;i&amp;gt;(be patient the flash can take 5mins)&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully cleared&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 zero.img&lt;br /&gt;
&lt;br /&gt;
the result should look exactly like this:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  /dev/mtdblock0&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the spi flash &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 spi-image.img&lt;br /&gt;
the checksums should be the same again - if not &amp;lt;b&amp;gt;flash the bootloader again&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should boot now from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addition: erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-02T15:03:52Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: add checksums verification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with the maskrom mode and an external computer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - &amp;lt;i&amp;gt;(Android images are not supported yet)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADLINK&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Download the required files&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the latest spi bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - &amp;lt;7&amp;gt;(for advanced users: this has the u-boot serial console disabled)&amp;lt;/i&amp;gt;&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
or for advanced users the &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled &amp;lt;i&amp;gt;(This is an debug bootloader if you need to troubleshoot booting issue with serial)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Check the integrity of the downloaded files:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img.gz &lt;br /&gt;
should give back:&lt;br /&gt;
 ac581b250fda7a10d07ad11884a16834  zero.img.gz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the previous downloaded spi clearing file &amp;lt;i&amp;gt;(gzip should already be installed otherwise install it):&amp;lt;/i&amp;gt;&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
 md5sum zero.img&lt;br /&gt;
should give back:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally check your desired bootloader image: &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader):&amp;lt;/i&amp;gt;&lt;br /&gt;
 md5sum spi-image.img&lt;br /&gt;
&lt;br /&gt;
it should give back one of the following lines:&lt;br /&gt;
&lt;br /&gt;
 46de85de37b8e670883e6f6a8bb95776  rock-5b-spi-image-g49da44e116d.img&lt;br /&gt;
 958cbdb6cf9b2e0841fd76c26930db8f  rock-5b-spi-image-g3caf61a44c2-debug.img&lt;br /&gt;
 1b83982a5979008b4407552152732156  rkspi_loader.img&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the spi flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
completely clear the spi flash: &amp;lt;i&amp;gt;(be patient the flash can take 5mins)&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully cleared&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 zero.img&lt;br /&gt;
&lt;br /&gt;
the result should look exactly like this:&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  /dev/mtdblock0&lt;br /&gt;
 2c7ab85a893283e98c931e9511add182  zero.img&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the spi flash &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
check if the flash was successfully &amp;lt;i&amp;gt;(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of your downloaded image again):&amp;lt;/i&amp;gt;&lt;br /&gt;
 sudo md5sum /dev/mtdblock0 spi-image.img&lt;br /&gt;
the checksums should be the same again - if not &amp;lt;b&amp;gt;flash the bootloader again&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should boot now from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addition: erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/downloads</id>
		<title>Rock5/downloads</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/downloads"/>
				<updated>2023-02-02T14:14:53Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: /*  Third Party Images */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/downloads}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Official ROCK images can also be downloaded from&lt;br /&gt;
&lt;br /&gt;
* '''[http://rock.sh/rockpi-baidupan BaiduPan(China)]'''&lt;br /&gt;
* '''[https://github.com/radxa/debos-radxa/releases/latest ROCK 5 Image Development Build]''' - The latest system images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For usernames and passwords please check the [https://wiki.radxa.com/Rock/FAQ#What.27s_the_user_and_password_in_Lubuntu FAQ].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-wrench&amp;quot; &amp;gt;&amp;lt;/i&amp;gt; Tools&amp;lt;/span&amp;gt;====&lt;br /&gt;
&amp;lt;div class=&amp;quot;table-responsive&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-hover table-bordered table-striped&amp;quot; style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Linux&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;MacOS&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Windows&amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&amp;lt;small&amp;gt;[https://www.balena.io/etcher Balena Etcher - A user friendly Image Writer]&amp;lt;/small&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;[https://github.com/balena-io/etcher/releases/download/v1.10.6/balenaEtcher-1.10.6-x64.AppImage Linux 64bit]  |  [https://github.com/balena-io/etcher/releases/download/v1.4.9/balena-etcher-electron-1.4.9-linux-ia32.zip Linux 32bit]&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;[https://github.com/balena-io/etcher/releases/download/v1.10.6/balenaEtcher-1.10.6.dmg balenaEtcher-1.10.6.dmg]&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;[https://github.com/balena-io/etcher/releases/download/v1.10.6/balenaEtcher-Portable-1.10.6.exe balenaEtcher-Portable-1.10.6.exe]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Preperation for an update to the m.2 flashing guide on the rock5 itself--&amp;gt;&lt;br /&gt;
&amp;lt;!--  &amp;lt;tr&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--    &amp;lt;td&amp;gt;&amp;lt;small&amp;gt;Raspberry Pi Imager&amp;lt;/small&amp;gt;&amp;lt;/td&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--    &amp;lt;td&amp;gt;[https://downloads.raspberrypi.org/imager/imager_latest_amd64.deb Debian/Ubuntu 64bit]&amp;lt;/td&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--    &amp;lt;td&amp;gt;[https://downloads.raspberrypi.org/imager/imager_latest.dmg macOS]&amp;lt;/td&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--    &amp;lt;td&amp;gt;[https://downloads.raspberrypi.org/imager/imager_latest.exe Windows]&amp;lt;/td&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--  &amp;lt;/tr&amp;gt;  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;col-md-12&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-android&amp;quot; &amp;gt;&amp;lt;/i&amp;gt; Official Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 20%&amp;quot; | Distribution&lt;br /&gt;
! style=&amp;quot;width: 30%&amp;quot; | Supported Boards&lt;br /&gt;
! style=&amp;quot;width: 50%&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Android-Logo.jpg | 200px | link=https://github.com/radxa/manifests]]&lt;br /&gt;
| &lt;br /&gt;
* [https://github.com/radxa/manifests/releases ROCK 5B]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[File:Debian-logo.png | 200px | link=https://github.com/radxa-build]]&lt;br /&gt;
| &lt;br /&gt;
* [https://github.com/radxa/debos-radxa/releases/download/20221031-1045/rock-5b-debian-bullseye-xfce4-arm64-20221031-1558-gpt.img.xz ROCK 5B]&lt;br /&gt;
| Debian Product.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Rock5/linux/debian | Installation Wiki]] &amp;lt;br /&amp;gt;&lt;br /&gt;
Debian 11 Bullseye &amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/radxa/debos-radxa/releases/latest Change Log].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Ubuntu_logo.png | 200px | link=https://github.com/radxa-build]]&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
* [https://github.com/radxa/debos-radxa/releases/download/20221031-1045/rock-5b-ubuntu-focal-server-arm64-20221031-1328-gpt.img.xz ROCK 5B]&lt;br /&gt;
&lt;br /&gt;
| Ubuntu Server Product.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Rock5/linux/ubuntu | Installation Wiki]]&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu Server 20.04.&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/radxa/debos-radxa/releases/latest Change Log].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot; style=&amp;quot;margin-bottom:5px;&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-linux&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; Third Party Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&amp;lt;div class=&amp;quot;table-responsive&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table align=&amp;quot;center&amp;quot; class=&amp;quot;table table-bordered table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- RebornOS --&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;col-md-2 mwbs-color-darker&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;th width=&amp;quot;15%&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;thumbnail&amp;quot; style=&amp;quot;display:  table-cell;&amp;quot;&amp;gt;[[File:rebornos-arm.png| link=https://www.rebornos.org/download-arm]]&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th style=&amp;quot;vertical-align:  middle;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;div class=&amp;quot;caption&amp;quot; style=&amp;quot;text-align:  left;padding-left:  10px;&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;p&amp;gt;&amp;lt;b&amp;gt;[https://github.com/RebornOS-Developers/lxqt-rock5b-image/releases/latest RebornOS ARM Rock5B Beta]&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th style=&amp;quot;vertical-align:  middle;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;div class=&amp;quot;caption&amp;quot; style=&amp;quot;text-align:  left;padding-left:  10px;&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; style=&amp;quot;display:  inline;&amp;quot;&amp;gt;RebornOS ARM on Arch.&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; style=&amp;quot;display:  inline;&amp;quot;&amp;gt;[https://discord.gg/K3BKe2A9 Discussion Discord]&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; &amp;gt;username and password are set upon installation&amp;lt;/p&amp;gt; &lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; &amp;gt;Live w/Calamares for custom tailored installation of over 10 DE’s based on preference. &amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; &amp;gt;[https://wiki.rebornos.org/arm/install Installation Wiki]&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; &amp;gt;'''Rolling ARM Distribution - - Made for you, made with you.'''&amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot; style=&amp;quot;margin-bottom:5px;&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-linux&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; Community Built Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/downloads</id>
		<title>Rock5/downloads</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/downloads"/>
				<updated>2023-02-02T11:51:23Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: /*  Third Party Images */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/downloads}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Official ROCK images can also be downloaded from&lt;br /&gt;
&lt;br /&gt;
* '''[http://rock.sh/rockpi-baidupan BaiduPan(China)]'''&lt;br /&gt;
* '''[https://github.com/radxa/debos-radxa/releases/latest ROCK 5 Image Development Build]''' - The latest system images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For usernames and passwords please check the [https://wiki.radxa.com/Rock/FAQ#What.27s_the_user_and_password_in_Lubuntu FAQ].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-wrench&amp;quot; &amp;gt;&amp;lt;/i&amp;gt; Tools&amp;lt;/span&amp;gt;====&lt;br /&gt;
&amp;lt;div class=&amp;quot;table-responsive&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-hover table-bordered table-striped&amp;quot; style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Linux&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;MacOS&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Windows&amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&amp;lt;small&amp;gt;[https://www.balena.io/etcher Balena Etcher - A user friendly Image Writer]&amp;lt;/small&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;[https://github.com/balena-io/etcher/releases/download/v1.10.6/balenaEtcher-1.10.6-x64.AppImage Linux 64bit]  |  [https://github.com/balena-io/etcher/releases/download/v1.4.9/balena-etcher-electron-1.4.9-linux-ia32.zip Linux 32bit]&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;[https://github.com/balena-io/etcher/releases/download/v1.10.6/balenaEtcher-1.10.6.dmg balenaEtcher-1.10.6.dmg]&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;[https://github.com/balena-io/etcher/releases/download/v1.10.6/balenaEtcher-Portable-1.10.6.exe balenaEtcher-Portable-1.10.6.exe]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Preperation for an update to the m.2 flashing guide on the rock5 itself--&amp;gt;&lt;br /&gt;
&amp;lt;!--  &amp;lt;tr&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--    &amp;lt;td&amp;gt;&amp;lt;small&amp;gt;Raspberry Pi Imager&amp;lt;/small&amp;gt;&amp;lt;/td&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--    &amp;lt;td&amp;gt;[https://downloads.raspberrypi.org/imager/imager_latest_amd64.deb Debian/Ubuntu 64bit]&amp;lt;/td&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--    &amp;lt;td&amp;gt;[https://downloads.raspberrypi.org/imager/imager_latest.dmg macOS]&amp;lt;/td&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--    &amp;lt;td&amp;gt;[https://downloads.raspberrypi.org/imager/imager_latest.exe Windows]&amp;lt;/td&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--  &amp;lt;/tr&amp;gt;  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;col-md-12&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-android&amp;quot; &amp;gt;&amp;lt;/i&amp;gt; Official Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 20%&amp;quot; | Distribution&lt;br /&gt;
! style=&amp;quot;width: 30%&amp;quot; | Supported Boards&lt;br /&gt;
! style=&amp;quot;width: 50%&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Android-Logo.jpg | 200px | link=https://github.com/radxa/manifests]]&lt;br /&gt;
| &lt;br /&gt;
* [https://github.com/radxa/manifests/releases ROCK 5B]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[File:Debian-logo.png | 200px | link=https://github.com/radxa-build]]&lt;br /&gt;
| &lt;br /&gt;
* [https://github.com/radxa/debos-radxa/releases/download/20221031-1045/rock-5b-debian-bullseye-xfce4-arm64-20221031-1558-gpt.img.xz ROCK 5B]&lt;br /&gt;
| Debian Product.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Rock5/linux/debian | Installation Wiki]] &amp;lt;br /&amp;gt;&lt;br /&gt;
Debian 11 Bullseye &amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/radxa/debos-radxa/releases/latest Change Log].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Ubuntu_logo.png | 200px | link=https://github.com/radxa-build]]&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
* [https://github.com/radxa/debos-radxa/releases/download/20221031-1045/rock-5b-ubuntu-focal-server-arm64-20221031-1328-gpt.img.xz ROCK 5B]&lt;br /&gt;
&lt;br /&gt;
| Ubuntu Server Product.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Rock5/linux/ubuntu | Installation Wiki]]&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu Server 20.04.&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/radxa/debos-radxa/releases/latest Change Log].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot; style=&amp;quot;margin-bottom:5px;&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-linux&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; Third Party Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&amp;lt;div class=&amp;quot;table-responsive&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table align=&amp;quot;center&amp;quot; class=&amp;quot;table table-bordered table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- RebornOS --&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;col-md-2 mwbs-color-darker&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;th width=&amp;quot;8%&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;thumbnail&amp;quot; style=&amp;quot;display:  table-cell;&amp;quot;&amp;gt;[[File:rebornos-arm.png| link=https://github.com/RebornOS-Developers/lxqt-rock5b-image/releases/download/92bb9c6/RebornOS-ARM-rock5b-2023-01-22.img.xz]]&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th width=&amp;quot;45%&amp;quot; style=&amp;quot;vertical-align:  middle;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;div class=&amp;quot;caption&amp;quot; style=&amp;quot;text-align:  left;padding-left:  10px;&amp;quot;&amp;gt;&lt;br /&gt;
=====[https://github.com/RebornOS-Developers/lxqt-rock5b-image/releases/download/92bb9c6/RebornOS-ARM-rock5b-2023-01-22.img.xz RebornOS ARM Rock5B Beta]=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th style=&amp;quot;vertical-align:  middle;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;div class=&amp;quot;caption&amp;quot; style=&amp;quot;text-align:  left;padding-left:  10px;&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; style=&amp;quot;display:  inline;&amp;quot;&amp;gt;RebornOS ARM on Arch.&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; style=&amp;quot;display:  inline;&amp;quot;&amp;gt;[https://discord.gg/K3BKe2A9 Discussion Discord]&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; &amp;gt;username and password are set upon installation&amp;lt;/p&amp;gt; &lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; &amp;gt;Live w/Calamares for custom tailored installation of over 10 DE’s based on preference. &amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; &amp;gt;[https://wiki.rebornos.org/arm/install Installation Wiki]&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; &amp;gt;'''Rolling ARM Distribution - - Made for you, made with you.'''&amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot; style=&amp;quot;margin-bottom:5px;&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-linux&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; Community Built Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/downloads</id>
		<title>Rock5/downloads</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/downloads"/>
				<updated>2023-02-02T11:30:47Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: /*  Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/downloads}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Official ROCK images can also be downloaded from&lt;br /&gt;
&lt;br /&gt;
* '''[http://rock.sh/rockpi-baidupan BaiduPan(China)]'''&lt;br /&gt;
* '''[https://github.com/radxa/debos-radxa/releases/latest ROCK 5 Image Development Build]''' - The latest system images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For usernames and passwords please check the [https://wiki.radxa.com/Rock/FAQ#What.27s_the_user_and_password_in_Lubuntu FAQ].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-wrench&amp;quot; &amp;gt;&amp;lt;/i&amp;gt; Tools&amp;lt;/span&amp;gt;====&lt;br /&gt;
&amp;lt;div class=&amp;quot;table-responsive&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;table table-hover table-bordered table-striped&amp;quot; style=&amp;quot;text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Linux&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;MacOS&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Windows&amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&amp;lt;small&amp;gt;[https://www.balena.io/etcher Balena Etcher - A user friendly Image Writer]&amp;lt;/small&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;[https://github.com/balena-io/etcher/releases/download/v1.10.6/balenaEtcher-1.10.6-x64.AppImage Linux 64bit]  |  [https://github.com/balena-io/etcher/releases/download/v1.4.9/balena-etcher-electron-1.4.9-linux-ia32.zip Linux 32bit]&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;[https://github.com/balena-io/etcher/releases/download/v1.10.6/balenaEtcher-1.10.6.dmg balenaEtcher-1.10.6.dmg]&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;[https://github.com/balena-io/etcher/releases/download/v1.10.6/balenaEtcher-Portable-1.10.6.exe balenaEtcher-Portable-1.10.6.exe]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Preperation for an update to the m.2 flashing guide on the rock5 itself--&amp;gt;&lt;br /&gt;
&amp;lt;!--  &amp;lt;tr&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--    &amp;lt;td&amp;gt;&amp;lt;small&amp;gt;Raspberry Pi Imager&amp;lt;/small&amp;gt;&amp;lt;/td&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--    &amp;lt;td&amp;gt;[https://downloads.raspberrypi.org/imager/imager_latest_amd64.deb Debian/Ubuntu 64bit]&amp;lt;/td&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--    &amp;lt;td&amp;gt;[https://downloads.raspberrypi.org/imager/imager_latest.dmg macOS]&amp;lt;/td&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--    &amp;lt;td&amp;gt;[https://downloads.raspberrypi.org/imager/imager_latest.exe Windows]&amp;lt;/td&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;!--  &amp;lt;/tr&amp;gt;  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;col-md-12&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-android&amp;quot; &amp;gt;&amp;lt;/i&amp;gt; Official Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 20%&amp;quot; | Distribution&lt;br /&gt;
! style=&amp;quot;width: 30%&amp;quot; | Supported Boards&lt;br /&gt;
! style=&amp;quot;width: 50%&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Android-Logo.jpg | 200px | link=https://github.com/radxa/manifests]]&lt;br /&gt;
| &lt;br /&gt;
* [https://github.com/radxa/manifests/releases ROCK 5B]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[File:Debian-logo.png | 200px | link=https://github.com/radxa-build]]&lt;br /&gt;
| &lt;br /&gt;
* [https://github.com/radxa/debos-radxa/releases/download/20221031-1045/rock-5b-debian-bullseye-xfce4-arm64-20221031-1558-gpt.img.xz ROCK 5B]&lt;br /&gt;
| Debian Product.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Rock5/linux/debian | Installation Wiki]] &amp;lt;br /&amp;gt;&lt;br /&gt;
Debian 11 Bullseye &amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/radxa/debos-radxa/releases/latest Change Log].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Ubuntu_logo.png | 200px | link=https://github.com/radxa-build]]&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
* [https://github.com/radxa/debos-radxa/releases/download/20221031-1045/rock-5b-ubuntu-focal-server-arm64-20221031-1328-gpt.img.xz ROCK 5B]&lt;br /&gt;
&lt;br /&gt;
| Ubuntu Server Product.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Rock5/linux/ubuntu | Installation Wiki]]&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu Server 20.04.&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/radxa/debos-radxa/releases/latest Change Log].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot; style=&amp;quot;margin-bottom:5px;&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-linux&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; Third Party Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&amp;lt;div class=&amp;quot;table-responsive&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table align=&amp;quot;center&amp;quot; class=&amp;quot;table table-bordered table-striped&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- RebornOS --&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;col-md-2 mwbs-color-darker&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;th width=&amp;quot;8%&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;thumbnail&amp;quot; style=&amp;quot;display:  table-cell;&amp;quot;&amp;gt;[[File:rebornos-arm.png| link=https://github.com/RebornOS-Developers/lxqt-rock5b-image/releases/download/92bb9c6/RebornOS-ARM-rock5b-2023-01-22.img.xz]]&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th width=&amp;quot;45%&amp;quot; style=&amp;quot;vertical-align:  middle;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;div class=&amp;quot;caption&amp;quot; style=&amp;quot;text-align:  left;padding-left:  10px;&amp;quot;&amp;gt;&lt;br /&gt;
=====[https://github.com/RebornOS-Developers/lxqt-rock5b-image/releases/download/92bb9c6/RebornOS-ARM-rock5b-2023-01-22.img.xz RebornOS ARM Rock5B Beta]=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th style=&amp;quot;vertical-align:  middle;&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;div class=&amp;quot;caption&amp;quot; style=&amp;quot;text-align:  left;padding-left:  10px;&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; style=&amp;quot;display:  inline;&amp;quot;&amp;gt;RebornOS ARM on Arch.&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; style=&amp;quot;display:  inline;&amp;quot;&amp;gt;[https://discord.gg/K3BKe2A9 Discussion Discord]&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; &amp;gt;username and password are set upon installation&amp;lt;/p&amp;gt; &lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; &amp;gt;Live w/Calamares for custom tailored installation of over 10 DE’s based on preference. &amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; &amp;gt;Installation Wiki [https://wiki.rebornos.org/arm/install]&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;quot;text-left&amp;quot; &amp;gt;'''Rolling ARM Distribution - - Made for you, made with you.'''&amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot; style=&amp;quot;margin-bottom:5px;&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-linux&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; Community Built Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/downloads</id>
		<title>Rock5/downloads</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/downloads"/>
				<updated>2023-02-02T01:28:14Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: /*  Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/downloads}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Official ROCK images can also be downloaded from&lt;br /&gt;
&lt;br /&gt;
* '''[http://rock.sh/rockpi-baidupan BaiduPan(China)]'''&lt;br /&gt;
* '''[https://github.com/radxa/debos-radxa/releases/latest ROCK 5 Image Development Build]''' - The latest system images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For usernames and passwords please check the [https://wiki.radxa.com/Rock/FAQ#What.27s_the_user_and_password_in_Lubuntu FAQ].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-wrench&amp;quot; &amp;gt;&amp;lt;/i&amp;gt; Tools&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 25%&amp;quot; | Description&lt;br /&gt;
! style=&amp;quot;width: 25%&amp;quot; | Linux&lt;br /&gt;
! style=&amp;quot;width: 25%&amp;quot; | MacOS&lt;br /&gt;
! style=&amp;quot;width: 25%&amp;quot; | Windows&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.balena.io/etcher Balena Etcher]&lt;br /&gt;
| [https://github.com/balena-io/etcher/releases/download/v1.7.9/balenaEtcher-1.7.9-x64.AppImage Linux 64bit], [https://github.com/balena-io/etcher/releases/download/v1.7.9/balenaEtcher-1.7.9-ia32.AppImage Linux 32bit]&lt;br /&gt;
| [https://github.com/balena-io/etcher/releases/download/v1.7.9/balenaEtcher-1.7.9.dmg balenaEtcher-1.4.9.dmg]&lt;br /&gt;
| [https://github.com/balena-io/etcher/releases/download/v1.7.9/balenaEtcher-Setup-1.7.9.exe balenaEtcher-Setup-1.4.9-x86.exe]&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Pi Imager&lt;br /&gt;
| [https://downloads.raspberrypi.org/imager/imager_latest_amd64.deb Debian/Ubuntu 64bit]&lt;br /&gt;
| [https://downloads.raspberrypi.org/imager/imager_latest.dmg macOS]&lt;br /&gt;
| [https://downloads.raspberrypi.org/imager/imager_latest.exe Windows]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-android&amp;quot; &amp;gt;&amp;lt;/i&amp;gt; Official Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 20%&amp;quot; | Distribution&lt;br /&gt;
! style=&amp;quot;width: 30%&amp;quot; | Supported Boards&lt;br /&gt;
! style=&amp;quot;width: 50%&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Android-Logo.jpg | 200px | link=https://github.com/radxa/manifests]]&lt;br /&gt;
| &lt;br /&gt;
* [https://github.com/radxa/manifests/releases ROCK 5B]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[File:Debian-logo.png | 200px | link=https://github.com/radxa-build]]&lt;br /&gt;
| &lt;br /&gt;
* [https://github.com/radxa/debos-radxa/releases/download/20221031-1045/rock-5b-debian-bullseye-xfce4-arm64-20221031-1558-gpt.img.xz ROCK 5B]&lt;br /&gt;
| Debian Product.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Rock5/linux/debian | Installation Wiki]] &amp;lt;br /&amp;gt;&lt;br /&gt;
Debian 11 Bullseye &amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/radxa/debos-radxa/releases/latest Change Log].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Ubuntu_logo.png | 200px | link=https://github.com/radxa-build]]&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
* [https://github.com/radxa/debos-radxa/releases/download/20221031-1045/rock-5b-ubuntu-focal-server-arm64-20221031-1328-gpt.img.xz ROCK 5B]&lt;br /&gt;
&lt;br /&gt;
| Ubuntu Server Product.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Rock5/linux/ubuntu | Installation Wiki]]&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu Server 20.04.&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/radxa/debos-radxa/releases/latest Change Log].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot; style=&amp;quot;margin-bottom:5px;&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-linux&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; Third Party Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot; style=&amp;quot;margin-bottom:5px;&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-linux&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; Community Built Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/downloads</id>
		<title>Rock5/downloads</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/downloads"/>
				<updated>2023-02-02T00:33:51Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/downloads}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Official ROCK images can also be downloaded from&lt;br /&gt;
&lt;br /&gt;
* '''[http://rock.sh/rockpi-baidupan BaiduPan(China)]'''&lt;br /&gt;
* '''[https://github.com/radxa/debos-radxa/releases/latest ROCK 5 Image Development Build]''' - The latest system images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For usernames and passwords please check the [https://wiki.radxa.com/Rock/FAQ#What.27s_the_user_and_password_in_Lubuntu FAQ].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-wrench&amp;quot; &amp;gt;&amp;lt;/i&amp;gt; Tools&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 25%&amp;quot; | Description&lt;br /&gt;
! style=&amp;quot;width: 25%&amp;quot; | Linux&lt;br /&gt;
! style=&amp;quot;width: 25%&amp;quot; | MacOS&lt;br /&gt;
! style=&amp;quot;width: 25%&amp;quot; | Windows&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.balena.io/etcher Balena Etcher]&lt;br /&gt;
| [https://github.com/balena-io/etcher/releases/download/v1.7.9/balenaEtcher-1.7.9-x64.AppImage Linux 64bit], [https://github.com/balena-io/etcher/releases/download/v1.7.9/balenaEtcher-1.7.9-ia32.AppImage Linux 32bit]&lt;br /&gt;
| [https://github.com/balena-io/etcher/releases/download/v1.7.9/balenaEtcher-1.7.9.dmg balenaEtcher-1.4.9.dmg]&lt;br /&gt;
| [https://github.com/balena-io/etcher/releases/download/v1.7.9/balenaEtcher-Setup-1.7.9.exe balenaEtcher-Setup-1.4.9-x86.exe]&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Pi Imager&lt;br /&gt;
| [https://downloads.raspberrypi.org/imager/imager_latest_amd64.deb Debian/Ubuntu]&lt;br /&gt;
| [https://downloads.raspberrypi.org/imager/imager_latest.dmg macOS]&lt;br /&gt;
| [https://downloads.raspberrypi.org/imager/imager_latest.exe Windows]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-android&amp;quot; &amp;gt;&amp;lt;/i&amp;gt; Official Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 20%&amp;quot; | Distribution&lt;br /&gt;
! style=&amp;quot;width: 30%&amp;quot; | Supported Boards&lt;br /&gt;
! style=&amp;quot;width: 50%&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Android-Logo.jpg | 200px | link=https://github.com/radxa/manifests]]&lt;br /&gt;
| &lt;br /&gt;
* [https://github.com/radxa/manifests/releases ROCK 5B]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[File:Debian-logo.png | 200px | link=https://github.com/radxa-build]]&lt;br /&gt;
| &lt;br /&gt;
* [https://github.com/radxa/debos-radxa/releases/download/20221031-1045/rock-5b-debian-bullseye-xfce4-arm64-20221031-1558-gpt.img.xz ROCK 5B]&lt;br /&gt;
| Debian Product.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Rock5/linux/debian | Installation Wiki]] &amp;lt;br /&amp;gt;&lt;br /&gt;
Debian 11 Bullseye &amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/radxa/debos-radxa/releases/latest Change Log].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Ubuntu_logo.png | 200px | link=https://github.com/radxa-build]]&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
* [https://github.com/radxa/debos-radxa/releases/download/20221031-1045/rock-5b-ubuntu-focal-server-arm64-20221031-1328-gpt.img.xz ROCK 5B]&lt;br /&gt;
&lt;br /&gt;
| Ubuntu Server Product.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Rock5/linux/ubuntu | Installation Wiki]]&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu Server 20.04.&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/radxa/debos-radxa/releases/latest Change Log].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot; style=&amp;quot;margin-bottom:5px;&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-linux&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; Third Party Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot; style=&amp;quot;margin-bottom:5px;&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-linux&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; Community Built Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T23:59:06Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: /* 3) Flash the SPI flash */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with the maskrom mode and an external computer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - ''(for advanced users: this has the u-boot serial console disabled)''&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file ''(gzip should already be installed otherwise install it):''&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader):''&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should boot now from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addition: erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T23:58:06Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: /* 3) Flash the SPI flash */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with the maskrom mode and an external computer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - ''(for advanced users: this has the u-boot serial console disabled)''&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should already be installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash:&lt;br /&gt;
&lt;br /&gt;
''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should boot now from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addition: erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/downloads</id>
		<title>Rock5/downloads</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/downloads"/>
				<updated>2023-02-01T23:55:15Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/downloads}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
Official ROCK images can also be downloaded from&lt;br /&gt;
&lt;br /&gt;
* '''[http://rock.sh/rockpi-baidupan BaiduPan(China)]'''&lt;br /&gt;
* '''[https://github.com/radxa/debos-radxa/releases/latest ROCK 5 Image Development Build]''' - The latest system images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For usernames and passwords please check the [https://wiki.radxa.com/Rock/FAQ#What.27s_the_user_and_password_in_Lubuntu FAQ].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-wrench&amp;quot; &amp;gt;&amp;lt;/i&amp;gt; Tools&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 25%&amp;quot; | Description&lt;br /&gt;
! style=&amp;quot;width: 25%&amp;quot; | Linux&lt;br /&gt;
! style=&amp;quot;width: 25%&amp;quot; | MacOS&lt;br /&gt;
! style=&amp;quot;width: 25%&amp;quot; | Windows&lt;br /&gt;
|-&lt;br /&gt;
| [https://www.balena.io/etcher Balena Etcher]&lt;br /&gt;
| [https://github.com/balena-io/etcher/releases/download/v1.7.9/balenaEtcher-1.7.9-x64.AppImage Linux 64bit], [https://github.com/balena-io/etcher/releases/download/v1.7.9/balenaEtcher-1.7.9-ia32.AppImage Linux 32bit]&lt;br /&gt;
| [https://github.com/balena-io/etcher/releases/download/v1.7.9/balenaEtcher-1.7.9.dmg balenaEtcher-1.4.9.dmg]&lt;br /&gt;
| [https://github.com/balena-io/etcher/releases/download/v1.7.9/balenaEtcher-Setup-1.7.9.exe balenaEtcher-Setup-1.4.9-x86.exe]&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Pi Imager&lt;br /&gt;
| [https://downloads.raspberrypi.org/imager/imager_latest_amd64.deb Debian/Ubuntu]&lt;br /&gt;
| [https://downloads.raspberrypi.org/imager/imager_latest.dmg macOS]&lt;br /&gt;
| [https://downloads.raspberrypi.org/imager/imager_latest.exe Windows]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-android&amp;quot; &amp;gt;&amp;lt;/i&amp;gt; Official Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 20%; text-align:center;&amp;quot; | Distribution&lt;br /&gt;
! style=&amp;quot;width: 20%; text-align:center;&amp;quot; | Supported Boards&lt;br /&gt;
! style=&amp;quot;width: 60%; text-align:center;&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Android-Logo.jpg | 200px | link=https://github.com/radxa/manifests]]&lt;br /&gt;
| &lt;br /&gt;
* [https://github.com/radxa/manifests/releases ROCK 5B]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[File:Debian-logo.png | 200px | link=https://github.com/radxa-build]]&lt;br /&gt;
| &lt;br /&gt;
* [https://github.com/radxa/debos-radxa/releases/download/20221031-1045/rock-5b-debian-bullseye-xfce4-arm64-20221031-1558-gpt.img.xz ROCK 5B]&lt;br /&gt;
| Debian Product.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Rock5/linux/debian | Installation Wiki]] &amp;lt;br /&amp;gt;&lt;br /&gt;
Debian 11 Bullseye &amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/radxa/debos-radxa/releases/latest Change Log].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Ubuntu_logo.png | 200px | link=https://github.com/radxa-build]]&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
* [https://github.com/radxa/debos-radxa/releases/download/20221031-1045/rock-5b-ubuntu-focal-server-arm64-20221031-1328-gpt.img.xz ROCK 5B]&lt;br /&gt;
&lt;br /&gt;
| Ubuntu Server Product.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Rock5/linux/ubuntu | Installation Wiki]]&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu Server 20.04.&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/radxa/debos-radxa/releases/latest Change Log].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot; style=&amp;quot;margin-bottom:5px;&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-linux&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; Third Party Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;span class=&amp;quot;label forest&amp;quot; style=&amp;quot;margin-bottom:5px;&amp;quot;&amp;gt;&amp;lt;i class=&amp;quot;fa fa-linux&amp;quot;&amp;gt;&amp;lt;/i&amp;gt; Community Built Images&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/5b/getting_started</id>
		<title>Rock5/5b/getting started</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/5b/getting_started"/>
				<updated>2023-02-01T23:16:46Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/3a/getting_started}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[Rock5/5b | ROCK 5 Model B]] &amp;gt; [[Rock5/5b/getting_started | Getting started]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Getting Started =&lt;br /&gt;
&lt;br /&gt;
This guide is designed for ROCK 5B enthusiast. The purpose is to learn about ROCK 5B as well as how to prepare and set up for basic use.&lt;br /&gt;
When you get a board, you need to know what model it is and which hardware version it is.&lt;br /&gt;
The information is printed in the top side of the board.&lt;br /&gt;
We will introduce the board information as much as possible.&lt;br /&gt;
&lt;br /&gt;
== Close look of ROCK 5B ==&lt;br /&gt;
* ROCK 5B front view&lt;br /&gt;
[[File:Rock5b-v142-top.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B front with an angle view&lt;br /&gt;
[[File:Rock5b-v142-angel.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B back view&lt;br /&gt;
[[File:Rock5b-v142-bottom.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
For the detailed hardware description and pinout, please refer [[Rock5/hardware/5b | ROCK 5B hardware page]].&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;get_start_specs&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Features ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What you need ==&lt;br /&gt;
&lt;br /&gt;
=== Necessary ===&lt;br /&gt;
* ROCK 5B main board&lt;br /&gt;
&lt;br /&gt;
* One of the Storage media below:&lt;br /&gt;
** microSD, larger than 8GB&lt;br /&gt;
** eMMC module, larger than 8GB&lt;br /&gt;
&lt;br /&gt;
* [[rock5/5b/power_supply | Power supply]]&lt;br /&gt;
** The ROCK 5B is powered by Type-C port and has a wide range of input voltage, from 5V to 21V. ROCK 5B supports USB Type-C PD 2.0 with 9V/2A, 12V/2A, 15V/2A and 20V/2A.&lt;br /&gt;
** The Type-C cable you using needs to support data communication. We call it USB Type-C charging data cable.&lt;br /&gt;
&lt;br /&gt;
* USB Keyboard and Mouse&lt;br /&gt;
** With four USB-A connectors, ROCK 5B can be equipped with a full sized keyboard and mouse.&lt;br /&gt;
&lt;br /&gt;
* Monitor and HDMI Cable&lt;br /&gt;
** ROCK 5B is equipped with a full sized HDMI connector. HDMI capable monitor is recommended.&lt;br /&gt;
** HDMI EDID display data is used to determine the best display resolution. On monitors and TVs that support 1080p (or 4K/8K) this resolution will be selected. If 1080p is not supported the next available resolution reported by EDID will be used. This selected mode will work with MOST but not all monitors/TVs.&lt;br /&gt;
&lt;br /&gt;
*USB to TTL serial cable&lt;br /&gt;
**ROCK 5B exports a dedicated serial console for CPU, which can access the low level debug message.&lt;br /&gt;
&lt;br /&gt;
*USB type A to type C cable&lt;br /&gt;
**If you want to write image on ROCK 5B from USB OTG port or use fastboot/adb commands you need an USB type A to type C cable to connect ROCK 5B and PC.&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
&lt;br /&gt;
* microSD Card Reader&lt;br /&gt;
** For flashing the image to the microSD Card &lt;br /&gt;
&lt;br /&gt;
*  Ethernet cable&lt;br /&gt;
** ROCK 5B supports internet access via Ethernet.&lt;br /&gt;
** An Ethernet cable is used to connect your ROCK 5B to a local network and the Internet.&lt;br /&gt;
&lt;br /&gt;
* USB type A to type C cable&lt;br /&gt;
** This is needed for fastboot/adb commands and the maskrom mode for advanced flashing.&lt;br /&gt;
&lt;br /&gt;
*  USB to TTL serial cable&lt;br /&gt;
** This is needed for serial console.&lt;br /&gt;
&lt;br /&gt;
* Camera Module&lt;br /&gt;
** ROCK 5B supports  camera function.&lt;br /&gt;
&lt;br /&gt;
* LCD Module&lt;br /&gt;
** ROCK 5B supports LCD display function.&lt;br /&gt;
&lt;br /&gt;
* Audio cable&lt;br /&gt;
** Audio can be played through speaker or headphones using a standard 3.5mm jack.&lt;br /&gt;
&lt;br /&gt;
* [[rock5/hardware/wifi | WiFi/BT Cards]]&lt;br /&gt;
&lt;br /&gt;
== Starting the board for the first time ==&lt;br /&gt;
&lt;br /&gt;
ROCK 5B can be started with eMMC Module or μSD Card. Now, you are presented with three options when installing your new operating system onto your ROCK 5B. &lt;br /&gt;
&lt;br /&gt;
===  Prepare ===&lt;br /&gt;
* When starting system with eMMC Module&lt;br /&gt;
(Option a) Insert the eMMC Module into ROCK Pi eMMC USB Reader. Then plug the ROCK Pi eMMC USB Reader into host PC.&lt;br /&gt;
&lt;br /&gt;
(Option b) Insert eMMC Module into eMMC to μSD card converter board. Insert the converter board into μSD Card Reader. Then plug the Card Reader into host PC.&lt;br /&gt;
&lt;br /&gt;
* When starting system with μSD Card&lt;br /&gt;
(Option c) Insert the μSD Card into μSD Card Reader. Then plug the Card Reader into host PC.&lt;br /&gt;
&lt;br /&gt;
===  Write Image ===&lt;br /&gt;
&lt;br /&gt;
* Download the official Ubuntu/Debian system image from [[rock5/downloads | Downloads]].&lt;br /&gt;
&lt;br /&gt;
* Download the flash tool, etcher, from [[rock5/downloads | Downloads]]. Choose the right version for your host operation system. Here we operate on host Ubuntu 20.04.&lt;br /&gt;
&lt;br /&gt;
* After unpacking the package, we run the tool by double-clicking BalenaEtcher icon.&lt;br /&gt;
&lt;br /&gt;
If you get an error message: &amp;quot;No polkit authentication agent found&amp;quot; you can try and start it with sudo, but do know that this is running the tool as '''root'''.&lt;br /&gt;
&lt;br /&gt;
*  In the etcher window, click '''Select image'''.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-1.png]]&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, click '''Select Drive'''.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-2.png]]&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, click '''Flash'''.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-3.png]]&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, once it shows us Flash Complete! It is done and can be put into the RockPi.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-4.png]]&lt;br /&gt;
&lt;br /&gt;
===  3. Boot the board ===&lt;br /&gt;
&lt;br /&gt;
* Now insert the system storage media, μSD Card or eMMC Module into the socket on the board.&lt;br /&gt;
&lt;br /&gt;
* (Optional) Use the USB to TTL serial cable to setup a connection between PC and ROCK 5B board. See [[rock5/dev/serial-console | Serial Console]].&lt;br /&gt;
&lt;br /&gt;
* Power on ROCK 5B by adapter with type C port.&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B will boot with the green power LED on. And after a while, another blue LED starts blinking.&lt;br /&gt;
&lt;br /&gt;
=== 4. Access from the Host PC/Laptop ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: HDMI monitor and Mouse ====&lt;br /&gt;
&lt;br /&gt;
You would see Desktop on HDMI monitor. &lt;br /&gt;
&lt;br /&gt;
==== Option 2: Serial console ====&lt;br /&gt;
&lt;br /&gt;
Check [[rock5/dev/serial-console | Serial Console]]&lt;br /&gt;
&lt;br /&gt;
==== Option 3: SSH ====&lt;br /&gt;
SSH server  is enabled on port 22 of ROCK 5B default image. &lt;br /&gt;
&lt;br /&gt;
Please use [https://angryip.org/ angryip] to find your board IP address.&lt;br /&gt;
&lt;br /&gt;
To access ROCK 5B by SSH, try &lt;br /&gt;
  &lt;br /&gt;
 ping rock-5b.local&lt;br /&gt;
 ssh rock@rock-5b.local&lt;br /&gt;
&lt;br /&gt;
or if your router/network doesn't support Local Domain, you need to check your network/router administrator page and look for the ROCK 5B ip address.&lt;br /&gt;
&lt;br /&gt;
 ping ip-of-device&lt;br /&gt;
 ssh rock@ip-of-device&lt;br /&gt;
&lt;br /&gt;
Note: You can also get the IP of ROCK 5B from option 1 if you can not access network administrator page.&lt;br /&gt;
&lt;br /&gt;
=== 5.Network state ===&lt;br /&gt;
&lt;br /&gt;
*Look at network configure:&lt;br /&gt;
&lt;br /&gt;
 $ sudo ifconfig&lt;br /&gt;
&lt;br /&gt;
*Test network:&lt;br /&gt;
&lt;br /&gt;
 $ ping -c 5 www.google.com&lt;br /&gt;
&lt;br /&gt;
=== 6.WIFI Connection ===&lt;br /&gt;
&lt;br /&gt;
Check [[rock5/linux/debian#wifi-connection | WIFI Connection]].&lt;br /&gt;
&lt;br /&gt;
=== 7.BT ===&lt;br /&gt;
&lt;br /&gt;
Check [[rock5/linux/debian#BT | BT]].&lt;br /&gt;
&lt;br /&gt;
=== 8.LED ===&lt;br /&gt;
&lt;br /&gt;
ROCK 5B has Power LED and User LED.&lt;br /&gt;
&lt;br /&gt;
* Power LED&lt;br /&gt;
&lt;br /&gt;
The power LED is green. It is always on when ROCK 5B is connected to any power source.&lt;br /&gt;
&lt;br /&gt;
* User LED&lt;br /&gt;
&lt;br /&gt;
The user LED is blue. By default, its blink status shows the running kernel.&lt;br /&gt;
&lt;br /&gt;
=== 9.GPIO ===&lt;br /&gt;
&lt;br /&gt;
ROCK 5B has one 40-pin expansion headers. Each pin is distinguished by color, more information click [[rock5/hardware/5b/gpio | ROCK 5B GPIO]].&lt;br /&gt;
&lt;br /&gt;
Development for GPIO. ROCK 5B supports libmraa GPIO library, click [[rock5/dev/libmraa | here]] to get more information.&lt;br /&gt;
&lt;br /&gt;
== Next Step ==&lt;br /&gt;
&lt;br /&gt;
* [[rock5/linux/debian | More Debian image usage and tips]]&lt;br /&gt;
* [[rock5/hardware | Checkout the hardware details]]&lt;br /&gt;
* Join the [https://forum.radxa.com/c/rock3 community] and the [https://t.me/rockpi4 discussion group]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/5b/getting_started</id>
		<title>Rock5/5b/getting started</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/5b/getting_started"/>
				<updated>2023-02-01T23:16:00Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: /* Optional */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/3a/getting_started}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[Rock5/5b | ROCK 5 Model B]] &amp;gt; [[Rock5/5b/getting_started | Getting started]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Getting Started =&lt;br /&gt;
&lt;br /&gt;
This guide is designed for ROCK 5B enthusiast. The purpose is to learn about ROCK 5B as well as how to prepare and set up for basic use.&lt;br /&gt;
When you get a board, you need to know what model it is and which hardware version it is.&lt;br /&gt;
The information is printed in the top side of the board.&lt;br /&gt;
We will introduce the board information as much as possible.&lt;br /&gt;
&lt;br /&gt;
== Close look of ROCK 5B ==&lt;br /&gt;
* ROCK 5B front view&lt;br /&gt;
[[File:Rock5b-v142-top.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B front with an angle view&lt;br /&gt;
[[File:Rock5b-v142-angel.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B back view&lt;br /&gt;
[[File:Rock5b-v142-bottom.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
For the detailed hardware description and pinout, please refer [[Rock5/hardware/5b | ROCK 5B hardware page]].&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;get_start_specs&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; Features ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What you need ==&lt;br /&gt;
&lt;br /&gt;
=== Necessary ===&lt;br /&gt;
* ROCK 5B main board&lt;br /&gt;
&lt;br /&gt;
* One of the Storage media below:&lt;br /&gt;
** microSD, larger than 8GB&lt;br /&gt;
** eMMC module, larger than 8GB&lt;br /&gt;
&lt;br /&gt;
* [[rock5/5b/power_supply | Power supply]]&lt;br /&gt;
** The ROCK 5B is powered by Type-C port and has a wide range of input voltage, from 5V to 21V. ROCK 5B supports USB Type-C PD 2.0 with 9V/2A, 12V/2A, 15V/2A and 20V/2A.&lt;br /&gt;
** The Type-C cable you using needs to support data communication. We call it USB Type-C charging data cable.&lt;br /&gt;
&lt;br /&gt;
* USB Keyboard and Mouse&lt;br /&gt;
** With four USB-A connectors, ROCK 5B can be equipped with a full sized keyboard and mouse.&lt;br /&gt;
&lt;br /&gt;
* Monitor and HDMI Cable&lt;br /&gt;
** ROCK 5B is equipped with a full sized HDMI connector. HDMI capable monitor is recommended.&lt;br /&gt;
** HDMI EDID display data is used to determine the best display resolution. On monitors and TVs that support 1080p (or 4K/8K) this resolution will be selected. If 1080p is not supported the next available resolution reported by EDID will be used. This selected mode will work with MOST but not all monitors/TVs.&lt;br /&gt;
&lt;br /&gt;
*USB to TTL serial cable&lt;br /&gt;
**ROCK 5B exports a dedicated serial console for CPU, which can access the low level debug message.&lt;br /&gt;
&lt;br /&gt;
*USB type A to type C cable&lt;br /&gt;
**If you want to write image on ROCK 5B from USB OTG port or use fastboot/adb commands you need an USB type A to type C cable to connect ROCK 5B and PC.&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
&lt;br /&gt;
* microSD Card Reader&lt;br /&gt;
** For flashing the image to the microSD Card &lt;br /&gt;
&lt;br /&gt;
*  Ethernet cable&lt;br /&gt;
** ROCK 5B supports internet access via Ethernet.&lt;br /&gt;
** An Ethernet cable is used to connect your ROCK 5B to a local network and the Internet.&lt;br /&gt;
&lt;br /&gt;
* USB type A to type C cable&lt;br /&gt;
** This is needed for fastboot/adb commands and the maskrom mode for advanced flashing.&lt;br /&gt;
&lt;br /&gt;
*  USB to TTL serial cable&lt;br /&gt;
** This is needed for serial console.&lt;br /&gt;
&lt;br /&gt;
* Camera Module&lt;br /&gt;
** ROCK 5B supports  camera function.&lt;br /&gt;
&lt;br /&gt;
* LCD Module&lt;br /&gt;
** ROCK 5B supports LCD display function.&lt;br /&gt;
&lt;br /&gt;
* Audio cable&lt;br /&gt;
** Audio can be played through speaker or headphones using a standard 3.5mm jack.&lt;br /&gt;
&lt;br /&gt;
* [[rock5/hardware/wifi | WiFi/BT Cards]]&lt;br /&gt;
&lt;br /&gt;
== Starting the board for the first time ==&lt;br /&gt;
&lt;br /&gt;
ROCK 5B can be started with eMMC Module or μSD Card. Now, you are presented with three options when installing your new operating system onto your ROCK 5B. &lt;br /&gt;
&lt;br /&gt;
===  Prepare ===&lt;br /&gt;
* When starting system with eMMC Module&lt;br /&gt;
(Option a) Insert the eMMC Module into ROCK Pi eMMC USB Reader. Then plug the ROCK Pi eMMC USB Reader into host PC.&lt;br /&gt;
&lt;br /&gt;
(Option b) Insert eMMC Module into eMMC to μSD card converter board. Insert the converter board into μSD Card Reader. Then plug the Card Reader into host PC.&lt;br /&gt;
&lt;br /&gt;
* When starting system with μSD Card&lt;br /&gt;
(Option c) Insert the μSD Card into μSD Card Reader. Then plug the Card Reader into host PC.&lt;br /&gt;
&lt;br /&gt;
===  Write Image ===&lt;br /&gt;
&lt;br /&gt;
* Download the official Ubuntu/Debian system image from [[rock5/downloads | Downloads]].&lt;br /&gt;
&lt;br /&gt;
* Download the flash tool, etcher, from [[rock5/downloads | Downloads]]. Choose the right version for your host operation system. Here we operate on host Ubuntu 20.04.&lt;br /&gt;
&lt;br /&gt;
* After unpacking the package, we run the tool by double-clicking BalenaEtcher icon.&lt;br /&gt;
&lt;br /&gt;
If you get an error message: &amp;quot;No polkit authentication agent found&amp;quot; you can try and start it with sudo, but do know that this is running the tool as '''root'''.&lt;br /&gt;
&lt;br /&gt;
*  In the etcher window, click '''Select image'''.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-1.png]]&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, click '''Select Drive'''.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-2.png]]&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, click '''Flash'''.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-3.png]]&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, once it shows us Flash Complete! It is done and can be put into the RockPi.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-4.png]]&lt;br /&gt;
&lt;br /&gt;
===  3. Boot the board ===&lt;br /&gt;
&lt;br /&gt;
* Now insert the system storage media, μSD Card or eMMC Module into the socket on the board.&lt;br /&gt;
&lt;br /&gt;
* (Optional) Use the USB to TTL serial cable to setup a connection between PC and ROCK 5B board. See [[rock5/dev/serial-console | Serial Console]].&lt;br /&gt;
&lt;br /&gt;
* Power on ROCK 5B by adapter with type C port.&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B will boot with the green power LED on. And after a while, another blue LED starts blinking.&lt;br /&gt;
&lt;br /&gt;
=== 4. Access from the Host PC/Laptop ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: HDMI monitor and Mouse ====&lt;br /&gt;
&lt;br /&gt;
You would see Desktop on HDMI monitor. &lt;br /&gt;
&lt;br /&gt;
==== Option 2: Serial console ====&lt;br /&gt;
&lt;br /&gt;
Check [[rock5/dev/serial-console | Serial Console]]&lt;br /&gt;
&lt;br /&gt;
==== Option 3: SSH ====&lt;br /&gt;
SSH server  is enabled on port 22 of ROCK 5B default image. &lt;br /&gt;
&lt;br /&gt;
Please use [https://angryip.org/ angryip] to find your board IP address.&lt;br /&gt;
&lt;br /&gt;
To access ROCK 5B by SSH, try &lt;br /&gt;
  &lt;br /&gt;
 ping rock-5b.local&lt;br /&gt;
 ssh rock@rock-5b.local&lt;br /&gt;
&lt;br /&gt;
or if your router/network doesn't support Local Domain, you need to check your network/router administrator page and look for the ROCK 5B ip address.&lt;br /&gt;
&lt;br /&gt;
 ping ip-of-device&lt;br /&gt;
 ssh rock@ip-of-device&lt;br /&gt;
&lt;br /&gt;
Note: You can also get the IP of ROCK 5B from option 1 if you can not access network administrator page.&lt;br /&gt;
&lt;br /&gt;
=== 5.Network state ===&lt;br /&gt;
&lt;br /&gt;
*Look at network configure:&lt;br /&gt;
&lt;br /&gt;
 $ sudo ifconfig&lt;br /&gt;
&lt;br /&gt;
*Test network:&lt;br /&gt;
&lt;br /&gt;
 $ ping -c 5 www.google.com&lt;br /&gt;
&lt;br /&gt;
=== 6.WIFI Connection ===&lt;br /&gt;
&lt;br /&gt;
Check [[rock5/linux/debian#wifi-connection | WIFI Connection]].&lt;br /&gt;
&lt;br /&gt;
=== 7.BT ===&lt;br /&gt;
&lt;br /&gt;
Check [[rock5/linux/debian#BT | BT]].&lt;br /&gt;
&lt;br /&gt;
=== 8.LED ===&lt;br /&gt;
&lt;br /&gt;
ROCK 5B has Power LED and User LED.&lt;br /&gt;
&lt;br /&gt;
* Power LED&lt;br /&gt;
&lt;br /&gt;
The power LED is green. It is always on when ROCK 5B is connected to any power source.&lt;br /&gt;
&lt;br /&gt;
* User LED&lt;br /&gt;
&lt;br /&gt;
The user LED is blue. By default, its blink status shows the running kernel.&lt;br /&gt;
&lt;br /&gt;
=== 9.GPIO ===&lt;br /&gt;
&lt;br /&gt;
ROCK 5B has one 40-pin expansion headers. Each pin is distinguished by color, more information click [[rock5/hardware/5b/gpio | ROCK 5B GPIO]].&lt;br /&gt;
&lt;br /&gt;
Development for GPIO. ROCK 5B supports libmraa GPIO library, click [[rock5/dev/libmraa | here]] to get more information.&lt;br /&gt;
&lt;br /&gt;
== Next Step ==&lt;br /&gt;
&lt;br /&gt;
* [[rock5/linux/debian | More Debian image usage and tips]]&lt;br /&gt;
* [[rock5/hardware | Checkout the hardware details]]&lt;br /&gt;
* Join the [https://forum.radxa.com/c/rock3 community] and the [https://t.me/rockpi4 discussion group]&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/microSD</id>
		<title>Rock5/install/microSD</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/microSD"/>
				<updated>2023-02-01T23:08:57Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: /* Option 2: Erase microSD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
&lt;br /&gt;
{{Languages|rock5/install/microSD}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/microSD | Install the image to microSD]]&lt;br /&gt;
&lt;br /&gt;
== Install the image to microSD ==&lt;br /&gt;
&lt;br /&gt;
This guide describes how to write images to microSD and erase microSD card for ROCK 5 serial boards.&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Write image to microSD ===&lt;br /&gt;
&lt;br /&gt;
In part one let's focus on writing one system image to microSD. Here we test it with ROCK 5B board.&lt;br /&gt;
&lt;br /&gt;
====Step one: Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B board with power supply&lt;br /&gt;
* a microSD card, larger than 8GB, class 10 or better&lt;br /&gt;
* a microSD card reader, either a USB card reader or the SD card reader on laptop&lt;br /&gt;
*  a PC/laptop running Windows or Linux or MacOS&lt;br /&gt;
&lt;br /&gt;
====Step two: Download necessary tools and image ====&lt;br /&gt;
&lt;br /&gt;
* Etcher is the tool we use to write image. Download the right Etcher for your PC from [[rock5/downloads | ROCK 5 Downloads]] page and install it. Check [https://www.balena.io/etcher/  Etcher website] for more info about Etcher.&lt;br /&gt;
* Choose the image you want to install from [[rock5/downloads | ROCK 5 Downloads]] page.&lt;br /&gt;
&lt;br /&gt;
Here we use the following image for writing.&lt;br /&gt;
&lt;br /&gt;
 rock-5b-debian-bullseye-xfce4-arm64-20220615-1045-gpt.img.xz&lt;br /&gt;
&lt;br /&gt;
====Step three: Write the image to microSD card ====&lt;br /&gt;
&lt;br /&gt;
* Insert the microSD Card into microSD Card Reader, which connects to host computer. &lt;br /&gt;
&lt;br /&gt;
* Run the application. For example double click balenaEtcher-1.7.9-x64.AppImage on Ubuntu 20.04:&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, we click button Select image.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-1.png]]&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, we click button Select Drive.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-2.png]]&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, we click button Flash.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-3.png]]&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, it shows us Flash Complete!&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-4.png]]&lt;br /&gt;
&lt;br /&gt;
Done! Now you have successfully installed the OS image on microSD card.&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase microSD ===&lt;br /&gt;
&lt;br /&gt;
When microSD is written with Android (or Linux) images before, now we change to Linux (or Android). It's recommended that you erase microSD first. Then write the target images.&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Write bootloader only to microSD ===&lt;br /&gt;
&lt;br /&gt;
In part three let's take a look know to write U-Boot images to microSD.&lt;br /&gt;
We have prebuilt u-boot images built via rockchip-bsp SDK.&lt;br /&gt;
They're idbloader.img and u-boot.itb.&lt;br /&gt;
&lt;br /&gt;
On Linux PC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo dd  if=./idbloader.img  of=/dev/sdX  seek=64&lt;br /&gt;
$ sudo dd  if=./u-boot.itb   of=/dev/sdX  seek=16384 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Mac PC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% sudo dd  if=./idbloader.img  of=/dev/diskX  seek=64&lt;br /&gt;
% sudo dd  if=./u-boot.itb  of=/dev/diskX  seek=16384&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/guide/spi-nvme-boot</id>
		<title>Rock5/guide/spi-nvme-boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/guide/spi-nvme-boot"/>
				<updated>2023-02-01T23:08:21Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/guide/spi-nvme-boot}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/guide | Guide]] &amp;gt; [[rock5/guide/spi-nvme-boot | SPI NOR flash bootloader and PCIe NVMe SSD boot]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SPI NOR flash stores bootloader files like &amp;lt;code&amp;gt;idbloader.img&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;u-boot.itb&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The PCIe NVMe SSD stores the system img/rootfs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To write the bootloader to the SPI NOR flash, please refer to this guide:&lt;br /&gt;
&lt;br /&gt;
*[[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To write the image to a PCIe NVMe SSD, please refer to this guide:&lt;br /&gt;
&lt;br /&gt;
*[[rock5/install/nvme | Install the Image to NVMe SSD]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T23:07:57Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with the maskrom mode and an external computer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - ''(for advanced users: this has the u-boot serial console disabled)''&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should already be installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should boot now from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addition: erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install</id>
		<title>Rock5/install</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install"/>
				<updated>2023-02-01T23:07:41Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/install}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
ROCK 5 supports different storage media for installation, they have different IO read/write speed. Choose one to install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Classic installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[rock5/install/microSD | µSD Card]]&lt;br /&gt;
* [[rock5/install/eMMC | eMMC module with an USB eMMC reader]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Advanced installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To boot from M.2 NVMe you need to flash your desired image to the SSD and also update the bootloader on the SPI to enable NVMe boot support.&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/nvme | M.2 NVMe SSD]]&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/spi |  Bootloader / SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not own a USB to eMMC reader you can alternatively flash the eMMC with the help of the maskrom mode:&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/usb-install-emmc | eMMC maskrom mode]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Additional&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ROCK 5 supports maskrom mode, which is a special operation mode for CPU to wait for command from the USB-C OTG port.&lt;br /&gt;
&lt;br /&gt;
[[rock5/install/rockchip-flash-tools | The Rockchip Flash Tools]] are the tools required for this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/guide/spi-nvme-boot</id>
		<title>Rock5/guide/spi-nvme-boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/guide/spi-nvme-boot"/>
				<updated>2023-02-01T23:07:23Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/guide/spi-nvme-boot}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/guide | Guide]] &amp;gt; [[rock5/guide/spi-nvme-boot | SPI NOR flash bootloader and PCIe NVMe SSD boot]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SPI NOR flash stores bootloader files like &amp;lt;code&amp;gt;idbloader.img&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;u-boot.itb&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The PCIe NVMe SSD stores the system img/rootfs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To write the bootloader to the SPI NOR flash, please refer to this guide:&lt;br /&gt;
&lt;br /&gt;
*[[rock5/install/spi | Install the bootloader to the SPI NOR flash]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To write the image to a PCIe NVMe SSD, please refer to this guide:&lt;br /&gt;
&lt;br /&gt;
*[[rock5/install/nvme | Install the Image to NVMe SSD]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/guide/spi-nvme-boot</id>
		<title>Rock5/guide/spi-nvme-boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/guide/spi-nvme-boot"/>
				<updated>2023-02-01T23:07:07Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/guide/spi-nvme-boot}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/guide | Guide]] &amp;gt; [[rock5/guide/spi-nvme-boot | SPI NOR flash bootloader and PCIe NVMe SSD boot]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SPI NOR flash stores bootloader files like &amp;lt;code&amp;gt;idbloader.img&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;u-boot.itb&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The PCIe NVMe SSD stores the system img/rootfs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To write the bootloader to the SPI NOR flash, please refer to this guide:&lt;br /&gt;
&lt;br /&gt;
*[[rock5/install/spi | Install the bootloader to the SPI NOR flash]].&lt;br /&gt;
&lt;br /&gt;
To write the image to a PCIe NVMe SSD, please refer to this guide:&lt;br /&gt;
&lt;br /&gt;
*[[rock5/install/nvme | Install the Image to NVMe SSD]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/guide/spi-nvme-boot</id>
		<title>Rock5/guide/spi-nvme-boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/guide/spi-nvme-boot"/>
				<updated>2023-02-01T23:05:56Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/guide/spi-nvme-boot}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/guide | Guide]] &amp;gt; [[rock5/guide/spi-nvme-boot | SPI NOR flash bootloader and PCIe NVMe SSD boot]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SPI NOR flash stores bootloader files like &amp;lt;code&amp;gt;idbloader.img&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;u-boot.itb&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The PCIe NVMe SSD stores the system img/rootfs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To write the bootloader to the SPI NOR flash, please refer to this guide:&lt;br /&gt;
&lt;br /&gt;
*[[rock5/install/spi | Install the bootloader to the SPI NOR flash]].&lt;br /&gt;
&lt;br /&gt;
To write the image to a PCIe NVMe SSD, please refer to this guide:&lt;br /&gt;
&lt;br /&gt;
*[[rock5/install/nvme | Install the Image to NVMe SSD]].&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install</id>
		<title>Rock5/install</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install"/>
				<updated>2023-02-01T22:53:42Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/install}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
ROCK 5 supports different storage media for installation, they have different IO read/write speed. Choose one to install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Classic installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[rock5/install/microSD | µSD Card]]&lt;br /&gt;
* [[rock5/install/eMMC | eMMC module with an USB eMMC reader]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Advanced installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To boot from M.2 NVMe you need to flash your desired image to the SSD and also update the bootloader on the SPI to enable NVMe boot support.&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/nvme | M.2 NVMe SSD]]&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/spi |  Bootloader / SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not own a USB to eMMC reader you can alternatively flash the eMMC with the help of the maskrom mode:&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/usb-install-emmc | eMMC maskrom mode]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Additional&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ROCK 5 supports maskrom mode, which is a special operation mode for CPU to wait for command from the USB-C OTG port.&lt;br /&gt;
&lt;br /&gt;
[[rock5/install/rockchip-flash-tools | The Rockchip Flash Tools]] are the tools required for this.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install</id>
		<title>Rock5/install</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install"/>
				<updated>2023-02-01T22:48:39Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/install}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
ROCK 5 supports different storage media for installation, they have different IO read/write speed. Choose one to install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Classic installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[rock5/install/microSD | µSD Card]]&lt;br /&gt;
* [[rock5/install/eMMC | eMMC module with an USB eMMC reader]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Advanced installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To boot from M.2 NVMe you need to flash your desired image to the SSD and also update the bootloader on the SPI to enable NVMe boot support.&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/nvme | M.2 NVMe SSD]]&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/spi |  Bootloader / SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
If you do not own a USB to eMMC reader you can alternatively flash the eMMC with the help of the maskrom mode:&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/usb-install-emmc | eMMC maskrom mode]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Additional&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ROCK 5 supports maskrom mode, which is a special operation mode for CPU to wait for command from the USB-C OTG port.&lt;br /&gt;
&lt;br /&gt;
[[rock5/install/rockchip-flash-tools | The Rockchip Flash Tools]] are the tools required for this.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install</id>
		<title>Rock5/install</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install"/>
				<updated>2023-02-01T22:48:16Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/install}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
ROCK 5 supports different storage media for installation, they have different IO read/write speed. Choose one to install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Classic installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[rock5/install/microSD | µSD Card]]&lt;br /&gt;
* [[rock5/install/eMMC | eMMC module with an USB eMMC reader]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Advanced installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To boot from M.2 NVMe you need to flash your desired image to the SSD and also update the bootloader on the SPI to enable NVMe boot support.&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/nvme | M.2 NVMe SSD]]&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/spi |  Bootloader / SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
If you do not own a USB to eMMC reader you can alternatively flash the eMMC with the help of the maskrom mode:&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/usb-install-emmc | eMMC maskrom mode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Additional&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ROCK 5 supports maskrom mode, which is a special operation mode for CPU to wait for command from the USB-C OTG port.&lt;br /&gt;
&lt;br /&gt;
[[rock5/install/rockchip-flash-tools | The Rockchip Flash Tools]] are the tools required for this.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install</id>
		<title>Rock5/install</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install"/>
				<updated>2023-02-01T22:47:11Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/install}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
ROCK 5 supports different storage media for installation, they have different IO read/write speed. Choose one to install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Classic installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[rock5/install/microSD | µSD Card]]&lt;br /&gt;
* [[rock5/install/eMMC | eMMC module with an USB eMMC reader]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Advanced installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To boot from M.2 NVMe you need to flash your desired image to the SSD and also update the bootloader on the SPI to enable NVMe boot support.&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/nvme | M.2 NVMe SSD]]&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/spi |  Bootloader / SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
If you do not own a USB to eMMC reader you can alternatively flash the eMMC with the help of the maskrom mode:&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/usb-install-emmc | eMMC maskrom mode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Additional&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ROCK 5 supports maskrom mode, which is a special operation mode for CPU to wait for command from the USB-C OTG port.&lt;br /&gt;
&lt;br /&gt;
[[rock5/install/rockchip-flash-tools | The Rockchip Flash Tools]] are the tools required for this.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install</id>
		<title>Rock5/install</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install"/>
				<updated>2023-02-01T22:46:06Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/install}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
ROCK 5 supports different storage media for installation, they have different IO read/write speed. Choose one to install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Classic installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[rock5/install/microSD | µSD Card]]&lt;br /&gt;
* [[rock5/install/eMMC | eMMC module with an USB eMMC reader]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Advanced installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To boot from M.2 NVMe you need to flash your desired image to the SSD and also update the bootloader on the SPI to enable NVMe boot support.&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/nvme | M.2 NVMe SSD]]&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/spi |  Bootloader / SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
If you do not own a USB to eMMC reader you can alternatively flash the eMMC with the help of the maskrom mode:&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/usb-install-emmc | eMMC maskrom mode]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additional:&lt;br /&gt;
&lt;br /&gt;
The ROCK 5 supports maskrom mode, which is a special operation mode for CPU to wait for command from the USB-C OTG port.&lt;br /&gt;
&lt;br /&gt;
[[rock5/install/rockchip-flash-tools | The Rockchip Flash Tools]] are required for this.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T22:42:38Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: /* 4) Reboot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with the maskrom mode and an external computer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - ''(for advanced users: this has the u-boot serial console disabled)''&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should already be installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should boot now from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addition: erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T22:36:55Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with the maskrom mode and an external computer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - ''(for advanced users: this has the u-boot serial console disabled)''&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should already be installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should now boot from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addition: erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install</id>
		<title>Rock5/install</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install"/>
				<updated>2023-02-01T22:17:55Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/install}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
ROCK 5 supports different storage media for installation, they have different IO read/write speed. Choose one to install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Classic installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
* [[rock5/install/microSD | µSD Card]]&lt;br /&gt;
* [[rock5/install/eMMC | eMMC module with an USB to eMMC reader]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Advanced installation options&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/spi |  SPI NOR Flash]]&lt;br /&gt;
* [[rock5/install/nvme | a NVMe SSD]]&lt;br /&gt;
* [[rock5/install/usb-install-emmc | eMMC from USB port]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additional:&lt;br /&gt;
&lt;br /&gt;
* [[rock5/install/rockchip-flash-tools | Install Rockchip Flash Tools]]&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T22:12:43Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - ''(for advanced users: this has the u-boot serial console disabled)''&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should already be installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should now boot from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addition: erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T22:10:34Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: /* Step 1: Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - ''(for advanced users: this has the u-boot serial console disabled)''&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should already be installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should now boot from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addition: Erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select &amp;lt;code&amp;gt;rk3588_spl_loader_v1.08.111.bin&amp;lt;/code&amp;gt;, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T22:06:07Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - ''(for advanced users: this has the u-boot serial console disabled)''&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should already be installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''If you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should now boot from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Addition: Erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option 3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T21:23:54Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: /* 3) Flash the SPI flash */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - ''(for advanced users: this has the u-boot serial console disabled)''&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should already be installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''I you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should now boot from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
= Addition: Erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T21:22:30Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - ''(for advanced users: this has the u-boot serial console disabled)''&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should be already installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.img.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''I you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should now boot from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
= Addition: Erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T21:20:21Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available to flash the SPI:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - ''(for advanced users: this has the u-boot serial console disabled)''&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should be already installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''I you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should now boot from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
= Addition: Erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T21:19:17Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For advanced users:&lt;br /&gt;
[[#Addition:_erase_the_SPI_NOR_flash | How to erase the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple method =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Boot linux from µSD card/eMMC ===&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
=== 2) Download required files on the ROCK 5 ===&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader], recommend for everything except armbian - ''(for advanced users: this has the u-boot serial console disabled)''&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Flash the SPI flash ===&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should be already installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== 4) Reboot ===&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''I you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should now boot from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Advanced (external) method =&lt;br /&gt;
&lt;br /&gt;
==  Requirements ==&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 1) Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== 2) Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 3) Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: confirm that ROCK 5B is in maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Load Configuration File ====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Select Loader ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Select SPI image ====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Excute ====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
= Addition: Erase the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Operate on ROCK 5B ===&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Erase with Linux PC/Mac ===&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
=== Option3: Erase with Windows PC ===&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Download ====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Erase all  ====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Reboot device ====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T21:11:25Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: /* Install the bootloader to the SPI NOR flash */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
= Install the bootloader to the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and supports booting other media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Simple method ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===  Requirements ===&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 1) Boot linux from µSD card/eMMC ====&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
==== 2) Download required files on the rock ====&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader] with u-boot serial console disabled (Recommend for everything except armbian)&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 3) Flash the SPI flash ====&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should be already installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
==== 4) Reboot ====&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''I you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should now boot from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced (external) method ==&lt;br /&gt;
&lt;br /&gt;
===  Requirements ===&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 1) Install Tools &amp;amp; Drivers ====&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
==== 2) Get RK3588 loader and U-Boot images ====&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 3) Boot the board to Maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
==== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ====&lt;br /&gt;
&lt;br /&gt;
===== Option 1: Flash with Linux PC/Mac =====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
===== Option 2: Flash with Windows PC =====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
===== Step 1: confirm that ROCK 5B is in maskrom mode =====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Load Configuration File =====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Select Loader =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
===== Step 4: Select SPI image =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
===== Step 5: Excute =====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
== Addition: Erase the SPI NOR flash ==&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Erase with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
==== Option3: Erase with Windows PC====&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
===== Step 1: Download =====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Erase all  =====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Reboot device =====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T21:06:50Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
= Install the bootloader to the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and support other booting media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Simple method ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===  Requirements ===&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 1) Boot linux from µSD card/eMMC ====&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
==== 2) Download required files on the rock ====&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img normal bootloader] with u-boot serial console disabled (Recommend for everything except armbian)&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img bootloader for armbian] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* or for advanced users the [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debuging bootloader] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 3) Flash the SPI flash ====&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should be already installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
==== 4) Reboot ====&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''I you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should now boot from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced (external) method ==&lt;br /&gt;
&lt;br /&gt;
===  Requirements ===&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 1) Install Tools &amp;amp; Drivers ====&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
==== 2) Get RK3588 loader and U-Boot images ====&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 3) Boot the board to Maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
==== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ====&lt;br /&gt;
&lt;br /&gt;
===== Option 1: Flash with Linux PC/Mac =====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
===== Option 2: Flash with Windows PC =====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
===== Step 1: confirm that ROCK 5B is in maskrom mode =====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Load Configuration File =====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Select Loader =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
===== Step 4: Select SPI image =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
===== Step 5: Excute =====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
== Addition: Erase the SPI NOR flash ==&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Erase with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
==== Option3: Erase with Windows PC====&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
===== Step 1: Download =====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Erase all  =====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Reboot device =====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T21:03:12Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
= Install the bootloader to the SPI NOR flash =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and support other booting media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Simple method ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===  Requirements ===&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 1) Boot linux from µSD card/eMMC ====&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
==== 2) Download required files on the rock ====&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled (Recommend for everything except armbian)&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 3) Flash the SPI flash ====&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should be already installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
==== 4) Reboot ====&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''I you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should now boot from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced (external) method ==&lt;br /&gt;
&lt;br /&gt;
===  Requirements ===&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 1) Install Tools &amp;amp; Drivers ====&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC.]]&lt;br /&gt;
&lt;br /&gt;
The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
==== 2) Get RK3588 loader and U-Boot images ====&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 3) Boot the board to Maskrom mode ====&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Linux host: &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; a result should be: &amp;lt;code&amp;gt;... ID 2207:350b Fuzhou Rockchip Electronics Company&amp;lt;/code&amp;gt;&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
==== 4) Write u-boot images to SPI NOR flash or erase SPI NOR flash ====&lt;br /&gt;
&lt;br /&gt;
===== Option 1: Flash with Linux PC/Mac =====&lt;br /&gt;
&lt;br /&gt;
On linux or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from 2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
===== Option 2: Flash with Windows PC =====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
===== Step 1: confirm that ROCK 5B is in maskrom mode =====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Load Configuration File =====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Select Loader =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
===== Step 4: Select SPI image =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
===== Step 5: Excute =====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
== Addition: Erase the SPI NOR flash ==&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with linux running on µSD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblk*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Erase with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
==== Option3: Erase with Windows PC====&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in maskrom mode&lt;br /&gt;
&lt;br /&gt;
===== Step 1: Download =====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Erase all  =====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Reboot device =====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T20:45:17Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
== Install the bootloader to the SPI NOR flash ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and support other booting media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK 5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Simple method ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====  Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== 1) Boot linux from µSD card/eMMC =====&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the ROCK 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
===== 2) Download required files on the rock =====&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled (Recommend for everything except armbian)&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== 3) Flash the SPI flash =====&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
extract/uncompress the prevois downloaded SPI clearing file: ''(gzip should be already installed otherwise install it)''&lt;br /&gt;
 gzip -d zero.gz&lt;br /&gt;
&lt;br /&gt;
completely clear the SPI flash:&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
&lt;br /&gt;
now write you desired bootloader to the SPI flash: ''(replace &amp;lt;code&amp;gt;spi-image.img&amp;lt;/code&amp;gt; with the name of you downloaded image - eg: &amp;lt;code&amp;gt;rock-5b-spi-image-g49da44e116d.img&amp;lt;/code&amp;gt; for the normal bootloader)''&lt;br /&gt;
 sudo dd if=spi-image.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
===== 4) Reboot =====&lt;br /&gt;
&lt;br /&gt;
Now you are done flashing a bootloader supporting NVMe booting.&lt;br /&gt;
&lt;br /&gt;
''I you do not flashed the NVMe already check [[Rock5/install/nvme | this guide]] to flash it. (again there are two options available)''&lt;br /&gt;
&lt;br /&gt;
Otherwise power off the ROCK 5, remove the µSD card or eMMC module and power it back up.&lt;br /&gt;
&lt;br /&gt;
It should now boot from your NVMe. 😉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Advanced (external) method ===&lt;br /&gt;
&lt;br /&gt;
====  Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC]]. The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
==== For ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: lsusb result: '''Bus 002 Device 032: ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device'''&lt;br /&gt;
** For Linux host: lsusb result: '''Bus 001 Device 112: ID 2207:350b Fuzhou Rockchip Electronics Company'''&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Write U-Boot images to SPI Nor Flash or erase SPI Nor Flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
 sudo dd if=rock-5b-spi-image-g49da44e116d.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
Get zero.img from [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz here].&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On your PC or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from Step2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 3: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
===== Step 1: comfirm that ROCK 5B is in Maskrom mode =====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Load Configuration File =====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Select Loader =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
===== Step 4: Select SPI image =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
===== Step 5: Excute =====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
== Addition: Erase the SPI Nor Flash ==&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblk*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Erase with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
==== Option3: Erase with Windows PC====&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in Maskrom mode&lt;br /&gt;
&lt;br /&gt;
===== Step 1: Download =====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Erase all  =====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Reboot device =====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/nvme</id>
		<title>Rock5/install/nvme</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/nvme"/>
				<updated>2023-02-01T20:36:57Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
&lt;br /&gt;
{{Languages|rock5/install/nvme}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/nvme | Install the image to M.2 NVME SSD]]&lt;br /&gt;
&lt;br /&gt;
= Install the image to M.2 NVME SSD =&lt;br /&gt;
&lt;br /&gt;
This guide describes how to write images to M.2 NVME SSD.&lt;br /&gt;
&lt;br /&gt;
== Option 1: with NVME to USB3.0 reader or PC with NVME slot==&lt;br /&gt;
&lt;br /&gt;
====Step one: Requirements ====&lt;br /&gt;
&lt;br /&gt;
This page describes how to download and install the image on a M.2 NVME SSD and boot on ROCK 5B. You need at least the following.&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B board with power supply&lt;br /&gt;
* One M.2 NVME SSD&lt;br /&gt;
* NVME to USB3.0 reader or a PC with NVME slot&lt;br /&gt;
&lt;br /&gt;
====Step two: Download necessary tools and image ====&lt;br /&gt;
&lt;br /&gt;
* Etcher is the tool we use to write image. Download the right Etcher for your PC from [[rock5/downloads | ROCK 5 Downloads]] page and install it. Check [https://www.balena.io/etcher/  Etcher website] for more info about Etcher.&lt;br /&gt;
* Choose the image you want to install from [[rock5/downloads | ROCK 5 Downloads]] page.&lt;br /&gt;
&lt;br /&gt;
Here we use the following image for writing.&lt;br /&gt;
&lt;br /&gt;
  rock-5b-debian-bullseye-xfce4-arm64-20220906-0626-gpt.img.xz&lt;br /&gt;
&lt;br /&gt;
====Step three: Write the image to M.2 NVME SSD ====&lt;br /&gt;
&lt;br /&gt;
* Insert the M.2 NVME SSD into M.2 NVME SSD to USB3.0 reader, which connects to host computer. &lt;br /&gt;
&lt;br /&gt;
* Run the application. For example double click balenaEtcher-1.5.116-x64.AppImage on Ubuntu 20.04:&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, we click button Select image.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-1.png]]&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, we click button Select Drive.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-2.png]]&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, we click button Flash.&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-3.png]]&lt;br /&gt;
&lt;br /&gt;
* In the etcher window, it shows us Flash Complete!&lt;br /&gt;
&lt;br /&gt;
[[File:etcher-rock-5b-4.png]]&lt;br /&gt;
&lt;br /&gt;
Done! Now you have successfully installed the OS image on M.2 NVME SSD.&lt;br /&gt;
&lt;br /&gt;
== Option 2: Write to NVMe SSD on ROCK 5B ==&lt;br /&gt;
&lt;br /&gt;
* Install Debian Linux image to [[Rock5/install/microSD | SD card]] or [[Rock5/install/eMMC | eMMC module]]&lt;br /&gt;
* Boot from SD card or eMMC module on ROCK 5B with NVMe SSD attached&lt;br /&gt;
* Download the ROCK 5B image when running Debian on ROCK 5B&lt;br /&gt;
* Check if NVMe SSD is detected &lt;br /&gt;
&lt;br /&gt;
on ROCK 5B:&lt;br /&gt;
&lt;br /&gt;
    sudo fdisk -l&lt;br /&gt;
&lt;br /&gt;
You can see the output message just like this:&lt;br /&gt;
&lt;br /&gt;
    Disk '''/dev/nvme0n1''': 232.9 GiB, 250059350016 bytes, 488397168 sectors             #The '/dev/nvme0n1' is your NVME SSD device path&lt;br /&gt;
    Units: sectors of 1 * 512 = 512 bytes                                           &lt;br /&gt;
    Sector size (logical/physical): 512 bytes / 512 bytes                           &lt;br /&gt;
    I/O size (minimum/optimal): 512 bytes / 512 bytes &lt;br /&gt;
&lt;br /&gt;
Write Image:&lt;br /&gt;
&lt;br /&gt;
on ROCK 5B:&lt;br /&gt;
&lt;br /&gt;
    sudo sudo xzcat ''''your compressed image path'''' | dd of=''''your NVME SSD device path'''' bs=1M status=progress            &lt;br /&gt;
    #such as: sudo xzcat rock-5b-debian-bullseye-xfce4-arm64-20220906-0626-gpt.img.xz  | dd of=/dev/nvme0n1 bs=1M status=progress&lt;br /&gt;
&lt;br /&gt;
== Option 3: Erase M.2 NVMe SSD ==&lt;br /&gt;
&lt;br /&gt;
When M.2 NVMe SSD is written with Android (or Linux) images before, now we change to Linux (or Android). It's recommended that you erase M.2 NVMe SSD first. Then write the target images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Boot from NVMe SSD =&lt;br /&gt;
&lt;br /&gt;
After you write the image to NVMe SSD, to boot from the NVMe SSD, you need to write the bootloader to SPI flash. Check [[Rock5/install/spi | Install to SPI]] to boot from NVMe SSD.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T20:23:57Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
== Install the bootloader to the SPI NOR flash ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and support other booting media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Simple method ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====  Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== 1) Boot linux from µSD card/eMMC =====&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the Rock 5 with linux from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''(check [[rock5/install/microSD | this guide]] to flash a new image to an µSD card''&lt;br /&gt;
''or check [[rock5/install/eMMC | this guide]] to flash a new image to an eMMC module)''&lt;br /&gt;
&lt;br /&gt;
===== 2) Download required files on the rock =====&lt;br /&gt;
&lt;br /&gt;
You can download files by using &amp;lt;code&amp;gt;wget DOWNLOADURLTOTHEFILE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for example to download the file to clear the spi: &amp;lt;code&amp;gt;wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the:&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz spi clearing file]&lt;br /&gt;
&lt;br /&gt;
and the latest SPI bootloader: &lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled (Recommend for everything except armbian)&lt;br /&gt;
* [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use this if you like to boot armbian from the M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
* [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled ''(This is an debug bootloader if you need to troubleshoot booting issue with serial)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== 3) Flash the SPI flash =====&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
It should give &amp;lt;code&amp;gt;/dev/mtdblock0&amp;lt;/code&amp;gt; back&lt;br /&gt;
&lt;br /&gt;
clear&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
 sudo dd if=rock-5b-spi-image-g49da44e116d.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
Get zero.img from [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Advanced (external) method ===&lt;br /&gt;
&lt;br /&gt;
====  Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC]]. The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
==== For ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: lsusb result: '''Bus 002 Device 032: ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device'''&lt;br /&gt;
** For Linux host: lsusb result: '''Bus 001 Device 112: ID 2207:350b Fuzhou Rockchip Electronics Company'''&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Write U-Boot images to SPI Nor Flash or erase SPI Nor Flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
 sudo dd if=rock-5b-spi-image-g49da44e116d.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
Get zero.img from [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz here].&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On your PC or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from Step2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 3: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
===== Step 1: comfirm that ROCK 5B is in Maskrom mode =====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Load Configuration File =====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Select Loader =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
===== Step 4: Select SPI image =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
===== Step 5: Excute =====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
== Addition: Erase the SPI Nor Flash ==&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblk*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Erase with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
==== Option3: Erase with Windows PC====&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in Maskrom mode&lt;br /&gt;
&lt;br /&gt;
===== Step 1: Download =====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Erase all  =====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Reboot device =====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T19:53:29Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: /* 1) Boot linux from µSD card/eMMC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
== Install the bootloader to the SPI NOR flash ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and support other booting media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Simple method ===&lt;br /&gt;
&lt;br /&gt;
====  Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
===== 1) Boot linux from µSD card/eMMC =====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the Rock 5 with Debian or Ubuntu from an µSD card or an eMMC module.&lt;br /&gt;
&lt;br /&gt;
''[[rock5/install/microSD | check this guide to flash a new image to an µSD card]]''&lt;br /&gt;
&lt;br /&gt;
''[[rock5/install/eMMC | or check this guide to flash a new image to an eMMC module]]''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled (Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled (Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Advanced (external) method ===&lt;br /&gt;
&lt;br /&gt;
====  Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC]]. The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
==== For ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: lsusb result: '''Bus 002 Device 032: ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device'''&lt;br /&gt;
** For Linux host: lsusb result: '''Bus 001 Device 112: ID 2207:350b Fuzhou Rockchip Electronics Company'''&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Write U-Boot images to SPI Nor Flash or erase SPI Nor Flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
 sudo dd if=rock-5b-spi-image-g49da44e116d.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
Get zero.img from [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz here].&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On your PC or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from Step2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 3: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
===== Step 1: comfirm that ROCK 5B is in Maskrom mode =====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Load Configuration File =====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Select Loader =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
===== Step 4: Select SPI image =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
===== Step 5: Excute =====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
== Addition: Erase the SPI Nor Flash ==&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblk*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Erase with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
==== Option3: Erase with Windows PC====&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in Maskrom mode&lt;br /&gt;
&lt;br /&gt;
===== Step 1: Download =====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Erase all  =====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Reboot device =====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T19:52:59Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
== Install the bootloader to the SPI NOR flash ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and support other booting media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Simple method ===&lt;br /&gt;
&lt;br /&gt;
====  Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
===== 1) Boot linux from µSD card/eMMC =====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first step is to boot the Rock 5 with Debian or Ubuntu from an µSD card or an eMMC module.&lt;br /&gt;
''[[rock5/install/microSD | check this guide to flash a new image to an µSD card]]''&lt;br /&gt;
''[[rock5/install/eMMC | or check this guide to flash a new image to an eMMC module]]''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled (Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled (Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Advanced (external) method ===&lt;br /&gt;
&lt;br /&gt;
====  Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC]]. The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
==== For ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: lsusb result: '''Bus 002 Device 032: ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device'''&lt;br /&gt;
** For Linux host: lsusb result: '''Bus 001 Device 112: ID 2207:350b Fuzhou Rockchip Electronics Company'''&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Write U-Boot images to SPI Nor Flash or erase SPI Nor Flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
 sudo dd if=rock-5b-spi-image-g49da44e116d.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
Get zero.img from [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz here].&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On your PC or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from Step2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 3: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
===== Step 1: comfirm that ROCK 5B is in Maskrom mode =====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Load Configuration File =====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Select Loader =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
===== Step 4: Select SPI image =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
===== Step 5: Excute =====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
== Addition: Erase the SPI Nor Flash ==&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblk*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Erase with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
==== Option3: Erase with Windows PC====&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in Maskrom mode&lt;br /&gt;
&lt;br /&gt;
===== Step 1: Download =====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Erase all  =====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Reboot device =====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T19:46:24Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the bootloader to the SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
== Install the bootloader to the SPI NOR flash ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it contains the bootloader for backup booting and support other booting media that the SoC maskrom mode itself does not direct support (such as NVMe, SATA or USB 3).&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the bootloader to the SPI flash on the ROCK 5B.&lt;br /&gt;
&lt;br /&gt;
There are two methods available:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Simple method ===&lt;br /&gt;
&lt;br /&gt;
====  Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
===== 1) Flash linux to a µSD card/eMMC =====&lt;br /&gt;
&lt;br /&gt;
The first step is to get a Debian or Ubuntu image from the [[rock5/downloads | downloads ]] section&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled (Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled (Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Advanced (external) method ===&lt;br /&gt;
&lt;br /&gt;
====  Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC]]. The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
==== For ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: lsusb result: '''Bus 002 Device 032: ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device'''&lt;br /&gt;
** For Linux host: lsusb result: '''Bus 001 Device 112: ID 2207:350b Fuzhou Rockchip Electronics Company'''&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Write U-Boot images to SPI Nor Flash or erase SPI Nor Flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
 sudo dd if=rock-5b-spi-image-g49da44e116d.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
Get zero.img from [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz here].&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On your PC or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from Step2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 3: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
===== Step 1: comfirm that ROCK 5B is in Maskrom mode =====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Load Configuration File =====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Select Loader =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
===== Step 4: Select SPI image =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
===== Step 5: Excute =====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
== Addition: Erase the SPI Nor Flash ==&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblk*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Erase with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
==== Option3: Erase with Windows PC====&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in Maskrom mode&lt;br /&gt;
&lt;br /&gt;
===== Step 1: Download =====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Erase all  =====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Reboot device =====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T19:43:49Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the image to SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
== Install the image to SPI NOR flash ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it is useful to install the bootloader to the SPI flash for a back up booting and support other booting media that the SoC maskrom mode doesn't direct support, such as NVMe, SATA or USB 3.&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the image to the SPI flash on the ROCK 5B board.&lt;br /&gt;
&lt;br /&gt;
There are two methods available:&lt;br /&gt;
*[[#Simple_method | simple method]] - flash the SPI from the ROCK5 itself&lt;br /&gt;
*[[#Advanced_(external)_method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Simple method ===&lt;br /&gt;
&lt;br /&gt;
====  Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
===== 1) Flash linux to a µSD card/eMMC =====&lt;br /&gt;
&lt;br /&gt;
The first step is to get a Debian or Ubuntu image from the [[rock5/downloads | downloads ]] section&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled (Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled (Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Advanced (external) method ===&lt;br /&gt;
&lt;br /&gt;
====  Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Procedure ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC]]. The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
==== For ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: lsusb result: '''Bus 002 Device 032: ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device'''&lt;br /&gt;
** For Linux host: lsusb result: '''Bus 001 Device 112: ID 2207:350b Fuzhou Rockchip Electronics Company'''&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Write U-Boot images to SPI Nor Flash or erase SPI Nor Flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
 sudo dd if=rock-5b-spi-image-g49da44e116d.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
Get zero.img from [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz here].&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On your PC or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from Step2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 3: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
===== Step 1: comfirm that ROCK 5B is in Maskrom mode =====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Load Configuration File =====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Select Loader =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
===== Step 4: Select SPI image =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
===== Step 5: Excute =====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
== Addition: Erase the SPI Nor Flash ==&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblk*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Erase with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
==== Option3: Erase with Windows PC====&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in Maskrom mode&lt;br /&gt;
&lt;br /&gt;
===== Step 1: Download =====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Erase all  =====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Reboot device =====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	<entry>
		<id>https://wiki.radxa.com/Rock5/install/spi</id>
		<title>Rock5/install/spi</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/Rock5/install/spi"/>
				<updated>2023-02-01T19:42:11Z</updated>
		
		<summary type="html">&lt;p&gt;Potter-91: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{rock5_header}}&lt;br /&gt;
{{Languages|rock5/dev/spi}}&lt;br /&gt;
&lt;br /&gt;
    [[rock5 | ROCK 5]] &amp;gt; [[rock5/install | Installation]] &amp;gt; [[rock5/install/spi | Install the image to SPI NOR flash]]&lt;br /&gt;
&lt;br /&gt;
== Install the image to SPI NOR flash ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROCK 5 has a SPI flash on the board, it is useful to install the bootloader to the SPI flash for a back up booting and support other booting media that the SoC maskrom mode doesn't direct support, such as NVMe, SATA or USB 3.&lt;br /&gt;
&lt;br /&gt;
This page describe how to write/install the image to the SPI flash on the ROCK 5B board.&lt;br /&gt;
&lt;br /&gt;
There are two methods available:&lt;br /&gt;
*[[#Simple_Method | simple method]] - flash the SPI from the ROCK5 itself&lt;br /&gt;
*[[#Advanced_Method | advanced method]] - flash the SPI with an external computer&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Simple Method ===&lt;br /&gt;
&lt;br /&gt;
====  Requirements ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* Linux image for ROCK 5B - ''(Android images are not supported yet)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Procedere ====&lt;br /&gt;
&lt;br /&gt;
===== 1) Flash linux to a µSD card/eMMC =====&lt;br /&gt;
&lt;br /&gt;
The first step is to get a Debian or Ubuntu image from the [[rock5/downloads | downloads ]] section&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled (Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled (Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Advanced (External) Method ===&lt;br /&gt;
&lt;br /&gt;
====  Requirement ====&lt;br /&gt;
&lt;br /&gt;
* ROCK 5B with proper power &lt;br /&gt;
* Linux image for ROCK 5B, Android image is not supported yet&lt;br /&gt;
* SD card or eMMC module&lt;br /&gt;
* USB Type C cable&lt;br /&gt;
* Windows/linux/macOS  PC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Install Tools &amp;amp; Drivers ===&lt;br /&gt;
&lt;br /&gt;
Please check this guide, [[rock5/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC]]. The PC tools we use to communicate with ROCK 5 in Maskrom mode are the '''rkdeveloptool''' on Linux/macOS and '''RkDevtool''' on Windows PC.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Get RK3588 loader and U-Boot images ===&lt;br /&gt;
&lt;br /&gt;
==== For ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
* Download the loader image from: &lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/rk3588_spl_loader_v1.08.111.bin RK3588 loader] - USB flashing helper&lt;br /&gt;
&lt;br /&gt;
* Download the latest SPI image from:&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img release version] with u-boot serial console disabled(Recommend)&lt;br /&gt;
** [https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img debug version] with u-boot serial console enabled(Use it when you need to troubleshoot booting issue)&lt;br /&gt;
** [https://github.com/huazi-yg/rock5b/releases/download/rock5b/rkspi_loader.img armbian version] (Use it when you need to install the armbian Image to M.2 NVME SSD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Boot the board to Maskrom mode ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rock-5b-typec-maskrom.jpeg|400px]]&lt;br /&gt;
&lt;br /&gt;
To boot ROCK 5B to Maskrom mode is simple:&lt;br /&gt;
&lt;br /&gt;
* Power off the board.&lt;br /&gt;
* Remove bootable device like MicroSD card, eMMC module, etc.&lt;br /&gt;
* Press the golden (or silver on some board revisions) button and hold it.&lt;br /&gt;
* Plug the USB-A to Type-C cable to ROCK 5B Type-C port, the other side to PC.&lt;br /&gt;
* Release the golded button.&lt;br /&gt;
* Check usb device&lt;br /&gt;
** For macOS host: lsusb result: '''Bus 002 Device 032: ID 2207:350b Fuzhou Rockchip Electronics Co., Ltd. Composite Device'''&lt;br /&gt;
** For Linux host: lsusb result: '''Bus 001 Device 112: ID 2207:350b Fuzhou Rockchip Electronics Company'''&lt;br /&gt;
** For Windows host: Open RKDevTool and you would see the device is in '''Found One MASKROM Device'''&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Write U-Boot images to SPI Nor Flash or erase SPI Nor Flash ===&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblock*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=zero.img of=/dev/mtdblock0&lt;br /&gt;
 sudo dd if=rock-5b-spi-image-g49da44e116d.img of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
Get zero.img from [https://dl.radxa.com/rock5/sw/images/others/zero.img.gz here].&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Flash with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
On your PC or Mac, run the rkdeveloptool &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool ld&lt;br /&gt;
 DevNo=1	Vid=0x2207,Pid=0x350b,LocationID=106	Maskrom&lt;br /&gt;
&lt;br /&gt;
This will load the loader (flash helper, downloaded from Step2) to run on ROCK 5B and init the ram and prepare the flashing environment etc.  &lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool db /path/to/rk3588_spl_loader_v1.08.111.bin		 # will output:&lt;br /&gt;
 Downloading bootloader succeeded.&lt;br /&gt;
&lt;br /&gt;
Next, write SPI image from PC/Mac to ROCK 5B SPI flash&lt;br /&gt;
&lt;br /&gt;
You can use the image download from Step 2.&lt;br /&gt;
&lt;br /&gt;
 sudo rkdeveloptool wl 0 rock-5b-spi-image-g49da44e116d.img					&lt;br /&gt;
 Write LBA from file (100%)&lt;br /&gt;
&lt;br /&gt;
Reboot the device &lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
now, the device should boot on SPI Nor Flash. And '''the blue led is on'''.&lt;br /&gt;
&lt;br /&gt;
==== Option 3: Flash with Windows PC ====&lt;br /&gt;
&lt;br /&gt;
Double click the RKDevTool.exe and you will see the following interface:&lt;br /&gt;
Double click the '''RKDevTool.exe''' and you will see the following interface:&lt;br /&gt;
&lt;br /&gt;
===== Step 1: comfirm that ROCK 5B is in Maskrom mode =====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Load Configuration File =====&lt;br /&gt;
&lt;br /&gt;
Right-click in the list box and select Load Config,Then select the configuration file in the resource management folder（The configuration file and RKDevTool are in the same directory）&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Select Loader =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;Loader&amp;quot; row to select rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
&lt;br /&gt;
===== Step 4: Select SPI image =====&lt;br /&gt;
&lt;br /&gt;
Next, click  the right last columns in the &amp;quot;spi&amp;quot; row to select spi-image.&lt;br /&gt;
&lt;br /&gt;
===== Step 5: Excute =====&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Excute&amp;quot; button, and you will see the content in the red box on the right. When the progress reaches 100%, the download is completed.&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-1.png |1000px]]&lt;br /&gt;
[[File: configuration.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File: rock-5b-spi-flash-02.png |1000px]]&lt;br /&gt;
&lt;br /&gt;
== Addition: Erase the SPI Nor Flash ==&lt;br /&gt;
&lt;br /&gt;
==== Option 1: Operate on ROCK 5B ====&lt;br /&gt;
&lt;br /&gt;
Boot your ROCK 5B with Linux running on SD card or eMMC module:&lt;br /&gt;
&lt;br /&gt;
Make sure the SPI flash is available:&lt;br /&gt;
 ls /dev/mtdblk*&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mtdblock0&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
==== Option 2: Erase with Linux PC/Mac ====&lt;br /&gt;
&lt;br /&gt;
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]&lt;br /&gt;
And extract it.&lt;br /&gt;
&lt;br /&gt;
 rkdeveloptool db rk3588_spl_loader_v1.08.111.bin&lt;br /&gt;
 rkdeveloptool wl 0 zero.img&lt;br /&gt;
 rkdeveloptool rd&lt;br /&gt;
&lt;br /&gt;
==== Option3: Erase with Windows PC====&lt;br /&gt;
&lt;br /&gt;
Before Erasing, please confirm that ROCK 5B is in Maskrom mode&lt;br /&gt;
&lt;br /&gt;
===== Step 1: Download =====&lt;br /&gt;
Choose the &amp;quot;Advanced features&amp;quot; button, then select rk3588_spl_loader_v1.08.111.bin, next click the &amp;quot;Download&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 2: Erase all  =====&lt;br /&gt;
Click the &amp;quot;erase all&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
===== Step 3: Reboot device =====&lt;br /&gt;
&lt;br /&gt;
[[File: eraseall_new.png |700px]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock5.&lt;/div&gt;</summary>
		<author><name>Potter-91</name></author>	</entry>

	</feed>