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

Difference between revisions of "Rock3/installusb-install-radxa-e23"

(Install to eMMC via USB)
 
(8 intermediate revisions by 2 users not shown)
Line 8: Line 8:
 
=== Requirement ===
 
=== Requirement ===
  
* Radxa E23 (with Radxa CM3)
+
* Radxa E23 with Radxa CM3
 
* 5V Type-C Power adapter
 
* 5V Type-C Power adapter
* USB Male A to Dupont cable.
+
* USB Male A to Dupont cable. (Needed for Radxa E23 V1.1)
 
** One port is Male A type and the other includes four Dupont lines.
 
** One port is Male A type and the other includes four Dupont lines.
 
** Hardware connection
 
** Hardware connection
Line 26: Line 26:
 
|}
 
|}
  
[[File:radxa-e23-usb-male-a-to-dupont-cable.jpg | 500px ]]
+
[[File:E23 wire and board.jpg | 500px]]
  
 
* [[rock3/downloads | Radxa E23 system images]]
 
* [[rock3/downloads | Radxa E23 system images]]
 
* [https://dl.radxa.com/rock3/images/loader/rk356x_spl_loader_ddr1056_v1.06.110.bin rk356x loader]
 
* [https://dl.radxa.com/rock3/images/loader/rk356x_spl_loader_ddr1056_v1.06.110.bin rk356x loader]
  
=== Setup rkdeveloptool (version: >=1.32) on Host PC ===
+
=== Install Tools&Drivers ===
==== Linux====
+
Please check this guide, [[rock3/install/rockchip-flash-tools | Install rockchip flash tools under Windows/Linux/MacOS PC]].
To build rkdeveloptool on a debain based Linux distribution, follow the instruction below:
+
  
Install build dependecy:
+
=== Boot the board to maskrom mode ===
  sudo apt-get install libudev-dev libusb-1.0-0-dev dh-autoreconf
+
  
Clone the source code and build:
+
==== For Radxa E23 V1.1 ====
  git clone https://github.com/rockchip-linux/rkdeveloptool
+
  cd rkdeveloptool
+
  autoreconf -i
+
  ./configure
+
  make
+
 
+
If you encounter compile error like below
+
  ./configure: line 4269: syntax error near unexpected token `LIBUSB1,libusb-1.0'
+
  ./configure: line 4269: `PKG_CHECK_MODULES(LIBUSB1,libusb-1.0)'
+
 
+
You should install pkg-config libusb-1.0
+
  sudo apt-get install pkg-config libusb-1.0
+
 
+
Then re-run
+
  autoreconf -i
+
  ./configure
+
  make
+
 
+
Now you have rkdeveloptool executable at the current directory.
+
  sudo cp rkdeveloptool /usr/local/bin/
+
 
+
Make sure that its version is at least 1.32.
+
 
+
  rkdeveloptool -v
+
  rkdeveloptool ver 1.32
+
 
+
==== MacOS ====
+
To build rkdeveloptool on macOS, you need [https://brew.sh/ homebrew](or similar package manager) to install required packages.
+
 
+
Install build dependency:
+
  brew install automake autoconf libusb
+
 
+
Clone the source code and build:
+
  git clone https://github.com/rockchip-linux/rkdeveloptool
+
  cd rkdeveloptool
+
  autoreconf -i
+
  ./configure
+
  make
+
 
+
If you encounter compile error like below
+
  ./configure: line 5384: syntax error near unexpected token `LIBUSB1,libusb-1.0'
+
  ./configure: line 5384: `PKG_CHECK_MODULES(LIBUSB1,libusb-1.0)'
+
 
+
You should install pkg-config libusb-1.0
+
  brew install pkg-config
+
 
+
Then re-run
+
  autoreconf -i
+
  ./configure
+
  make
+
 
+
Now you have rkdeveloptool executable at the current directory.
+
 
+
  sudo cp rkdeveloptool /usr/local/bin/
+
 
+
Make sure that its version is at least 1.32.
+
 
+
  rkdeveloptool -v
+
  rkdeveloptool ver 1.32
+
 
+
=== Boot the board to maskrom mode ===
+
  
 
Note that Radxa E23 OTG port consists of PIN#18, PIN#16, PIN#14 adn PIN#2 on the 40-pin Header.
 
Note that Radxa E23 OTG port consists of PIN#18, PIN#16, PIN#14 adn PIN#2 on the 40-pin Header.
Line 108: Line 45:
 
* Remove Type-C adapter
 
* Remove Type-C adapter
 
* Remove PoE Hat
 
* Remove PoE Hat
* Plug the USB Male A to Dupont cable to Radxa E23 OTG port, the other side to PC. Only use three Dupont wires (Dara+, Data-, GND), plug the Red Power wire later. Like this.
+
* Plug the USB Male A to Dupont cable to Radxa E23 OTG port, the other side to PC. Only use three Dupont wires (Dara+, Data-, GND).
 +
[[File:Radxa-e23-otg-3-date.jpeg  | 500px ]]
  
[[File:radxa-e23-otg-connection-without-red-wire.jpg | 500px ]]
+
* Press and hold the golden maskrom button next to wireless module.
 
+
[[File:Radxa-e23-maskrom-key.jpeg | 500px ]]
* Press and hold the golded maskrom button next to wireless module. Press and hold the golden button next to spi nor flash.
+
 
* Plug the Red Dupont wire to PIN#2 of 40-pin header on Radxa E23.
 
* Plug the Red Dupont wire to PIN#2 of 40-pin header on Radxa E23.
  
[[File:radxa-e23-otg-connection-with-red-wire.jpg | 500px ]]
+
[[File:Radxa-e23-red-wire-5v.jpg | 500px]]
  
* Release two golden buttons
+
* Release the golden button
  
 
Now on your Linux PC, '''lsusb''' command show show the following usb devices
 
Now on your Linux PC, '''lsusb''' command show show the following usb devices
  
  Bus 001 Device 112: ID 2207:350a Fuzhou Rockchip Electronics Compan
+
Bus 001 Device 112: ID 2207:350a Fuzhou Rockchip Electronics Company
  
 
It means the device is in '''maskrom mode''' now.
 
It means the device is in '''maskrom mode''' now.
Line 129: Line 66:
 
On your PC, run the rkdeveloptool
 
On your PC, run the rkdeveloptool
  
  rkdeveloptool ld
+
rkdeveloptool ld
  DevNo=1 Vid=0x2207,Pid=0x350a,LocationID=104 Maskrom
+
DevNo=1 Vid=0x2207,Pid=0x350a,LocationID=104 Maskrom
  
 
Download the loader (flash helper) to init the ram and prepare the flashing environment etc. If you don't have it, you can download it from [https://dl.radxa.com/rock3/images/loader/rk356x_spl_loader_ddr1056_v1.06.110.bin here]
 
Download the loader (flash helper) to init the ram and prepare the flashing environment etc. If you don't have it, you can download it from [https://dl.radxa.com/rock3/images/loader/rk356x_spl_loader_ddr1056_v1.06.110.bin here]
  
  rk356x_spl_loader_ddr1056_v1.06.110.bin
+
rkdeveloptool db rk356x_spl_loader_ddr1056_v1.06.110.bin
  
 
Write the GPT image to eMMC, start to write from offset '''0'''.
 
Write the GPT image to eMMC, start to write from offset '''0'''.
 
For example.
 
For example.
  
  rkdeveloptool wl 0 /path/to/radxa-e23-xxx-gpt.img
+
rkdeveloptool wl 0 /path/to/radxa-e23-xxx-gpt.img
  
 
Reboot the device
 
Reboot the device
  
  rkdeveloptool rd
+
rkdeveloptool rd
  
 
Now the device should boot the new image on eMMC.
 
Now the device should boot the new image on eMMC.
 +
 +
Please note that you can use zero.img instead of radxa-e23-xxx-gpt.img when erasing eMMC on board.
 +
Try the following commands.
 +
 +
dd if=/dev/zero of=./zero.img bs=1M count=64
 +
rkdeveloptool db rk356x_spl_loader_ddr1056_v1.06.110.bin
 +
rkdeveloptool wl 0 zero.img
  
 
=== Troubleshooting ===
 
=== Troubleshooting ===
  
 
Check [[rock3/FAQs |ROCK 3 FAQs]] first, if it doesn't help, start a new post on the forum https://forum.radxa.com/c/rock3.
 
Check [[rock3/FAQs |ROCK 3 FAQs]] first, if it doesn't help, start a new post on the forum https://forum.radxa.com/c/rock3.

Latest revision as of 07:53, 8 February 2022

    ROCK 3 >  Installation >   Install to eMMC from USB port (Radxa E23) 

Radxa E23 supports maskrom mode, which is a special running mode the CPU is waiting for command from USB OTG port. The PC tool we use to communicate with Radxa E23 in maskrom mode is rkdevelop tool, an open source tool by Rockchip.

Requirement

  • Radxa E23 with Radxa CM3
  • 5V Type-C Power adapter
  • USB Male A to Dupont cable. (Needed for Radxa E23 V1.1)
    • One port is Male A type and the other includes four Dupont lines.
    • Hardware connection
Radxa E23 40-pin Header USB Interface USB Male A to Dupont Cable
PIN#18 Data+ Green wire
PIN#16 Data- White wire
PIN#14 GND Black wire
PIN#2 5V Red wire

E23 wire and board.jpg

Install Tools&Drivers

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

Boot the board to maskrom mode

For Radxa E23 V1.1

Note that Radxa E23 OTG port consists of PIN#18, PIN#16, PIN#14 adn PIN#2 on the 40-pin Header.

To boot Radxa E23 E into maskrom mode is simple, you need to

  • Remove MicroSD
  • Remove Type-C adapter
  • Remove PoE Hat
  • Plug the USB Male A to Dupont cable to Radxa E23 OTG port, the other side to PC. Only use three Dupont wires (Dara+, Data-, GND).

Radxa-e23-otg-3-date.jpeg

  • Press and hold the golden maskrom button next to wireless module.

Radxa-e23-maskrom-key.jpeg

  • Plug the Red Dupont wire to PIN#2 of 40-pin header on Radxa E23.

Radxa-e23-red-wire-5v.jpg

  • Release the golden button

Now on your Linux PC, lsusb command show show the following usb devices

Bus 001 Device 112: ID 2207:350a Fuzhou Rockchip Electronics Company

It means the device is in maskrom mode now.

Install to eMMC via USB

On your PC, run the rkdeveloptool

rkdeveloptool ld
DevNo=1	Vid=0x2207,Pid=0x350a,LocationID=104	Maskrom

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

rkdeveloptool db rk356x_spl_loader_ddr1056_v1.06.110.bin

Write the GPT image to eMMC, start to write from offset 0. For example.

rkdeveloptool wl 0 /path/to/radxa-e23-xxx-gpt.img

Reboot the device

rkdeveloptool rd

Now the device should boot the new image on eMMC.

Please note that you can use zero.img instead of radxa-e23-xxx-gpt.img when erasing eMMC on board. Try the following commands.

dd if=/dev/zero of=./zero.img bs=1M count=64
rkdeveloptool db rk356x_spl_loader_ddr1056_v1.06.110.bin
rkdeveloptool wl 0 zero.img

Troubleshooting

Check ROCK 3 FAQs first, if it doesn't help, start a new post on the forum https://forum.radxa.com/c/rock3.