Is mkyaffs util avaible in CVS?
Quoted 12 lines · Nobin Mathew
For using jffs2 following are the instructions,
for creating jffs2 image
mkfs.jffs2 --eraseblock=blocksize --pad=pagesize --no-cleanmarkers -d rootdirectory -o imagename
example
mkfs.jffs2 --eraseblock=0x20000 --pad=2048 --no-cleanmarkers -d $HOME/work -ojffs2_nand
Oh, I think it should be
mkfs.jffs2 --pagesize=2048 --eraseblock=0x20000 --pad=0x200000 --no-cleanmarkers -d rootfs/ -o rootfs.jffs2
This will produce a 2Mbytes jffs2 image which is aligned with 2048 pagesize. Then the nandwrite can write it to NAND chip.
Quoted 11 lines
Erasing flash partition use
#flash_eraseall -j/dev/mtdXBurning the image
#nandwrite
/dev/mtdXjffs2_nandAnd mount the partition using
mount -t jffs2/dev/mtdblockX/mnt
root:~> mount -t jffs2 /dev/mtdblock2 /mnt/jffs_check_nand_cleanmarker returned 1jffs2_check_oob_empty returned 0jffs_check_nand_cleanmarker returned 1jffs2_check_oob_empty returned 0jffs_check_nand_cleanmarker returned 1jffs2_check_oob_empty returned 0jffs_check_nand_cleanmarker returned 1jffs2_check_oob_empty returned 0jffs_check_nand_cleanmarker returned 1jffs2_check_oob_empty returned 0jffs_check_nand_cleanmarker returned 1jffs2_check_oob_empty returned 0jffs_check_nand_cleanmarker returned 1jffs2_check_oob_empty returned 0jffs_check_nand_cleanmarker returned 1jffs2_check_oob_empty returned 0jffs_check_nand_cleanmarker returned 1jffs2_check_oob_empty returned 0jffs_check_nand_cleanmarker returned 1jffs2_check_oob_empty returned 0jffs_check_nand_cleanmarker returned 1jffs2_check_oob_empty returned 0
Endless message and finally system hang.
Here is my JFFS2 configuration:
CONFIG_JFFS2_FS=yCONFIG_JFFS2_FS_DEBUG=2CONFIG_JFFS2_FS_WRITEBUFFER=y
# CONFIG_JFFS2_SUMMARY is not set
# CONFIG_JFFS2_FS_XATTR is not set
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not setCONFIG_JFFS2_ZLIB=yCONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not set
Sorry for asking this JFFS2 question on YAFFS2 maillist.
Thanks
- Bryan Wu
Quoted 202 lines
So there is difference in procedure for jffs2 and yaffs2
Nobin Mathew
Quoted 197 lines · Bryan Wu
Quoted 3 lines · Nobin Mathew
What all YAFFS2 options are enabled in the kernel. Can you try disabling the autoselect.
Here is my config
---
CONFIG_YAFFS_FS=yCONFIG_YAFFS_YAFFS1=y
#CONFIG_YAFFS_DOES_ECCis not setCONFIG_YAFFS_YAFFS2=y
#CONFIG_YAFFS_AUTO_YAFFS2is not set
#CONFIG_YAFFS_DISABLE_LAZY_LOADis not setCONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10#CONFIG_YAFFS_DISABLE_WIDE_TNODESis not set #CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASEDis not set #CONFIG_YAFFS_SHORT_NAMES_IN_RAMis not set
---Quoted 4 lines
Can you check the page size the driver returns.
If you are developing a new driver then you first try jffs2.
can I use nandwrite to program the jffs2 image to nand flash chip? nandwrite -a -o
/dev/mtdXjffs2_imageCould you please help me to use the mkfs.jffs2 for make a jffs2 image?
#mkfs.jffs2 -s 2KiB -e 128KiB -n -d rootfs -o rootfs.jffs2 the file size of rootfs.jffs2 will be 88Mbytes, while
#mkfs.jffs2 -e 128KiB -n -d rootfs -o rootfs.jffs2 file size is 1.6Mbytes
Did I miss something?
Thanks a lot for your help.
- Bryan Wu
Quoted 155 lines
That is much more stable, and then we will come back to YAFFS2.
In my case i also developed a nand controller driver. and it was working perfectly with above mentioned options with YAFFS2.
Nobin Mathew
Quoted 147 lines · Bryan Wu
Quoted 2 lines · Nobin Mathew
Which is your NAND chip?
NAND device: Manufacturer ID:
0x20, Chip ID:0xda(ST Micro NAND 256MiB 3,3V 8-bit)Quoted 1 line
Is it 2k page chip?
yes, it is.
Quoted 6 lines
Then use
#flash_eraseall/dev/mtdX
#nandwrite -a -o/dev/mtdXyaffs2_image
#mount -t yaffs2/dev/mtdblockX/mntHere is the command log on my board:
---
root:~>flash_eraseall/dev/mtd2
Erasing 128 Kibyte @ fbe0000 -- 99 % complete. root:~>
root:~>
root:~> nandwrite -a -o/dev/mtd2rootfs.yaffs2 Writing data to block 0
Writing data to block 20000
Writing data to block 40000
Writing data to block 60000
Writing data to block 80000
Writing data to block a0000
Writing data to block c0000
Writing data to block e0000
Writing data to block 100000
Writing data to block 120000
Writing data to block 140000
Writing data to block 160000
Writing data to block 180000
Writing data to block 1a0000
Writing data to block 1c0000
Writing data to block 1e0000
Writing data to block 200000
Writing data to block 220000
Writing data to block 240000
Writing data to block 260000
Writing data to block 280000
Writing data to block 2a0000
Writing data to block 2c0000
Writing data to block 2e0000
root:~> mount -t yaffs/dev/mtdblock2/mnt/
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
root:~> cd/mnt/
root:/mnt> ls
lost+found
root:/mnt>
root:/mnt> cat/proc/yaffs
YAFFS built:Jul 11 2007 15:32:43
$Id:yaffs_fs.c2682 2007-01-22 03:19:29Z aubrey $ $Id:yaffs_guts.c2682 2007-01-22 03:19:29Z aubrey $Device 0 "File System"
startBlock......... 0
endBlock........... 2015
chunkGroupBits..... 1
chunkGroupSize..... 2
nErasedBlocks...... 1992
nTnodesCreated..... 300
nFreeTnodes........ 35
nObjectsCreated.... 600
nFreeObjects....... 29
nFreeChunks........ 127542
nPageWrites........ 0
nPageReads......... 0
nBlockErasures..... 0
nGCCopies.......... 0
garbageCollections. 0
passiveGCs......... 0
nRetriedWrites..... 0
nRetireBlocks...... 0
eccFixed........... 0
eccUnfixed......... 0
tagsEccFixed....... 0
tagsEccUnfixed..... 0
cacheHits.......... 0
nDeletedFiles...... 0
nUnlinkedFiles..... 0
nBackgroudDeletions 0
useNANDECC......... 1
isYaffs2........... 1
---The rootfs.yaffs2 is made by mkyaffs2image tool from a rootfs dir. Why there is no rootfs subdirs such as bin/
lib/etc/ ...?Thanks
- Bryan WuQuoted 49 lines
Nobin Mathew
Quoted 46 lines · Bryan Wu
Quoted 2 lines · Nobin Mathew
This is the link to yaffs2 source
http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/yaffs2/Yeah, I got this source. But there is no mkyaffs
Quoted 2 lines
You can use
flash_erasealland nandwrite tools frommtd_utilsI am not sure my method, please help me to point out some wrong:
$ flash_eraseall /dev/mtd2 $ nandwrite -y -p /dev/mtd2 rootfs.yaffs2right?
I use mkyaffs as this:
$ eraseall /dev/mtd2 /* old mtd-utils provide eraseall */ $ mkyaffs -e /dev/mtd2 $ mount -t yaffs /dev/mtdblock2 /mnt $ cp "necessary files" /mnt $ umount /mntThen I can reboot my board mounting
/dev/mtdblock2yaffs2 as rootfs.Thanks
- Bryan WuQuoted 18 lines · Bryan Wu
Quoted 16 lines
Hi folks,
I am developing Blackfin NAND Flash Controller driver.
YAFFS2 should be OK on our platform. I can't found the mkyaffs tool in the CVS now, how can I format a NAND partition as YAFFS2 without mkyaffs tool?
Thanks
- Bryan Wu_______________________________________________
yaffs mailing list
[email protected]
http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
Quoted 15 lines · Nobin Mathew
Quoted 14 lines · Bryan Wu
Quoted 12 lines · Nobin Mathew
For using jffs2 following are the instructions,
for creating jffs2 image
mkfs.jffs2 --eraseblock=blocksize --pad=pagesize --no-cleanmarkers -d rootdirectory -o imagename
example
mkfs.jffs2 --eraseblock=0x20000 --pad=2048 --no-cleanmarkers -d $HOME/work -ojffs2_nand
Quoted 6 lines
Quoted 2 lines
Oh, I think it should be
mkfs.jffs2 --pagesize=2048 --eraseblock=0x20000 --pad=0x200000 --no-cleanmarkers -d rootfs/ -o rootfs.jffs2I think you are changing the Jffs2 page size, it is not the NAND page size Whatever I gave you should work.
Quoted 1 line
Oh, my NAND chip's page size is 2048 (2K bytes).
---
roc@roc-desktop:/opt/uclinux-dist/linux-2.6.x$ mkfs.jffs2 mkfs.jffs2: Usage: mkfs.jffs2 [OPTIONS] Make a JFFS2 file system image from an existing directory tree
Options:
-p, --pad[=SIZE] Pad output to SIZE bytes with 0xFF. If SIZE is
not specified, the output is padded to the end of the final erase block
-r, -d, --root=DIR Build file system from directory DIR (default: cwd)
-s, --pagesize=SIZE Use page size (max data node size) SIZE (default: 4KiB)
-e, --eraseblock=SIZE Use erase block size SIZE (default: 64KiB)
-c, --cleanmarker=SIZE Size of cleanmarker (default 12)
-m, --compr-mode=MODE Select compression mode (default: priortiry)
-x, --disable-compressor=COMPRESSOR_NAME
Disable a compressor
-X, --enable-compressor=COMPRESSOR_NAME
Enable a compressor
-y, --compressor-priority=PRIORITY:COMPRESSOR_NAME
Set the priority of a compressor
-L, --list-compressors Show the list of the avaiable compressors
-t, --test-compression Call decompress and compare with the original (for test)
-n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock
-o, --output=FILE Output to FILE (default: stdout)
-l, --little-endian Create a little-endian filesystem
-b, --big-endian Create a big-endian filesystem
-D, --devtable=FILE Use the named FILE as a device table file
-f, --faketime Change all file times to '0' for regression testing
-q, --squash Squash permissions and owners making all files be owned by root
-U, --squash-uids Squash owners making all files be owned by root
-P, --squash-perms Squash permissions on all files
-h, --help Display this help text
-v, --verbose Verbose operation
-V, --version Display version information
-i, --incremental=FILE Parse FILE and generate appendage output for it---
So I choose pagesize for 2048 and pad the whole image to 2M which aligned by 2K.
And thanks anyway, I think there are some bugs in my NAND driver, -:)
- Bryan Wu
Quoted 259 lines
Quoted 259 lines
This will produce a 2Mbytes jffs2 image which is aligned with 2048 pagesize. Then the nandwrite can write it to NAND chip.
Quoted 11 lines
Erasing flash partition use
#flash_eraseall -j/dev/mtdXBurning the image
#nandwrite
/dev/mtdXjffs2_nandAnd mount the partition using
mount -t jffs2/dev/mtdblockX/mntroot:~> mount -t jffs2
/dev/mtdblock2/mnt/jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0Endless message and finally system hang.
Here is my JFFS2 configuration:
CONFIG_JFFS2_FS=yCONFIG_JFFS2_FS_DEBUG=2CONFIG_JFFS2_FS_WRITEBUFFER=y
#CONFIG_JFFS2_SUMMARYis not set
#CONFIG_JFFS2_FS_XATTRis not set
#CONFIG_JFFS2_COMPRESSION_OPTIONSis not setCONFIG_JFFS2_ZLIB=yCONFIG_JFFS2_RTIME=y
#CONFIG_JFFS2_RUBINis not setSorry for asking this JFFS2 question on YAFFS2 maillist.
Thanks
- Bryan WuQuoted 202 lines
So there is difference in procedure for jffs2 and yaffs2
Nobin Mathew
Quoted 197 lines · Bryan Wu
Quoted 3 lines · Nobin Mathew
What all YAFFS2 options are enabled in the kernel. Can you try disabling the autoselect.
Here is my config
---
CONFIG_YAFFS_FS=yCONFIG_YAFFS_YAFFS1=y
#CONFIG_YAFFS_DOES_ECCis not setCONFIG_YAFFS_YAFFS2=y
#CONFIG_YAFFS_AUTO_YAFFS2is not set
#CONFIG_YAFFS_DISABLE_LAZY_LOADis not setCONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10#CONFIG_YAFFS_DISABLE_WIDE_TNODESis not set #CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASEDis not set #CONFIG_YAFFS_SHORT_NAMES_IN_RAMis not set
---Quoted 4 lines
Can you check the page size the driver returns.
If you are developing a new driver then you first try jffs2.
can I use nandwrite to program the jffs2 image to nand flash chip? nandwrite -a -o
/dev/mtdXjffs2_imageCould you please help me to use the mkfs.jffs2 for make a jffs2 image?
#mkfs.jffs2 -s 2KiB -e 128KiB -n -d rootfs -o rootfs.jffs2 the file size of rootfs.jffs2 will be 88Mbytes, while
#mkfs.jffs2 -e 128KiB -n -d rootfs -o rootfs.jffs2 file size is 1.6Mbytes
Did I miss something?
Thanks a lot for your help.
- Bryan Wu
Quoted 155 lines
That is much more stable, and then we will come back to YAFFS2.
In my case i also developed a nand controller driver. and it was working perfectly with above mentioned options with YAFFS2.
Nobin Mathew
Quoted 147 lines · Bryan Wu
Quoted 2 lines · Nobin Mathew
Which is your NAND chip?
NAND device: Manufacturer ID:
0x20, Chip ID:0xda(ST Micro NAND 256MiB 3,3V 8-bit)Quoted 1 line
Is it 2k page chip?
yes, it is.
Quoted 6 lines
Then use
#flash_eraseall/dev/mtdX
#nandwrite -a -o/dev/mtdXyaffs2_image
#mount -t yaffs2/dev/mtdblockX/mntHere is the command log on my board:
---
root:~>flash_eraseall/dev/mtd2
Erasing 128 Kibyte @ fbe0000 -- 99 % complete. root:~>
root:~>
root:~> nandwrite -a -o/dev/mtd2rootfs.yaffs2 Writing data to block 0
Writing data to block 20000
Writing data to block 40000
Writing data to block 60000
Writing data to block 80000
Writing data to block a0000
Writing data to block c0000
Writing data to block e0000
Writing data to block 100000
Writing data to block 120000
Writing data to block 140000
Writing data to block 160000
Writing data to block 180000
Writing data to block 1a0000
Writing data to block 1c0000
Writing data to block 1e0000
Writing data to block 200000
Writing data to block 220000
Writing data to block 240000
Writing data to block 260000
Writing data to block 280000
Writing data to block 2a0000
Writing data to block 2c0000
Writing data to block 2e0000
root:~> mount -t yaffs/dev/mtdblock2/mnt/
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
root:~> cd/mnt/
root:/mnt> ls
lost+found
root:/mnt>
root:/mnt> cat/proc/yaffs
YAFFS built:Jul 11 2007 15:32:43
$Id:yaffs_fs.c2682 2007-01-22 03:19:29Z aubrey $ $Id:yaffs_guts.c2682 2007-01-22 03:19:29Z aubrey $Device 0 "File System"
startBlock......... 0
endBlock........... 2015
chunkGroupBits..... 1
chunkGroupSize..... 2
nErasedBlocks...... 1992
nTnodesCreated..... 300
nFreeTnodes........ 35
nObjectsCreated.... 600
nFreeObjects....... 29
nFreeChunks........ 127542
nPageWrites........ 0
nPageReads......... 0
nBlockErasures..... 0
nGCCopies.......... 0
garbageCollections. 0
passiveGCs......... 0
nRetriedWrites..... 0
nRetireBlocks...... 0
eccFixed........... 0
eccUnfixed......... 0
tagsEccFixed....... 0
tagsEccUnfixed..... 0
cacheHits.......... 0
nDeletedFiles...... 0
nUnlinkedFiles..... 0
nBackgroudDeletions 0
useNANDECC......... 1
isYaffs2........... 1
---The rootfs.yaffs2 is made by mkyaffs2image tool from a rootfs dir. Why there is no rootfs subdirs such as bin/
lib/etc/ ...?Thanks
- Bryan WuQuoted 49 lines
Nobin Mathew
Quoted 46 lines · Bryan Wu
Quoted 2 lines · Nobin Mathew
This is the link to yaffs2 source
http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/yaffs2/Yeah, I got this source. But there is no mkyaffs
Quoted 2 lines
You can use
flash_erasealland nandwrite tools frommtd_utilsI am not sure my method, please help me to point out some wrong:
$ flash_eraseall /dev/mtd2 $ nandwrite -y -p /dev/mtd2 rootfs.yaffs2right?
I use mkyaffs as this:
$ eraseall /dev/mtd2 /* old mtd-utils provide eraseall */ $ mkyaffs -e /dev/mtd2 $ mount -t yaffs /dev/mtdblock2 /mnt $ cp "necessary files" /mnt $ umount /mntThen I can reboot my board mounting
/dev/mtdblock2yaffs2 as rootfs.Thanks
- Bryan WuQuoted 18 lines · Bryan Wu
Quoted 16 lines
Hi folks,
I am developing Blackfin NAND Flash Controller driver.
YAFFS2 should be OK on our platform. I can't found the mkyaffs tool in the CVS now, how can I format a NAND partition as YAFFS2 without mkyaffs tool?
Thanks
- Bryan Wu_______________________________________________
yaffs mailing list
[email protected]
http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
Quoted 8 lines · Bryan Wu
Quoted 7 lines · Nobin Mathew
For using jffs2 following are the instructions,
for creating jffs2 image
mkfs.jffs2 --eraseblock=blocksize --pad=pagesize --no-cleanmarkers -d rootdirectory -o imagename
Quoted 8 lines
Quoted 5 lines
example
mkfs.jffs2 --eraseblock=0x20000 --pad=2048 --no-cleanmarkers -d $HOME/work -ojffs2_nandOh, I think it should be
mkfs.jffs2 --pagesize=2048 --eraseblock=0x20000 --pad=0x200000 --no-cleanmarkers -d rootfs/ -o rootfs.jffs2
I think you are changing the Jffs2 page size, it is not the NAND page size Whatever I gave you should work.
Quoted 260 lines
This will produce a 2Mbytes jffs2 image which is aligned with 2048 pagesize. Then the nandwrite can write it to NAND chip.
Quoted 11 lines
Erasing flash partition use
#flash_eraseall -j/dev/mtdXBurning the image
#nandwrite
/dev/mtdXjffs2_nandAnd mount the partition using
mount -t jffs2/dev/mtdblockX/mntroot:~> mount -t jffs2
/dev/mtdblock2/mnt/jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0jffs_check_nand_cleanmarkerreturned 1jffs2_check_oob_emptyreturned 0Endless message and finally system hang.
Here is my JFFS2 configuration:
CONFIG_JFFS2_FS=yCONFIG_JFFS2_FS_DEBUG=2CONFIG_JFFS2_FS_WRITEBUFFER=y
#CONFIG_JFFS2_SUMMARYis not set
#CONFIG_JFFS2_FS_XATTRis not set
#CONFIG_JFFS2_COMPRESSION_OPTIONSis not setCONFIG_JFFS2_ZLIB=yCONFIG_JFFS2_RTIME=y
#CONFIG_JFFS2_RUBINis not setSorry for asking this JFFS2 question on YAFFS2 maillist.
Thanks
- Bryan WuQuoted 202 lines
So there is difference in procedure for jffs2 and yaffs2
Nobin Mathew
Quoted 197 lines · Bryan Wu
Quoted 3 lines · Nobin Mathew
What all YAFFS2 options are enabled in the kernel. Can you try disabling the autoselect.
Here is my config
---
CONFIG_YAFFS_FS=yCONFIG_YAFFS_YAFFS1=y
#CONFIG_YAFFS_DOES_ECCis not setCONFIG_YAFFS_YAFFS2=y
#CONFIG_YAFFS_AUTO_YAFFS2is not set
#CONFIG_YAFFS_DISABLE_LAZY_LOADis not setCONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10#CONFIG_YAFFS_DISABLE_WIDE_TNODESis not set #CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASEDis not set #CONFIG_YAFFS_SHORT_NAMES_IN_RAMis not set
---Quoted 4 lines
Can you check the page size the driver returns.
If you are developing a new driver then you first try jffs2.
can I use nandwrite to program the jffs2 image to nand flash chip? nandwrite -a -o
/dev/mtdXjffs2_imageCould you please help me to use the mkfs.jffs2 for make a jffs2 image?
#mkfs.jffs2 -s 2KiB -e 128KiB -n -d rootfs -o rootfs.jffs2 the file size of rootfs.jffs2 will be 88Mbytes, while
#mkfs.jffs2 -e 128KiB -n -d rootfs -o rootfs.jffs2 file size is 1.6Mbytes
Did I miss something?
Thanks a lot for your help.
- Bryan Wu
Quoted 155 lines
That is much more stable, and then we will come back to YAFFS2.
In my case i also developed a nand controller driver. and it was working perfectly with above mentioned options with YAFFS2.
Nobin Mathew
Quoted 147 lines · Bryan Wu
Quoted 2 lines · Nobin Mathew
Which is your NAND chip?
NAND device: Manufacturer ID:
0x20, Chip ID:0xda(ST Micro NAND 256MiB 3,3V 8-bit)Quoted 1 line
Is it 2k page chip?
yes, it is.
Quoted 6 lines
Then use
#flash_eraseall/dev/mtdX
#nandwrite -a -o/dev/mtdXyaffs2_image
#mount -t yaffs2/dev/mtdblockX/mntHere is the command log on my board:
---
root:~>flash_eraseall/dev/mtd2
Erasing 128 Kibyte @ fbe0000 -- 99 % complete. root:~>
root:~>
root:~> nandwrite -a -o/dev/mtd2rootfs.yaffs2 Writing data to block 0
Writing data to block 20000
Writing data to block 40000
Writing data to block 60000
Writing data to block 80000
Writing data to block a0000
Writing data to block c0000
Writing data to block e0000
Writing data to block 100000
Writing data to block 120000
Writing data to block 140000
Writing data to block 160000
Writing data to block 180000
Writing data to block 1a0000
Writing data to block 1c0000
Writing data to block 1e0000
Writing data to block 200000
Writing data to block 220000
Writing data to block 240000
Writing data to block 260000
Writing data to block 280000
Writing data to block 2a0000
Writing data to block 2c0000
Writing data to block 2e0000
root:~> mount -t yaffs/dev/mtdblock2/mnt/
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
root:~> cd/mnt/
root:/mnt> ls
lost+found
root:/mnt>
root:/mnt> cat/proc/yaffs
YAFFS built:Jul 11 2007 15:32:43
$Id:yaffs_fs.c2682 2007-01-22 03:19:29Z aubrey $ $Id:yaffs_guts.c2682 2007-01-22 03:19:29Z aubrey $Device 0 "File System"
startBlock......... 0
endBlock........... 2015
chunkGroupBits..... 1
chunkGroupSize..... 2
nErasedBlocks...... 1992
nTnodesCreated..... 300
nFreeTnodes........ 35
nObjectsCreated.... 600
nFreeObjects....... 29
nFreeChunks........ 127542
nPageWrites........ 0
nPageReads......... 0
nBlockErasures..... 0
nGCCopies.......... 0
garbageCollections. 0
passiveGCs......... 0
nRetriedWrites..... 0
nRetireBlocks...... 0
eccFixed........... 0
eccUnfixed......... 0
tagsEccFixed....... 0
tagsEccUnfixed..... 0
cacheHits.......... 0
nDeletedFiles...... 0
nUnlinkedFiles..... 0
nBackgroudDeletions 0
useNANDECC......... 1
isYaffs2........... 1
---The rootfs.yaffs2 is made by mkyaffs2image tool from a rootfs dir. Why there is no rootfs subdirs such as bin/
lib/etc/ ...?Thanks
- Bryan WuQuoted 49 lines
Nobin Mathew
Quoted 46 lines · Bryan Wu
Quoted 2 lines · Nobin Mathew
This is the link to yaffs2 source
http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/yaffs2/Yeah, I got this source. But there is no mkyaffs
Quoted 2 lines
You can use
flash_erasealland nandwrite tools frommtd_utilsI am not sure my method, please help me to point out some wrong:
$ flash_eraseall /dev/mtd2 $ nandwrite -y -p /dev/mtd2 rootfs.yaffs2right?
I use mkyaffs as this:
$ eraseall /dev/mtd2 /* old mtd-utils provide eraseall */ $ mkyaffs -e /dev/mtd2 $ mount -t yaffs /dev/mtdblock2 /mnt $ cp "necessary files" /mnt $ umount /mntThen I can reboot my board mounting
/dev/mtdblock2yaffs2 as rootfs.Thanks
- Bryan WuQuoted 18 lines · Bryan Wu
Quoted 16 lines
Hi folks,
I am developing Blackfin NAND Flash Controller driver.
YAFFS2 should be OK on our platform. I can't found the mkyaffs tool in the CVS now, how can I format a NAND partition as YAFFS2 without mkyaffs tool?
Thanks
- Bryan Wu_______________________________________________
yaffs mailing list
[email protected]
http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs