Author Topic: How To Mount Roms?  (Read 5303 times)

Jinidog

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.st-legacy.de.vu
How To Mount Roms?
« 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.

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
How To Mount Roms?
« Reply #1 on: April 27, 2005, 04:49:00 pm »
jffs2 != cramfs, thank god

google for mtdram jffs2 and visit the first result
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

Jinidog

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.st-legacy.de.vu
How To Mount Roms?
« Reply #2 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)

Jinidog

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.st-legacy.de.vu
How To Mount Roms?
« Reply #3 on: April 27, 2005, 05:14:36 pm »
This gives some hints:
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.

acpkendo

  • Full Member
  • ***
  • Posts: 169
    • View Profile
    • http://
How To Mount Roms?
« Reply #4 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. . .

Jinidog

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.st-legacy.de.vu
How To Mount Roms?
« Reply #5 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.

Greg2

  • Hero Member
  • *****
  • Posts: 790
    • View Profile
    • http://
How To Mount Roms?
« Reply #6 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

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
How To Mount Roms?
« Reply #7 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.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

Jinidog

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.st-legacy.de.vu
How To Mount Roms?
« Reply #8 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.

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
How To Mount Roms?
« Reply #9 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
« Last Edit: April 28, 2005, 08:16:39 am by Mickeyl »
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

Jinidog

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.st-legacy.de.vu
How To Mount Roms?
« Reply #10 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 ?
« Last Edit: April 28, 2005, 09:05:53 am by Jinidog »

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
How To Mount Roms?
« Reply #11 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  
« Last Edit: April 28, 2005, 03:58:00 pm by Mickeyl »
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.