Dfu-util/zh cn
From Openmoko
(→Purpose) |
m (-Guides) |
||
(10 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
== 目的 == | == 目的 == | ||
− | dfu-util | + | dfu-util 是一个实现主机端[[USB DFU]](通用串行总线 设备固件升级)协议的程序。 |
− | 在 | + | 在 Openmoko 项目中,我们使用这个程序来与我们的特别增强型boot loader [[u-boot]] 通信,这个boot loader实现了DFU的设备侧功能。 |
通过使用 dfu-util 和你的 Neo1973,你能做到: | 通过使用 dfu-util 和你的 Neo1973,你能做到: | ||
* transfer and flash partitions to [[NAND Flash]], such as | * transfer and flash partitions to [[NAND Flash]], such as | ||
** The Linux [[kernel]] | ** The Linux [[kernel]] | ||
− | ** | + | ** 根文件系统分区 |
** The splash screen partition | ** The splash screen partition | ||
− | ** | + | ** u-boot 环境 |
** Last, but not least: The [[u-boot]] bootloader itself. | ** Last, but not least: The [[u-boot]] bootloader itself. | ||
− | * | + | * 向 Neo1973 的 RAM 传输任何东西 |
** this can be used for fast development cycles of low-level code such as kernels without flashing them | ** this can be used for fast development cycles of low-level code such as kernels without flashing them | ||
* read out the current NAND partitions | * read out the current NAND partitions | ||
** this is an easy and efficient way of doing full backups of your phone | ** this is an easy and efficient way of doing full backups of your phone | ||
− | == | + | == 源代码 == |
− | dfu-util | + | dfu-util 的源代码可以从 http://svn.openmoko.org/trunk/src/host/dfu-util/ 下载。 |
− | Binary packages will be made available as part of the regular | + | Binary packages will be made available as part of the regular Openmoko builds |
− | == | + | == 参考文档 == |
=== Command-line options === | === Command-line options === | ||
Line 30: | Line 30: | ||
<pre> | <pre> | ||
− | dfu-util - (C) 2007 by | + | dfu-util - (C) 2007 by Openmoko Inc. |
This program is Free Software and has ABSOLUTELY NO WARRANTY | This program is Free Software and has ABSOLUTELY NO WARRANTY | ||
Line 53: | Line 53: | ||
<pre> | <pre> | ||
# ./dfu-util --list | # ./dfu-util --list | ||
− | dfu-util - (C) 2007 by | + | dfu-util - (C) 2007 by Openmoko Inc. |
This program is Free Software and has ABSOLUTELY NO WARRANTY | This program is Free Software and has ABSOLUTELY NO WARRANTY | ||
Line 62: | Line 62: | ||
<pre> | <pre> | ||
# ./dfu-util --list | # ./dfu-util --list | ||
− | dfu-util - (C) 2007 by | + | dfu-util - (C) 2007 by Openmoko Inc. |
This program is Free Software and has ABSOLUTELY NO WARRANTY | This program is Free Software and has ABSOLUTELY NO WARRANTY | ||
Line 126: | Line 126: | ||
{{Languages|Dfu-util}} | {{Languages|Dfu-util}} | ||
− | [[Category: | + | [[Category:System Developers/zh cn]] |
Latest revision as of 00:02, 13 September 2008
Contents |
[edit] 目的
dfu-util 是一个实现主机端USB DFU(通用串行总线 设备固件升级)协议的程序。
在 Openmoko 项目中,我们使用这个程序来与我们的特别增强型boot loader u-boot 通信,这个boot loader实现了DFU的设备侧功能。
通过使用 dfu-util 和你的 Neo1973,你能做到:
- transfer and flash partitions to NAND Flash, such as
- 向 Neo1973 的 RAM 传输任何东西
- this can be used for fast development cycles of low-level code such as kernels without flashing them
- read out the current NAND partitions
- this is an easy and efficient way of doing full backups of your phone
[edit] 源代码
dfu-util 的源代码可以从 http://svn.openmoko.org/trunk/src/host/dfu-util/ 下载。
Binary packages will be made available as part of the regular Openmoko builds
[edit] 参考文档
[edit] Command-line options
[edit] --help
dfu-util - (C) 2007 by Openmoko Inc. This program is Free Software and has ABSOLUTELY NO WARRANTY Usage: dfu-util [options] ... -h --help Print this help message -V --version Print the version number -l --list List the currently attached DFU capable USB devices -d --device vendor:product Specify Vendor/Product ID of DFU device -c --cfg config_nr Specify the Configuration of DFU device -i --intf intf_nr Specify the DFU Interface number -a --alt alt_nr Specify the Altseting of the DFU Interface -t --transfer-size Specify the number of bytes per USB Transfer -U --upload file Read firmware from device into <file> -D --download file Write firmware from <file> into device -R --reset Issue USB Reset signalling once we're finished
[edit] --list
Using the --list option, you can list the available DFU capable devices, their configuration, interface and altsettings. Below is an example for a current Neo1973 phone in u-boot Runtime Mode
# ./dfu-util --list dfu-util - (C) 2007 by Openmoko Inc. This program is Free Software and has ABSOLUTELY NO WARRANTY Found DFU Runtime: [0x1457:0x5119] devnum=0, cfg=0, intf=2, alt=0, name="USB Device Firmware Upgrade"
Below is an example for a current Neo1973 phone in u-boot DFU Mode
# ./dfu-util --list dfu-util - (C) 2007 by Openmoko Inc. This program is Free Software and has ABSOLUTELY NO WARRANTY Found DFU: [0x1457:0x5119] devnum=16, cfg=0, intf=0, alt=0, name="RAM 0x32000000" Found DFU: [0x1457:0x5119] devnum=16, cfg=0, intf=0, alt=1, name="u-boot" Found DFU: [0x1457:0x5119] devnum=16, cfg=0, intf=0, alt=2, name="u-boot_env" Found DFU: [0x1457:0x5119] devnum=16, cfg=0, intf=0, alt=3, name="kernel" Found DFU: [0x1457:0x5119] devnum=16, cfg=0, intf=0, alt=4, name="splash" Found DFU: [0x1457:0x5119] devnum=16, cfg=0, intf=0, alt=5, name="rootfs"
This shows you six interfaces, all in configuration 0 and interface 0, with altsetting 0...4. The name is currently not yet defined, but will be added to one of the upcoming u-boot releases. The mapping on the Neo1973 is as follows:
- 0: RAM
- 1: 'u-boot' partition
- 2: 'u-boot_env' partition
- 3: 'kernel' partition
- 4: 'splash' partition
- 5: 'rootfs' partition
[edit] --device
You can specify the USB Vendor and Product ID of the device you want to program:
dfu-util --device 0x1457:0x5119
If you only have one standards-compliant DFU device attached to your PC, this is optional. However, as soon as you have multiple DFU devices, dfu-util will detect this and abort, asking you to specify which device it shall use.
[edit] --transfer-size
Specifies the size of each individual USB transfer. If you don't use it, the maximum possible size for your combination of host operating system and USB device is chosen (for optimal performance).
[edit] --download
download the given file into the device.
[edit] --upload
upload from the DFU device into the given file[name].
NOTE: Upload support is currently broken |
[edit] Phrasebook
There's no full-fledged manual yet. Instead, some examples:
[edit] Flashing the kernel
dfu-util -a 3 -R -D /path/to/uImage
[edit] Flashing the bootloader
dfu-util -a 1 -R -D /path/to/u-boot.bin
[edit] Copying a kernel into RAM
dfu-util -a 0 -R -D /path/to/uImage
Once this has finished, the kernel will be available at the default load address of 0x32000000 in Neo1973 RAM.
NOTE: You cannot transfer more than 2MB of data into RAM using this method |
Languages: |
English • العربية • Български • Česky • Dansk • Deutsch • Esperanto • Eesti • Español • فارسی • Suomi • Français • עברית • Magyar • Italiano • 한국어 • Nederlands • Norsk (bokmål) • Polski • Português • Română • Русский • Svenska • Slovenčina • Українська • 中文(中国大陆) • 中文(台灣) • Euskara • Català |