Author Topic: Change Zimage.bin  (Read 4375 times)

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
Change Zimage.bin
« on: October 23, 2005, 12:27:47 pm »
hey anyone know how I can edit the existing files in this? For instance I want my theme as a default(already installed, and a few minor configurations.
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Change Zimage.bin
« Reply #1 on: October 29, 2005, 06:29:04 am »
Is it a jffs2 filesystem or cramfs? Find out which, then you can mount it (instructions for mounting both are scattered around the forum, or google has them too) and alter files in it. Just be careful about the eventual size of the initrd.bin


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

corecoder

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • http://patternsemerge.home.mindspring.com
Change Zimage.bin
« Reply #2 on: January 28, 2006, 11:07:56 am »
I couldn't find a good places to post this. But this seems OK. I didn't want to start a new topic.

Well here it goes.

Why can't I get my custom rom to boot?

I have been trying to get a custom rom built for my c860. I'm trying to use the 'card_update_c860' files.

My experiance:
 I have compiled my own kernel and can flash it with no problems.
 I have flashed OZ, pdaXrom, and have updated to 1.4JP.
 I've restored from NAND many times.
 I can mount the initrd.bin on my linux boxes. (fc4, debian-sarge,woody and such, mandrake, and others) using

modprobe mtdram total_size=65535 (could this be the issue?)
modprobe mtdblock
modprobe jffs2
dd if=initrd.bin of=/dev/mtdblock0
mount -t jffs2 /dev/mtdblock0 /mymountpoint
cd /mymountpoint

 I'm using the build.sh and mkfs.jffs2 files from rootfs-slc860-20031107.tar and a initrd.bin is created.
 I have used different updater.sh files including the on from 'card_update_c860'.
 I can also boot into console only and run the extract.sh to get the mversion.bin,roflsys.bin and such.
 
I have searched the forum using 'initrd' and have read everything all the back to 2003.

Yes, I know I can remount rw on the Z and make changes that way, but I'd like to know how to roll my own rom.

Bascially a learning experience.

By the way,I can change/flash a rom on the 5500 with no problems.

OT: How did you ROM folks change the maintre.bin file to fix the 64M limit?
SL-C860 Original Sharp ROM (Flash back and forth wit RC5)/Pocket Workstation
4gb/1gb/340mb MicroDrives
1gb/512/256 SD cards
CampactLAN
Ambicom wireless LAN
Pretec Bluetooth
Ambicom Modem
PocketTop IR keyboard
2X-5500 Orginal ROM/OZ3.5.1

corecoder

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • http://patternsemerge.home.mindspring.com
Change Zimage.bin
« Reply #3 on: January 29, 2006, 10:22:05 am »
Nevermind. I figured it out.
Now for some ROM modding.
SL-C860 Original Sharp ROM (Flash back and forth wit RC5)/Pocket Workstation
4gb/1gb/340mb MicroDrives
1gb/512/256 SD cards
CampactLAN
Ambicom wireless LAN
Pretec Bluetooth
Ambicom Modem
PocketTop IR keyboard
2X-5500 Orginal ROM/OZ3.5.1

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
Change Zimage.bin
« Reply #4 on: January 29, 2006, 11:03:03 am »
please post what you have.....more info the better..
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

corecoder

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • http://patternsemerge.home.mindspring.com
Change Zimage.bin
« Reply #5 on: January 30, 2006, 08:23:56 am »
I read in the SL-3000 HOWTO (near the end) about a small configuration that seems to work for the c860.

Hear is what I'm doing.
 I used nand-extract.pl to rip apart the NAND backup.
 
 Renamed the *P2.RAW file (root) to myinitrd.
   ( could also boot using the DB trick and dd the mtd2 part)
 
 Did all of the modprobe stuff to get the JFFS2 mounted.
   (I used the info from /proc/mtd to figure out the total_size for the mtdram)
   ( I don't think it matters. I'll try it later)
 
 Make any changes I need or want.
 
 Run mkfs.jffs2 -o newinitrd -e16k -r /mnt/directory
   ( I used the mkfs.jffs2 from the c860-rootfs file,found elsewhere in the forum)
 
 Use the initrd.bin from card_update_c860. ( could also use cacko, pdaXrom?) to extract the  next info.

   From the sl3000 howto doc.
     Run 'head -c 16 initrd.bin > header'
     (Then rename initrd.bin to something.)
     Run 'cat header newinitrd > initrd.bin

I don't get why, but the 16 byte version header needs to be added to the front.Still digging into things for this.

Then I flashed just the initrd.bin using the updater.sh script.  

There are probably other ways, but this works for me. Just don't over shoot the size limit.
SL-C860 Original Sharp ROM (Flash back and forth wit RC5)/Pocket Workstation
4gb/1gb/340mb MicroDrives
1gb/512/256 SD cards
CampactLAN
Ambicom wireless LAN
Pretec Bluetooth
Ambicom Modem
PocketTop IR keyboard
2X-5500 Orginal ROM/OZ3.5.1

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
Change Zimage.bin
« Reply #6 on: January 30, 2006, 03:40:41 pm »
cool, thanks
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder