For those of you who want to hack the HTC Evo 4G, HTC has officially released the Evo 4G kernel, meaning you can compile it yourself and do whatever the heck you want to it.
Today, I will show you how to build your own HTC Evo 4G kernel using Ubuntu linux, which is the easiest way. For those of you who have Windows, you can try running Ubuntu linux under VMWare or VirtualBox, which works just fine. Mac should be very similar to Ubuntu linux.
Download evo_4g-2.6.29-e1cabff5.tar.gz from HTC’s website.
1. Let’s get into “root” mode since you won’t have to do so many “sudo”:
1. Untar your evo_4g-2.6.29-e1cabff5.tar.gz file:
tar xvf evo_4g-2.6.29-e1cabff5.tar.gz
Next, you can move the directory to /kernel for easy naming.
mv evo_4g-2.6.29-e1cabff5 /kernel
2. Next, let’s go to your SDK Tools directory /sdk/tools
3. Next, connect your HTC Evo 4G to your computer and make sure it’s in USB Debugging Mode under Settings->Applications->Development.
4. Next, we will pull the current configuration from your existing kernel on the HTC Evo 4G, so we don’t break anything
./adb pull /proc/config.gz .
5. Let’s gunzip the config.gz:
6. Which will give us file called config.
7. Let’s move this config file into our kernel directory as .config:
cp config /kernel/.config
8. Go into your kernel directory:
9. Let’s download the compiler for ARM on linux. (Select the latest version and download the one that says “A32 GNU/Linux TAR”. e.g. http://www.codesourcery.com/sgpp/lite/arm/portal/package6488/public/arm-none-linux-gnueabi/arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2)
to download it to the /kernel directory.
10. Untar the compiler
tar xvf arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
11. Let’s edit the Makefile to use the downloaded ARM compiler:
(I like vi editor but you can use your favorite text editor.)
Next, change the CROSS_COMPILE= line to:
12. (Optional) You can now edit .config file to add your hacks such as enabling loop devices for mounting. (this one required for the Ubuntu install on your Evo 4G)
Uncomment the CONFIG_DEV_BLK_LOOP and write:
to enable loop devices.
13. Let’s compile it by doing:
Once that’s done, you need to copy over the “compiled” wifi/4G drivers to your Evo 4G to make it along with your new kernel.
Let’s copy over the new kernel and drivers to your /sdk/tools directory for easy installation.
cp /kernel/drivers/net/wireless/bcm4329_204/bcm4329.ko /sdk/tools/.
cp drivers/net/wimax/SQN/sequans_sdio.ko /sdk/tools/.
cp /kernel/arch/arm/boot/zImage /sdk/tools/.
14. Go to your SDK tools directory again and push the new files!
./adb push bcm4329.ko /system/lib/modules/bcm4329.ko
./adb push sequans_sdio.ko /system/lib/modules/sequans_sdio.ko
15. You will need fastboot to flash the new kernel image so do:
chmod 755 fastboot
(For Windows, download this file and put into your SDK tools directory!)
Next let’s flash the new kernel image, zImage by doing:
./fastboot flash zimage zImage
It should actually be waiting, now you need to turn your phone off, then boot it back up into bootloader mode by pressing the Power button WHILE holding down the volume button. Wait 3 seconds and hit the Power button to enter the fastboot mode.
16. Now you should see fastboot flashing the image and you can reboot it to try out your new HTC Evo 4G kernel you built yourself!
If you like this post, don't forget to Like us on our Facebook page!