nandflaha20 nand 支持列表ubi格式文件吗

1424人阅读
学习笔记(8)
工作(18)
工作中遇到ubi文件系统镜像的烧录,遇到一些问题。
一个是如何在bootloader中添加支持烧录ubi镜像的功能,uboot中已有此功能,这里说的是本身不支持烧写ubi文件系统镜像的bootloader。方法是直接读ubi镜像进行烧写,但是如果遇到读到的页全是全0xff的的页,则跳过直接不写。
另一个是使用烧录器烧录ubi文件系统镜像时,一定要确保烧录器也是遇到全0xff的页跳过不烧录,不然也会出问题,这个需要和烧录器厂商确认。
所以如果自己开发烧录ubifs的工具,一定要记住这一点。
其实上述注意事项在ubi的官方文档中已经有说明:
If your UBI image contains&&file
system, and your flash is NAND, you may have to drop&0xFF&bytes the end of input PEB data. This is very important, although not
required for all NAND flashes. Sometimes a failure to do this may result in very unpleasant problems which might be difficult to debug later. So we recommend to always do this.(摘自)
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:216472次
积分:2705
积分:2705
排名:第8009名
原创:53篇
转载:55篇
评论:30条
(5)(2)(6)(3)(3)(1)(3)(3)(1)(5)(6)(3)(2)(9)(1)(1)(17)(15)(9)(5)(3)(2)(2)(1)UBI文件系统简介_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
UBI文件系统简介
上传于||文档简介
&&u​-​b​o​o​t​ ​下​u​b​i​的​使​用​
​
​使​用​Q​E​M​U​模​拟​搭​建​A​R​M​开​发​平​台​(​二​)​―​―​加​入​b​u​s​y​b​o​x​支​持
阅读已结束,如果下载本文需要使用
想免费下载本文?
下载文档到电脑,查找使用更方便
还剩25页未读,继续阅读
你可能喜欢下次自动登录
现在的位置:
& 综合 & 正文
U-Boot中ubi和ubifs命令的使用
原文地址:
(1)查看MTD分区表
U-Boot$ mtdparts
mtdparts variable not set, see 'help mtdparts'
no partitions defined
mtdids : nand0=nandflash0
mtdparts: mtdparts=nandflash0:1536k(bootloder),512k(params),4m(kernel),16m(safefs),-(rootfs)
U-Boot$ mtdparts
mtdparts variable not set, see 'help mtdparts'
no partitions defined
mtdids : nand0=nandflash0
mtdparts: mtdparts=nandflash0:1536k(bootloder),512k(params),4m(kernel),16m(safefs),-(rootfs)
(2)载入默认分区表
U-Boot$ mtdparts default
(3)激活分区
U-Boot$ ubi part safefs
Creating 1 MTD partitions on "nand0":
0x-0x : "mtd=3"
device_name0:mtd=3
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
scanning error 0
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=3"
UBI: MTD device size: 16 MiB
UBI: number of good PEBs: 127
UBI: number of bad PEBs: 1
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 127
UBI: number of PEBs reserved for bad PEB handling: 2
UBI: max/mean erase counter: 4/1
Creating 1 MTD partitions on "nand0":
0x-0x : "mtd=3"
device_name0:mtd=3
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
scanning error 0
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=3"
UBI: MTD device size: 16 MiB
UBI: number of good PEBs: 127
UBI: number of bad PEBs: 1
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 127
UBI: number of PEBs reserved for bad PEB handling: 2
UBI: max/mean erase counter: 4/1
查看当前激活的分区:
U-Boot$ ubi part
Device 0: nand0, partition safefs
Device 0: nand0, partition safefs
(4)挂载分区
U-Boot$ ubifsmount safefs
UBIFS: recovery needed
UBIFS: recovery deferred
UBIFS: mounted UBI device 0, volume 0, name "safefs"
UBIFS: mounted read-only
UBIFS: file system size:
bytes (13860 KiB, 13 MiB, 110 LEBs)
UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root: 0 bytes (0 KiB)
UBIFS: recovery needed
UBIFS: recovery deferred
UBIFS: mounted UBI device 0, volume 0, name "safefs"
UBIFS: mounted read-only
UBIFS: file system size:
bytes (13860 KiB, 13 MiB, 110 LEBs)
UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root: 0 bytes (0 KiB)
(5)查看分区的内容
U-Boot$ ubifsls
&DIR& 3840 Tue Apr 20 07:42:09 2010 bin
&DIR& 480 Fri Aug 28 02:32:54 2009 dev
&DIR& 2416 Thu Jan 01 00:18:47 1970 etc
&DIR& 5464 Tue Apr 20 07:54:28 2010 lib
&DIR& 480 Tue Apr 20 07:42:01 2010 mnt
&DIR& 160 Fri Aug 28 01:37:57 2009 opt
&DIR& 224 Tue Apr 20 09:19:29 2010 tmp
&DIR& 160 Fri Aug 28 01:37:57 2009 sys
&DIR& 736 Thu Feb 26 07:25:19 2009 var
&DIR& 608 Fri Aug 28 02:32:54 2009 usr
&DIR& 296 Fri Aug 28 01:37:57 2009 boot
&DIR& 224 Tue Apr 20 07:42:01 2010 home
&DIR& 160 Fri Aug 28 01:37:57 2009 proc
&DIR& 2528 Tue Sep 14 08:50:07 2010 sbin
&DIR& 160 Fri Aug 28 01:37:57 2009 root
&LNK& 11 Tue Sep 14 08:24:07 2010 linuxrc
706 Wed Sep 15 08:47:30 2010 burn.usb
52 Wed Jun 30 06:30:21 2010 readme
697 Wed Sep 15 08:47:43 2010 burn.cf
664 Wed Sep 15 08:47:17 2010 burn.sd
&DIR& 3840 Tue Apr 20 07:42:09 2010 bin
&DIR& 480 Fri Aug 28 02:32:54 2009 dev
&DIR& 2416 Thu Jan 01 00:18:47 1970 etc
&DIR& 5464 Tue Apr 20 07:54:28 2010 lib
&DIR& 480 Tue Apr 20 07:42:01 2010 mnt
&DIR& 160 Fri Aug 28 01:37:57 2009 opt
&DIR& 224 Tue Apr 20 09:19:29 2010 tmp
&DIR& 160 Fri Aug 28 01:37:57 2009 sys
&DIR& 736 Thu Feb 26 07:25:19 2009 var
&DIR& 608 Fri Aug 28 02:32:54 2009 usr
&DIR& 296 Fri Aug 28 01:37:57 2009 boot
&DIR& 224 Tue Apr 20 07:42:01 2010 home
&DIR& 160 Fri Aug 28 01:37:57 2009 proc
&DIR& 2528 Tue Sep 14 08:50:07 2010 sbin
&DIR& 160 Fri Aug 28 01:37:57 2009 root
&LNK& 11 Tue Sep 14 08:24:07 2010 linuxrc
706 Wed Sep 15 08:47:30 2010 burn.usb
52 Wed Jun 30 06:30:21 2010 readme
697 Wed Sep 15 08:47:43 2010 burn.cf
664 Wed Sep 15 08:47:17 2010 burn.sd
(6)查看某个文件
U-Boot$ ubifsload
Loading file 'readme' to addr 0x with size 52 (0x)...
Loading file 'readme' to addr 0x with size 52 (0x)...
U-Boot$ md
6f 4c206c6c safefs
6f 200a2e73 PC3250 Boards..
130 302d-0
a0a0a31 00 1...............
&&&&推荐文章:
【上篇】【下篇】ubifs文件系统的制作详解_图文_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
ubifs文件系统的制作详解
上传于||暂无简介
阅读已结束,如果下载本文需要使用
想免费下载本文?
下载文档到电脑,查找使用更方便
还剩60页未读,继续阅读
你可能喜欢AM335x UBI Filesystem 制作以及NandFlash 烧录手册UBI,ubi
扫扫二维码,随身浏览文档
手机或平板扫扫即可继续访问
AM335x UBI Filesystem 制作以及NandFlash 烧录手册
举报该文档为侵权文档。
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
推荐理由:
将文档分享至:
分享完整地址
文档地址:
粘贴到BBS或博客
flash地址:
支持嵌入FLASH地址的网站使用
html代码:
&embed src='/DocinViewer-4.swf' width='100%' height='600' type=application/x-shockwave-flash ALLOWFULLSCREEN='true' ALLOWSCRIPTACCESS='always'&&/embed&
450px*300px480px*400px650px*490px
支持嵌入HTML代码的网站使用
您的内容已经提交成功
您所提交的内容需要审核后才能发布,请您等待!
3秒自动关闭窗口

我要回帖

更多关于 flah player 的文章

 

随机推荐