Extracting NAND flash image

seven
Hello

I have a Mini2440 and got the basics working with the kernel, filesystem
etc. Now next step, I got a .bin image file from a friend that he used on
his board. I know I can pass this image to the FriendlyARM board through
dnw.exe but what I want to do is get the filesystem from this image and
extract it on my computer. Does anyone know if it is possible to do this?

davef
Is it really a uImage or a zImage?  If it is a uImage go here:

Shell script to mount/unmount JFFS2 using kernel memory emulating MTD

at this place:

http://code.google.com/p/friendlyarm/wiki/Linux_Tutorial

I am sure a zImage could be mounted in a similar way, just never tried.

Juergen Beisert
JFFS2 is a filesystem you can mount, but a "zImage" is only the
abbreviation for a regular Linux kernel image compressed with zlib.

davef
Oops

I really meant to say is it a JFFS2 or YAFFS2 filesystem?  

I am sure that a YAFFS2 filesystem could be ...

Reggie
On linux, there is a program called 'file', at the command prompt do:
file theimage.bin

Obviously change theimage.bin name to whatever the name of your bin file
actually is, hopefully it will give you some information about the makeup
of the file.  If it's a file that can be mounted directly then you will see
information returned by the 'file' program indicating whether the file is
split up, with start sectors and partition information, such as the
partition type.

if it's got mountable stuff in it you should then be able to use a program
like kpartx to attach the image file to a loop device, something like:
sudo kpartx -a theimage.bin

will add all of the mountable image to a loop device (usually loop0) it
will also mount the partitions to block loop devices, which you should be
able to find under /dev/mapper/loop0p1 etc. or something similar. Once its
done that you should be able to use the normal mount commands to mount the
image partitions and then examine their contents just like you would with
any other linux file system.

Reggie
There are also a set of mktools around somewhere (probably on the dvd image
for your board) that will do un-yaffing too.

Reggie
you should also be able to emulate nand on a linux pc, from there you might
get lucky enough to be able to 'flash' the image to your virtual nand
device and mount it that way.