(本文是针对s5pv210的u-boot移植分析文章,u-boot源码会在
这里更新)
感谢@
dwgdwhxqs网友提出的BUG,现在在u-boot中已经实现了fastboot功能,就可以扔掉串口刷系统了。先来一个刷系统的截图:
然后是串口的反应:U-Boot 2013.01-rc2-g5654154-dirty (Sep 08 2013 - 22:39:50) for TINY210(Nand:K9GAG08U0F)
CPU: S5PC110@1000MHz
Board: FriendlyARM-TINY210
DRAM: 512 MiB
WARNING: Caches not enabled
PWM Moudle Initialized.
GPD0CON : 1111, GPD0DAT : e
NAND: 256 MiB
MMC: SAMSUNG SD/MMC: 0, SAMSUNG SD/MMC: 1
In: serial
Out: serial
Err: serial
Net: dm9000
checking mode for fastboot ...
fastboot_preboot() = 0
checking mode for fastboot ...
Hit any key to stop autoboot: 0
[Ver130726-TINY210v2]#
fastbootFastboot: employ default partition information
[Partition table on NAND]
ptn 0 name='bootloader' start=0x0 len=0x100000(~1024KB) (Uboot)
ptn 1 name='kernel' start=0x400000 len=0x500000(~5120KB)
ptn 2 name='system' start=0xE00000 len=0xF200000(~247808KB) (Yaffs)Received 32 bytes: getvar:partition-type:bootloader
Received 24 bytes: getvar:max-download-size
Received 17 bytes: download:00046b08
Starting download of 289544 bytes
downloading of 289544 bytes finished
Received 16 bytes: flash:bootloader
flashing 'bootloader'
ptn->length = 1048576
cmd = nand erase 0 100000
NAND erase: device 0 offset 0x0, size 0x100000
Erasing at 0xe0000 -- 100% complete.
OK
cmd = nand erase 0 100000
NAND write: device 0 offset 0x0, size 0x60000
Writing at 0x40000 -- 100% is complete. 393216 bytes written: OK
partition 'bootloader' flashed
Received 28 bytes: getvar:partition-type:kernel
Received 24 bytes: getvar:max-download-size
Received 17 bytes: download:00496288
Starting download of 4809352 bytes
....
downloading of 4809352 bytes finished
Received 12 bytes: flash:kernel
flashing 'kernel'
ptn->length = 5242880
cmd = nand erase 400000 500000
NAND erase: device 0 offset 0x400000, size 0x500000
Erasing at 0x8e0000 -- 100% complete.
OK
cmd = nand erase 400000 500000
NAND write: device 0 offset 0x400000, size 0x4a0000
Writing at 0x880000 -- 100% is complete. 4849664 bytes written: OK
partition 'kernel' flashed
Received 28 bytes: getvar:partition-type:system
Received 24 bytes: getvar:max-download-size
Received 17 bytes: download:01672200
Starting download of 23536128 bytes
......................
downloading of 23536128 bytes finished
Received 12 bytes: flash:system
flashing 'system'
ptn->length = 253755392
cmd = nand erase e00000 f200000
NAND erase: device 0 offset 0xe00000, size 0xf200000
Skipping bad block at 0x00f40000
Skipping bad block at 0x04de0000
Skipping bad block at 0x08b20000
Skipping bad block at 0x0ab40000
Skipping bad block at 0x0b300000
Skipping bad block at 0x0e0c0000
Skipping bad block at 0x0f700000
Skipping bad block at 0x0f980000
Erasing at 0xffe0000 -- 100% complete.
OK
cmd = nand erase e00000 f200000
NAND write: device 0 offset 0xe00000, size 0x1672200
Writing at 0xf20000 -- 6% is complete.Skip bad block 0x00f40000
Writing at 0x2480000 -- 100% is complete. 23536128 bytes written: OK
partition 'system' flashed。
更有趣的是,MiniTools+SuperBoot也是基于fastboot来实现的。当u-boot进入fastboot模式的时候,如果PC上打开MiniTools的时候,MiniTools会以为开发上是SuperBoot,并显示为usb 已经连接,从串口还可以看到MiniTools和"SuperBoot"(这里是u-boot)通信信息。
(为了正常使用,如果要用在u-boot进入fastboot的时候,PC上关闭MiniTools)
![](http://www.aiothome.net/attachment/58_61588_8aeae37f692fe63.png)
也就是说如果友善提供MiniTools的API,就可以用开源的u-boot实现与MiniTools对接烧写系统。为了方便大家实验,我把所用到的镜像都打包了,这里(
本部分内容设定了隐藏,需要回复后才能看到
)。
还有目前移植的是一个beta版本,还调试语句都没有去掉,还没有向主线版本中合并。大家也先来找找这个fastboot有没有bug。今天就不分析文章了,再有半个小时就又周一了。
另:关于安装fastboot:我这边没有windows测试,你可以baidu一下。ubuntu12.10安装是:sudo apt-get install android-tools-fastboot
关于简单的更新系统:fastboot flash bootloader tiny210v2-uboot.bin
fastboot flash kernel /work/tftpboot/uImage_softecc
fastboot flash system /work/tftpboot/rootfs_qtopia_qt4.img
更多关于fastboot的使用请见
这里.
[ 此帖被kangear在2013-09-09 00:13重新编辑 ]