[Samsung Galaxy Tab Plus] garyd9:
You'll want to fork it.. (don't read that the wrong way.) Here are a couple of things I'll give you for free, as they really aren't very obvious. There are probably holes in this... and I need to leave my house about 20 minutes ago, so I'm not proofreading...

First, you need a compiler and toolchain. Samsung likes to use v4.4.3 of gcc, and we're kind of stuck for that in order to let things work properly with the ar6000.ko precompiled kernel module. The easiest way to get that is to take a few steps back and search for cyanogenmod. If you search, you'll find official cyanogenmod instructions for getting the code for and building for the Samsung Galaxy SII. That has the same CPU as this tablet, so get for it. Don't worry about getting any prebuild modules - we aren't actually compiling for the SGII.. we just want the 4.4.3 toolchain that comes with it. ;) (Among tons of other garbage, make sure this leaves you with a file similar to ~/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc ) (You can also get this toolchain from the android ndk or from pulling the latest ICS sources from google... ) Following the directions for getting the cyanogenmod stuff will also ensure you have other tools installed on your machine as needed...

Second, the kernel builds itself based on a config file. Its more complicated than this, but basically the kernel makefile imports this config file and uses that as instructions for the build. Normally, that config file is in the same directory as the top-level Makefile and called ".config" That's isn't the case here... Those "Kconfig" files aren't actually used at compile-time. Instead, they are kind of "instructions" for building the config file.

If you examine the "build_p6210_kernel" file in the toplevel directory of the kernel source from my github (same place as the toplevel makefile), you'll eventually come across this line:

make ARCH=arm c210_p2w_rev02_defconfig CROSS_COMPILE=$COMPILER_DIR"

That's telling the kernel makefile to: build for the ARM arch instead of x86, to use the config file called "c210_p2w_rev02_defconfig" (instead of .config), and to use the compiler specified by CROSS_COMPILE (which, by default, is set to the path mentioned above for the cyanogen included prebuilt.)

That config file is located in "arch/arm/configs" You can do things the hard way and edit it manually (at least using those Kconfig files as a guide), or you can do things an easier way:

make menuconfig ARCH=arm c210_p2w_rev02_defconfig

That should give you a much "prettier" way to edit that config file. This actually uses those Kconfig files to determine what to show you, etc. Of course, it can be a bit annoying to actually find the options to want to change, but a bit of persistance can usually get you what you want.

Note: while typing this, I was following my own directions and it wasn't actually saving the updated config to either the original file or to .config.. not sure whats going on with that. I could have sworn it worked earlier... in the meantime, just do this:

cp arch/arm/configs/c210_p2w_rev02_defconfig .config
make menuconfig ARCH=arm
cp .config arch/arm/configs/c210_p2w_rev02_defconfig

It's probably not needed to specify the ARCH when running menuconfig, but I'm paranoid and it doesn't hurt anything I can tell.

...

So... menuconfig (and other variations) pull together the various Kconfig files to present options which builds the .config which is used as an "instruction sheet" for building the kernel.

The next step is to actually build a kernel. However, there's something still missing...

The samsung devices build an initial ramdisk filesystem into the kernel itself in order to provide a basic filesystem to get started with. That "initramfs" contains, among other things, drivers and scripts to get everything else mounted and running. I'm going to kind of skip over the details of this (for now) to try and end this novel I'm writing... I have the build script for the kernel set up so that it'll pull in a directory as a filesystem and include it in the kernel. Let's say, on your build machine, you have a directory called "p6210" and within that directory you pulled a copy of the kernel sources (called linux_kernel_GT-P6210.) You want to go back into "p6210" and get another of my githib repo's called "initramfs_normal_GT-P6210". Then rename that directory to just "initramfs". Then you should have a tree similar to below (p6210 might be called something different)

p6210

|

+-- linux_kernel_GT-P6210

+-- initramfs

The "build_p6210_kernel script I keep mentioning will look for "../initramfs" and copy that into the kernel build tree to be included as the initramfs.

Now, go ahead and cd into linux_kernel_GT-P6210 and ./build_p6210_kernel. If everything worked, you'll get spammed for several minutes while the kernel builds.

I'm going to jump around a bit, as I really need to run out and get some stuff done today, but the kernel image will be located in arch/arm/boot and called "zImage" You'll need to copy this to your tablet and overwrite the existing normal boot partition with it. Assuming you have adb running on your linux box and the tablet attached, here are a couple commands that'll do exactly that:

WARNING: Make sure you have 2 CWM Recovery backups done before you do this. Make two of them in a row. Paranoia is a good thing. If the kernel you are about to write is screwed up, you'll need to boot into CWM Recovery and restore one of those backups. If one backup is bad, you'll have a second one. Of course, as a last resort, you can always use ODIN...

adb push arch/arm/boot/zImage /mnt/sdcard
adb shell dd if=/mnt/sdcard/zImage of=/dev/block/mmcblk0p5 bs=4096

Then, "adb reboot" and see what happens.