mkfs.ubifs, ubinize, ubiupdatevol request!

Artem Bityutskiy dedekind at infradead.org
Fri May 30 02:21:46 EDT 2008


Hi,

On Thu, 2008-05-29 at 15:02 +0800, Nancy wrote:
>        I don't know what's the detail differences between mkfs.vfat
> and windows format program.  For me, the speed problem is really hard
> to find. Is there anyone who can give me a hint?

I do not know much about vfat and cannot help here.

>        when I dump VFAT volume to a file, there have ummapped LEBs in
> between Cause the windows format program will write the last LEB. But
> I can't dump the ummaped LEBs to files due to the dump file size
> limitation. So I have to teach ubiupdatevol and ubinize to .....   Oh
> please, that's really hard things for me.

Actually what we could do is to create a simple program which would dump
whole _MTD_ device, and basically drop unmapped physical eraseblocks.
This is just easier to do. Something like this:

fd = open(/dev/mtdX);
for (each physical eraseblock) {
	read(fd, buf, peb_size);
	/* Check if PEB is not mapped by checking that there is not VID
           header */
	if (vid_header_is_not_present())
		/* This PEB is unmapped, it is safe to drop it and
		   switch to the next PEB */
		continue;
	/* Write data to the output file */
	write(output_file_descriptor, buf, peb_size);
	
}

Afterward, you will be able to just flash the resulting dump with
"ubiformat".

But of course, you will dump all volumes this way, not just one. Does
this work for you?

This should be easy to write this tool. I could do this but I am very
busy at the moment and basically have not time, may be later.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list