Store the base64 release key in the OTA zips

This can be directly grepped in pre-existing package.xml tables
to make sure we're not trying to update to a differently signed
build

Change-Id: I7528a8e7c484ea9209cd665b9263328ae834586a
build: use /usr/bin/env to call python

Hardcoding the path to python instead of env is not recommended.  This
can break the build in some Linux environments that link /usr/bin/python
to python3.

Change-Id: I4c62eb391acc6d468ce24ac8640834e965e76e78
build: Set ccache base to build top

This enables ccache sharing between different build tree paths.

Change-Id: I99636bdd2779a6ccf0649f027e35cf67df44b6ae
build: Add new public keys to recovery
Change-Id: I11dea464297813be36e60c23728dde8893535c46
Signed-off-by: CNBLACK <didwjdgns21@gmail.com>
build: Include an extra device.mk

Change-Id: I4373f78f57c81e46affc2f6a6bc854bf4c3d00db
ota: Make sure we don't install on top of an incompatible system
If the system has data present, make sure said data doesn't depend
on a system signature different from our own. If we can't find
our platform key, abort the installation

Change-Id: I16572daf9464de326a9d0d126597cfbf03208f94
Signed-off-by: CNBLACK <didwjdgns21@gmail.com>
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