[Galaxy S I9000 Android Development] mialwe:
@perka:

For precompiled CWM:

-------------------

- use a CWM3 based initramfs (e.g. Chainfire's or other kernels initramfs working with CWM3) with precompiled CWM3 and all needed binaries/subdirs/scripts/symlinks

For self-compiled CWM:

-------------------

-- takes a lot of time unless you can use ready-to-use sources (spent 2 months (nights only) on this for RFS compatibility and various EXT4 conversion experiments)

-- setup build environment (Linux)

-- get complete Gingerbread sources (~2.5 - x hours download)

My personal way:

cd $HOME/android/sgs1/kerneldev
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > repo
chmod a+x repo
mkdir gingerbread
cd gingerbread
../repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
../repo sync
-> wait some hours, check for unexpected download stop, restart if neccesary, mostly needed with ICS sources)

-- move a modem.bin to vendor/samsung/galaxysmtp/proprietary

-- execute ". build/envsetup.sh && lunch full_galaxysmtd-eng"

-- execute "make -jX recoveryimage" (X=number of CPUs*2) -> full recovery with subdirectories, recovery binary and symlinks

-- execute "make -jX recovery" -> recovery binary only ( to use for updated recovery sources)

-- replace built recovery binary/subdirs/symlinks/scripts/... in orig. initramfs

-- adjust initramfs to load custom CWM

-- change partition handling in CWM (orig. android_bootable_recovery handles EXT4 only) if RFS compatibility needed

-- adjust init.rc in initramfs to boot with RFS or EXT4 if needed

I may have missed a lot of things but that's what I thought of (not much time, kids) at the moment.

More information:

-------------------

https://github.com/CyanogenMod/android_bootable_recovery/tree/gingerbread

http://wiki.cyanogenmod.com/wiki/Samsung_Galaxy_S:_Compile_CyanogenMod_(Linux)

https://github.com/mialwe/midnight-i9000-recovery (based on Semaphore initramfs, heavily modified for Midnight, self-compiled CWM4, RFS compatibility)

https://github.com/mialwe/midnight-i9000-initramfs (Midnight initramfs sources)

https://github.com/stratosk/semaphore/tree/master/sema_initramfs -> based on Chainfires sources, updated to work with CWM5 recently I think, not sure

Supercurios information on a bad RFS-bug (ALWAYS mount with "check=no" option) you will have to deal with using a self-compiled CWM with RFS compatibility, lost the link, it's here @XDA) EDIT: Found it: http://xdaforums.com/showthread.php?t=848471

...

@SunnyOK

Custom kernel:

------------------

- setup build environment (Linux)

- get toolchain (Codesourcery, Linaro,...)

- get sources (stock Samsung: https://opensource.samsung.com, Update2-GB is incomplete and has to be partially merged with full source, partially = not the usb-gadget files because of tethering issues if I remember right)

- get orig. initramfs (a)

- get custom initramfs (b) (if needed)

- move orig. modules (system/lib/modules) from a to b (you need some proprietary modules from GB kernel)

- get orig. kernel LOCALVERSION used in a (the CL-12345678 string shown in settings->info)

-EDIT - my small list:

# for JVQ: -I9000XXJVQ-CL281085
# for JVR: -I9000XXJVR-CL425308
# for JVS: -I9000XXJVS-CL565837
# for JVT: -I9000XXJVT-CL617736
# for JVU: -I9000XWJVU-CL621561
# for JVX: -I9000XWJVX-CL716737
# for JVZ: -I9000XWJVZ-CL762604
# for JW1: -I9000XWJW1-CL788890
# for JVU: -I9000XXJVU-CL851880

- execute

export KBUILD_BUILD_VERSION="yourkernelname-version"
export LOCALVERSION="$LOCALVER" # see CL-12345... string)

- execute "make make -jX CROSS_COMPILE=$TOOLCHAIN aries_eur_defconfig" (X=number of CPUs*2)

- put directory for initramfs sources into created .config

- execute "make -jX CROSS_COMPILE=$TOOLCHAIN" (~10-15 min, @core2duo 2Ghz, 3Mb RAM, 64Gb SSD)

- update compiled modules in initramfs with compiled ones if needed:

find . -name '*.ko' -exec cp -v {} "path-to-your-initramfs/lib/modules" \;

- execute "make -jX CROSS_COMPILE=$TOOLCHAIN" again

- flash created arch/arm/boot/zImage with Heimdall to test

- if you have first untouched kernel booting you can start modifying the sources and recompile, then reflash, then test, experiment, optimize,...

All this can be done automatically via scripting but this might help you a little bit. Remember using a correct LOCALVER-string matching the proprietary modules extracted from original initramfs atherwise you will end up with boot process beeing stuck at SGS logo.

More information:

------------------

http://source.android.com/source/initializing.html