hi all,

finally i have created a little jffs2 image (on my PC locally) and try to mount 
it, following this procdure:

1) looked for the correct eraseblocksize, looking at "/proc/mtd", it is 0x10000 
(64K, default)
2) created locally on PC a little jffs2 image with
sudo mkfs.jffs2 -r flash --squash --big-endian --eraseblock=64 -o rootfs.jffs2
3) written the jffs2 image into the last 1024Kb (prepared) partition of the 
flash,
4) tried to mount it, but i get the following error

/var # mkdir jffs2
/var # ls
jffs2  lock   log    run    tmp
/var # mount -t jffs2 /dev/mtdblock2 /var/jffs2
MTDSB: lookup_bdev() returned 0
MTDSB: New superblock for device 2 ("JFFS2 (1024K)")
jffs2: Flash size not aligned to erasesize, reducing to 0KiB
jffs2: Too few erase blocks (0)
mount: mounting /dev/mtdblock2 on /var/jffs2 failed: Invalid argument

so seems that the way i am creating / writing the image is not correct.
every help is really appreciated
 
thanks
angelo

On 25/04/2011 15:44, Ulisses Reina Montenegro de Albuquerque wrote:
> On Mon, 2011-04-25 at 13:42 +0200, Angelo Dureghello wrote:
>> Dear All,
>>
>> i have finally a well working uClinux running on a Coldfire-based custom 
>> board i developed.
>> I am looking for some basic help to have a little part of the flash 
>> available to store some few KB of non volatile data.
>>
>> I have actually a 4Mb flash, first 64K are used from the bootloader, 2.3M 
>> busy from the kernel+romfs image, the rest (abt 1,5M) is free.
>> Once the kernel is loaded into ram, i can move and operate inside the romfs 
>> tree.
>> Actually, my idea to store non-volatile data is to create an additional 
>> jffs2 partition in the last 1,5M, but seems i cannot mount it in any romfs 
>> folder.
>> So i just need some basic help for now,
>> - is this possible in theory (romfs+jffs2) ?
>> - does it have a sense or this is a totally wrong approach ?
> 
> Mount points are just directories that should exist in the proper place
> in order to have a given filesystem available under another filesystem.
> So, if you want your r/w jffs2 filesystem to be available under /data on
> your system, just make sure your romfs contains the corresponding
> directory, and your /etc/fstab contains the correct reference to the
> block device associated to your flash segment.
> 
> There might be a lot of stuff to configure, depending on your flash type
> (NAND or NOR), your flash partitioning schema (I personally have used
> the mtd command line for the linux kernel) and the initial setup of the
> flash memory with the filesystem image. Check out
> http://www.linux-mtd.infradead.org/archive/index.html for more
> information.
> 
>> many thanks,
>>
>> ragards,
>> angelo
> 
> Regards
> Ulisses
> 
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev@uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev@uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to