[HTC Pico (Explorer)] @rcane:
Compile kernel in WINDOWS 7

First my PC config.. dont know related to compiling or not but still i mention it..

Windows 7 32-bit

4GB RAM

i3 3rd gen. 3.3 GHz

Ok now with compiling.

1) Some Tools and Source:

i. Cygwin http://cygwin.com/install.html

ii. Toolchain for windows. http://android-git.devnull.name/gh/toolchain-4.6.3.cygwin.tar.bz2

iii. Kernel source. get it on your own. I used https://github.com/sakindia123/htc_pico_kernel_3.x. Download as zip.

iv. Notepad++

2)Environment Setup:

i) install cygwin by running setup.exe(duh!!) select install from internet with any mirror. Now for package selection, select install rather than default.

Now for extra must needed package for compiling checklist is below:

lzop
gcc
gcc-core
gcc-g++
wget
vim
vim-common
git
git-compleation
libncurses-devel
make
cmake
python

I think this much is enough. In cygwin there is a search bar to find that package is going to install or not so check it. And get familiar with cygwin.

ii. Most important. Our windows doesn't understand difference between heLLwindow.txt and hellwindow.txt so we need to configure that. open regedit.exe select computer. Now click on File and hit Export and take registry backup. so if mess something u can restore it.

Now go to

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\kernel

You will find on right side obcaseinsensitive registry. set its value to 0 in Hexadesimal. And reboot your system. This how u get case sensitive in windows still u can't able to make heLLwindow.txt and hellwindow.txt at same place. it need different method..:D

3) Compiling:

i. create some directory: Open cygwin and run below command to

mkdir -p ~/a
cd ~/a

so go to C:\cygwin\home\home\a and here paste all your source ZIP and toolchain tar.bz2 file. do not try to unzip with other software plz..

ii. Extracting files: Note right now you are in "a" directory. Run below command in cygwin after copying files.

tar -xjvf toolchain-4.6.3.cygwin.tar.bz2
unzip *.zip
Note:For easiness rename kernel source zip file into 3.zip

By doing this u get two separate folder in C:\cygwin\home\home\a one is 3 and other is toolchain-4.6.3

iii. Config file:

cd 3

connect you phone to pc and get gonfig.gz. If you have configure adb correctly then you can it inside cygwin or by other metod get config.gz inside 3 directory.

adb pull /proc/config.gz
gzip -dc config.gz > .config
Note: I use inside cygwin in "3" directory. But ask some questions. which will confuse you. go for different method below.

[B]OR[/B]

make pico_defconfig

Tip: which command you use in different kernel source? confuse? so check [B]C:\cygwin\home\home\a\3\arch\arm\configs[/B]
as per my kernel situated path. check which configs are provided. in my example u will find pico_defconfig. so i used "make pico_defconfig"
on other source u may find differnet config so use this check. for example "[B]make pico_cm_defconfi[/B]g" or "[B]pico_sense_defconfig[/B]"
as in cute_prince source.

iv. Cross Compiling:

goto folder 3 and open "Makefile" with notepad++ and goto line 198 stating CROSS_COMPILING.

Replace whole line with this one and save.

CROSS_COMPILE	?= C:/cygwin/home/home/a/toolchain-4.6.3/bin/arm-linux-androideabi-

V. Compiling:

Enter command

make -jX
WHERE "X" IS NUMBER ACCORDING TO YOUR PC CONFIGURATION. MY PROCESSOR IS QUAD CORE SO I PUT 4.
SO FOR THAT MY COMMAND IS [B]make -j4[/B]

Here is one pic that shows windows can be case sensitive:

vi. Party time:

go to C:\cygwin\home\home\a\3\arch\arm\boot you will find zImage. Add appropriate ramdisk and your boot.img is ready to rock. :laugh:

vii. Modules:

Enter below code to get moduels.

make modules
mkdir modules
cp `find ./ | grep .ko$` modules.order modules/

Reference:http://xdaforums.com/showthread.php?t=1686310

Want to appreciate my work "thank you" button is on bottom left. :)