在线时间5 小时
UID2097663
注册时间2014-5-27
NXP金币0
该用户从未签到
注册会员

- 积分
- 79
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2014-10-10 08:48:17
|
显示全部楼层
你好,文档中是介绍烧写到SD卡的,如下
7.3 Boot commands
Boot application image from memory
bootm [addr [arg ...]]
Boot image via network using TFTP protocol
tftpboot [loadAddress] [[hostIPaddr:]bootfilename]
Boot image via network using DHCP/TFTP protocol
dhcp [loadAddress] [[hostIPaddr:]bootfilename]
Boot image via network using RARP/TFTP protocol
rarpboot [loadAddress] [[hostIPaddr:]bootfilename]
Format MMC device
mxs_mmc format <dev num>
Install image to MMC card
mxs_mmc install <dev num> addr size [sbImage|uImage|rootfs]
我现在的需求是烧写到NANDFLASH。我目前没有关于在uboot下烧写uImage和ubi.img。我使用的烧写命令式:
tftp 42000000 uImage
nand erase 0x300000 0x300000
nand write 0x42000000 0x300000 0x300000
tftp 42000000 ubi.img
nand erase 0x1400000 0x1400000
nand write 0x42000000 0x1400000 0x1400000
但是这样写的话有问题,如下:
我已经可以使用uboot启动,然后通过nand write烧写ubifs,如下:
MX28 U-Boot > tftp 42000000 ubi.img
Using FEC0 device
TFTP from server 192.168.10.101; our IP address is 192.168.10.100
Filename 'ubi.img'.
Load address: 0x42000000
Loading: FEC: Link is down 7809
T #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##################
done
Bytes transferred = 17432576 (10a0000 hex)
MX28 U-Boot > nand erase 0x1400000 0x1400000
NAND erase: device 0 offset 0x1400000, size 0x1400000
Erasing at 0x27e000005000000 -- 0% complete.
OK
MX28 U-Boot > nand write 0x42000000 0x1400000 0x1400000
NAND write: device 0 offset 0x1400000, size 0x1400000
20971520 bytes written: OK
MX28 U-Boot >
并且第一次可以启动文件系统。但是第二次启动的时候,重新下载也是第二次在加载文件系统的时候出现如下错误:
UBI error: ubi_io_read: error -74 while reading 126976 bytes from PEB 3:4096, read 126976 bytes
UBI error: ubi_io_read: error -74 while reading 126976 bytes from PEB 4:4096, read 126976 bytes
UBI error: ubi_io_read: error -74 while reading 11 bytes from PEB 9:6144, read 11 bytes
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 80000005 [#1] PREEMPT
last sysfs file:
Modules linked in:
CPU: 0 Not tainted (2.6.35.3-670-g914558e #128)
PC is at 0x0
LR is at my_read_page+0x60/0xa8
pc : [<00000000>] lr : [<c0263234>] psr: 40000013
sp : c7c27b18 ip : 00000020 fp : c7c27d4c
r10: c06000bd r9 : 00000000 r8 : c0027a14
r7 : c0027a24 r6 : c04f05b8 r5 : c7c27d2c r4 : c7c27d50
r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : c7dfc400
Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: 40004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc7c26270)
Stack: (0xc7c27b18 to 0xc7c28000) |
|