Difference between revisions of "Rkdeveloptool"
From Rockchip open source Document
Line 14: | Line 14: | ||
Then | Then | ||
<pre>sudo make && make install</pre> | <pre>sudo make && make install</pre> | ||
+ | |||
= Usage = | = Usage = | ||
Line 19: | Line 20: | ||
== Support commands == | == Support commands == | ||
− | + | ---- | |
+ | Tool Usage --------------------- | ||
+ | Help: -H<br/> Version: -V<br/> DownloadBoot: DB <Loader><br/> UpgradeLoader: UL <Loader><br/> ReadLBA: RL <BeginSec> <SectorLen> <File><br/> WriteLBA: WL <BeginSec> <File><br/> WriteGPT: GPT <parameter><br/> EraseFlash: EF <br/> TestDevice: TD<br/> ResetDevice: RD [subcode]<br/> ReadFlashID: RID<br/> ReadFlashInfo: RFI<br/> ReadChipInfo: RCI<br/> -------------------------------------------------------<br/> | ||
+ | |||
+ | | ||
== Flash image to target emmc == | == Flash image to target emmc == | ||
Line 41: | Line 46: | ||
rkdeveloptool wl 0x8000 boot.img | rkdeveloptool wl 0x8000 boot.img | ||
rkdeveloptool wl 0x40000 rootfs.img</pre> | rkdeveloptool wl 0x40000 rootfs.img</pre> | ||
+ | <ul style="margin-left: 40px;"> | ||
+ | <li>usb ''ul'' command to write idbloader into idb from rockchip loader</li> | ||
+ | </ul> | ||
+ | <pre style="margin-left: 80px;">rkdeveloptool ul rkxx_loader_vx.xx.bin</pre> | ||
+ | <ul style="margin-left: 40px;"> | ||
+ | <li>use ''gpt'' command to write gpt table with parameter_gpt.txt</li> | ||
+ | </ul> | ||
+ | <pre style="margin-left: 80px;">rkdeveloptool gpt parameter_gpt.txt</pre> | ||
<ul style="margin-left: 40px;"> | <ul style="margin-left: 40px;"> | ||
<li>use reset device comamnd to reset the target after image write complete</li> | <li>use reset device comamnd to reset the target after image write complete</li> | ||
</ul> | </ul> | ||
<pre style="margin-left: 80px;">rkdeveloptool rd</pre> | <pre style="margin-left: 80px;">rkdeveloptool rd</pre> |
Revision as of 02:13, 12 April 2017
Contents
Download rkdeveloptool
Get the source code for rkdeveloptool
git clone https://github.com/rockchip-linux/rkdeveloptool.git
Build rkdeveloptool
First, install the libusb and udev. In Ubuntu,
sudo apt-get install libudev-dev libusb-1.0-0-dev
Then
sudo make && make install
Usage
Support commands
Tool Usage ---------------------
Help: -H
Version: -V
DownloadBoot: DB <Loader>
UpgradeLoader: UL <Loader>
ReadLBA: RL <BeginSec> <SectorLen> <File>
WriteLBA: WL <BeginSec> <File>
WriteGPT: GPT <parameter>
EraseFlash: EF
TestDevice: TD
ResetDevice: RD [subcode]
ReadFlashID: RID
ReadFlashInfo: RFI
ReadChipInfo: RCI
-------------------------------------------------------
Flash image to target emmc
In order to flash image to target emmc,
- Make target get into rockusb mode;
- Connect target to Host PC via USB;
- Write the image to the eMMC with tool command;
- use download boot command to make target init DRAM and run usbplug;
rkdeveloptool db rkxx_loader_vx.xx.bin
- use write lba command to write image to target, this step can be repeat for many times;
rkdeveloptool wl 0x40 idbLoader.img rkdeveloptool wl 0x4000 uboot.img rkdeveloptool wl 0x8000 boot.img rkdeveloptool wl 0x40000 rootfs.img
- usb ul command to write idbloader into idb from rockchip loader
rkdeveloptool ul rkxx_loader_vx.xx.bin
- use gpt command to write gpt table with parameter_gpt.txt
rkdeveloptool gpt parameter_gpt.txt
- use reset device comamnd to reset the target after image write complete
rkdeveloptool rd