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

Difference between revisions of "Rock/flash the image/zh cn"

 
(25 intermediate revisions by 4 users not shown)
Line 2: Line 2:
 
__TOC__
 
__TOC__
  
这个页面描述怎么往Radxa Rock的NAND flash上装系统,即大家喜闻乐见的'''刷机'''. 你可以选择完全刷机(就是刷 [[rock/update.img |update.img]]格式的固件)或者只刷特定的某个 [[rock/partitions |分区]]. 你可以从[http://radxa.com/download radxa网站download]下载radxa或者第三方[[rock/prebuilt images| 编译好的固件 ]]或者制作你自己的固件.
+
这个页面描述怎么往Radxa Rock的NAND flash上装系统,即大家喜闻乐见的'''刷机'''. 你可以选择完全刷机(就是刷 [[rock/update.img |update.img]]格式的固件)或者只刷特定的某个 [[rock/partitions |分区]]. 你可以从[http://radxa.com/download radxa网站download]下载radxa(android, lubuntu, 双启动固件)或者第三方[[rock/prebuilt images| 编译好的固件 ]]或者制作你自己的固件.
  
 
== 开始之前 ==
 
== 开始之前 ==
Line 8: Line 8:
 
记住:
 
记住:
 
     '''Radxa Rock是刷不死的,正如它的名字一样。除非你把硬件损坏了。'''
 
     '''Radxa Rock是刷不死的,正如它的名字一样。除非你把硬件损坏了。'''
 
+
烧写固件所需要的硬件环境:
What you will need to flash the board is:
+
  * 一块Radxa Rock的开发板(全功能版本或者精简版本)
* a Radxa Rock board (full or lite version)
+
  * 一台运行windows XP/Windows 7(32位/64位)或者Linux(32位/64位)的计算机
* a PC running Windows (XP 32/64bit, Windows 7 32/64 bit) or Linux (32/64bit)
+
  * 一根用于连接Radxa Rock开发板的OTG口和计算机USB口的microUSB线
* a micro USB cable with one side plugged in to the OTG port of Radxa Rock and the other side plugged into the USB port on PC.
+
  
 
== Windows ==
 
== Windows ==
  
The Windows tool for flashing the image is provided by Rockchip. To flash the [[rock/update.img| update.img]], you need to use the RKBatchTool and to flash the [[rock/partitions| partitions]], you will need to use RKDevelopTool. Both RKBatchTool and RKDevelopTool rely on the RK USB driver so you will need to install it first as below:
+
Windows下烧写镜像的工具是由Rockchip提供的。你可以使用RKBatch Tool来烧写镜像文件 [[rock/update.img| update.img]],并使用RKDevelop Tool来烧写partitions配置文件[[rock/partitions| partitions]]。不过这两种工具都依赖于RK USB驱动,所以你首先需要根据以下步骤安装RK USB驱动:
  
 
=== Install driver ===
 
=== Install driver ===
There two ways to install the driver under Windows:
+
在Windows下有两种方式安装该驱动:
  
# install using RKDriverAssistant tools - the easy way
+
# 使用RKDriverAssistant tools安装 - 比较容易的方式
# install manually
+
# 手动安装
 
<p></p>
 
<p></p>
'''If you have already installed the USB driver please skip this step.'''
+
'''如果你已经安装好了USB驱动,请跳过此步骤。'''
  
==== Install using RK Driver Assistant tools ====
+
==== 使用RK Driver Assistant tools安装 ====
There’s no need to connect your Rockchip device during this procedure just download and extract [http://dl.radxa.com/rock/tools/windows/RK_DriverAssitant.zip RKDriverAssistant.zip]
+
在此安装过程中不需要连接Rockchip设备,只需要下载并解压[http://dl.radxa.com/rock/tools/windows/RK_DriverAssitant.zip RKDriverAssistant.zip],然后在RKDriverAssistant目录下的DriveInstall.exe上双击运行即可。
Then double click on DriverInstall.exe in the RKDriverAssistant directory to start the utility.
+
如果你之前为其他Rockchip设备安装过Rockchip USB驱动,确保首先点击"Uninstall Driver"。
If you've previously tried to install the Rockchip USB  drivers for any Rockchip devices make sure you click “Uninstall Driver” first.
+
  
 
[[File:RK_Driver_Assistant_Install_Uninstall.jpg]]
 
[[File:RK_Driver_Assistant_Install_Uninstall.jpg]]
  
Then click “Install Driver” and when the driver has finish installing then shut down radxa board and connect the Radxa Rock board to your computer and let the board go to [[rock/recovery mode| recovery mode]], then your computer will detect the board and you will see it within device manager.
+
然后点击 “Install Driver” 。当安装完成时,关闭Radxa Rock开发板,并将开发板与你的计算机连接起来(使用MicroUSB线)(注意不要使用USB3.0接口),然后使开发板进入[[Rock/Loader mode/zh_cn|Loader模式]],此时你的计算机将检测到开发板,并且你将在设备管理器中看到它。
  
 
[[File:RK_Driver_Assistant_Install_Usb_driver.png]]
 
[[File:RK_Driver_Assistant_Install_Usb_driver.png]]
  
Now the driver should have been installed successfully!
+
现在驱动应该已经安装成功了。
  
==== Install Manually====
 
  
Download the file (usb_driver_v3.5.zip) from [http://dl.radxa.com/rock/tools/windows/usb_driver_v3.5.zip here] and shut down the Radxa Rock board then connect the Radxa Rock board to the computer and let the board go to [[rock/recovery mode| recovery mode]]. After your computer should detect the board and you will see an unknown device within device manager.
+
==== 手动安装====
  
[[File:flash_image_1.jpg]]
+
[http://dl.radxa.com/rock/tools/windows/usb_driver_v3.5.zip 这里] 下载(usb_driver_v3.5.zip) 文件,并解压该文件,关闭Radxa Rock开发板,然后使用MicroUSB线连接开发板和计算机,并让开发板进入 [[Rock/Loader mode/zh_cn|Loader模式]],然后你的计算机应该检测到开发板,同时你在设备管理器中会看到一个未知设备。
  
Select the Unknown device then right click and select "Update Driver Software".
+
[[File:flash_image_1.jpg]]
  
 +
选择该未知设备,并右键点击它,然后选择“更新驱动程序软件”。
  
 
[[File:flash_image_2.jpg]]
 
[[File:flash_image_2.jpg]]
  
Select "Browse the computer for driver software".
+
选择“浏览计算机以查找驱动程序”
  
 
[[File:flash_image_2.5.jpg]]
 
[[File:flash_image_2.5.jpg]]
  
Find the file unzipped file you downloaded earlier (usb_driver_v3.5.zip) and select either the 32/64bit folder then click "OK" to install.
+
选择浏览,并在弹出的窗口中找到之前下载并解压的 (usb_driver_v3.5.zip)文件夹,选择32/64位文件夹其中之一,然后点击OK来安装
  
 
[[File:flash_image_3.jpg]]
 
[[File:flash_image_3.jpg]]
  
When the driver is installed successful you will then see a Rockusb Device in the device manager window.
+
当驱动安装成功,你将在设备管理器中看到一个Rockusb设备
  
 
[[File:flash_image_6.jpg]]
 
[[File:flash_image_6.jpg]]
  
Now the driver is installed successfully.
+
现在驱动程序已经安装成功了。
  
===Flash Image===
+
===烧写镜像===
There are two methods to flash an image.
+
要烧写一个镜像文件,我们有两种方式.
 
   
 
   
# use RKBatchTool   (Factory upgrading firmware tool, flash update.img only, it will erase everything.)
+
# 使用 RKBatchTool   (工厂用来升级固件的工具,只能烧写update.img,注意会擦除原有的任何东西)
# use RKAndroidTool (Development tool, can flash by partitions)
+
# 使用 RKAndroidTool (开发工具,可以按区块烧写)
 
<br/>
 
<br/>
====Using RKBatchTool to flash update.img====
+
====使用 RKBatchTool 烧写 update.img====
  
 
   
 
   
Download RKBatchTool from [http://dl.radxa.com/rock/tools/windows/RK_BatchTool_V1.7.zip here]. Then unzip it and double click RKBatchTool.exe, you will now see the interface as follows:
+
[http://dl.radxa.com/rock/tools/windows/RK_BatchTool_V1.7.zip 这里]下载RKBatchTool,然后解压,双击RKBatchTool.exe,你将看到如下界面:
  
 
[[File:flash_image_7.jpg]]
 
[[File:flash_image_7.jpg]]
  
Select an image (rockdev/update.img). For information on how to make an update.img see [[Rock/update.img | update.img]]<br/>
+
选择一个镜像(rockdev/update.img)。如果需要如何制作一个update.img文件的话,查看[[Rock/update.img | update.img]]<br/>
 
[[File:flash_image_8.jpg]]
 
[[File:flash_image_8.jpg]]
  
Power down the Radxa Rock board and connect the Radxa Rock board to the computer then let the board go to [[rock/recovery mode]] after the program should detect the device.<br/>
+
拔掉Radxa Rock开发板的电源,并使用MicroUSB线连接开发板与你的计算机,然后让开发板进入[[Rock/Loader mode/zh_cn|Loader模式]],此时程序应该能检测到设备。
 +
<br/>
 
[[File:flash_image_9.jpg]]
 
[[File:flash_image_9.jpg]]
  
Click the "Upgrade" button to begin flashing and when the flashing process finishes successfully you will see the following interface.<br/>
+
单击“升级”按钮进行烧写,在烧写成功时,你将看到如下界面。<br/>
 
[[File:flash_image_10.jpg]]
 
[[File:flash_image_10.jpg]]
  
If the flashing has aborted ,it could possibly be an error with the update.img, you can either try to redo the operations above or make the update.img again!
+
如果烧写操作失败,那么可能是update.img存在错误,你可以尝试重做以上操作或者重新制作update.img!
  
====Using RKAndroidTool to falsh image by selection ====
+
=== 使用RKAndroidTool 烧写选定的镜像 ====
Download RKAndroidTools from [http://dl.radxa.com/rock/tools/windows/RKDevelopTool_v1.37.zip here]. Unzip it the file and double click RKAndroidTool.exe, you will then see the interface as follows:
+
[http://dl.radxa.com/rock/tools/windows/RKDevelopTool_v1.37.zip 这里]下载RKAndroidTools,并解压,然后双击RKAndroidTool.exe,你将看到以下界面:
  
 
[[File:rkandroidtool_flash_image_1.png]]
 
[[File:rkandroidtool_flash_image_1.png]]
  
Power down the Radxa Rock board and connect the Radxa Rock board to the computer and let the board go to [[rock/recovery mode]] then the program will detect it.
+
拔掉Radxa Rock开发板的电源,连接开发板和计算机,并让开发板进入[[Rock/Loader mode/zh_cn|Loader模式]],然后程序会自动检测到设备。
  
 
[[File:rkandroidtool_flash_image_2.png]]
 
[[File:rkandroidtool_flash_image_2.png]]
  
There are eight selections to choose from so select the correct row and then select the checkbox to the left of the row to select it. After you must click the column on the right side for the path of the file you want to flash. You can then select one or more files and flash them at once. Finally Click "Run" to flash images to the device (the right most selection shows the log of the progress).
+
界面上有8个可选项,选择正确的行并且选中左边的选择框,然后你必须单击该行右侧的按钮,选择你想烧写的文件路径。你可以一次选择一个或者多个文件并烧写它们。最后单击“Run”烧写镜像(程序右侧的框里面会显示过程日志)。
  
 
[[File:rkandroidtool_flash_image_3.png]]
 
[[File:rkandroidtool_flash_image_3.png]]
Line 103: Line 102:
 
[[File:rkandroidtool_flash_image_4.png]]
 
[[File:rkandroidtool_flash_image_4.png]]
  
If successful the board will disconnect from the tool and boot into the system.
+
如果成功的话,板子会自动断开,并且引导到系统。
  
Please Note:
+
请注意:
  
# The kernel is contained within the boot.img when you package the image by  "./mkimage.sh ota"  please see [[Rock/Android_Build]] for more information.
+
# 当你通过“./mkimage.sh.ota”打包镜像文件时,内核是包含在boot.img中的。详情请查看 [[Rock/Android_Build]]
# you can flash one of more image at one time as needed
+
# 你可以根据需要一次烧写一个或者多个镜像文件
  
=== Troubleshooting ===
+
=== 故障排除 ===
==== RKBatchTool can not recognize the board ====  
+
==== RKBatchTool 检测不到开发板 ====  
1.Recovery mode : USB device HW:  VID_2207&PID_310B <br/>
+
1.Loader模式 : USB 设备硬件:  VID_2207&PID_310B <br/>
2.Boot into Android: USB device HW: VID_2207&PID_0006
+
2.引导进Android: USB 设备硬件: VID_2207&PID_0006
  
For Recovery mode<br/>
+
Loader模式<br/>
I have use manual install within recovery mode for PID_310B.
+
我已经手动安装了驱动,并且Loader模式的USB为PID_310B,“Rockusb device”驱动在Vista上安装成功了,但是RKBatchTool连接不到RK3188的板子,导致无法烧写镜像。
The "Rockusb device" driver installed successfully on Vista but the RKBatchTool can not connect to the RK3188 board for img flashing.
+
  
For Recovery mode cannot connect issue [Solved]<br/>
+
对于Loader模式无法连接的问题[已解决]<br/>
Root Cause: RK3188 board is connected to laptop via USB 3.0 PMMCIA card.
+
根本原因:RK3188板通过USB3.0 PMMCIA卡连接到笔记本电脑。这是一个USB2.0到USB3.0的兼容性问题,所以USB3.0端口换成USB 2.0端口,然后RKBatchTool应该可以连接到RK3188板子来烧写镜像了。
It's a USB2.0 to USB3.0 compatibility issue so switch USB 3.0 port to a USB 2.0 then the RKBatchTool should connect to the RK3188 board for img flashing.
+
  
==== Flashing failed ====
+
==== 烧写失败 ====
  
After flashing, the uart print
+
烧写后,串口打印:
  
 
     DDR Version 1.04 20130517 In DDR3 300MHz Bus Width=32 Col=10 Bank=8 Row=15 CS=2 Die Bus-Width=16 Size=2048MB Memory OK OUT BUILD=====6 SdmmcInit=0 20 F:32 1061 0 0 40 FlashReadRetry error!!,row = fff000 FlashReadRetry error!!,row = fff000
 
     DDR Version 1.04 20130517 In DDR3 300MHz Bus Width=32 Col=10 Bank=8 Row=15 CS=2 Die Bus-Width=16 Size=2048MB Memory OK OUT BUILD=====6 SdmmcInit=0 20 F:32 1061 0 0 40 FlashReadRetry error!!,row = fff000 FlashReadRetry error!!,row = fff000
  
and not boot.
+
同时无法引导。
  
If flashing failed, try to format the nand flash before flashing it.
+
如果烧写失败,尝试在烧写前格式化NandFlash。
* RKAndroid tool - click "Erease IDB" button to format the nand flash
+
* RKAndroidTool - 单击 “Erease IDB”按钮,格式化NandFlash。
* RK Batch tool - click "Restore" to format and then flash the image
+
* RKBatchTool    - 单击 “Restore”按钮格式化,然后烧写镜像。
  
  
 
==== Preparing IDB failed ====
 
==== Preparing IDB failed ====
This happens at upgrading bootloader, if you need to upgrade the bootloader or the update.img contains a new bootloader, you probably will meet this. The rock is "bricked". Follow this [[rock/unbrick | unbrick instructions]] to unbrick it.
+
这发生在升级bootloader的时候,如果你需要升级bootloader或update.img中包含了一个新的引导程序,那么你可能会遇到这个问题。板子这是“变砖”了。。。按照这个 [[rock/unbrick | unbrick 说明]]解决它。
  
 
== Linux ==
 
== Linux ==
Rockchip has provided tools for upgrading within Linux (closed source) since Android 4.4. It's called '''upgrade_tool'''.
+
从Android 4.4起,Rockchip提供了一个在Linux系统下的升级工具(闭源)。叫做“upgrade_tool”。
It supports update.img, parameter, bootloader and other partitions, and it's command line based.
+
它支持烧写update.img、parameter、bootloader和其他分区,注意它是基于命令行的工具。
  
rkflashkit is an open source GUI version flashing tool for rockchip devices. It can not flash bootloader or parameter, only supports kernel and other partitions, but it supports backup the partitions.
+
rkflashkit 是一个用于烧写瑞芯微设备的开源图形界面版本软件。它不能烧写bootloader或者parameter,只支持烧写内核和其他分区,但是它支持备份这些分区。
  
  
For developers:
 
''The initial RE work of the Rockchip bootloader updating protocol is by naobsd and has been improved by some in '''rkflashtool'''. linuxerwang has made a GUI version of the rkflashtool called '''rkflashkit'''. Please note: both '''rkflashtool''' and '''rkflashkit''' can '''not''' flash the [[rock/update.img]] and can only flash within [[rock/bootloader]] mode and not [[rock/mask rom]] mode because the [[rock/mask rom]] updating protocol is not RE yet. If you are interested in the RE protocol ping naobsd at #radxa on IRC. Since the [[rock/bootloader]] has remained unchanged for a long time it's enough for normal usage. If you don't know what this means, just ignore it.''
 
  
=== Upgrade_tool from Rockchip ===
+
针对开发者:
 +
“早期的Rockchip bootloader刷机协议的逆向工程工作是由 naobsd 完成的,并且由一些在使用 “rkflashtool”的人进行了改进,linuxerwang 制作了一个rkflashtool的GUI版本,叫做 “rkflashkit”,请注意:"rkflashtool" 和 “rkflashkit” 都不能烧写 [[rock/update.img | update.img格式的刷机包]] ,只能在 [[rock/bootloader | bootloader]] 模式下并且不在 [[rock/mask rom | mask rom]] 模式下烧写,因为这个  [[rock/mask rom | mask rom]] 升级协议还没有被逆向工程, 如果你对逆向工程刷机协议有兴趣,可以在  #radxa 的聊天室上找naobsd,[[rock/bootloader | bootloader]] 通常不会变动太大,已经可以保证日常使用了。如果你不明白这段话的意思,只要忽略它就可以了。”
  
Download the Rockchip linux upgrade tool [http://dl.radxa.com/rock/tools/linux/Linux_Upgrade_Tool_v1.16.zip here]. Unzip it and you will get a file called '''upgrade_tool''' which is a binary executable file under Linux.
+
=== Rockchip的升级工具 ===
==== Flash update.img ====
+
Let the board go to [[rock/recovery mode]] and run the following command to flash the [[rock/update.img]]:
+
    sudo ./upgrade_tool '''uf'''  /path/to/update.img          #(UF Upgrade Flash)
+
  
If you have an error with upgrading you can low level format the nand flash first with the following command:
+
从 [http://dl.radxa.com/rock/tools/linux/Linux_Upgrade_Tool_V2.1.zip 这里]下载Rockchip的Linux升级工具并解压,然后你会得到一个在Linux下二进制可执行文件,叫做“upgrade_tool”。
 +
 
 +
==== 烧写 update.img ====
 +
让板子进入[[Rock/Loader mode/zh_cn|Loader模式]]并运行以下命令烧写[[rock/update.img | update.img格式的刷机包]]:
 +
  sudo ./upgrade_tool '''uf'''  /path/to/update.img          #(UF Upgrade Flash)
 +
 
 +
如果你在升级过程中有一个错误,你可以首先使用以下命令来低格nandflash:
 
     sudo ./upgrade_tool '''lf'''      #(LF Lowlevel Format) This will erase everything on nand
 
     sudo ./upgrade_tool '''lf'''      #(LF Lowlevel Format) This will erase everything on nand
  
==== Flash parameter ====
+
==== 烧写 parameter ====
 
     sudo ./upgrade_tool '''di''' -p /path/to/parameter    #(DI Download Image)
 
     sudo ./upgrade_tool '''di''' -p /path/to/parameter    #(DI Download Image)
  
==== Flash bootloader ====
+
==== 烧写 bootloader ====
 
     sudo ./upgrade_tool '''ul''' /path/to/bootloader  #(UL Upgrade Loader)
 
     sudo ./upgrade_tool '''ul''' /path/to/bootloader  #(UL Upgrade Loader)
  
==== Flash the kernel(boot.img) ====
+
==== 烧写内核(boot.img) ====
 
     sudo ./upgrade_tool '''di''' -b /path/to/boot.img    #(DI Download Image)
 
     sudo ./upgrade_tool '''di''' -b /path/to/boot.img    #(DI Download Image)
  
==== Others ====
+
==== 其他====
There are other commands in the upgrade_tool, such as:
+
有一些在upgrade_tool中使用的其他命令,比如:
     UL: upgrade the loader
+
     UL: 升级Loader
     EF: erease the nand flash
+
     EF: 擦除nand flash
 
+
=== Rkflashkit with GUI ===
+
You can download the pre-built rkflashkit [http://dl.radxa.com/rock/tools/linux/rkflashkit_0.1.1_all.deb here] or build it yourself with the following command:
+
  
 +
=== 图形化版本工具 - Rkflashkit ===
 +
你可以从 [http://dl.radxa.com/rock/tools/linux/rkflashkit_0.1.1_all.deb 这里]下载已经编译好的rkflashkit,或者使用以下命令自己编译它:
 +
 
     git clone https://github.com/linuxerwang/rkflashkit  
 
     git clone https://github.com/linuxerwang/rkflashkit  
 
     cd rkflashkit  
 
     cd rkflashkit  
 
     ./waf debian  
 
     ./waf debian  
  
And install it with the following command
+
并使用以下命令安装:
  
 
     sudo apt-get install python-gtk2  
 
     sudo apt-get install python-gtk2  
 
     sudo dpkg -i rkflashkit_0.1.1_all.deb
 
     sudo dpkg -i rkflashkit_0.1.1_all.deb
  
Run it with the following command
+
使用以下命令运行:
  
 
     sudo rkflashkit
 
     sudo rkflashkit
  
You can see the interface looks like this:
+
你会看到如下的界面:
  
 
[[File:rkflashkit1.png| 600px]]
 
[[File:rkflashkit1.png| 600px]]
  
Connect the Radxa Rock board to the computer and let the board go into [[rock/recovery mode]] you will then see the the program detect the board in recovery mode.
+
连接Radxa Rock开发板和计算机,并且让板子进入[[Rock/Loader mode/zh_cn|Loader模式]] ,你将看到程序在Loader模式下检测到板子。
  
# Click the Nand partition and you will see the partitions of the board listed then choose the one you want to flash.
+
# 单击 Nand partition,然后你会看到板子的分区列表,然后从其中选择一个你要烧写的分区。
# Choose the location of the image you want to flash to that partition.
+
# 选择你想烧写到这个分区的镜像文件目录
# Click the "Flash image" button and it will start flashing
+
# 单击 “Flash image” 按钮,就会开始烧写。
# After it's finished click "Reboot Device" button to reboot the board.
+
# 烧写结束后,单击“Reboot Device”按钮重启板子
  
  
[[File:rkflashkit2.png| 500px]] [[File:rkflashkit3.png| 500px]]
+
[[File:rkflashkit2.png| 500px]]
 +
[[File:rkflashkit3.png| 500px]]
  
== Install the image on RR without PC ==
+
== 不用计算机在RR上烧写镜像 ==
If you want to write the image on RR without any other host PC, you can download the image and write with dd:
+
如果你想不用其他任何计算机,在Rockchip Rock板上写镜像,你可以下载镜像,并使用dd写:
 
     sudo dd if=XXX.img of=/dev/block/mtd/by-name/XXX bs=16384 conv=sync,fsync
 
     sudo dd if=XXX.img of=/dev/block/mtd/by-name/XXX bs=16384 conv=sync,fsync

Latest revision as of 02:37, 16 August 2023

中文(中国大陆)‎

这个页面描述怎么往Radxa Rock的NAND flash上装系统,即大家喜闻乐见的刷机. 你可以选择完全刷机(就是刷 update.img格式的固件)或者只刷特定的某个 分区. 你可以从radxa网站download下载radxa(android, lubuntu, 双启动固件)或者第三方 编译好的固件 或者制作你自己的固件.

开始之前

记住:

   Radxa Rock是刷不死的,正如它的名字一样。除非你把硬件损坏了。

烧写固件所需要的硬件环境:

 * 一块Radxa Rock的开发板(全功能版本或者精简版本)
 * 一台运行windows XP/Windows 7(32位/64位)或者Linux(32位/64位)的计算机
 * 一根用于连接Radxa Rock开发板的OTG口和计算机USB口的microUSB线

Windows

Windows下烧写镜像的工具是由Rockchip提供的。你可以使用RKBatch Tool来烧写镜像文件 update.img,并使用RKDevelop Tool来烧写partitions配置文件 partitions。不过这两种工具都依赖于RK USB驱动,所以你首先需要根据以下步骤安装RK USB驱动:

Install driver

在Windows下有两种方式安装该驱动:

  1. 使用RKDriverAssistant tools安装 - 比较容易的方式
  2. 手动安装

如果你已经安装好了USB驱动,请跳过此步骤。

使用RK Driver Assistant tools安装

在此安装过程中不需要连接Rockchip设备,只需要下载并解压RKDriverAssistant.zip,然后在RKDriverAssistant目录下的DriveInstall.exe上双击运行即可。 如果你之前为其他Rockchip设备安装过Rockchip USB驱动,确保首先点击"Uninstall Driver"。

RK Driver Assistant Install Uninstall.jpg

然后点击 “Install Driver” 。当安装完成时,关闭Radxa Rock开发板,并将开发板与你的计算机连接起来(使用MicroUSB线)(注意不要使用USB3.0接口),然后使开发板进入Loader模式,此时你的计算机将检测到开发板,并且你将在设备管理器中看到它。

RK Driver Assistant Install Usb driver.png

现在驱动应该已经安装成功了。


手动安装

这里 下载(usb_driver_v3.5.zip) 文件,并解压该文件,关闭Radxa Rock开发板,然后使用MicroUSB线连接开发板和计算机,并让开发板进入 Loader模式,然后你的计算机应该检测到开发板,同时你在设备管理器中会看到一个未知设备。

Flash image 1.jpg

选择该未知设备,并右键点击它,然后选择“更新驱动程序软件”。

Flash image 2.jpg

选择“浏览计算机以查找驱动程序”

Flash image 2.5.jpg

选择浏览,并在弹出的窗口中找到之前下载并解压的 (usb_driver_v3.5.zip)文件夹,选择32/64位文件夹其中之一,然后点击OK来安装

Flash image 3.jpg

当驱动安装成功,你将在设备管理器中看到一个Rockusb设备

Flash image 6.jpg

现在驱动程序已经安装成功了。

烧写镜像

要烧写一个镜像文件,我们有两种方式.

  1. 使用 RKBatchTool (工厂用来升级固件的工具,只能烧写update.img,注意会擦除原有的任何东西)
  2. 使用 RKAndroidTool (开发工具,可以按区块烧写)


使用 RKBatchTool 烧写 update.img

这里下载RKBatchTool,然后解压,双击RKBatchTool.exe,你将看到如下界面:

Flash image 7.jpg

选择一个镜像(rockdev/update.img)。如果需要如何制作一个update.img文件的话,查看 update.img
Flash image 8.jpg

拔掉Radxa Rock开发板的电源,并使用MicroUSB线连接开发板与你的计算机,然后让开发板进入Loader模式,此时程序应该能检测到设备。
Flash image 9.jpg

单击“升级”按钮进行烧写,在烧写成功时,你将看到如下界面。
Flash image 10.jpg

如果烧写操作失败,那么可能是update.img存在错误,你可以尝试重做以上操作或者重新制作update.img!

使用RKAndroidTool 烧写选定的镜像 =

这里下载RKAndroidTools,并解压,然后双击RKAndroidTool.exe,你将看到以下界面:

Rkandroidtool flash image 1.png

拔掉Radxa Rock开发板的电源,连接开发板和计算机,并让开发板进入Loader模式,然后程序会自动检测到设备。

Rkandroidtool flash image 2.png

界面上有8个可选项,选择正确的行并且选中左边的选择框,然后你必须单击该行右侧的按钮,选择你想烧写的文件路径。你可以一次选择一个或者多个文件并烧写它们。最后单击“Run”烧写镜像(程序右侧的框里面会显示过程日志)。

Rkandroidtool flash image 3.png

Rkandroidtool flash image 4.png

如果成功的话,板子会自动断开,并且引导到系统。

请注意:

  1. 当你通过“./mkimage.sh.ota”打包镜像文件时,内核是包含在boot.img中的。详情请查看 Rock/Android_Build
  2. 你可以根据需要一次烧写一个或者多个镜像文件

故障排除

RKBatchTool 检测不到开发板

1.Loader模式 : USB 设备硬件: VID_2207&PID_310B
2.引导进Android: USB 设备硬件: VID_2207&PID_0006

Loader模式
我已经手动安装了驱动,并且Loader模式的USB为PID_310B,“Rockusb device”驱动在Vista上安装成功了,但是RKBatchTool连接不到RK3188的板子,导致无法烧写镜像。

对于Loader模式无法连接的问题[已解决]
根本原因:RK3188板通过USB3.0 PMMCIA卡连接到笔记本电脑。这是一个USB2.0到USB3.0的兼容性问题,所以USB3.0端口换成USB 2.0端口,然后RKBatchTool应该可以连接到RK3188板子来烧写镜像了。

烧写失败

烧写后,串口打印:

   DDR Version 1.04 20130517 In DDR3 300MHz Bus Width=32 Col=10 Bank=8 Row=15 CS=2 Die Bus-Width=16 Size=2048MB Memory OK OUT BUILD=====6 SdmmcInit=0 20 F:32 1061 0 0 40 FlashReadRetry error!!,row = fff000 FlashReadRetry error!!,row = fff000

同时无法引导。

如果烧写失败,尝试在烧写前格式化NandFlash。

  • RKAndroidTool - 单击 “Erease IDB”按钮,格式化NandFlash。
  • RKBatchTool - 单击 “Restore”按钮格式化,然后烧写镜像。


Preparing IDB failed

这发生在升级bootloader的时候,如果你需要升级bootloader或update.img中包含了一个新的引导程序,那么你可能会遇到这个问题。板子这是“变砖”了。。。按照这个 unbrick 说明解决它。

Linux

从Android 4.4起,Rockchip提供了一个在Linux系统下的升级工具(闭源)。叫做“upgrade_tool”。 它支持烧写update.img、parameter、bootloader和其他分区,注意它是基于命令行的工具。

rkflashkit 是一个用于烧写瑞芯微设备的开源图形界面版本软件。它不能烧写bootloader或者parameter,只支持烧写内核和其他分区,但是它支持备份这些分区。


针对开发者: “早期的Rockchip bootloader刷机协议的逆向工程工作是由 naobsd 完成的,并且由一些在使用 “rkflashtool”的人进行了改进,linuxerwang 制作了一个rkflashtool的GUI版本,叫做 “rkflashkit”,请注意:"rkflashtool" 和 “rkflashkit” 都不能烧写 update.img格式的刷机包 ,只能在 bootloader 模式下并且不在 mask rom 模式下烧写,因为这个 mask rom 升级协议还没有被逆向工程, 如果你对逆向工程刷机协议有兴趣,可以在 #radxa 的聊天室上找naobsd, bootloader 通常不会变动太大,已经可以保证日常使用了。如果你不明白这段话的意思,只要忽略它就可以了。”

Rockchip的升级工具

这里下载Rockchip的Linux升级工具并解压,然后你会得到一个在Linux下二进制可执行文件,叫做“upgrade_tool”。

烧写 update.img

让板子进入Loader模式并运行以下命令烧写 update.img格式的刷机包

  sudo ./upgrade_tool uf  /path/to/update.img          #(UF Upgrade Flash)

如果你在升级过程中有一个错误,你可以首先使用以下命令来低格nandflash:

   sudo ./upgrade_tool lf       #(LF Lowlevel Format) This will erase everything on nand

烧写 parameter

   sudo ./upgrade_tool di -p /path/to/parameter    #(DI Download Image)

烧写 bootloader

   sudo ./upgrade_tool ul /path/to/bootloader  #(UL Upgrade Loader)

烧写内核(boot.img)

   sudo ./upgrade_tool di -b /path/to/boot.img    #(DI Download Image)

其他

有一些在upgrade_tool中使用的其他命令,比如:

   UL: 升级Loader
   EF: 擦除nand flash

图形化版本工具 - Rkflashkit

你可以从 这里下载已经编译好的rkflashkit,或者使用以下命令自己编译它:

   git clone https://github.com/linuxerwang/rkflashkit 
   cd rkflashkit 
   ./waf debian 

并使用以下命令安装:

   sudo apt-get install python-gtk2 
   sudo dpkg -i rkflashkit_0.1.1_all.deb

使用以下命令运行:

   sudo rkflashkit

你会看到如下的界面:

Rkflashkit1.png

连接Radxa Rock开发板和计算机,并且让板子进入Loader模式 ,你将看到程序在Loader模式下检测到板子。

  1. 单击 Nand partition,然后你会看到板子的分区列表,然后从其中选择一个你要烧写的分区。
  2. 选择你想烧写到这个分区的镜像文件目录
  3. 单击 “Flash image” 按钮,就会开始烧写。
  4. 烧写结束后,单击“Reboot Device”按钮重启板子


Rkflashkit2.png Rkflashkit3.png

不用计算机在RR上烧写镜像

如果你想不用其他任何计算机,在Rockchip Rock板上写镜像,你可以下载镜像,并使用dd写:

    sudo dd if=XXX.img of=/dev/block/mtd/by-name/XXX bs=16384 conv=sync,fsync