1.代码路径
主机端的fastboot的路径:
./android42/system/core/fastboot/*
cong@dell:/work/ct/android42$ mmm ./system/core/fastboot/
linux下编译的文件
-
cong@dell:/work/ct$ tree ./android42/system/core/fastboot/
-
├── bootimg.c
-
├── engine.c
-
├── fastboot.c
-
├── protocol.c
-
├── usb_linux.c
-
└── util_linux.c
板子上的fastboot的路径:
./lichee/u-boot/common/cmd_fastboot.c
2. 烧写出错
板子在开机时随便按一个键进入uboot,然后输出fastboot
-
sunxi#fastboot
-
ptn 0 name='bootloader' start=16777216 len=16777216
-
ptn 1 name='env' start=33554432 len=16777216
-
ptn 2 name='boot' start=50331648 len=16777216
-
ptn 3 name='system' start=67108864 len=536870912
-
ptn 4 name='data' start=603979776 len=536870912
-
ptn 5 name='misc' start=1140850688 len=16777216
-
ptn 6 name='recovery' start=1157627904 len=33554432
-
ptn 7 name='cache' start=1191182336 len=335544320
-
ptn 8 name='private' start=1526726656 len=16777216
-
ptn 9 name='databk' start=1543503872 len=268435456
-
ptn 10 name='UDISK' start=1811939328 len=1543503872
-
Fastboot entered
主机端:
-
cong@dell:/work/ct$ sudo ./android42/out/host/linux-x86/bin/fastboot devices
-
20080411 fastboot
-
cong@dell:/work/ct$ sudo ./android42/out/host/linux-x86/bin/fastboot flash boot ./android42/out/target/product/sugar-cubietruck/boot.img
-
sending 'boot' (7698 KB)...
-
FAILED (remote: data too large, larger than buffer)
-
finished. total time: 0.007s
板子上的提示是:
-
getvar
-
getvar
-
download
-
download_size = 2018133165
-
Starting download of 1924 MB
注意: boot分区是boot.img包括kernel+initramfs
3. 解决方法
主机的上fastboot有个小bug,只需要重新编译主机上的fastboot就可以了.
-
main 文件在android42/system/core/fastboot/fastboot.c中
-
--> fb_download_data 文件在android42/system/core/fastboot/protocol.c中
-
中将 sprintf(cmd, "download:%08x", size);
-
改为 sprintf(cmd, "download:%08x:", size);
即后面随便加上一个除[0-9][a-f]外的一个字符,这样板子上的fastboot在解析cmd时就不会弄错了
阅读(4018) | 评论(0) | 转发(1) |