Difference between revisions of "Rock/flash the image/zh cn"
(→Windows) |
(→Flash Image) |
||
Line 62: | Line 62: | ||
现在驱动程序已经安装成功了。 | 现在驱动程序已经安装成功了。 | ||
− | === | + | ===烧写镜像=== |
− | + | 要烧写一个镜像文件,我们有两种方式. | |
− | # | + | # 使用 RKBatchTool (工厂用来升级固件的工具,只能烧写update.img,注意会擦除原有的任何东西) |
− | # | + | # 使用 RKAndroidTool (开发工具,可以按区块烧写) |
<br/> | <br/> | ||
− | ==== | + | ====使用 RKBatchTool 烧写 update.img==== |
− | + | 从[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]] | ||
− | + | 选择一个镜像(rockdev/update.img)。如果需要如何制作一个update.img文件的话,查看[[Rock/update.img | update.img]]<br/>。 | |
[[File:flash_image_8.jpg]] | [[File:flash_image_8.jpg]] | ||
− | + | 拔掉Radxa Rock开发板的电源,并使用MicroUSB线连接开发板与你的计算机,然后让开发板进入[[rock/recovery 模式]] ,此时程序应该能检测到设备。 | |
+ | <br/> | ||
[[File:flash_image_9.jpg]] | [[File:flash_image_9.jpg]] | ||
− | + | 单击“升级”按钮进行烧写,在烧写成功时,你将看到如下界面。<br/> | |
[[File:flash_image_10.jpg]] | [[File:flash_image_10.jpg]] | ||
− | + | 如果烧写操作失败,那么可能是update.img存在错误,你可以尝试重做以上操作或者重新制作update.img! | |
====Using RKAndroidTool to falsh image by selection ==== | ====Using RKAndroidTool to falsh image by selection ==== | ||
− | + | 从[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]] | ||
− | + | 拔掉Radxa Rock开发板的电源,连接开发板和计算机,并让开发板进入[[rock/recovery 模式]] ,然后程序会自动检测到设备。 | |
[[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). | 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). |
Revision as of 05:18, 27 March 2014
这个页面描述怎么往Radxa Rock的NAND flash上装系统,即大家喜闻乐见的刷机. 你可以选择完全刷机(就是刷 update.img格式的固件)或者只刷特定的某个 分区. 你可以从radxa网站download下载radxa或者第三方 编译好的固件 或者制作你自己的固件.
开始之前
记住:
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下有两种方式安装该驱动:
- 使用RKDriverAssistant tools安装 - 比较容易的方式
- 手动安装
如果你已经安装好了USB驱动,请跳过此步骤。
使用RK Driver Assistant tools安装
在此安装过程中不需要连接Rockchip设备,只需要下载并解压RKDriverAssistant.zip,然后在RKDriverAssistant目录下的DriveInstall.exe上双击运行即可。 如果你之前为其他Rockchip设备安装过Rockchip USB驱动,确保首先点击"Uninstall Driver"。
然后点击 “Install Driver” 。当安装完成时,关闭Radxa Rock开发板,并将开发板与你的计算机连接起来(使用MicroUSB线)(注意不要使用USB3.0接口),然后使开发板进入 recovery 模式,此时你的计算机将检测到开发板,并且你将在设备管理器中看到它。
现在驱动应该已经安装成功了。
手动安装
从 这里 下载(usb_driver_v3.5.zip) 文件,并解压该文件,关闭Radxa Rock开发板,然后使用MicroUSB线连接开发板和计算机,并让开发板进入 recovery 模式,然后你的计算机应该检测到开发板,同时你在设备管理器中会看到一个未知设备。
选择该未知设备,并右键点击它,然后选择“更新驱动程序软件”。
选择“浏览计算机以查找驱动程序”
选择浏览,并在弹出的窗口中找到之前下载并解压的 (usb_driver_v3.5.zip)文件夹,选择32/64位文件夹其中之一,然后点击OK来安装
当驱动安装成功,你将在设备管理器中看到一个Rockusb设备
现在驱动程序已经安装成功了。
烧写镜像
要烧写一个镜像文件,我们有两种方式.
- 使用 RKBatchTool (工厂用来升级固件的工具,只能烧写update.img,注意会擦除原有的任何东西)
- 使用 RKAndroidTool (开发工具,可以按区块烧写)
使用 RKBatchTool 烧写 update.img
从这里下载RKBatchTool,然后解压,双击RKBatchTool.exe,你将看到如下界面:
选择一个镜像(rockdev/update.img)。如果需要如何制作一个update.img文件的话,查看 update.img
。
拔掉Radxa Rock开发板的电源,并使用MicroUSB线连接开发板与你的计算机,然后让开发板进入rock/recovery 模式 ,此时程序应该能检测到设备。
如果烧写操作失败,那么可能是update.img存在错误,你可以尝试重做以上操作或者重新制作update.img!
Using RKAndroidTool to falsh image by selection
从这里下载RKAndroidTools,并解压,然后双击RKAndroidTool.exe,你将看到以下界面:
拔掉Radxa Rock开发板的电源,连接开发板和计算机,并让开发板进入rock/recovery 模式 ,然后程序会自动检测到设备。
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).
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.
- you can flash one of more image at one time as needed
Troubleshooting
RKBatchTool can not recognize the board
1.Recovery mode : USB device HW: VID_2207&PID_310B
2.Boot into Android: USB device HW: VID_2207&PID_0006
For Recovery mode
I have use manual install within recovery mode for PID_310B.
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]
Root Cause: RK3188 board is connected to laptop via USB 3.0 PMMCIA card.
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
and not boot.
If flashing failed, try to format the nand flash before flashing it.
- RKAndroid tool - click "Erease IDB" button to format the nand flash
- RK Batch tool - click "Restore" to format and then flash the image
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 unbrick instructions to unbrick it.
Linux
Rockchip has provided tools for upgrading within Linux (closed source) since Android 4.4. It's called upgrade_tool. It supports update.img, parameter, bootloader and other partitions, and it's command line based.
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.
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
Download the Rockchip linux upgrade tool here. Unzip it and you will get a file called upgrade_tool which is a binary executable file under Linux.
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:
sudo ./upgrade_tool lf #(LF Lowlevel Format) This will erase everything on nand
Flash parameter
sudo ./upgrade_tool di -p /path/to/parameter #(DI Download Image)
Flash bootloader
sudo ./upgrade_tool ul /path/to/bootloader #(UL Upgrade Loader)
Flash the kernel(boot.img)
sudo ./upgrade_tool di -b /path/to/boot.img #(DI Download Image)
Others
There are other commands in the upgrade_tool, such as:
UL: upgrade the loader EF: erease the nand flash
Rkflashkit with GUI
You can download the pre-built rkflashkit here or build it yourself with the following command:
git clone https://github.com/linuxerwang/rkflashkit cd rkflashkit ./waf debian
And install it with the following command
sudo apt-get install python-gtk2 sudo dpkg -i rkflashkit_0.1.1_all.deb
Run it with the following command
sudo rkflashkit
You can see the interface looks like this:
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.
- Click the Nand partition and you will see the partitions of the board listed then choose the one you want to flash.
- Choose the location of the image you want to flash to that partition.
- Click the "Flash image" button and it will start flashing
- After it's finished click "Reboot Device" button to reboot the board.
Install the image on RR without PC
If you want to write the image on RR without any other host PC, you can download the image and write with dd:
sudo dd if=XXX.img of=/dev/block/mtd/by-name/XXX bs=16384 conv=sync,fsync