maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   mtd-tools and 0xFFFF (https://talk.maemo.org/showthread.php?t=23604)

maacruz 2008-09-14 17:27

mtd-tools and 0xFFFF
 
Hi all,
Has anyone got debs or already built binaries of mtd-tools and 0xFFFF for the tablet (diablo)?
I'm trying to do a flashable backup, but can't find the tools in any repo.

fanoush 2008-09-14 20:40

Re: mtd-tools and 0xFFFF
 
binaries of mtd-utils are inside bootmenu flasher http://fanoush.wz.cz/maemo/initfs_flasher.tgz

For flashable backup you just mount jffs2 system somewhere and create jffs2 image out of it via mkfs.jffs2. Example for rootfs
Code:

mount -t jffs2 /dev/mtdblock4 /opt
mkfs.jffs2 -r /opt -o /media/mmc1/rootfs.jffs2 -e 128 -l -n

later you can flash it (when booted from something else than internal flash) via
Code:

flash_eraseall -j /dev/mtd4
nandwrite -a -p /dev/mtd4 /media/mmc1/rootfs.jffs2


maacruz 2008-09-15 16:44

Re: mtd-tools and 0xFFFF
 
Thank you very much.
I already did that with rootfs and initfs .
Since nobody seems to have compiled 0xFFFF for the tablet I guess I'll have to do it myself once I put on the build environment. Seems a more appropiate tool to backup (it can dump CAL and Xloader areas too)

qwerty12 2008-09-15 17:15

Re: mtd-tools and 0xFFFF
 
I have static binaries of mtd-tools and 0xFFFF (for initfs) here:
http://qwerty12.maemobox.org/initfs

It's static but compiled against uclibc so I dunno if it will work on a booted system.

For dumping CAL, cat /dev/mtd1 > /media/mmc2/mycalfile should do it. edit: seems not, thanks fanoush.

maacruz 2008-09-15 19:11

Re: mtd-tools and 0xFFFF
 
Thanks :-D
Static binaries always work, unless the kernel interface changes

qwerty12 2008-09-15 19:46

Re: mtd-tools and 0xFFFF
 
Thanks. I just remembered that I modified the dump function on 0xffff not to ask questions and not to strip :/. (i made it for the purpose for running straight from bootmenu), I'll recompile tomorrow with the original source.

maacruz 2008-09-15 20:02

Re: mtd-tools and 0xFFFF
 
Oooops!
Thanks for the warning

fanoush 2008-09-15 20:32

Re: mtd-tools and 0xFFFF
 
Quote:

Originally Posted by maacruz (Post 224090)
Thank you very much.
I already did that with rootfs and initfs .
Since nobody seems to have compiled 0xFFFF for the tablet I guess I'll have to do it myself once I put on the build environment.

Well I did but it is not that much useful on the tablet.

Quote:

Originally Posted by maacruz (Post 224090)
Seems a more appropiate tool to backup (it can dump CAL and Xloader areas too)

Backup can be done via nanddump (or even dd), no need for 0xFFFF. As for being more appropriate - check 0xFFFF source, older versions were actually worse with lot of stuff hardcoded and no bad block handling, in recent version the code is basically copied from nanddump so it should be similar. For backup both are good, for restore I wouldn't trust any of them directly on the device for bootloader or CAL area.


All times are GMT. The time now is 06:09.

vBulletin® Version 3.8.8