[Q] Unpacking and Packing Boot.img for Sensation

Simma87

New member
Jan 31, 2012
4
0
0
Hi, I am trying to compile my own kernel, using the CM7.1 alpha source, but have not been able to load the zImage successfully. So I have taken a step back and tried to create a boot.img with an existing working 1.

I've extracted the boot.img from the file: update-cm-7.1.0-SelfKANG10-Sensation-signed.zip and have been able to fastboot boot boot.img using the extracted file. Everything loads up fine.

I would like to simply unpack this img and repack it with no modifications. I have tried several methods:

split_bootimg.pl, then, (have also tried other scripts unpack-H.pl, unpack-bootimg.pl, unpack.sh)
mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel your-kernel-file --ramdisk newramdisk.cpio.gz -o mynewimage.img
fastboot boot mynewimage.img

The phone hangs at the HTC boot screen.

I have tried manually separating the kernel and ramdisk using a hex editor, finding the string 00 00 1F 8B and removing the bottom section to get the kernel and the top section to get the ramdisk, then creating 2 separate files.

I have also tried adding the base address 0x40400000 to the mkbootimg command.

Is there something else I am missing? Please help. I have Sensation 4G if that makes any difference.
 
Last edited:

Simma87

New member
Jan 31, 2012
4
0
0
Found my problem. Base address in the config file was wrong. It showed 0x40400000. I used a new split script that displays the base address which shows 0x48000000. Did the mkbootimg with a split boot.img of a working CM7.1 update and the new boot image is now working. Will try with compiled zImage now.
 

vietcad1977

Senior Member
Nov 9, 2013
135
31
0
Ha Noi
Found my problem. Base address in the config file was wrong. It showed 0x40400000. I used a new split script that displays the base address which shows 0x48000000. Did the mkbootimg with a split boot.img of a working CM7.1 update and the new boot image is now working. Will try with compiled zImage now.
Let's me kwown method of u? Thank