查看: 9901|回复: 8

[已解决] imx28 uboot烧写ubifs问题(已解决)

[复制链接]

该用户从未签到

6

主题

23

帖子

0

注册会员

Rank: 2

积分
79
最后登录
1970-1-1
发表于 2014-9-16 21:49:14 | 显示全部楼层 |阅读模式
本帖最后由 FSL_TICS_Rita 于 2014-10-10 11:51 编辑

我已经可以使用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)


请问imx28  nandflash启动,在uboot下write ubifs时候如何操作,目前我操作命令如下,但感觉需要修改nand write成nand write.ubi,请问如何实现?
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



我知道答案 目前已有8人回答
回复

使用道具 举报

该用户从未签到

6

主题

23

帖子

0

注册会员

Rank: 2

积分
79
最后登录
1970-1-1
 楼主| 发表于 2014-9-17 10:11:22 | 显示全部楼层
看到我问题了吗,谢谢
回复 支持 反对

使用道具 举报

该用户从未签到

145

主题

4926

帖子

0

金牌会员

Rank: 6Rank: 6

积分
9267
最后登录
1970-1-1
发表于 2014-9-17 10:48:30 | 显示全部楼层
eleganthuman 发表于 2014-9-17 10:11
看到我问题了吗,谢谢

一会I.MX工程师会过来统一处理I.MX的题,放心,肯定看到你的题的。
回复 支持 反对

使用道具 举报

该用户从未签到

45

主题

2369

帖子

0

金牌会员

Rank: 6Rank: 6

积分
3275
最后登录
1970-1-1
发表于 2014-9-17 17:05:39 | 显示全部楼层
楼主你好,请问你使用的是官网的i.mx28的开发板吗?
回复 支持 反对

使用道具 举报

该用户从未签到

6

主题

23

帖子

0

注册会员

Rank: 2

积分
79
最后登录
1970-1-1
 楼主| 发表于 2014-9-18 22:34:09 | 显示全部楼层
你好,是啊。请问你们那的UBOOT模式下下载命令式怎么样的?另外你们有针对nandflash的uboot,并且支持ubifs命令的uboot吗
回复 支持 反对

使用道具 举报

该用户从未签到

45

主题

2369

帖子

0

金牌会员

Rank: 6Rank: 6

积分
3275
最后登录
1970-1-1
发表于 2014-9-19 15:26:18 | 显示全部楼层
eleganthuman 发表于 2014-9-18 22:34
你好,是啊。请问你们那的UBOOT模式下下载命令式怎么样的?另外你们有针对nandflash的uboot,并且支持ubifs ...

楼主你好,在i.mx28的文档中应该是有说明的,建议你看一下哈。
回复 支持 反对

使用道具 举报

该用户从未签到

45

主题

2369

帖子

0

金牌会员

Rank: 6Rank: 6

积分
3275
最后登录
1970-1-1
发表于 2014-9-19 15:28:37 | 显示全部楼层
eleganthuman 发表于 2014-9-18 22:34
你好,是啊。请问你们那的UBOOT模式下下载命令式怎么样的?另外你们有针对nandflash的uboot,并且支持ubifs ...

还有u-boot是一样的。不一样的是文件系统的格式。
回复 支持 反对

使用道具 举报

该用户从未签到

45

主题

2369

帖子

0

金牌会员

Rank: 6Rank: 6

积分
3275
最后登录
1970-1-1
发表于 2014-10-9 17:54:47 | 显示全部楼层
楼主你好,请问你帖中的问题已经解决了吗?如果没有的话,欢迎继续在这里讨论哈~~
回复 支持 反对

使用道具 举报

该用户从未签到

6

主题

23

帖子

0

注册会员

Rank: 2

积分
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)
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 注册/登录

本版积分规则

关闭

站长推荐上一条 /3 下一条

Archiver|手机版|小黑屋|恩智浦技术社区

GMT+8, 2025-7-20 23:53 , Processed in 0.105093 second(s), 29 queries , MemCache On.

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.

快速回复 返回顶部 返回列表