Difference between revisions of "Template:RockchipUnbrick"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
 
(updated by API)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
===The Boot order between eMMC and SD card===
+
== Unbricking Method ==
By default, the system will be booted from the TF card first, but this is not the case under all conditions. This section will explain all situations in detail; <br>
+
If the ROM is not installed correctly, causing the development board to become bricked, and you might not have the opportunity to reinstall the ROM via an SD card, you need to enter Maskrom mode to unbrick it by erasing the storage device.<br>
<br>
+
===Windows Users===
Refer to rockchip official document [http://opensource.rock-chips.com/wiki_Boot_option], there are two types of loader program:<br>
+
==== Download Required Files ====
1) U-Boot TPL/SPL (i.e. upsream U-Boot, also called mainline U-Boot)<br>
+
* '''Get the necessary tools''': Visit [https://dl.friendlyelec.com/{{{1}}} here], find '''RKDevTool_v3.19_for_window.zip''' and '''DriverAssitant_v5.12.zip''' in the '''05_Tools''' directory, and download them to your local machine.
2) Rockchip MiniLoader<br>
+
* '''Install Rockchip USB driver and RKDevTool''': Extract '''DriverAssitant_v5.12.zip''' to install the Rockchip USB driver, and extract '''RKDevTool_v3.19_for_window.zip''' to obtain the Rockchip flashing tool '''RKDevTool'''.
<br>
+
* '''Get the loader''': Visit [http://112.124.9.243/dvdfiles/ here], enter the tools directory corresponding to your CPU model, and download '''MiniLoaderAll.bin'''.
Things to note: <br>
+
==== Enter Maskrom Mode to Erase the Storage Device ====
1) FriendlyELEC's image uses Rockchip MiniLoader<br>
+
* Remove the SD card, USB device, and other peripherals from the development board
2) The third-party image usually uses U-Boot TPL/SPL<br>
+
* Start '''RKDevTool''' on your computer.
<br>
+
{{#switch: {{{1}}}
The following situations will always start from eMMC:<br>
+
| NanoPi-R5C =
If the system in the eMMC, or the system in the TF card uses the first Loader type U-Boot TPL/SPL, it will always boot from the eMMC;<br>
+
* Press and hold the “Mask” key, power on the board. After the status LED has been on for at least 3 seconds, release the Mask key
If you want to boot from the TF card, there are the following methods:<br>
+
* Use a USB A-to-A cable, connect {{{1}}} to a PC as follows, connect to the USB port on the side near the TF card
'''Method 1''': Clear the Loader on the eMMC, the clearing method is as follows, after starting from the eMMC, enter the following command on the command line to clear the Loader on the eMMC: <br>
+
| NanoPi-R4SE
 +
| NanoPi-R5S
 +
| NanoPi-R6S
 +
| NanoPi-R6C =
 +
* Press and hold the “Mask” key, power on the board. After the status LED has been on for at least 3 seconds, release the Mask key
 +
* Use a USB A-to-A cable, connect {{{1}}} to a PC as follows
 +
| NanoPC-T6
 +
| NanoPC-T6-LTS
 +
| CM3588 =
 +
* Press and hold the “Mask” key, power on the board. After the status LED has been on for at least 3 seconds, release the Mask key
 +
* Use a USB C-to-A cable, connect {{{1}}} to a PC
 +
| NanoPi-R3S
 +
| NanoPi-R2S-Plus =
 +
* Press and hold the “Mask” key, Use a USB C-to-A cable, connect {{{1}}} to a PC,After the status LED has been on for at least 3 seconds, release the Mask key
 +
| SOM-RK3399 =
 +
* Press and hold the "Recover" key, Use a USB C-to-A cable, connect {{{1}}} to a PC,After the status LED has been on for at least 3 seconds, release the "Recover" key
 +
| #default =
 +
* Press and hold the “Mask” key, Use a USB cable, connect {{{1}}} to a PC,After the status LED has been on for at least 3 seconds, release the Mask key
 +
}}
 +
{{#switch: {{{1}}}
 +
| NanoPi-R4SE =
 +
[[File:Nanopir4se-usba-to-usba.jpg|frameless|400px]]
 +
| NanoPi-R6S =
 +
[[File:Nanopir6s-usba-to-usba2.jpg|frameless|400px]]
 +
| NanoPi-M6 =
 +
[[File:Nanopim6-usba-to-usba2.jpg|frameless|400px]]
 +
| NanoPi-R6C =
 +
[[File:Nanopir6c-usba-to-usba.jpg|frameless|400px]]
 +
| NanoPi-R5S =
 +
[[File:Nanopir5s-usba-to-usba2.jpg|frameless|400px]]
 +
| NanoPi-R5C =
 +
[[File:R5C-usbflash.jpg|frameless|400px]]
 +
| NanoPi-R2S-Plus =
 +
[[File:R2SPLUS-usbflash.jpg|frameless|400px]]
 +
| NanoPi-R3S =
 +
[[File:Xianshua-R3S.jpg|frameless|400px]]
 +
| NanoPC-T6-LTS
 +
| NanoPC-T6 =
 +
[[File:T6LTS-usbflash.jpg|frameless|400px]]
 +
| CM3588 =
 +
[[File:Cm3588-usbflash.jpg|frameless|400px]]
 +
| NanoPi-Zero2 =
 +
[[File:Zero2-usbflash.jpg|frameless|400px]]
 +
| #default =
 +
}}
 +
* You will see '''Found One MASKROM Device''' displayed at the bottom of the '''RKDevTool''' interface, as shown below:
 +
[[File:Rkdevtool_found_one_maskrom_device.png|frameless|600px]]
 +
* Click the '''Advanced Function''' tab in the '''RKDevTool''' interface.
 +
* In the '''Boot''' text box, select '''MiniLoaderAll.bin''', then click the '''Download''' button.
 +
* Select '''EMMC''', click '''Switch Storage''', then click the '''EraseAll''' button to erase the eMMC.
 +
[[File:Rkdevtool_erase_emmc.png|frameless|600px]]
 +
{{#switch: {{{1}}}
 +
| NanoPi-R5S
 +
| NanoPi-R2C-Plus
 +
| CM3588
 +
| NanoPC-T6 =
 +
* '''(Optional)''': If your {{{1}}} has SPI Nor Flash, select '''SPINOR''', click '''Switch Storage''', then click the '''EraseAll''' button to erase the SPI Nor Flash.
 +
[[File:Rkdevtool_erase_spinorflash.png|frameless|600px]]
 +
}}
 +
* At this point, {{{1}}} is restored to its initial state and can be normally booted via SD card or eMMC.
 +
===Linux Users===
 +
====Download the Required Files====
 +
* '''Get the necessary tools''': Visit [https://dl.friendlyelec.com/{{{1}}} here] and find '''upgrade_tool_v2.30_for_linux.tgz''' in the '''05_Tools''' directory and download it locally.
 +
* '''Get the loader''': Visit [http://112.124.9.243/dvdfiles/ here], enter the tools directory corresponding to your CPU model, and download '''MiniLoaderAll.bin'''.
 +
====Installation for upgrade_tool====
 +
Using the following commands:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
dd if=/dev/zero of=/dev/mmcblk2 bs=8M count=1
+
tar xzf upgrade_tool_v2.30_for_linux.tgz
 +
cd upgrade_tool_v2.30_for_linux
 +
sudo cp upgrade_tool /usr/local/sbin/
 +
sudo chmod 755 /usr/local/sbin/upgrade_tool
 
</syntaxhighlight>
 
</syntaxhighlight>
'''Method 2''': Insert the TF card, Press Maskrom Key (or short-circuit the Maskrom contacts) and then power on (need to keep the short-circuit for about 3 seconds), it will start from the TF card<br>
+
====Enter Maskrom Mode to Erase the Storage Device====
<br>
+
* Connect {{{1}}} to the computer using a USB data cable.
The summary is as follows:<br>
+
* Disconnect the power from {{{1}}}, hold down the '''MASK''' button, connect the power, and release the button after 4 seconds.
{| class="wikitable"
+
* Check the connection with the following command:
|-
+
<syntaxhighlight lang="bash">
! eMMC current system
+
upgrade_tool LD
! TF card current system
+
</syntaxhighlight>
! Boot priority
+
A result similar to "DevNo=1 Vid=0x2207,Pid=0x350b,LocationID=13 Mode=Maskrom SerialNo=" indicates that the device has been detected.
|-
+
* Erase the eMMC with the following command:
| No system
+
<syntaxhighlight lang="bash">
| Any image
+
upgrade_tool EF MiniLoaderAll.bin
| TF card
+
</syntaxhighlight>
|-
+
{{#switch: {{{1}}}
| FriendlyELEC's image
+
| NanoPi-R5S
| FriendlyELEC's image
+
| NanoPi-R2C-Plus
| TF card
+
| CM3588
|-
+
| NanoPC-T6 =
| FriendlyELEC's image
+
* '''(Optional)''': If your {{{1}}} has SPI Nor Flash, erase the SPI Nor Flash with the following commands:
| Image with Mainline U-boot
+
<syntaxhighlight lang="bash">
| eMMC
+
upgrade_tool DB MiniLoaderAll.bin
|-
+
upgrade_tool SSD  # Select 5, SPINOR
| Image with Mainline U-boot
+
dd if=/dev/zero of=zero.img bs=1M count=16  # For 16M NOR FLASH
| FriendlyELEC's image
+
upgrade_tool WL 0 zero.img
| eMMC
+
</syntaxhighlight>
|-
+
}}
| Image with Mainline U-boot
+
* At this point, {{{1}}} has been restored to its initial state and can boot the system normally via SD card or eMMC.
| Image with Mainline U-boot
+
===Mac Users===
| eMMC
+
Our tests found that upgrade_tool_v2.25 does not work properly on macOS. Therefore, we recommend using Windows or Linux unless an updated version of upgrade_tool becomes available.
|}
+

Latest revision as of 03:33, 13 December 2024

1 Unbricking Method

If the ROM is not installed correctly, causing the development board to become bricked, and you might not have the opportunity to reinstall the ROM via an SD card, you need to enter Maskrom mode to unbrick it by erasing the storage device.

1.1 Windows Users

1.1.1 Download Required Files

  • Get the necessary tools: Visit here, find RKDevTool_v3.19_for_window.zip and DriverAssitant_v5.12.zip in the 05_Tools directory, and download them to your local machine.
  • Install Rockchip USB driver and RKDevTool: Extract DriverAssitant_v5.12.zip to install the Rockchip USB driver, and extract RKDevTool_v3.19_for_window.zip to obtain the Rockchip flashing tool RKDevTool.
  • Get the loader: Visit here, enter the tools directory corresponding to your CPU model, and download MiniLoaderAll.bin.

1.1.2 Enter Maskrom Mode to Erase the Storage Device

  • Remove the SD card, USB device, and other peripherals from the development board
  • Start RKDevTool on your computer.
  • Press and hold the “Mask” key, Use a USB cable, connect {{{1}}} to a PC,After the status LED has been on for at least 3 seconds, release the Mask key
  • You will see Found One MASKROM Device displayed at the bottom of the RKDevTool interface, as shown below:

Rkdevtool found one maskrom device.png

  • Click the Advanced Function tab in the RKDevTool interface.
  • In the Boot text box, select MiniLoaderAll.bin, then click the Download button.
  • Select EMMC, click Switch Storage, then click the EraseAll button to erase the eMMC.

Rkdevtool erase emmc.png

  • At this point, {{{1}}} is restored to its initial state and can be normally booted via SD card or eMMC.

1.2 Linux Users

1.2.1 Download the Required Files

  • Get the necessary tools: Visit here and find upgrade_tool_v2.30_for_linux.tgz in the 05_Tools directory and download it locally.
  • Get the loader: Visit here, enter the tools directory corresponding to your CPU model, and download MiniLoaderAll.bin.

1.2.2 Installation for upgrade_tool

Using the following commands:

tar xzf upgrade_tool_v2.30_for_linux.tgz
cd upgrade_tool_v2.30_for_linux
sudo cp upgrade_tool /usr/local/sbin/
sudo chmod 755 /usr/local/sbin/upgrade_tool

1.2.3 Enter Maskrom Mode to Erase the Storage Device

  • Connect {{{1}}} to the computer using a USB data cable.
  • Disconnect the power from {{{1}}}, hold down the MASK button, connect the power, and release the button after 4 seconds.
  • Check the connection with the following command:
upgrade_tool LD

A result similar to "DevNo=1 Vid=0x2207,Pid=0x350b,LocationID=13 Mode=Maskrom SerialNo=" indicates that the device has been detected.

  • Erase the eMMC with the following command:
upgrade_tool EF MiniLoaderAll.bin
  • At this point, {{{1}}} has been restored to its initial state and can boot the system normally via SD card or eMMC.

1.3 Mac Users

Our tests found that upgrade_tool_v2.25 does not work properly on macOS. Therefore, we recommend using Windows or Linux unless an updated version of upgrade_tool becomes available.