Author Topic: How Do I Unpack A .bin File?  (Read 5869 times)

xamindar

  • Hero Member
  • *****
  • Posts: 803
    • View Profile
    • http://www.radnimax.com
How Do I Unpack A .bin File?
« on: July 17, 2007, 04:51:24 am »
Can someone tell me how to unpack a rom such as the cacko rom?  I need to get into the filesystem and find the kernel module "serial_cs" if it is there.  Hopefully getting that module will finally allow me to use my compact flash bluetooth card.

Or, if anyone knows where I can find that module that would greatly help.  Thanks for any help.
SL-C3100 happily Dualbooting Japanese Rom 1.02 and Debian Eabi
Replaced internal CF with 8gb seagate cf hard drive
Ambicom CF GPS
CyberPower battery powered USB hub
D-link DCF-650W (MAN THIS THING IS HUGE!!)

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
How Do I Unpack A .bin File?
« Reply #1 on: July 17, 2007, 09:18:53 am »
Make sure you have a /dev/mtdblock0 or /dev/mtdblock/0 device; if not use "mknod /dev/mtdblock0 b 31 0" to create one. Then:

modprobe mtdram total_size=32768
modprobe mtdblock
modprobe jffs2
dd if=initrd.bin of=/dev/mtdblock0
mount -t jffs2 /dev/mtdblock0 /mnt/whatever

The total_size above has to be big enough to hold the initrd.bin. It's in KB, so the 32768 above is 32MB. Try 65536 instead if your initrd.bin is larger.

Obviously you need to do this on a linux box; the Z just doesn't have the RAM to do the job itself. I'm not aware of any way to do it from windows.
« Last Edit: July 17, 2007, 09:21:34 am by pelrun »
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

xamindar

  • Hero Member
  • *****
  • Posts: 803
    • View Profile
    • http://www.radnimax.com
How Do I Unpack A .bin File?
« Reply #2 on: July 17, 2007, 11:53:12 am »
Thank you so much for this info.  After enabling memory technology devices and jffs2 support in my kernel and recompiling I was able to mount the cacko rom using your instructions.  Thanks you so much.

YES!  And the cacko rom has the serial_cs module.  Now hopefully I can get this ambicom bluetooth BT2000C card to work.

EDIT:  Dang, the module doesn't work.  Anyone know where I can get one that is made for the C3100 kernel.  I guess the cacko kernel is different for some reason.

Code: [Select]
bash-2.05# modprobe serial_cs
/lib/modules/2.4.20/pcmcia/serial_cs.o: unresolved symbol sharpsl_serial_out_wait
/lib/modules/2.4.20/pcmcia/serial_cs.o: insmod /lib/modules/2.4.20/pcmcia/serial_cs.o failed
/lib/modules/2.4.20/pcmcia/serial_cs.o: insmod serial_cs failed
bash-2.05#            
« Last Edit: July 17, 2007, 12:17:26 pm by xamindar »
SL-C3100 happily Dualbooting Japanese Rom 1.02 and Debian Eabi
Replaced internal CF with 8gb seagate cf hard drive
Ambicom CF GPS
CyberPower battery powered USB hub
D-link DCF-650W (MAN THIS THING IS HUGE!!)