build: Add Qualcomm's helper macros

 * This is used everywhere in Qualcomm's code. There's no reason we need
   to constantly replace it with uglier stuff in our Makefiles.

Change-Id: I0183a338470ec96a38f356a47bae65a0d3fb2c95
build: Add board platforms to qcom_utils

Change-Id: I85458167bf2b9c04b029d09b87bf791ff4cfd04d
build: Use common name for QCOM 7K boards.

This is needed to build QCOM HAL without external modifications. The
device would now have to specify msm7x27 or msm7x30 instead of
specifying the full name.

Patch Set 2: Add msm7x27a into the list.

Change-Id: I25018e397b5aad27fab5244731a574ae86752e17
Add new version to qcom_utils.mk

Change-Id: I1ca1532fd4968450715ecd0cca7729e0e6d507ef
Allow a device to generically define its own headers

We have a few cases of devices including specific versions of projects
just because of modified headers (msm_mdp.h comes to mind), and I just
had enough of ifdeffing header files for specific cases (the P990 needs
a lot of these).
Now... if a target defines a TARGET_SPECIFIC_HEADER_PATH, any headers in
there will take precedence over the standard ones; for example, on the
p990, I have

TARGET_SPECIFIC_HEADER_PATH := device/lge/p990/include

which makes, for example, the
device/lge/p990/include/hardware_legacy/AudioHardwareInterface.h be
used instead of
hardware/libhardware_legacy/include/hardware_legacy/AudioHardwareInterface.h
whenever a source file uses <hardware_legacy/AudioHardwareInterface.h>

Change-Id: I41b62668b60e3f62a6ebd3738d8d2675103a81e6
Allow override of device asserts, including multi-device support.

Set in board file with TARGET_OTA_ASSERT_DEVICE.
(cherry-picked from commit 0f452f21fc9323b9d1fe746161761cf40aaa5030)

Change-Id: Icd10de924f2b88168912c9575174cebf6b0104ba
Signed-off-by: cj360 <ayunker551@gmail.com>

Conflicts:
	core/Makefile
	tools/releasetools/ota_from_target_files

Conflicts:
	core/Makefile
	tools/releasetools/ota_from_target_files
recovery: fix custom recoveries

This is a squashed set of commits with some updates to minimize conflict with AOSP

recovery: custom recovery build fixes

Patch by Koush

Extract uboot image creation from core/Makefile

http://memegenerator.net/instance/12495768

This change utilizes BOARD_CUSTOM_BOOTIMG_MK to extract out the Uboot boot and
recovery image generation out into it's own file (approx 130 lines).

This should:
    * Clean up the already huge Makefile and the keep ifdeffyness down
    * Make sure Uboot changes don't effect other builds
    * Extract a lot of code that is only for 3 devices

This depreciates BOARD_USES_UBOOT but BOARD_USES_UBOOT_MULTIIMAGE is still valid.

Boards who use uboot boot images should remove BOARD_USES_UBOOT and add
  BOARD_CUSTOM_BOOTIMG_MK := device/common/uboot-bootimg.mk
to their BoardConfig.mk
(location of the makefile is not finalized)

Signed-off-by: cj360 <ayunker551@gmail.com>

Conflicts:
	core/Makefile

Patch by nemith

remove unused BOARD_USES_COMBINED_RECOVERY

Change-Id: I79520c510488d63d469b0d1a3a099420f7de1fe6

Patch by codeworkx

Change-Id: I6bcab88b76272526bdc558fbf8d7b43347bb5ef1

Conflicts:
	core/Makefile

Conflicts:
	core/Makefile
build: fix BOARD_CUSTOM_BOOTIMG_MK

Change-Id: I1b9fa7d8eb67bdcaaae7b55ca538b33545e73581
build: add support for custom releasetools

Change-Id: I2337559ac669bb5868708c4726cbacbf5713261a
Signed-off-by: cj360 <ayunker551@gmail.com>

Conflicts:
	core/Makefile
releasetools: use prebuilt boot image if using a custom boot image makefile

Change-Id: Ic348d31e8df7933dc4f9f055b7a5a2beacc21d32
Signed-off-by: cj360 <ayunker551@gmail.com>

Conflicts:
	tools/releasetools/common.py
Re-add ARCH_ARM_HAVE_TLS_REGISTER for armv7

OpenGL needs this flag for armv7

For more information :
https://github.com/androidarmv6/android_bionic/commit/7bc88df02f887229738b08fd7f7bd2668805f306
https://github.com/androidarmv6/android_frameworks_native/commit/4ffa795a3e9f2d2a26766147b1cfedbe78e823d4

Change-Id: Ib68c17e2f8dd3c8c15f8f3ea235fe25a46d05b6a
build: update qcom_utils.mk

This is a combination of 2 commits.

commit 65849f502ad3e16f6916ddc640d4305c36b7bebc
Author: Jake Weinstein <xboxfanj@msn.com>
Date:   Sat Sep 14 13:10:43 2013 -0500

    Build: update qcom_utils.mk

    Add build macro to determine Android Release

    Adding platform sdk version 18 for JB MR2.

    Change-Id: I79aa831ddd335bd14bd777506c210acc5d9960f1

commit 677d8efcb831b4b29c5bb5123897943870a55627
Author: andrew.boren <andrew.boren@gmail.com>
Date:   Sat May 18 22:15:13 2013 -0700

    qcom_utils: Add qsd8k to qcom platforms

    PS2: fix typo

    Change-Id: Id85569d1dd7be2f4c0620827da6d89e63b658aa9

Change-Id: I58d70c079c6ec2c76ab7fc169664f1e4c55fb552
build: recovery: don't remove init.*.rc

Change-Id: Ic1e14e1e82cb28106da5b39f530e0b667377840d
Fix for missing kernel modules?

Change-Id: I4b15094aca826036708b0a80b5e4ae7558185031
Signed-off-by: cj360 <ayunker551@gmail.com>

Conflicts:
	core/tasks/kernel.mk
Add CM SELinux policies

Credit to CM and those who contributed!

cm: Fix global selinux policy inclusion

We're adding CM-specific policies to an overlay instead of patching
external/sepolicy, so we need to make sure it's included to prevent
misbehaving systems

Change-Id: I7989a1093f9abc8360d492e73a860eb4afad10ad

Add auditd

Change-Id: I54717edbeb9677e53bdd01e6519edd30c387bfe8
build: Fix usage of releasetool

Change-Id: I15766759195e86c0f9395cfce0b98c5a5a3f6f63
Signed-off-by: cj360 <ayunker551@gmail.com>

Conflicts:
	core/Makefile
Support building with GNU make 4.0

* It works just fine, no need for the warning.

Change-Id: Ifa2ab17454edfcd8b7840a7534f70576286f2864
Signed-off-by: cj360 <ayunker551@gmail.com>

Conflicts:

	core/main.mk

Conflicts:
	core/main.mk
clean build repo

Signed-off-by: cj360 <ayunker551@gmail.com>