如题,我想把ubifs文件系统从nand flash中读出来,但是,我如何确定这个文件系统存储在nand flash的什么地址?
我是执行mmc_flash_ubifs进行烧录,我想问,如何确定在nand flash中的存储位置?
uboot环境变量如下:
bootargs=console=ttyS2,115200n8 ip=192.168.4.191 mem=64M@0xc0000000
bootcmd=if nboot.e 0xc0700000 0 0x120000; then setenv bootargs ${mem} ${bootargs} root=ubi0:ubifs rootfstype=ubifs ubi.mtd=4,2048; bootm 0xc0700000; fi; if mmc rescan 0; then if fatload mmc 0 0xc0600000 boot.scr; then source 0xc0600000; fi; if fatload mmc 0 0xc0700000 uImage; then setenv bootargs ${mem} ${bootargs} root=/dev/mmcblk0p2 rw rootwait; bootm 0xc0700000; fi; fi; if sf probe 0; then sf read 0xc0700000 0x80000 0x220000;setenv bootargs ${mem} ${bootargs}root=/dev/mmcblk0p2 rw rootwait;bootm 0xc0700000;fi
bootdelay=1
baudrate=115200
bootfile="uImage"
hwconfig=dsp:wake=yes
serverip=192.168.4.58
ipaddr=192.168.4.191
mmc_flash_uimage=mmc rescan 0; fatload mmc 0 0xc0700000 uImage;nand erase 0x120000 0x400000;nand write 0xc0700000 0x120000 0x400000;
mmc_flash_ubifs=mtdparts default; nand erase ubifs;ubi part ubifs 2048;ubi create ubifs;mmc rescan 0; fatload mmc 0 0xc0000000 ubifs.img;ubi write 0xc0000000 ubifs 0xd00000;
tftp_flash_uimage=tftp 0xc0700000 uImage;nand erase 0x120000 0x400000;nand write 0xc0700000 0x120000 0x400000;
tftp_flash_ubifs=mtdparts default; nand erase ubifs;ubi part ubifs 2048;ubi create ubifs;tftp 0xc0000000 ubifs.img;ubi write 0xc0000000 ubifs 0xd00000;
stdin=serial
stdout=serial
stderr=serial
ethaddr=00:50:c2:e6:77:22
ver=U-Boot 2009.11 ( 9? 15 2015 – 04:52:33)
Environment size: 1379/65532 bytes
执行烧录ubifs的打印如下:
run mmc_flash_ubifs
NAND erase: device 0 offset 0x600000, size 0x8000000
Erasing at 0x85e0000 — 100% complete.
OK
Creating 1 MTD partitions on "nand0":
0x000000600000-0x000008600000 : "mtd=4"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=4"
UBI: MTD device size: 128 MiB
UBI: number of good PEBs: 1024
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 1010
UBI: total number of reserved PEBs: 14
UBI: number of PEBs reserved for bad PEB handling: 10
UBI: max/mean erase counter: 0/0
Creating dynamic volume ubifs of size 128245760
reading ubifs.img
13586432 bytes read
Volume "ubifs" found at volume id 0
OEM > <INTERRUPT>
HG:
http://www.deyisupport.com/question_answer/dsp_arm/davinci_digital_media_processors/f/39/t/105411.aspx
供参考
miles meng:
回复 HG:
感谢回复,但我是想把文件系统通过烧写nand flash的烧写器从nand flash中读取出来啊,我想确定当我们从SD卡拷贝文件系统写入到nand flash时,存放在nand flash中的地址