View Single Post
benny1967's Avatar
Posts: 3,790 | Thanked: 5,718 times | Joined on Mar 2006 @ Vienna, Austria
#8
@art:
I hope I can remember what I did... It's basically all in fanoush's post above, though (his script):

First I unpack the fiasco image:
Code:
flasher-3.0 -u -F SU-18_2007HACKER_4.2007.46-3_PR_F5_MR0_ARM.bin
One of the files I get is rootfs.jffs2. I used this one and deleted everything else that was in the image.
Then I find a free loop device (usually /dev/loop0) with "losetup -f" and attach the rootfs-file to it:
Code:
losetup /dev/loop0 rootfs.jffs2
Next I set up the block2mtd-module to work with the loop device. Honestly, I have no idea what all these things are... I just do as I'm told:
Code:
modprobe block2mtd block2mtd=/dev/loop0,131072
I didnt do the "modprobe jffs2", "modprobe mtdblock" because those are not modules in my kernel; normally you will have them as modules and use modprobe as described by fanoush.
(I learned that you have to compile block2mtd as a module, though, otherwise you can't cleanly undo all of this.)

Next you mount the device:
Code:
mount -t jffs2 -o ro /dev/mtdblock0 /mnt/jffs2/
For the following step, I assume your MMC-card is mounted on /media/disk/:

Copy the contents of the jffs2 to the card with:
Code:
tar -cf -  -C /mnt/jffs . | tar xvf - -C /media/disk
(/mnt/jffs is the source, /media/disk the target)
Again, I did what I read on maemo.org. I'm not really sure why "cp -a" or something similar will not do, they say you need to use tar or rsync. That's how it works...

Another thing that was strange: The unpacked rootfs has <200MB; the partition on my MMC was set to 256MB or so, IIRC. Still, very early in the copy-process, I got error messages about the target being full... "df" showed 70% free on the partition afterwards. I had no time to investigate, deleted a second partition and created a new one with 700MB - now it works.
 

The Following User Says Thank You to benny1967 For This Useful Post: