qcom_utils: Make "is-vendor-board-platform,XX" depend on BOARD_HAS_XX_HARDWARE

Prevent qc's code from wrongly kicking in for AOSP-derived
configurations
ota: Include copies of the recovery scripts even if shipping in block mode
Edify: Add AssertSomeBaseband

Allow releasetools.py to assert a baseband version. Works just like
AssertSomeBootloader.

Change-Id: Ic8eb341cef1d777d983be25ba21a3bc545819c29
ota_from_target_files: Validate signatures after possible data wipe

If the data is being wiped, we want to validate the signature after
this step. This is also a good check that the data wipe succeeded.

Change-Id: Iaecfddfb2010944de0c97e7bb21d8e581f20deec
ota: Fix recovery-script cleanups in block mode

Change-Id: Iadb480f8062cfb7a0e6c9024e32ac0d71a7481d7
build: Clean up use of vendor/extra

 * extra_config.mk is not needed anymore
 * Include BoardConfigExtra.mk if available

Change-Id: Icd0db0852ceee5cb5c701c9a40b829e1f3ebd69e
build: qcom: Set QCOM_*_PATH variables for hardware/qcom-* projects

This consolidates a bunch of one-off logic scattered throughout the
code base.  Usage in Android.mk files is trivial:

At top level, use e.g. "ifeq ($(call my-dir),$(QCOM_AUDIO_PATH))".
This works for all variants, including non-variants (i.e. AOSP).

Within subdirs, use e.g. hardware/qcom/audio => $(QCOM_AUDIO_PATH)

Change-Id: Iee2497ea9a7efeb4ae9e861b84c532b19da7b69d

build: Introduce project pathmap and use it for qcom variants

The project pathmap tracks the path to the top level of a project.  The
following functions are provided:

 * project-set-path adds an entry.
 * project-set-path-variant adds a "variant" entry.
 * project-path-for retrieves an entry.

To use as a guard in Android.mk:

  ifeq ($(call my-dir),$(call project-path-for,projectname))

To use for include paths in Android.mk:

  LOCAL_C_INCLUDES += $(call project-path-for,projectname)/...

Set project pathmap for qcom project variants.

Change-Id: I8dceca72a1ba80fc7b1830c5ab285d444f530457

build: Set QCOM variants for non-QCOM_HARDWARE defined targets

* Nexus devices and others typically do not define the QCOM_HARDWARE
  flag, so the variant path should always default to the AOSP variant.
* Unconditionally set the variant to the AOSP HAL by default.

Change-Id: I714170897128f92718af266366cfcbf3136e8981
[HAX] Allow per-target dtbTool

 * Revert this when fixed

Change-Id: I97ecb0448ae7bd5859454be290c5dde6248b2859

build: Default to dtbToolCM

* The default dtbTool isn't the correct module name for the module that
  actually lives in device/qcom/common/dtbtool

Change-Id: I80b427e3652b99742573bc4d2829e51645a8822b
Redo BOARD_CUSTOM_BOOTIMG_MK support

Simplified version of the previous implementation. Recovery's ramdisk
is spun off from the main recovery target again to allow overriding
just the image-generation step
Consolidate bash version checks

There were two checks for bash version, the 2nd was superfluous; this
patch removes the duplicate checks, and shifts the bash version check to
being back after the "are we in bash" check.

Change-Id: I57ff8c1fedce80f739c06643d2976d2c1465db1b

Conflicts:
	envsetup.sh
envsetup: export ANDROID_BUILD_TOP earlier

Change-Id: Ia3497f61f4e9aaeeb793cecd3b4f488f0a48181a
build: fix bash completion sourcing

Sourcing functions in files from a function within a file being
sourced was giving bash a hard time. This fixes 'repo' command tab
completions.

Change-Id: Iac1b3078e20749fb474ed1270e0886cf435e24d9

Conflicts:
	envsetup.sh
Fix file-size stats on OSX

Kernel makefiles that the stat on the system is GNU stat. GNU stat uses the "-c" option to specify format.
Darwin stat uses the "-f" option to specify format. This discrepency will cause kernel build breaks.
On my system, I symlink stat to GNU stat. This causes the "get-file-size" define
to fail.
The fix for this is to detect "gstat", aka GNU stat, and use that appropriately.

Change-Id: I987c155b7dc3ff14ffe6da40edf834ca34b7df75

Fix up the get-file-size function that was broken due to the prior commit that made it utilize gnu stat (gstat)

Change-Id: I24bba2bfcb509ad1ad76d2260eedd685ba45c393
Define CONFIG_64BIT for LP64 target

Linux kernel uapi headers use CONFIG_64BIT flag. We need to define that if
__LP64__ flag is defined.

Change-Id: I2143ca8d91d70506485f3eb6f21a9e5243c495cc
build: Add support for device tree in boot.img

Add support for optional device tree image (dt.img)
to boot and recovery images.  Some devices use kernel device
tree and this adds the device tree image as a section within
the boot/recovery images.

Change-Id: I91431ef2f4b86485895678916e39a8572be878eb
Build: add DT image variable to Makefile

DT image variable is currently present in
generate_extra_images.mk.This file is moved to
build/tasks to support persist image generation
during parallel make. As build/tasks is called
at the end of Makefile, DT image variable is not
available for other images generation like boot and
recovery. Adding this variable in Makefile ensures
the variable is defined before usage

Change-Id: I21f675d8ce648dc1cf1f4f3aede33278300e08c9
CRs-fixed: 548299
Fix case where boot/recovery.img were being built with wrong params.

The boot and recovery images  now get built using the same params during ota package
generation as during a normal build.

Change-Id: I93d46e11a4245288f0e87c87a2e4bf45ac5aff69
Fix the extra dt.img compilation issue.

Add support for optional device tree image (dt.img)
for device that doesnt have TARGET_BOOTIMAGE_USE_EXT2

Change-Id: I6e07b3ca6d049a8ebdad7ea304b4f39e7c846151
Fixing Compilation issue

Change-Id: I1ad1e91498aee877c78cf85656fe704c585fb0cf
framework: adding security-bridge

adding security-bridge to FRAMEWORK_BASE_SUBDIRS
to make it compile as part of the framework/base java module

Change-Id: Ic96ba5549525fcaa58c274f918ac511f69cb0096