Re: [Yaffs] Is mkyaffs util avaible in CVS?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Bryan Wu
Date:  
To: Nobin Mathew
CC: yaffs
Subject: Re: [Yaffs] Is mkyaffs util avaible in CVS?
On Wed, 2007-07-11 at 12:29 +0530, Nobin Mathew wrote:
> Which is your NAND chip?
>

NAND device: Manufacturer ID: 0x20, Chip ID: 0xda (ST Micro NAND 256MiB
3,3V 8-bit)

> Is it 2k page chip?


yes, it is.
>
> Then use
> #flash_eraseall /dev/mtdX
> #nandwrite -a -o /dev/mtdX yaffs2_image
> #mount -t yaffs2 /dev/mtdblockX /mnt
>


Here 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/mtd2 rootfs.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.c 2682 2007-01-22 03:19:29Z aubrey $
$Id: yaffs_guts.c 2682 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 Wu

> Nobin Mathew
>
> On 7/11/07, Bryan Wu <> wrote:
> > On Wed, 2007-07-11 at 12:07 +0530, Nobin Mathew wrote:
> > > 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
> > >
> > > You can use flash_eraseall and nandwrite tools from mtd_utils
> >
> > I am not sure my method, please help me to point out some wrong:
> > $ flash_eraseall /dev/mtd2
> > $ nandwrite -y -p /dev/mtd2 rootfs.yaffs2
> >
> > right?
> >
> > 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 /mnt

> >
> > Then I can reboot my board mounting /dev/mtdblock2 yaffs2 as rootfs.
> >
> > Thanks
> > - Bryan Wu
> >
> > >
> > > On 7/11/07, Bryan Wu <> wrote:
> > > > 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
> > > >
> > > > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> > > >
> >