Difference between revisions of "Rock3/install/usb-install"
(Created page with "{{rock3_header}} {{Languages|rock3/install/microSD}} ROCK 3 > Installation > rock3/install/usb-install | Install to eMMC from USB port...") |
|||
Line 7: | Line 7: | ||
=== Install on eMMC from USB port === | === Install on eMMC from USB port === | ||
Rock 3 supports Maskrom mode, which is a special operation mode for CPU to wait for USB OTG port command. | Rock 3 supports Maskrom mode, which is a special operation mode for CPU to wait for USB OTG port command. | ||
− | The PC tools we use to communicate with rock 3 in Maskrom mode are the ''' | + | The PC tools we use to communicate with rock 3 in Maskrom mode are the '''rkdeveloptool''' and '''AndroidTool tool'''. |
− | We use '''the | + | We use '''the rkdeveloptool in Linux/macOS ''' and '''the AndroidTool tool under Windows'''. |
+ | |||
=== Requirement === | === Requirement === | ||
− | * ROCK | + | * ROCK 3A mainboard |
* eMMC module | * eMMC module | ||
* Power adapter | * Power adapter | ||
* '''USB Male A to Male A cable'''(important) USB-C has been seen as not working, an adaptor for USB-C to USB-A has worked. [https://forum.radxa.com/t/otg-flashing-not-working/717 See discussion]. | * '''USB Male A to Male A cable'''(important) USB-C has been seen as not working, an adaptor for USB-C to USB-A has worked. [https://forum.radxa.com/t/otg-flashing-not-working/717 See discussion]. | ||
+ | |||
=== Install Tools&Drivers === | === Install Tools&Drivers === | ||
− | |||
==== Windows ==== | ==== Windows ==== | ||
− | + | ||
=====Step 1:Install Android tool===== | =====Step 1:Install Android tool===== | ||
The tool is provided in a compressed package. First, download the compressed package of this tool, and click the download link [https://dl.radxa.com/tools/windows/RKDevTool_Release_v2.81.zip (RKDevTool_Release_v2.81.zip)]. After downloading, unzip it. Installation is complete. | The tool is provided in a compressed package. First, download the compressed package of this tool, and click the download link [https://dl.radxa.com/tools/windows/RKDevTool_Release_v2.81.zip (RKDevTool_Release_v2.81.zip)]. After downloading, unzip it. Installation is complete. | ||
Line 32: | Line 33: | ||
Then click “Install Driver”, the driver has finish installing. | Then click “Install Driver”, the driver has finish installing. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
==== Linux==== | ==== Linux==== | ||
− | |||
For Linux, we build the rkdeveloptool, '''>=1.32''', from source code. | For Linux, we build the rkdeveloptool, '''>=1.32''', from source code. | ||
Line 55: | Line 50: | ||
If you encounter compile error like below | 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 | You should install pkg-config libusb-1.0 | ||
− | + | sudo apt-get install pkg-config libusb-1.0 | |
Then re-run | Then re-run | ||
− | + | autoreconf -i | |
− | + | ./configure | |
− | + | make | |
Now you have rkdeveloptool executable at the current directory. | Now you have rkdeveloptool executable at the current directory. | ||
sudo cp rkdeveloptool /usr/local/bin/ | 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. | To build rkdeveloptool on macOS, you need [https://brew.sh/ homebrew](or similar package manager) to install required packages. | ||
Install build dependency: | Install build dependency: | ||
− | + | brew install automake autoconf libusb | |
− | + | ||
Clone the source code and build: | 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 | 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 | You should install pkg-config libusb-1.0 | ||
− | + | brew install pkg-config | |
Then re-run | Then re-run | ||
− | + | autoreconf -i | |
− | + | ./configure | |
− | + | make | |
Now you have rkdeveloptool executable at the current directory. | 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 === | === Boot the board to maskrom mode === | ||
− | To boot ROCK | + | To boot ROCK 3A into maskrom mode is simple: |
− | * | + | * Power off the board |
** remove microSD card | ** remove microSD card | ||
− | ** | + | ** insert the eMMC module to eMMC socket |
− | * | + | * Plug the USB Male A to Mail A cable to ROCK 3A OTG port(the upper USB3 port), the other side to PC |
− | * | + | * Short the following pins. See the two yellow hats. |
− | + | ||
[[File:3a-maskrom.png | 400px]] | [[File:3a-maskrom.png | 400px]] | ||
+ | * Power on the board | ||
+ | * Remove the yellow right hat. Keep the yellow left hat there. | ||
+ | * See usb device | ||
+ | ** For Linux/macOS: lsusb result: '''Bus 001 Device 112: ID 2207:350a Fuzhou Rockchip Electronics Company''' | ||
+ | ** For Windows: Open RKDevTool and you would see the device is in "maskrom mode". | ||
+ | [[File:select-loader-bin.jpeg | 600px]] | ||
− | + | Alternatively, if you are running Android and can access ADB, you can reboot the device to loader mode 'adb reboot bootloader' then use the rkdeveloptool to reset the device into maskrom mode 'rkdeveloptool rd 3' or Windows AndroidTool '''Switch''' button to go to maskrom mode. | |
− | + | === Begin Installation USB -> eMMC === | |
− | + | ==== Linux/macOS ==== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
On your PC, run the rkdeveloptool | 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 [https://dl.radxa.com/ | + | 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] |
− | + | 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. | ||
− | + | rkdeveloptool wl 0 /path/to/rock3a-xxx-gpt.img | |
Reboot the device | Reboot the device | ||
− | + | rkdeveloptool rd | |
− | Now the device should boot the new image on eMMC | + | Now the device should boot the new image on eMMC. |
Please notice that when you want to erase eMMC on board, you can use this command. Get zero.img from [https://dl.radxa.com/rockpi4/images/others/zero.img.gz here]. | Please notice that when you want to erase eMMC on board, you can use this command. Get zero.img from [https://dl.radxa.com/rockpi4/images/others/zero.img.gz here]. | ||
− | + | rkdeveloptool db rk356x_spl_loader_ddr1056_v1.06.110.bin | |
− | + | rkdeveloptool wl 0 zero.img | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==== Windows ==== | ==== Windows ==== | ||
− | |||
Double click the '''RKDevTool.exe''' and you will see the following interface: | Double click the '''RKDevTool.exe''' and you will see the following interface: | ||
Line 204: | Line 180: | ||
[[File:3a-run-image.jpeg | 600px]] | [[File:3a-run-image.jpeg | 600px]] | ||
− | |||
− | |||
=== Troubleshooting === | === Troubleshooting === | ||
* If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock3. | * If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock3. |
Revision as of 09:35, 26 November 2021
ROCK 3 > Installation > Install to eMMC from USB port
Contents
Install on eMMC from USB port
Rock 3 supports Maskrom mode, which is a special operation mode for CPU to wait for USB OTG port command. The PC tools we use to communicate with rock 3 in Maskrom mode are the rkdeveloptool and AndroidTool tool. We use the rkdeveloptool in Linux/macOS and the AndroidTool tool under Windows.
Requirement
- ROCK 3A mainboard
- eMMC module
- Power adapter
- USB Male A to Male A cable(important) USB-C has been seen as not working, an adaptor for USB-C to USB-A has worked. See discussion.
Install Tools&Drivers
Windows
Step 1:Install Android tool
The tool is provided in a compressed package. First, download the compressed package of this tool, and click the download link (RKDevTool_Release_v2.81.zip). After downloading, unzip it. Installation is complete.
Step 2:Install driver
Using the RK driver assistant tool to install the driver.
There’s no need to connect your Rockchip device during this procedure just download and extract RKDriverAssistant.zip
Then double click on DriverInstall.exe in the RKDriverAssistant directory to start the utility. If you installed the Rockchip USB drivers for any other Rockchip devices already, make sure you click “Uninstall Driver” first.
Then click “Install Driver”, the driver has finish installing.
Linux
For Linux, we build the rkdeveloptool, >=1.32, from source code.
To build rkdeveloptool on a Debian based Linux distribution, follow the instruction below:
Install build dependency:
sudo apt-get install libudev-dev libusb-1.0-0-dev dh-autoreconf
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 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 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
To boot ROCK 3A into maskrom mode is simple:
- Power off the board
- remove microSD card
- insert the eMMC module to eMMC socket
- Plug the USB Male A to Mail A cable to ROCK 3A OTG port(the upper USB3 port), the other side to PC
- Short the following pins. See the two yellow hats.
- Power on the board
- Remove the yellow right hat. Keep the yellow left hat there.
- See usb device
- For Linux/macOS: lsusb result: Bus 001 Device 112: ID 2207:350a Fuzhou Rockchip Electronics Company
- For Windows: Open RKDevTool and you would see the device is in "maskrom mode".
Alternatively, if you are running Android and can access ADB, you can reboot the device to loader mode 'adb reboot bootloader' then use the rkdeveloptool to reset the device into maskrom mode 'rkdeveloptool rd 3' or Windows AndroidTool Switch button to go to maskrom mode.
Begin Installation USB -> eMMC
Linux/macOS
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/rock3a-xxx-gpt.img
Reboot the device
rkdeveloptool rd
Now the device should boot the new image on eMMC.
Please notice that when you want to erase eMMC on board, you can use this command. Get zero.img from here.
rkdeveloptool db rk356x_spl_loader_ddr1056_v1.06.110.bin rkdeveloptool wl 0 zero.img
Windows
Double click the RKDevTool.exe and you will see the following interface:
Double click this red box and modify it to image in the second row.
Step 1: Select Loader
If your ROCK 3 is in maskrom mode and connects to PC, you can see that the program detect it Found one MASKROM Device in the red box
Next, click the button in the first row on the right last columns select the loader "rk356x_xxx_ loader_ xxxxx.bin ",
Note: the loader (flash helper) is used to init the ram and prepare the flashing environment etc. If you don't have it, you can download it from here
Step 2: Select Image
Then click the right last columns to in the Image row and choose the image you want to flash.You can download the image from here
Note: Normally the image name should ends with xxx-gpt.img. If the image name ends with xxx-rkupdate.img, you can not flash with this method.
Step 3: Run
Finally, click the "run" button, and you will see the content on the right. When the progress reaches 100% or show Download image OK in the red box, the download is completed.
Troubleshooting
- If you have issue with flashing via USB OTG, start a new post on the forum, https://forum.radxa.com/c/rock3.