As you have seen in my previous post I have compiled the HTC Hero kernel, now is the time to use the kernel and that’s what I am going to show you in this post.
Let me start off with telling you that you can find a lot of information regarding android and boot on the android-dls.com site.
There information is useful and there tools are working fine BUT they don’t work for the Hero, actually they do but they miss one thing ![]()
Let’s cut the chitchat and let me explain you how to boot your Hero with your own fresh kernel. Assume you have compiled your kernel using my way or your own way you get an zImage. Next thing you have to do is download the following things and put them all in one folder including your zImage: boot.img mkbootimg repack-bootimg.pl(altered) unpack-bootimg.pl
CAUTION: Please make an backup with nandroid before proceeding!!!!!!!
Step 1:
unzip mkbootimg.zip
Step 2:
perl unpack-bootimg.pl boot.img
Step 3:
perl repack-bootimg.pl zImage boot.img-ramdisk netBoot.img
The repack script was fine but it missed the –base 0×19200000 statement at the mkbootimg line, that’s what I added.
Our newBoot.img is ready for work right now. What you need to do now is upload it to your Hero, this can be done in two ways:
Method 1:
fastboot flash boot newBoot.img fastboot reboot
Method 2:
adb push newBoot.img /sdcard adb shell cat /dev/zero > /dev/mtd/mtd2 - write: No space left on device [this is ok, you can ignore] flash_image boot /sdcard/newBoot.img reboot your phone
If everything went oke your phone should boot with your new kernel. Have Fun!
Hi,
I followed the steps, but in step 3, this is what I get:
494 blocks
sh: mkbootimg: not found
repacked boot image written at boot.img-ramdisk-repack.img
I don’t see newBoot.img created. I already extracted the mkbootimg.zip as instructed in step 1 in the same folder. May you advise what went wrong?
Ahh never mind. I added “./” in the command to execute mkbootimg, and it works now. Thanks a lot for the guide =)
@zero
It seams there is an error in the repack-bootimg.pl. Please edit it (gedit repack-bootimg.pl) and change this:
system (“mkbootimg
to this:
system (“./mkbootimg
That should work.
EDIT:
I see you found it your self, have fun with your kernel.
Hi again,
After I flashed the newBoot.img using fastboot and reboot the phone, the phone is now always stucked on the HERO screen =.=
Not sure what went wrong…
Do you have a working boot.img that can help me restore my phone?
@zero
Use one of the Hero generic boot.img: http://android.modaco.com/content/htc-hero-hero-modaco-com/291942/24-nov-roms-radios-in-update-zip-format-for-gsm-hero/
Or use the boot.img from modaco: http://android.modaco.com/content/htc-hero-hero-modaco-com/292018/11-jan-3-1-modaco-custom-rom-for-gsm-hero/
Just download one of the zip files you think suits you and get the boot.img from it. You could also go back completely to the stock HTC Hero software buy applying the update.zip Hope this helps your, did you tried to revert to your backup?
Thanks for the link. I can now restore my phone with the generic boot.img. But I have retried compiling the kernel and still failed booting up the phone with the created newBoot.img. Have you personally tried these steps? Any idea what could be the problem?
@zero
Yes I have personally compiled the HTC Hero kernel(see my post about how I did it) and successfully booted my Hero with it.
I assume you compiled the HTC Hero kernel and not the androids stock one? What configuration did you use for compiling?
I followed your post about compiling the HTC Hero Kernel. For the configuration, I have tried both by using adb pull /proc/config.gz and by using your sh script. There seems to be a few new options that appear when compiling, and I just pressed Enter, is that ok? Those options are:
Local version – append to kernel release (LOCALVERSION) [] (NEW)
Initramfs source file(s) (INITRAMFS_SOURCE) [] (NEW)
External firmware blobs to build into the kernel binary (EXTRA_FIRMWARE) [] (NEW)
There are also warnings that 5 syscall are not implemented (fadvise64, migrate_pages, pselect6, ppoll, epoll_pwait).
@zero
It should be fine the way you do it. I assume you have the GSM Hero and not the CDMA.
I am not sure why you are not able to use your compiled kernel, you could try to look for some more info or clues here http://android.modaco.com/index.php?s=&showtopic=294951&view=findpost&p=1111441
There is one other thing you can try, you could try to use a boot.img from modaco or pull the boot.img from your own Hero instead the one i have here and try it with that.
I am not really able to help you, if you have used the same kernel sources as I did and you have successfully compiled the kernel it should work.
Thanks for the advice. I tried running “perl unpack-bootimg.pl boot.img” using the generic Hero boot.img instead of the boot.img posted here, and it works now.
I am glad you got it working.