eat: Automated install of fresh builds

Needs:
1 - a build
2 - a connected device

Change-Id: I24820b984e79430b7af7ccedc171fc69269c0a32

envsetup: eat safely

Change-Id: I2d8b52206213d8f4d8dcce3518cadb2be59e78d8

eat more safely, if there is something to eat

Check for zip file presence before trying to eat

Change-Id: I7913be619d189bbd723263edad878d6d05b8a5a7

Fixed eat not waiting for device if adb server was not started

$(adb get-state) returned unexpected starting server message
causing the if statement to fail. Calling "adb start-server"
beforehand remedies that.

Patch Set 2:
$(adb get-state) returns 'unknown' if Clockwork recovery is running on the device
look for /sbin/recovery and 'pass' the state test
also
adb wait-for-device
will result in endless loop, replace with until loop using with get-state OR 'recovery' tests

Patch Set 3:
fix the initial adb state test, use AND instead of OR

Patch Set 4:
Rebased and prevent "device not found" message from spamming the screen by
redirecting error output to null

Change-Id: I2d41b8853567cde80bf7fc08b5e4f0ad5ba1fdf5
Signed-off-by: Firerat <firer4t@googlemail.com>

Updated for CM9 variables
build in colors: host C/C++

Change-Id: Ic415cab53a2efa104c9d4b31ddbe8c8eb74e493d
build: Inline kernel building as a buildtime task

Kernel image integration is now done in the build system. The
"one true way" of doing this is to download the kernel source
into kernel/TARGET_BOOTLOADER_NAME (by usage of the cm.dependencies
mechanism or otherwise), and defining the TARGET_KERNEL_CONFIG
variable in the device's BoardConfig makefile

If the kernel's location doesn't match the automagic location
(multi-device kernel source, for instance), TARGET_KERNEL_SOURCE
can be used to specify a kernel path (i.e.,
"TARGET_KERNEL_SOURCE := kernel/shared-whatever")

If the device requires out-of-kernel-tree modules to be built,
the TARGET_KERNEL_MODULES variable can be used, pointing to a
_make target_ that will build and install such modules. Definition
of such a target is the device author's responsibility, the only
restriction is that it is a normal makefile recipe (example
below)

Optionally (or as an alternative), a prebuilt binary can also be
defined at BoardConfig, by usage of the TARGET_PREBUILT_KERNEL
variable. This binary will be used if the kernel source is absent
(or undefined).

A minimal BoardConfig.mk should look something like this:

TARGET_KERNEL_CONFIG := cyanogenmod_<device>_defconfig
TARGET_PREBUILT_KERNEL := device/<vendor>/<device>/kernel

To include, for example, the TI WLAN modules, this can be used:

-----------------------------
TIWLAN_MODULES:
       make -C hardware/ti/wlan/wl1283/platforms/os/linux/ KERNEL_DIR=$(KERNEL_OUT) ARCH="arm" CROSS_COMPILE="arm-eabi-" TNETW=1273 RANDOM_MAC=n REPORT_LOG=n
       mv hardware/ti/wlan/wl1283/platforms/os/linux/tiwlan_drv.ko $(KERNEL_MODULES_OUT)
       make -C hardware/ti/wlan/wl1283_softAP/platforms/os/linux/ KERNEL_DIR=$(KERNEL_OUT) ARCH="arm" CROSS_COMPILE="arm-eabi-" TNETW=1273 REPORT_LOG=n
       mv hardware/ti/wlan/wl1283_softAP/platforms/os/linux/tiap_drv.ko $(KERNEL_MODULES_OUT)

TARGET_KERNEL_MODULES := TIWLAN_MODULES
---------------------------

Change-Id: I8634fa4c788a42dc6f62e62ca170825b66db126a
build: Fix kernel module building on Darwin/OSX

Darwin/OSX build host does not have module-init-tools which is
required to generated modules.dep file. Switch to modules.order
file marker which is always generated instead.

Change-Id: I20c0fccd905fa668202c3e7284a8778db3728a65