OESF Portables Forum

Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Angstrom & OpenZaurus => Topic started by: Jinidog on April 27, 2005, 04:42:03 pm

Title: How To Mount Roms?
Post by: Jinidog on April 27, 2005, 04:42:03 pm
Hello,

I think the OpenZaurus ROMs are images with a cramfs-filesystem.
So it should be possible to mount them and perhaps modify them.

But I cannot mount them.
I tried mount -t cramfs -o loop /path/to/opie-image-poodle-20050409140246.rootfs.jffs2.bin /mnt/zaurus/ but it didn't work.
Perhaps someone can give me a hint.

Thanks.
Title: How To Mount Roms?
Post by: Mickeyl on April 27, 2005, 04:49:00 pm
jffs2 != cramfs, thank god

google for mtdram jffs2 and visit the first result
Title: How To Mount Roms?
Post by: Jinidog on April 27, 2005, 04:57:30 pm
Thanks.

I compiled the jffs2 module but:
mount -t jffs2 -o loop /home/jini/Downloads/opie-image-poodle-20050409140246.rootfs.jffs2.bin /mnt/floppy/

concludes in the same error (bad superblock)
Title: How To Mount Roms?
Post by: Jinidog on April 27, 2005, 05:14:36 pm
This gives some hints:
http://wep-linux.berlios.de/mtddevices.html (http://wep-linux.berlios.de/mtddevices.html)

Sadly I have no mtdblocks in my /dev directory and the modulenames seems to have changed.
Perhaps I try tomorrow again.
Title: How To Mount Roms?
Post by: acpkendo on April 27, 2005, 05:51:15 pm
FWIW, I remember having to run losetup when mounting Sharp ROM images. . . not sure if this is specific to cramfs or not. . .
Title: How To Mount Roms?
Post by: Jinidog on April 27, 2005, 05:56:01 pm
I read that for cramfs and read somewhere else, that loop devices will not help in case of jffs2.
Although I tried it and it didn't work.

I believe, I have the trouble with the missig /dev/mdbblock because I compiled the stuff as moduls or because of udev, who knows.
Title: How To Mount Roms?
Post by: Greg2 on April 27, 2005, 06:34:39 pm
Quote
I believe, I have the trouble with the missig /dev/mdbblock because I compiled the stuff as moduls or because of udev, who knows.
I was going to give you a link to a very good post on The Zaurus Message Board... but it appears it is gone.

I did and still do archive a good html doc when I see one... so I will attach it here for you.

I think this is what your looking for. The oesf/forums won't accept gz so I will have to zip it. Unzip and follow the instructions:

Greg
Title: How To Mount Roms?
Post by: Mickeyl on April 28, 2005, 04:08:10 am
Look like you didn't google or else you would've seen that jffs2 is not directly mountable. You mount an mtdblock where you have dd'ed the jffs2 into. It's not working via loopback.
Title: How To Mount Roms?
Post by: Jinidog on April 28, 2005, 08:09:25 am
Of course I googled and I know, that I have to use mtdblocks.
My problem is just, that I have no /dev/mtdblock although I have compiled support in my kernel.
That's a problem I have to solve for myself.
Title: How To Mount Roms?
Post by: Mickeyl on April 28, 2005, 08:14:08 am
modprobe mtdblock
modprobe mtdram

should do that. Perhaps you need to manually construct the device nodes - although this gets automatically done here using udev. It should look like that:

Code: [Select]
mickey@gandalf:~/work/spp1140/abschlussbericht$ lsmod|grep mtd

mtdram                  3716  0
mtdblock                5312  0
mtd_blkdevs             8448  1 mtdblock
mtdpart                 9984  1 mtdram
mtdcore                 6984  6 jffs2,mtdram,mtd_blkdevs,mtdpart

and

Code: [Select]
mickey@gandalf:~/work/spp1140/abschlussbericht$ ls -l /dev/mtdblock0

brw-rw----  1 root disk 31, 0 Apr 24 11:44 /dev/mtdblock0
Title: How To Mount Roms?
Post by: Jinidog on April 28, 2005, 08:58:36 am
Okay, I found the right kernel-options.
(I was to tired yesterday)

Now I can mount the ROM. Thanks!

How do I save changes in the ROM into a new ROM image?
dd if=/dev/mtdblock0 of=/imagefile ?
Title: How To Mount Roms?
Post by: Mickeyl on April 28, 2005, 03:57:34 pm
That may work, but the flash updater won't be too happy about it - better regenerate the image with mkfs.jffs2.

Besides, why do you want to develop with SharpROM Cloner techniques? OZ is about building software from scratch. It strikes me as pretty backwards to modify an open source ROM in Sharp closed source style