fastboot中使用tftp烧写kernel

来源:互联网 发布:php 如何防止抓包截断 编辑:程序博客网 时间:2024/06/06 04:37


v200es1,直接用hitools烧写,不知道是不是bug,serverip没有起作用,导致:







fastboot# <INTERRUPT>
fastboot# <INTERRUPT>
fastboot# <INTERRUPT>
fastboot# <INTERRUPT>
fastboot# <INTERRUPT>
fastboot# printenv
bootdelay=1
baudrate=115200
ipaddr=192.168.1.10
netmask=255.255.255.0
bootfile="uImage"
phy_intf=mii,rgmii
use_mdio=0,1
phy_addr=2,1
gmac_debug=0
bootcmd=mmc read 0 0x1FFFFC0 47800 5000; bootm 0x1FFFFC0
serverip=192.168.1.88
bootargs=mem=1G root=/dev/nfs rootfstype=nfs rsize=1024,wsize=1024 nfsroot=192.168.1.88:/nfsboot/ ip=192.168.1.10:192.168.1.88::255.255.255.0::eth0:on console=ttyAMA0,115200 mtdparts=hi_emmc:1M(fastboot),1M(partition),1M(bootargs),10M(recovery),2M(deviceinfo),8M(baseparam),20M(logo),20M(logobak),40M(fastplay),40M(fastplaybak),40M(kernel),20M(misc),500M(system),1024M(userdata),100M(cache),-(sdcard)
gatewayip=192.168.1.1
stdin=serial
stdout=serial
stderr=serial
ethaddr=A6:0C:01:5F:21:8F
ver=Fastboot 3.3.0 (renxueliang@Mars) (Jul 23 2013 - 15:24:21)

Environment size: 778/65532 bytes


================================================   
网线断了:

fastboot# tftp 0x1000000 kernel.img
ETH0: PHY(phyaddr=2, mii) not link!
ETH1: PHY(phyaddr=1, rgmii) not link!
higmac init fail!
fastboot# 

fastboot# 

=======================================================

使用fastboot的tftp,貌似这是个客户端:

fastboot# tftp 0x1000000 kernel.img
ETH0: PHY(phyaddr=2, mii) link UP: DUPLEX=FULL : SPEED=100M
MAC:   A6-0C-01-5F-21-8F
TFTP from server 192.168.1.88; our IP address is 192.168.1.10
Download Filename 'kernel.img'.
Download to address: 0x1000000
Downloading: T T 
Abort
fastboot# tftp 0x1000000 kernel.img
ETH0: PHY(phyaddr=2, mii) link UP: DUPLEX=FULL : SPEED=100M
MAC:   A6-0C-01-5F-21-8F
TFTP from server 192.168.1.88; our IP address is 192.168.1.10
Download Filename 'kernel.img'.
Download to address: 0x1000000
Downloading: T T T T T T T 

Abort

==========================================



设置tftp服务器所在pc的ip地址,作为serverip:


fastboot# setenv serverip 192.168.1.200
fastboot# tftp 0x1000000 kernel.img    
ETH0: PHY(phyaddr=2, mii) link UP: DUPLEX=FULL : SPEED=100M
MAC:   A6-0C-01-5F-21-8F
TFTP from server 192.168.1.200; our IP address is 192.168.1.10
Download Filename 'kernel.img'.
Download to address: 0x1000000
Downloading: #  [ Connected ]
################################        [ 2.888 MB]
################################        [ 5.752 MB]
########
done
Bytes transferred = 6785464 (6789b8 hex)

fastboot# 



马上就可以烧写了:





=================fastboot的命令===========



fastboot# help 
?       - alias for 'help'
base    - print or set address offset
bootm   - boot application image from memory
bootp   - boot image via network using BOOTP/TFTP protocol
cmp     - memory compare
cp      - memory copy
crc32   - checksum calculation
ddr     - ddr training function
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
getinfo - print hardware information
go      - start application at address 'addr'
help    - print command description/usage
loadb   - load binary file over serial line (kermit mode)
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
md      - memory display
mii     - MII utility commands
mm      - memory modify (auto-incrementing address)
mmc     - MMC sub system
mmcinfo - mmcinfo <dev num>-- display MMC info
mtest   - simple RAM read/write test
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
run     - run merge image in fastboot
saveenv - save environment variables to persistent storage
setenv  - set environment variables
sf      - SPI flash sub-system
tftp    - tftp  - download or upload image via network using TFTP protocol
uploadx - upload binary file over serial line (xmodem mode)
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor version
fastboot# mmcinfo
Device: himci v200
Manufacturer ID: fe
OEM: 14e
Name: MMC04 
Tran Speed: 25000000
Rd Block Len: 512
MMC version 4.0
High Capacity: Yes
Capacity: 3841982464
Bus Width: 8-bit
fastboot# 


=========================

但是这里有个问题啊,这个tftp命令,只是下载到板子的ram中,还没有烧写到flash中。

这需要另一个命令。




原创粉丝点击