问题1:MFGtool烧入image后无法从eMMC引导。
I2C3 Recovery success
Found PFUZE100!deviceid=10,revid=11
Net: got MAC address from IIM: 00:00:00:00:00:00
FEC0 [PRIME]
Hit any key tostop autoboot: 0
FEC: Link is down7949
*** ERROR: `ethaddr'not set
FEC: Link is down7949
WrongImage Format for bootm command
ERROR: can't getkernel image!
MX6Solo SABRESDU-Boot >
分析:从打印消息来看应该是MAC地址为零,导致无法引导。
解决:
用别人打出来的uboot,提示:
Net: got MAC address from IIM: 00:00:00:00:00:00
FEC0 [PRIME]
Hit any key to stop autoboot: 0
FEC: Link is Up 796d
*** ERROR: `ethaddr' not set
FEC: Link is Up 796d
Wrong Image Format for bootm command
ERROR: can't get kernel image!
要在参数中增加:
setenv ethaddr 00:0C:0C:A0:02:6A;saveenv
设置后saveenv(我打出来的uboot,连这个savenv命令都没有,但版本都是:
U-Boot 2009.08(Aug 16 2013 - 12:53:32)
修改:
setenv bootcmd runbootcmd_mmc;saveenv
reset,启动linux kernel正常。
看来,根本的原因就在于uboot版本不正确,导致编译后烧入出现问题。
烧入开发板的u-boot-mx6solo-sabresd.bin( 512Mbit DDR3),是可以引导的,但问题在于freescale uboot default设置为bootcmd=runbootcmd_net,eth0addr没有设置因此导致错误。
如果default设置为bootcmd=runbootcmd_mmc就没问题了。
测了许多个uboot版本,也没有一个正确的,也就是说,跟sabreSD参考设计一样的uboot。仔细思考了一下,可能代码都是正确的,就是uboot配置参数不同,只有自己来修改
include/configs/mx6solo_sabresd.h和include/configs/mx6solo_sabresd_mfg.h
正确的uboot参数:
MX6Solo SABRESDU-Boot > printenv
bootdelay=3
baudrate=115200
ipaddr=192.168.1.103
serverip=192.168.1.101
netmask=255.255.255.0
loadaddr=0x10800000
rd_loadaddr=(0x10800000+ 0x300000)
netdev=eth0
ethprime=FEC0
uboot=u-boot.bin
kernel=uImage
nfsroot=/opt/eldk/arm
bootargs_base=setenvbootargs console=ttymxc0,115200 nosmp
bootargs_nfs=setenvbootargs ${bootargs} root=/dev/nfs ip=dhcpnfsroot=${serverip}:${nfsroot},v3,tcp
bootcmd_net=runbootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm
bootargs_mmc=setenvbootargs ${bootargs} ip=dhcp root=/dev/mmcblk0p1 rootwait
bootcmd_mmc=runbootargs_base bootargs_mmc; mmc dev 3; mmc read ${loadaddr} 0x800 0x2000; bootm
stdin=serial
stdout=serial
stderr=serial
ethact=FEC0
bootargs=console=ttymxc0,115200nosmp root=/dev/nfs ip=dhcp nfsroot=192.168.1.101:/opt/eldk/arm,v3,tcp
ethaddr=00:0C:0C:A0:02:6A
bootcmd=runbootcmd_mmc
Environment size:851/8188 bytes
MX6Solo SABRESDU-Boot >
MX6Solo SABRESDU-Boot > ping 192.168.1.90
FEC: Link is Up796d
Using FEC0 device
host 192.168.1.90is alive //网口正常!
MX6Solo SABRESDU-Boot >
启动正常:
freescale login:root
login[2491]: rootlogin on 'ttymxc0'
root@freescale ~$
定位了问题后,uboot.bin编译出来可以引导,但是又出现了新问题:
Hit any key tostop autoboot: 0
mmc3(part 0) iscurrent device
MMC read: dev # 3,block # 2048, count 8192 ... 8192 blocks read: OK
## Booting kernelfrom Legacy Image at 10800000 ...
Image Name: Linux-3.0.35-2666-gbdde708
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3866444 Bytes = 3.7 MB
Load Address: 10008000
EntryPoint: 10008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel...
UncompressingLinux... done, booting the kernel.
在这里死掉了。不动了。
baidu了一下,就两大主要原因:machine type不对或是console配置不对。
首先,内核uImage编译时开启Kernel hacking -> Kernellow-level debugging functions
以追查原因。
ubootinclude/asm-arm/mach-types.h:
#defineMACH_TYPE_MX6Q_SABRESD 3980
内核arch/arm/tools/mach-types:
mx6q_sabresd MACH_MX6Q_SABRESD MX6Q_SABRESD 3980
检查了是对的。改用uboot-imx,结果生成的uboot.bin连MMC设备都找不见。
改用make mx6q_sabresd_config来编译,结果连串口都没有任何响应。
I have justdonwloaded a u-boot-v2009.08 from
ftp://ftp.denx.de/pub/u-boot/, And patch it usingu-boot-v2009.08-imx_3.0.101_4.1.1.tar.bz2.
下载原装ubootv2009.08包再打imx6patch,仍然是不行。freescale下载的u-boot-2009.08是打过patch的。
Thisproblem is positioned as follows:
viinclude/configs/mx6solo_sabresd.h
#definePHYS_SDRAM_1_SIZE (512 * 1024 *1024)
change this valuefrom 512M to 1024M will lead to this problem. But why andhow to resolve it?