zapher, on Jan 9 2011, 20:26, said:
Would you mind writing up the whole procedure so we don't fall in the same pits?
Sure... no bother....
* everything italicized is the command your type in your terminal....
* everything in bold is the filename
* boot-tools utilities are located in $HOME/bin and is in your PATH
* Java 1.5 is present and installed and executable (that is one lil snag - its very hard to obtain 1.5, by yours truly Oracle!!!)
Am using Slackware Linux 13.0, for starters so your mileage will vary....
Make sure you have developer tools including git installed...
First... obtain the android sdk by going
here...
I installed it into $HOME/ANDROID
Then...
pull down the android source repo from
here
I cloned the repository into $HOME/mydroid, this will take a while...3.5Gb or thereabouts...
follow the instructions on that linky...
Reason: to obtain the pre-built toolchains
Finally...
Pull down the git repo for the kernel source, I have $HOME/repository where all source from github gets cloned into...
git clone https://github.com/Z...LADE-2.6.32.git
Using your own rom, unzip it into somewhere, I have a
$HOME/myrom,
$HOME/myrom:
unzip your_rom
there should be a
META-INF folder,
boot.img,
system folder
Using the tool from
http://forum.android...al-rom-faq.html, grab
boot-tools.zip.
The tool in that zip is called
split_bootimg.pl
$HOME/myrom:
split_bootimg.pl boot.img
there should be kernel and ramdisk files present. It is the kernel that we're interested in.
Now go to $HOME/repository/ZTE-BLADE-2.6.32.
export CCOMPILER=$HOME/mydroid//prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
Then to build.... have a cuppa...
make ARCH=arm CROSS_COMPILE=$CCOMPILER
Lots of compile messages will appear.... no need to do a config or anything as it's already done for you!
The kernel will reside in
$HOME/repository/ZTE-BLADE-2.6.32/arch/arm/boot/zImage
Also: the modules will be built as well, the file to watch out for is
$HOME/repository/ZTE-BLADE-2.6.32/modules.order
That will contain the list of modules required...
Go back to your
$HOME/myrom
Navigate into the
system/lib/modules sub-folder, and
cat $HOME/repository/ZTE-BLADE-2.6.32/modules.order | sed s/^kernel\//g | awk '{ system(sprintf("cp $HOME/repository/ZTE-BLADE-2.6.32%s .\n", $0)); }'
navigate back to
$HOME/myrom and copy the kernel with the one found in
$HOME/repository/ZTE-BLADE-2.6.32/arch/arm/boot/zImage
$HOME/myrom:
cp $HOME/repository/ZTE-BLADE-2.6.32/arch/arm/boot/zImage .
Then, recreate the boot.img file... (mkbootimg is in your $HOME/bin)
mkbootimg --base 0x2A00000 --kernel zImage --ramdisk boot.img-ramdisk.cpio.gz -o boot.img
Note the underlined base address, be sure you get this right, if not, your handset will freeze and hang!
Now, last step, re-zip up your new rom
zip -r my_new_rom.zip META-INF boot.img system
Finally, sign the new_rom... again, testsign.jar is available here underneath this post for your benefit...(
tar xvfz testsign.gz)
java -classpath $HOME/bin/testsign.jar testsign my_new_rom.zip my_new_rom_signed.zip
Using adb, push that across to your sdcard, I have a folder there called
roms.
adb push my_new_rom_signed.zip /sdcard/roms
Reboot, go into Clockwork recovery, wipe data, wipe cache, install the rom, pick
my_new_rom_signed.zip and let it work away installing...
then reboot and pray!
Feel free to point out any errors or omissions...