OSDN Git Service

android-x86/build.git
7 years agoqcom_utils: Make "is-vendor-board-platform,XX" depend on BOARD_HAS_XX_HARDWARE
Ricardo Cerqueira [Wed, 5 Nov 2014 17:08:57 +0000 (17:08 +0000)]
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

7 years agoenvsetup: dopush: set file permissions on files pushed to /data too
Matt Mower [Tue, 20 May 2014 07:52:23 +0000 (02:52 -0500)]
envsetup: dopush: set file permissions on files pushed to /data too

* If pushing to /data, transfer old file owner, group, permissions to
  pushed files, then restorecon

Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
Change-Id: Ibf2945adee457a680a288f2bdfba3d2e29ba25a1

7 years agoenvsetup: fixup dopush
Matt Mower [Tue, 20 May 2014 07:52:23 +0000 (02:52 -0500)]
envsetup: fixup dopush

* After clobber, $OUT does not exist and tee cannot create .log; fix
  this by calling mkdir -p $OUT
* Make sure Copy and Install are at the beginning of the log line being
  analyzed and also search for ':' so that "Copying:" lines don't count
* Fix Copy file list by quoting so shell doesn't think this is a
  command: $LOC $(...)
* Fix 'only copy files from $OUT' now that multiple file pushing works
  right
* Only stop java services once (if needed) and then wait to restart
  services until after all files have been pushed
* Change location of SystemUI.apk to priv-app

Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
Change-Id: I65edd34bf445b28c2638cb3e9621719121fb962f

7 years agobuild: Store the jenkins build number in misc_info
Brint E. Kriebel [Thu, 10 Jul 2014 17:38:59 +0000 (10:38 -0700)]
build: Store the jenkins build number in misc_info

If the jenkins build number is available, list it as build_number in
the misc_info.txt file.

Change-Id: I6500c6b53661f2904dff738d25d8a8d24a7dca80

7 years agoota: Make sure we don't install on top of an incompatible system
Ricardo Cerqueira [Fri, 9 May 2014 21:21:28 +0000 (22:21 +0100)]
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

7 years agoDon't set CCACHE_BASEDIR if its already set
Mike Grissom [Mon, 26 Aug 2013 23:09:51 +0000 (16:09 -0700)]
Don't set CCACHE_BASEDIR if its already set

 * enable use of shared ccache

Change-Id: Ic708a5d5169291d674b167aa2c87bf2c8adaafae

7 years agobuild: Include an extra device.mk
Steve Kondik [Sun, 18 May 2014 22:34:30 +0000 (15:34 -0700)]
build: Include an extra device.mk

Change-Id: I4373f78f57c81e46affc2f6a6bc854bf4c3d00db

build: Clean up use of vendor/extra

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

Change-Id: Icd0db0852ceee5cb5c701c9a40b829e1f3ebd69e

7 years agobuild: Add new public keys to recovery
Brint E. Kriebel [Thu, 15 May 2014 19:30:37 +0000 (12:30 -0700)]
build: Add new public keys to recovery

Change-Id: I11dea464297813be36e60c23728dde8893535c46

build: Move bacon public key to device tree

Change-Id: I50c780203f7ecdd3008ac07146b7c9db91f9a443

7 years agobuild: Set ccache base to build top
Tom Marshall [Fri, 16 May 2014 20:46:24 +0000 (13:46 -0700)]
build: Set ccache base to build top

This enables ccache sharing between different build tree paths.

Change-Id: I99636bdd2779a6ccf0649f027e35cf67df44b6ae

7 years agobuild: use /usr/bin/env to call python
Andrew Bartholomew [Sat, 10 May 2014 14:58:07 +0000 (10:58 -0400)]
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

7 years agoStore the base64 release key in the OTA zips
Ricardo Cerqueira [Wed, 7 May 2014 16:28:49 +0000 (17:28 +0100)]
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

7 years agotools: getb64key - print the base64 version of a PEM public key file
Ricardo Cerqueira [Tue, 1 Oct 2013 19:42:45 +0000 (20:42 +0100)]
tools: getb64key - print the base64 version of a PEM public key file

Change-Id: Ia94ff560c88dfe85c3fa55db5c8219aa0d3419ee

7 years agobuild: edify: use set_metadata for backuptool
Tom Marshall [Wed, 9 Apr 2014 23:14:07 +0000 (16:14 -0700)]
build: edify: use set_metadata for backuptool

Also use saner permissions on backuptool.sh

Change-Id: I50742b51867aa358f5924b8dc208833092a35bd9

7 years agoStore the value from TARGET_OTA_ASSERT_DEVICE to a file
Brint E. Kriebel [Wed, 22 Jan 2014 23:51:46 +0000 (15:51 -0800)]
Store the value from TARGET_OTA_ASSERT_DEVICE to a file

This is needed so it can be read in when re-signing a package to
allow for the proper device asserts.

Change-Id: I8f3bb491bbbaa4d2b827a45ef83f12c6c83e6712

7 years agoAllow individual projects to enforce a property's value
Ricardo Cerqueira [Fri, 3 Jan 2014 02:46:15 +0000 (02:46 +0000)]
Allow individual projects to enforce a property's value

Some projects require system properties to be set to a specific
value (for example, a shared library needing a property pointing
to its own path) in order to work correctly, but some device
configurations are mistakenly setting those properties with the
wrong value (usually inherited from the original OEM build).

"PRODUCT_PROPERTY_UBER_OVERRIDES += property=value" can (and
should) be used in that project's makefile to ensure the value
is the correct one. This variable is intended for software projects,
and should never be used in product makefiles (BoardConfig, cm.mk,
AndroidProduct)

Change-Id: I1986e7c444e51cce8b198e43fdc793fad16d6276

7 years agobuild: Add QCOM target-specific config
Steve Kondik [Sat, 28 Dec 2013 23:48:20 +0000 (15:48 -0800)]
build: Add QCOM target-specific config

 * Needed to support global DirectTract config on legacy targets
 * Let's also eliminate some boilerplate

Change-Id: I736c10a5e7e1f3d1e0de9e60f29b60add276f151

build: Fix cflags for QC targets

Change-Id: I2281bec3afb4d80e80845718d880dc24ef7baf32

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

build: Automatically set QCOM audio, display, media variants

* Device platform should determing the HAL that ought to be used. This
  commit forces QCOM_HARDWARE to select the -caf HAL variants, which
  are then broken down by platform within the variant path.

Change-Id: I6fc7a3def7b93112f034a3b89552f302727cdbf8

build: Enable QCOM_BSP, QC_AV with QCOM_HARDWARE

Change-Id: Ibf9dd35272521109fea52e46bacf6e1e3074ed6a

pathmap: Point QC HAL pathmaps directly to the source

Directly map to the actual HAL directory, including the
board platform. This lets project-path-for point directly
to the respective HALs.

Change-Id: Ic4ed61bbdea9d0b5683502bf84a8410e76858527

Enable QCOM_BSP_LEGACY flag for pre-8974 targets

Change-Id: I895f1b1cbad0d260e1bca87ccb61e6194de023fd

build: Fix QCOM_BSP_LEGACY cflags

Change-Id: I880f32892d9e082e3ba92878414f3cb3c6f08066

Fix QCOM_BSP_LEGACY

Checks in the Android.mk files do not enable the cflags for .h
files, causing a build that crashes constantly.

Change-Id: I315c760488445629fda860ba70066417c7d68b8b

build: Clean up QCOM flag definitions

Change-Id: I66bca2db83260ccd65b82e540ee9f7961f00b030

build: Add QCOM flags to Clang CFLAGS

Change-Id: I56f0d4106f5d3d27c1ace744d30c1c81f0052bbd

build: Remove unused qcom CFLAG

Change-Id: I6ead3e57899bcb007d4d284901f918a65a9e6926

build: Set QCOM global cflags for secondary arch

Change-Id: I637d94f9b0ddee2c8d6057de44355e482163dd36

build: Fix copypasta in 2nd target clang flags

Change-Id: Ieedce8754b145e53d72a5d6a4b41fbe5cdf6473f

build: Allow devices to specify a RIL variant

Change-Id: Ia5d35d916be358fb7be7ead6bd05cc3628b35a37

build: qcom: Set the correct project path for device-specific cameras

Change-Id: I37696dae2c05c4e9f4fc824fbba63af47483ea17

build: Allow QC platforms to share/customize HAL variants

* Allow devices to override HAL variant using QCOM_HARDWARE_VARIANT
* 8909 and 8916 share HALs by default
* 8610, 8226, 8974 share HALs by default
* 8992, 8994 share HALs by default

Change-Id: Idfbdc405a35c5ba518fc71c8b691fc177ddf9068
(cherry picked from commit 338b399a2976993f0758c2f4e61620e987f4cb19)

build: Add a couple more custom pathmap variables

Change-Id: Ie44b9844c6d82dd73d1ea1f16b565f8bb06652c1

qcom: Enable TARGET_COMPILE_WITH_MSM_KERNEL

In the 6.0 HALs, CAF added the TARGET_COMPILE_WITH_MSM_KERNEL
which is enabled when building AOSP with an in-line kernel.
Since we only use in-line kernel builds, go ahead and enable
it across the board for all Qualcomm devices

Change-Id: I36bba34b7f1009b0776256cf0e0ce57e6c7377f4

qcom: Add QTI_BSP

Change-Id: Id99fb17044e453af050e6e3ff59cd3f5a47da268

qcom: Remove QCOM_DIRECTTRACK

* DirectTrack/LPA/tunnel for 8960 only works with AwesomePlayer, which
  has been deprecated. Don't bother allowing this to compile.

Change-Id: I4d3e6dd9f1e3047a379fd76af4f6b45d791210de

build: Allow devices to specify a WLAN variant

Change-Id: I59616fa641c4ccddea7eb5fb77e9aeb0423ef234

build: Add bt-vendor variant and fix wlan variant

Change-Id: Ie3c433420504f0f14783f99e2d5fcdd46f1a3f37

build: Adjust for device-specific HAL paths

* QCOM variant HALs are pretty much deprecated, long live
  device-specific HALs!

Change-Id: I636d1e851519aba31ea3744b369aea06d6db6f68

build: qcom: Define legacy ALSA audio flag

Change-Id: I83cf184f56e1293f6abaaac7849505260499c9af

build: End this nightmare.

 * Disable QC AV enhancements across the board. It brings no value
   for CyanogenMod now.  We are unable and unwilling to make this
   shit work for commercial products- for aftermarket it would
   be a complete waste of time to even try.

Change-Id: Id6f0086c107c24178410e726738e666341fdbfe1

qcom: Select Sony display/media variants for Sony devices

Sony's msm8226 and msm8974 devices use HALs that match the 3.10 kernel
they use. Select a custom variant here.

Change-Id: Iecfb6bdf0e989ba5231bce6e650b6926417f7f90

qcom: Fix non-QC target pathmappings

* The actual key for camera, gps, loc-api is qcom-$(name), not $(NAME).

Change-Id: Id0f2ed760cae3b5627983ef5a2206775bc880637

qcom: Add dataservices to project pathmap

* Set vendor/qcom/opensource/dataservices as the default dataservices
  provider.
* Devices can override this choice by setting
  USE_DEVICE_SPECIFIC_DATASERVICES and providing dataservices in the
  $(TARGET_DEVICE_DIR)/dataservices directory.
* Set $(TARGET_DEVICE_DIR)/dataservices as the default dataservices
  provider for non-QC hardware (Nexus devices).

Change-Id: Ie003110d7b745367947b4b728bc83800c0351068

qcom: Add support for custom device specific paths

* There are many supported devices with common trees,
  and they may wish to put their hals there.
* Allow setting the path to the hal by using
  DEVICE_SPECIFIC_<component>_PATH when
  USE_DEVICE_SPECIFIC_<component> is true.

Change-Id: I1335d322cd43440b028b51cff6023dd05e1d1024

qcom: Explicitly build the custom audio policy for legacy alsa

Change-Id: Ib0efba23e20ff156c032fe0ad428c5fa08b15f8d

qcom: Allow usage of default QC HAL paths

Change-Id: Icbeaa995047289b5e10cdebf805f8bd8cb7978b1

qcom: Use correct path for BT vendor

Change-Id: I81971e65a7f75ad5755bfdbed229c30d447c7d55

qcom: Support 8937/8953

Change-Id: I84b1807e88d5be1230eab64bd1275a0677ce510f

build: Readd msm7x27a to QCOM Targets

Change-Id: I87db6ee43059c256d338babbdfe414030a06b53e
Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
7 years agobuild: Add support for PRODUCT_COPY_FILES_OVERRIDES
Steve Kondik [Fri, 13 Dec 2013 17:47:42 +0000 (12:47 -0500)]
build: Add support for PRODUCT_COPY_FILES_OVERRIDES

 * We may have a case where prebuilts need to be built from
   source instead based on an externalized config.
 * New directive takes a list of destination files to remove from
   PRODUCT_COPY_FILES so that other instructions can be supplied.

Change-Id: I7feff16440e54d1676ffddbbd96d5947efa43ede

7 years agoenvsetup: Mark zsh as compatible
Emilio López [Sun, 3 Nov 2013 16:05:43 +0000 (13:05 -0300)]
envsetup: Mark zsh as compatible

Basic functionality has been tested on zsh 5.0.2 and has been found to
work correctly.

Change-Id: I02e5e3bedf56b43104c280d9737ae7b334357643

7 years agoenvsetup: drop unnecesary exports
Emilio López [Sun, 3 Nov 2013 16:04:27 +0000 (13:04 -0300)]
envsetup: drop unnecesary exports

export -f is a bashism and we don't actually need it, so lets remove it.

Change-Id: I9228cef0c4a9543b3d34fdc39a368ad0238431e2

7 years agoenvsetup: do not print an error if complete fails
Emilio López [Sun, 3 Nov 2013 16:02:13 +0000 (13:02 -0300)]
envsetup: do not print an error if complete fails

complete is a bashism; so it will fail on other shells. Avoid printing
an error if that is the case.

Change-Id: Id6d6311792f409cc3a697c7a2bb003863f1afe60

7 years agocore: main: remove all the spam about including make files
cybojenix [Sat, 2 Nov 2013 13:18:36 +0000 (17:18 +0400)]
core: main: remove all the spam about including make files

Change-Id: Ifd2ef0e239d16b169c572472416c2c31df62a367

7 years agoenvsetup: Fix remote functions to deal with symlinks
Steve Kondik [Sat, 16 Nov 2013 11:48:30 +0000 (03:48 -0800)]
envsetup: Fix remote functions to deal with symlinks

Change-Id: I6f35dc30dda22149b2c37e1c6c7d41ea7239d3bb

7 years agobuild: Add cafremote command to envsetup
Steve Kondik [Sun, 27 Oct 2013 20:34:36 +0000 (13:34 -0700)]
build: Add cafremote command to envsetup

 * So lazy!

Change-Id: I99a988180abb4fb486d4ebbb842bb9eda03bf1bc

7 years agoFor user builds, use a release build id in the description if one exists
Ricardo Cerqueira [Mon, 11 Nov 2013 00:51:48 +0000 (00:51 +0000)]
For user builds, use a release build id in the description if one exists

Companion change to Ic5913e587400dd38c04aa05de3a7becced77a59e

Change-Id: If5edbf56d567701f96f0ba46af9a90ffa8310c24

7 years agoDon't make assumptions about the formats of build descriptions
Ricardo Cerqueira [Fri, 1 Nov 2013 00:47:32 +0000 (00:47 +0000)]
Don't make assumptions about the formats of build descriptions

Change-Id: Id83a7594e9e1b9b4ffbdbaba695506d8d0d21a46

7 years agocm: Fix global selinux policy inclusion
Ricardo Cerqueira [Tue, 5 Nov 2013 22:17:59 +0000 (22:17 +0000)]
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

7 years agobuild: Add script to generate extra images
Steve Kondik [Wed, 23 Oct 2013 05:23:27 +0000 (22:23 -0700)]
build: Add script to generate extra images

Change-Id: I53081c7a2b4f18bc8c8a27b04d311a6b078b2022

Use CM standard qcom naming

Change-Id: I360b3dcf1fe82140a7993189e881f9d77b571bef

generate_extra_images: Remove deprecated image generation

* Remove msm7x27a/msm7x30 nand images
* Remove msm8930 1G userdata

Change-Id: I81b93d34893d504a53f2aadb9c3ac2089c06860c

generate_extra_images: Rename targets and add 'sec' prefix

Change-Id: Ie7debfb33349d16d9a457ff817072af2f3a10c0f

7 years agobuild: Add support for vendor product and device name
Steve Kondik [Sat, 26 Oct 2013 19:58:57 +0000 (12:58 -0700)]
build: Add support for vendor product and device name

 * CM's build system assumes some convention-over-configuration which
   we might need to override in order to conform to vendor requirements.
 * Allow overriding of target and product names using these new
   variables. This allows for CM conventions to work, while generating
   the correct fingerprint dynamically without post processing the
   strings.

Change-Id: Ic5913e587400dd38c04aa05de3a7becced77a59e

7 years agoStore the path to the ota file generator where it can be reused
Ricardo Cerqueira [Fri, 18 Oct 2013 20:48:46 +0000 (21:48 +0100)]
Store the path to the ota file generator where it can be reused

Change-Id: I8896713c79a751b79fbbcc75f6ba30dad4ea9fac

7 years agobuild: Don't run backuptool on GMS builds
Steve Kondik [Mon, 7 Oct 2013 09:34:47 +0000 (02:34 -0700)]
build: Don't run backuptool on GMS builds

Change-Id: I5dde27f9d16b88049171db9805221d92e67f3e5d

7 years agoAdd a unique build number to every build
Ricardo Cerqueira [Wed, 25 Sep 2013 23:10:20 +0000 (00:10 +0100)]
Add a unique build number to every build

SDK-readable via android.os.Build.INCREMENTAL

Change-Id: If9885adebe12a56b2b2e353285721be695bc411b

Fix exporting the unique build identifier

Change-Id: Ie58e981b7e83a4351d137dfd8995dce7d365d950

Fix incremental build number on Darwin

Darwin does not include sha1sum, but it should have openssl.

Change-Id: If2b685c1478f9486bed21dfba0c655d9e02db72b

Use openssl instead of sha1sum

Change-Id: Iab8a74d4af6646104cb23312853f811a38bdec0d

7 years agoAdd PRODUCT_BOOTANIMATION
William Roberts [Tue, 20 Aug 2013 23:02:53 +0000 (16:02 -0700)]
Add PRODUCT_BOOTANIMATION

Just add PRODUCT_BOOTANIMATION in your product
makefiles and point it to the zip file you would
like to have used as the boot animation.

The coresponsing build system handles picking
the last one, which is the last product to set this.

Change-Id: I8c95a515a8fbb92d363141eb79e254712dccc162
Signed-off-by: William Roberts <wroberts@tresys.com>
Fix for build break when PRODUCT_BOOTANIMATION is unset

Change-Id: I236c2dd35ba0e632ed327ed6dc36324c9e59587a

Restore original behavior when PRODUCT_BOOTANIMATION is undefined

Change-Id: I3ee7141f7c26cee033b8a30824caf38fcacec5a8

7 years agoenvsetup: Wait for device in installboot/installrecovery
Steve Kondik [Sat, 31 Aug 2013 00:34:37 +0000 (17:34 -0700)]
envsetup: Wait for device in installboot/installrecovery

 * Useful when you're racing against a bug that causes a kernel panic
   shortly after USB turns on :(

Change-Id: I2a503e4b195e632ed5b67a77b942e80c47d0ff45

envsetup: Use wait-for-online so these cmds work in recovery

Change-Id: I7a85e7068f373b1d726aa6b27a51862fa9b7c6fd

7 years agobuild: allow dopush to work properly with network adb
Sam Mortimer [Sun, 11 Aug 2013 05:57:08 +0000 (22:57 -0700)]
build: allow dopush to work properly with network adb

Change-Id: I9efe60814d66dc8eb17544e6c2b94473dc903133

7 years agorecovery: Always allow the CM release key
Ricardo Cerqueira [Wed, 3 Jul 2013 22:06:02 +0000 (23:06 +0100)]
recovery: Always allow the CM release key

Avoid the "Untrusted" warning in recovery when flashing a CM-signed
build

Change-Id: I13900bd7e2539fdc7442477a844391b8c5d87dda

7 years agoenvsetup: Fix installrecovery for new fstab format
Steve Kondik [Sat, 10 Aug 2013 04:03:42 +0000 (21:03 -0700)]
envsetup: Fix installrecovery for new fstab format

Change-Id: I26ab441c28350cce70bb976b249b16c6b83ab8da

envsetup: Fix giant derp

Change-Id: I490556f18c40c3614e4e554d7db3306a16ff99d8

7 years agoeat: Support v2 fstabs
Ricardo Cerqueira [Sat, 27 Jul 2013 12:51:56 +0000 (13:51 +0100)]
eat: Support v2 fstabs

Change-Id: I5220d7e9232174e2acbdc2d6c931827af959f212

7 years agoenvsetup: add a helper to fix "out/target/common" not being really common
Chirayu Desai [Sun, 30 Jun 2013 04:34:25 +0000 (10:04 +0530)]
envsetup: add a helper to fix "out/target/common" not being really common

* out/target/common isn't really common, and if you do
  back to back builds for multiple devices, that is noticable.
* Use out/target/common-$device instead, and link the appropriate
  dir to out/target/common every time lunch() is run, if
  CM_FIXUP_COMMON_OUT is set.
* Refer https://groups.google.com/forum/#!topic/android-building/ispbOgzoyg8
  for more info.

Change-Id: I11e7df0e68e2a60ce32576f06397d60fc9465b60

7 years agobuild: get rid of the sparse expand stuff
Shareef Ali [Wed, 29 May 2013 03:44:31 +0000 (22:44 -0500)]
build: get rid of the sparse expand stuff

* i don't see a reason why we are doing this because we never deal
with flashing system img rawly
* This will put useless write on ssd..
* we don't have space on ssd

Change-Id: Icd53d161b8515f5eca238b98ad68515d69caa34f

7 years agoenvsetup.sh: add missing dquotes
Christopher Lais [Mon, 3 Jun 2013 20:15:39 +0000 (15:15 -0500)]
envsetup.sh: add missing dquotes

Change-Id: Ic86a5dd36b0f32cd7dc4d2f9c187566398796ed6

7 years agodopush: push files to /data too
Chirayu Desai [Sun, 19 May 2013 14:24:32 +0000 (19:54 +0530)]
dopush: push files to /data too

Change-Id: I85e24575a04955ae17b978f038edc46e1e6bfa2c

7 years agoSign final packages with a different key if requested
Ricardo Cerqueira [Mon, 1 Jul 2013 22:35:26 +0000 (23:35 +0100)]
Sign final packages with a different key if requested

...and throw it into recovery builds as well

Change-Id: Ic96d4d49d821cb03d5318e3e9ad93d02fb92573e

7 years agolets make the lunch list look a little neater
cybojenix [Fri, 28 Jun 2013 19:30:00 +0000 (20:30 +0100)]
lets make the lunch list look a little neater

It's very simple, but with more and more devices coming in, a long list won't cut it
There are probably better ways of doing this, feel free to comment

Change-Id: I9bd1fef920f985a133c882df9987b6be29dbc7b8

7 years agoadd adb to the disttools
Koushik Dutta [Tue, 18 Jun 2013 21:17:21 +0000 (14:17 -0700)]
add adb to the disttools

Change-Id: I898fa5c9396606144e57dba8453f476b9e9440ab

7 years agorepopick: initial commit
Chirayu Desai [Wed, 5 Jun 2013 14:44:33 +0000 (20:14 +0530)]
repopick: initial commit

Change-Id: Ie42c11d335da07f6d164a0fcb887011e5fd6dcf4

repopick: add -b shortcut option

  * useful for people like me who want to pick into temp branch so
    that the picks survive a repo sync
  * shortcut to "--start-branch auto --abandon-first --ignore-missing"

Change-Id: Ia4d4309d27e46a15ff4b74525668d974f4251dcb

repopick: handle additional error cases around subprocesses

  * gracefully error if the project path cannot be found
  * poll() was not a reliable determination of EOF on my
    Darwin-Python 2.7 system.

Change-Id: I203c2a75820f8acc079a5c9751d1c04daf6f3a16

repopick: allow running from a subdir of ANDROID_BUILD_TOP

Change-Id: I6dfcd5dfe700174ed87dc8627b23519c62b4cb27

envsetup: hmm repopick

Change-Id: I483cb36721f31dbf1f67e46cbe8a306b2a9e2c15

repopick: decode the result as UTF-8

Change-Id: I51f2defa861c86b51baa7bad1df1d9666b952160

repopick: gracefully handle empty/non-JSON server responses

Change-Id: Idbabdbfb4a910de0ad405f02b2a84cf2bc9ef3dc

repopick: remove the superfluous information from date

  * '2011-11-17 06:54:52.000000000' -> '2011-11-17 06:54:52'

Change-Id: I73d37c9aba13d4be6b4d2d2fc0f2f83971a3e77b

repopick: let's be nice to our servers :)

* Prefer fetching changes from GitHub, and if that fails,
  silently fall-back to Gerrit.

Change-Id: Ibf68d4b69a7e8dbee2adb8f7f4250340b8be629c

repopick: skip a cherry pick if its already been merged

* override this behavior with the -f argument

Change-Id: I280b4945344e7483a192d1c9769c42b8fd2a2aef

RepoPick : Add support for git pull

Allow user to git pull patchsets and dependencies.

Change-Id: If5520b45fe79836eac628b3caf0526f11f8953d9
(cherry picked from commit df646304bdcef329e3fe7c12b68107de1f4cd42a)

repopick: allow specifying a topic to pick all commits from

Change-Id: I4fb60120794a77986bf641de063a8d41f4f45a23

repopick: support specifying a range of commits to pick

* for example: repopick 12345-12350

Change-Id: I21dd0ef5f19d7b3899fa40ec4c28a0e9dba8a4df

repopick: handle variant hal branching

Change-Id: Ib0dee19abc13a7fb8d8e42c09b73c1b4f35ca938

Allow repopick to cherry-pick a specific patch set

Use 'repopick 123456/9' where '123456' is the change number
and '9' is the desired patchset.

Change-Id: I2d9f6939fbde50b2a6057b75d2e7f722be5a3e21

repopick: Catch errors on url load failure

Exit gracefully if server cannot be reached or if it reports an error.

Change-Id: I86a1a45d3a1f8dfdb49a0400cb728c965dbad8df

repopick: Allow using a custom query

Change-Id: I87e92d3cbfa35367d87f55c92a6d12a6d4282232

repopick: Allow the github fetch to fail

* This is optional and done to save gerrit server
  bandwidth, however it may fail in cases where
  the 'github' remote is a mirror which doesn't
  sync the changes.
* Let it try fetching from gerrit if fetching from
  github fails.

Change-Id: I6d183ff83572d817d78633280d8b20e3efdaf8f0

Support custom gerrit servers via HTTP or SSH

Please test/provide feedback.

Change-Id: Id7043dc009c1fe5614f73a5da2aa021c0d784a4b
Ticket: RM-14

repopick: skip abandoned commits

Change-Id: I7f203fc4f790bf26acce1112c5c24c703acd9326

repopick: handle hardware_ril/ril-caf

Change-Id: Ib72255d899529effb0d6121034f42a7532d4a02b

Fix custom URL error. Merged from cm_build_config

Change-Id: Iffe7766f137889f113bc5a94254058dc4dbf0ea3
(cherry picked from commit 04d470c5efa7510cc86e614cb401a9b6a41947f0)

repopick: open changes are either NEW or OPEN, not just OPEN

Gerrit's API is terrible. I believe it was written by monkeys.

Change-Id: Idb39a357c241ce7923549a3d217f7ee632326e92

repopick: print the status of a skipped cherry pick

Change-Id: I5181910dc80fe4cf2d69cc22089e191b36a80c9e

repopick: Update script with some fixes

Make quiet actually be quiet.
Allow overriding the path for a repopick.
Sort query and topic results to have a better chance of them applying
cleanly.
Don't try to pull from github when using a custom gerrit address.
Catch git command failures and properly return failure codes.

Change-Id: I7ff010fbfbf1026c6fe03cb27649f677637e1bb5

repopick: support projects which get checked out multiple times

see: caf branches for multimedia, where different branches get checked
out under different paths.

Change removes hacks needed for -caf branches, as this data is taken
directly out of 'repo manifest'

Change-Id: Id7aa24709c3dc6bc874899ef605e58271fec082c

repopick: Actually try to fetch from Gerrit if fetching from GitHub fails

* Exit on failure only if fetching didn't fail.

Change-Id: Iae75dfcff590ed72afd93f58772440e4f3b0ca27

repopick: Allow commits to be excluded from a topic importation

 * Add the ability to 'repopick -t TOPIC -e 120586,120587'

Change-Id: Ib99c095174a0987f68cb8261b7af3f59272b05b5
Signed-off-by: AdrianDC <radian.dc@gmail.com>
py3: repopick

Change-Id: I65e6bb295bd475cc391579023940642b5747f521

py3: update all the things

Change-Id: I5e11b46b7c2f7f8760d6c0e713ca99c1e88b7cd3

repopick: Don't crash if change not found

If change is not located, skip it. Resolves the following:

Traceback (most recent call last):
  File "(omitted)/build/tools/repopick.py", line 258,
in <module>
    review = [x for x in reviews if x['number'] == change][0]
IndexError: list index out of range

Change-Id: I96423ddc809ac1c7994998db4e1929ca813f20ca

repopick: support specifying a range of commits to pick

* for example: repopick 12345-12350

Change-Id: I3b8f2c331a6ac5488032432e133bd4b44d0bf007

7 years agoenvsetup: use $(CURDIR) for getting current directory
Chirayu Desai [Wed, 1 May 2013 10:18:08 +0000 (15:48 +0530)]
envsetup: use $(CURDIR) for getting current directory

Change-Id: I5f00faf64ec31d86dd2e48ec038748ce8499380b

7 years agoeat: get the proper MODVERSION
Chirayu Desai [Sat, 4 May 2013 12:29:18 +0000 (17:59 +0530)]
eat: get the proper MODVERSION

* The version in system/build.prop might be
  different than what the zip is named on incremental
  builds.
* Use CM_VERSION from the build system instead.

Change-Id: If4508921d8fd05219a2f358a2397a13b247065bd
Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
7 years agocout: move to $out
nebkat [Fri, 28 Dec 2012 10:40:45 +0000 (10:40 +0000)]
cout: move to $out

Change-Id: I3b5bf8a5f62dcdf267662bb97a2073150152cfa6

7 years agoenvsetup: Make installboot work in recovery mode too
Steve Kondik [Sat, 13 Apr 2013 20:23:35 +0000 (13:23 -0700)]
envsetup: Make installboot work in recovery mode too

 * Needs a change to adb to allow waiting for recovery

Change-Id: Ia90645513f46bcb5f20b7c74c55ef15842710d3d

7 years agoeat: Eat using adb sideload
Steve Kondik [Sat, 13 Apr 2013 14:19:52 +0000 (07:19 -0700)]
eat: Eat using adb sideload

 * Requires new recovery and updated adbd

Change-Id: I65990822ab63313701d74783d95611d128d90f94

7 years agoprint CM_VERSION in build config
Chirayu Desai [Mon, 25 Mar 2013 06:32:12 +0000 (12:02 +0530)]
print CM_VERSION in build config

Change-Id: Iead654e30798a11e636ec743683f3431d14a858c

7 years agoenvsetup: include bash completion script from vendor/cm
Chirayu Desai [Sat, 16 Mar 2013 14:30:17 +0000 (20:00 +0530)]
envsetup: include bash completion script from vendor/cm

Change-Id: Id90d84748df41d6626dfd46befabe0054c6d14e7

7 years agobacon: generate cm package
Chirayu Desai [Sun, 23 Dec 2012 03:51:46 +0000 (09:21 +0530)]
bacon: generate cm package

Change-Id: I3cece868e56f85bfa0b31a62a51e6eab2070ab06

7 years agoenvsetup: Don't tread on my $PROMPT_COMMAND
Steve Kondik [Thu, 27 Dec 2012 23:28:34 +0000 (15:28 -0800)]
envsetup: Don't tread on my $PROMPT_COMMAND

 * I want my own PROMPT_COMMAND to coexist with Android's, so stash it
   in the environment and add it to the new command.

Change-Id: I200902f135d0c5c620a8eb3ce9cefdba318cf9d3

envsetup: Fix $PROMPT_COMMAND

Change I200902f135d0c5c620a8eb3ce9cefdba318cf9d3 broke the android
PROMPT_COMMAND on scenarios where the existing prompt already had
a hardstatus adjustment, since appending it to Android's just clobbered
Android's in favor of the original.

So instead of appending them, inject android's at the beggining of the
existing one (and create a default if none exists)

Change-Id: I1fbcbfdb6220d886dda3662da498d1759a4c195b

envsetup: Really fix PROMPT_COMMAND handling

 * Add ANDROID_NO_PROMPT_COMMAND to not change it at all.
 * Export ANDROID_PROMPT_PREFIX so it can be used elsewhere.

Change-Id: Ib2a487404d3b8a367a21582e8a0ce69c2d212a9a

envsetup: More PROMPT_COMMAND

* Get rid of ANDROID_NO_PROMPT_COMMAND, the pre-existing STAY_OFF_MY_LAWN
does the same thing
* Remove any pre-existing android prefixes to avoid accumulation
scenarios in consecutive builds (i.e., multiple build identification
strings in hardstatus)

Change-Id: I86661e066e18ea6ad0c742fa1dc6555780fa5441

envsetup: add quotes around PROMPT_COMMAND

Better compatibility for zsh.

Change-Id: Ie010c30580e67e3b5357e3cc869114a525762677

7 years agoenvsetup: push to connected device only if it is $CM_BUILD
Chirayu Desai [Wed, 26 Dec 2012 05:23:58 +0000 (10:53 +0530)]
envsetup: push to connected device only if it is $CM_BUILD

Change-Id: Icce057cb31d6fbc9abb0292311c88c32fea3540c

7 years agobuild: Update domain name
Pawit Pornkitprasan [Tue, 11 Dec 2012 09:41:07 +0000 (16:41 +0700)]
build: Update domain name

cyanogenmod.com -> cyanogenmod.org

Change-Id: Icae50c103d94e2018027c971bf1a77f01e2602c6

7 years agobuild: Add board platforms to qcom_utils
Steve Kondik [Fri, 7 Dec 2012 08:21:36 +0000 (00:21 -0800)]
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

Build: update qcom_utils.mk

Add build macro to determine Android Release

Adding platform sdk version 18 for JB MR2.

Change-Id: I79aa831ddd335bd14bd777506c210acc5d9960f1

qcom_utils: Update list of QCOM_BOARD_PLATFORMS

Add msm8226 (Moto G) and other upcoming platforms
Change-Id: Icf895cbcf86791ca800636a1c0893b3a905a27a0

qcom_utils: Add msm8992 and msm8994

 * The Snapdragon 808 will be releasing as the msm8992 so
   reference it as such.
 * The Snapdragon 810 is already released and used, so build the
   qcom utilities for devices using msm8994.

Change-Id: I564cb68295099a73fefd24d43e19ca371968ef44

Adding msm8909 as a QCOM board platform

Change-Id: I01c35348b463a769454d7b64e6710a647cabe4f7

build: add msm8996 to QCOM targets

Change-Id: I4d19bc681d64f56c4e64ac87943058012f76a4ef

build: Add msm8952 as a QCOM board platform

Change-Id: I738db8dc479676d7dfa74c89218c0dad21973ade

qcom: Support 8937/8953

Change-Id: I84b1807e88d5be1230eab64bd1275a0677ce510f

build: Readd msm7x27a to QCOM Targets

Change-Id: I87db6ee43059c256d338babbdfe414030a06b53e
Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
7 years agomka: change how make is called
Arnav Gupta [Fri, 23 Nov 2012 17:47:44 +0000 (10:47 -0700)]
mka: change how make is called

in some environments make -j N xxx results in compiling target 'N' instead of 'xxx'
make -jN xxx will always make 'xxx' with N number of threads
Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
Change-Id: I77f17c9286a5ef1d61163d8f978900fb4c24e2e7

7 years agoomnom (brunch + eat) command
Nebojsa Cvetkovic [Fri, 9 Nov 2012 23:02:54 +0000 (23:02 +0000)]
omnom (brunch + eat) command

Change-Id: I524e5a1450de7ea9c93512eebcb10f320e68fa82

7 years agobuild: Add "installrecovery" command
Steve Kondik [Wed, 24 Oct 2012 23:40:42 +0000 (16:40 -0700)]
build: Add "installrecovery" command

 * Similar to "installboot", add an "installrecovery" command which
   writes the recovery image to the correct partition of a running
   device.

Change-Id: I1dcca44fd0d8afa08ece9e99cd914547acb99c83

7 years agocleanbuild: add *.zip.md5sum to installclean_files
Chirayu Desai [Thu, 1 Nov 2012 07:28:45 +0000 (12:58 +0530)]
cleanbuild: add *.zip.md5sum to installclean_files

Change-Id: I4b68bb9a8d421a54b008c5318fa82ed230bd6441

7 years agodopush: improvements
Chirayu Desai [Tue, 16 Oct 2012 14:10:18 +0000 (19:40 +0530)]
dopush: improvements

- use $OUT instead of replacing device name with a new line
  and then "tail"ing it.
- adb shell stop/start if file is SystemUI.apk or framework/*
- and some cleanup.

Change-Id: I49278406dc53285b4919f7d41116ad849ec38250

7 years agobuild: work around missing readlink -f on Mac
David Ferguson [Thu, 4 Oct 2012 14:15:58 +0000 (10:15 -0400)]
build: work around missing readlink -f on Mac

Change-Id: I5d56366cf33a2b02f1886c87815d00cff279779d

7 years agoenvsetup: set OUT_DIR to an absolute path always
Chirayu Desai [Thu, 27 Sep 2012 12:41:25 +0000 (18:11 +0530)]
envsetup: set OUT_DIR to an absolute path always

OUT_DIR was set to $(TOPDIR)out previously,
but $(TOPDIR) was null, so it was a relative path.
This broke releasetools, inline kernel building, etc
since they require absolute paths.
Fix it so that it is set to $(shell readlink -f .)/out
if $(TOPDIR) is null.

Also remove hacks which checked if (OUT_DIR) was out
and changed it to $(ANDROID_BUILD_TOP)/out to workaround
the aforementioned problem.

Change-Id: I459a3b1325a1bbea0565cd73f6acf160d4ed9b39

7 years agobuild: Add "installboot" command to install boot images
Steve Kondik [Mon, 24 Sep 2012 06:46:55 +0000 (23:46 -0700)]
build: Add "installboot" command to install boot images

 * For devices that lack fastboot, this command will copy the boot image
   to a running device, write it out to the correct partition with dd,
   copy the modules and set the correct permissions.
 * Field surveys have discovered that a specific CM device maintainer is
   handling two devices, one with boot partition p7 and one at p8.
 * Extensive research has unveiled the fact that mixing up these
   partitions across these two specific devices will cause
   corruption of the TZ firmware, which cannot be restored and results
   in an unrecoverable brick.
 * Automate the process so this idiot (me) stops breaking shit.

Change-Id: I0dc5449daf128181e2e349ea26ad5741cc87bfe7

7 years agobuild: Add "aospremote" command
Steve Kondik [Mon, 17 Sep 2012 18:33:18 +0000 (11:33 -0700)]
build: Add "aospremote" command

 * Adds the git remote for the matching AOSP repository.

Change-Id: Iad03fb95874ff39a39083218aec0d834e82b4480

7 years agoenvsetup.sh: Fix the `reposync` function
Alan Orth [Fri, 7 Sep 2012 08:44:27 +0000 (11:44 +0300)]
envsetup.sh: Fix the `reposync` function

It seems ionice can't find `repo` if it's in ~/bin, even if ~/bin
is in the user's $PATH.  Placing repo into /usr/bin or /usr/local/
bin works, but is undesirable (build instructions from both AOSP
and CM tell users to put repo into ~/bin, and repo likes to update
itself from time to time).

This forces the reposync function to use the full path to the repo
binary.

Change-Id: I9dc4a3d4ec3f39563e3a84de7321189700079c2e

7 years agobuild: Remove wallpapers from full_base.
Andreas Schneider [Fri, 31 Aug 2012 20:45:52 +0000 (22:45 +0200)]
build: Remove wallpapers from full_base.

They are already in the cm common config for the full phone.

Change-Id: I02fc0ea73e92ae8b19931d05e6783e3cfa166af2

7 years agobuild: Add Qualcomm's helper macros
Steve Kondik [Mon, 20 Aug 2012 18:00:51 +0000 (11:00 -0700)]
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

7 years agoenvsetup: Add some more commands
Daniel Bateman [Sat, 4 Aug 2012 08:48:09 +0000 (03:48 -0500)]
envsetup: Add some more commands

 * mmp: Like mm but pushes the built files afterward.

 * mmmp: Like mmm but pushes the built files afterward.

These may be useful when doing debugging on a individual library,
since it builds the library and pushes the new library to the device.

Examples:

mmmp -B device/samsung/vibrantmtd/libgps
mmmp -B packages/apps/Torch

Thanks: tpruvot for revisions

Change-Id: Ia6bdd2b63797ea86e164af69496b70ea6d7c5156

7 years agoupdate ota_from_target_files to handle mounting/unmounting for backupscript
Austen Dicken [Sun, 15 Jul 2012 21:28:05 +0000 (16:28 -0500)]
update ota_from_target_files to handle mounting/unmounting for backupscript

backupscript should not be mounting/unmounting itself as it makes other
scripts have unexpected results (such as modelid_cfg, which expects /system
to be mounted)

instead have the ota script handle the mounting/unmounting

Change-Id: I94511f4147c624d975cb3ecbeaa8b0e98f63437c

7 years agoAdd recoveryzip target. Import recovery building/porting tools.
Koushik Dutta [Mon, 21 Nov 2011 05:14:29 +0000 (21:14 -0800)]
Add recoveryzip target. Import recovery building/porting tools.

echo args

Change-Id: Ib346a27d94ccab3e992fe3bc3be9e0010e7b89a0

mkvendor.sh: fixes for Android 4.2.

Change-Id: Id7ff9ef03700d595734811ccf868371ffb024384

mkvendor: fix echoed build commands

cm.mk.template uses PRODUCT_NAME := cm___DEVICE__

Change-Id: I063fc4b93d90ebb034637bf3e92d83c77aa439ca

add cm.mk.template file for mkvendor.sh

Change-Id: Iba150a5350a7a7dbc9e3444d71d4ff293d51f3d7

fix template for mkvendor.sh

Change-Id: I2c78ed013053efa0c399e022502fd9ec4a1de8e6

mkvendor.sh: force armeabi-v7a

Change-Id: I9f29eec73a13144b47ff7b1db1d59cb1e5a4ef64

mkvendor.sh: typo

Change-Id: I8cc2303fde7c815384e09f65b6d4a1116ac29ee4

mkvendor.sh: more fixes

Change-Id: I0c641d42a96e44bb9170475d5de21cb8644e4d3d

BoardConfig.mk.template: Add TARGET_CPU_VARIANT

Change-Id: I8cd74a794e0d1a6818b5479cf7f5264e87d565f3

BoardConfig.mk.template: Add TARGET_CPU_SMP

This one is easy forget if not in the template

Change-Id: If65e557a661ecc81c6bfc434525b3c9937ff988e

tools/device: Remove deprecated line
gsm.mk no longer exist in vendor/cm

Change-Id: I0b6d50b424b3d24065e7287e1a03b64348014817
Signed-off-by: Jackeagle <jackeagle102@gmail.com>
build: Do not make recoveries or recoveryzip

Change-Id: I5a599eb3ba3f3450d9dfeab390c527a586bcaa68

7 years agoenv: implement the repodiff command
Tanguy Pruvot [Wed, 6 Jun 2012 19:39:23 +0000 (21:39 +0200)]
env: implement the repodiff command

 sample usage:
   repodiff ics
   repodiff github/ics --numstat
   repodiff android-4.0.4_r1.2 android-4.0.4_r2

Change-Id: Id1c1e504c75676707e59f051fd5ff9ce748d4297
Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>
build: Add repodiff to list of commands

7 years agobuild: Stop installing the sample APN list
Steve Kondik [Mon, 21 May 2012 05:10:30 +0000 (22:10 -0700)]
build: Stop installing the sample APN list

 * Sample APN list is always being installed, we don't want this in CM.

Change-Id: I74b97f3af545c4a7568d3001e1435c63cfbc7de8

7 years agomakerecipe: WIP to generate manifest branches for releases
Koushik Dutta [Mon, 14 May 2012 23:14:36 +0000 (16:14 -0700)]
makerecipe: WIP to generate manifest branches for releases

Change-Id: I1804c180844043692f788275c8998307e348001b

7 years agoModular backuptool.sh. Executes backup and restore methods defined in arbitrary...
Warren Togami [Sun, 4 Mar 2012 09:10:09 +0000 (23:10 -1000)]
Modular backuptool.sh.  Executes backup and restore methods defined in arbitrary /system/addon.d/*.sh scripts.

* Copy backuptool.functions alongside backuptool.sh.
* Delete both from /system/bin as they are not useful there.

Patch Series
============
http://review.cyanogenmod.com/#change,13265
CyanogenMod/android_build
  * edify generator
http://review.cyanogenmod.com/#change,13266
CyanogenMod/android_system_core
  * permissions on /system/addon.d
http://review.cyanogenmod.com/#change,13267
CyanogenMod/android_vendor_cm
  * 50-cm.sh reference backup script
  * modular backuptool.sh
  * support backuptool.functions used by /system/addon.d/*.sh scripts

Change-Id: I26b4907d28f49c69627699d2accd2f0fa2d1b112

7 years agoNote that update-api is a lie.
Koushik Dutta [Sat, 25 Feb 2012 22:24:20 +0000 (14:24 -0800)]
Note that update-api is a lie.

Change-Id: Idc2d92630e94ccbd60b5d5447c3762db8e5096f8

7 years agoeat: Automated install of fresh builds
Ricardo Cerqueira [Fri, 19 Aug 2011 19:37:12 +0000 (20:37 +0100)]
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

eat: Adapt to new file naming scheme

Change-Id: I101e333918bc215bebcc594c97bdd68307c90aaa

eat: Adapt to new storage paths

Change-Id: Ic060304275c2d19858636c84740b3f60dfdc6193

envsetup: Make eat restart adbd as root before pushing the recovery command

Without adbd running as root we can't write to /cache/recovery and
eat fails with a permission denied.

Change-Id: I015b50f29c001605cdc1a0088f68296b62809b56

Eat: Option to specify directory of zip in recovery mode

It pushes to /mnt/sdcard0, which may be /emmc/ in recovery. Now the user
can specify another path other than /sdcard/ where the zip is

Change-Id: Ie39615132ae39d9f6b304a3049b2395b2a2af182

fix "eat"

Assume user 0 is the active one when flashing...

Change-Id: Ibdc28ef49f8023e786ee82c9e42c221409dfd6bb

eat: Use /cache if possible

 * Check the size of /cache and use it if possible.

Change-Id: I72fecf3f8d2311c04e63fe81a7ca9a8a6a40419d

7 years agoDisable dataroaming by default
Pawit Pornkitprasan [Sat, 28 Jan 2012 02:05:16 +0000 (09:05 +0700)]
Disable dataroaming by default

The property is removed so that the property in vendor/cm can
take effect

Change-Id: Iefadc1a6e71cbf92ecb7363c953f4b5a82064446

7 years agobuild-with-colors: moar colors
Chirayu Desai [Sat, 13 Oct 2012 07:35:29 +0000 (13:05 +0530)]
build-with-colors: moar colors

- rename CL_PFX and CL_INS to better match the
  colors they show.
- add more colors.

Output of:
- most host stuff is yellow
- most target stuff is green
- installing/copying files is cyan
- import/export includes and notice files is cyan
- bootimage/recoveryimage is cyan
- and some more colors in many places ;)

Change-Id: I5532afa4ba608e0a7c408516dc9f912f9ca389f7

7 years agobuild in colors: Install outputs in blue/yellow [basic ics version]
Tanguy Pruvot [Mon, 9 Jan 2012 14:42:26 +0000 (15:42 +0100)]
build in colors: Install outputs in blue/yellow [basic ics version]

"target prefix:" in yellow
"Install: file" in cyan

should be in a single command line else there are sync problems
in multithread (-j X)

These colors can be tuned in core/Makefile if you use a white terminal.
can be disabled with "export BUILD_WITH_COLORS=0"

Only the most important output is colored to reduce ics merge problems

Change-Id: I0e585079fde6900799ef209367a523d94a51cda5

Colors: add more colors to final build steps

also fix releasetool echo and visible recovery echos

Change-Id: Icf5d88468572f935610c544bf1d5d356ec9870d3

build in colors: host C/C++

Change-Id: Ic415cab53a2efa104c9d4b31ddbe8c8eb74e493d

7 years agoAdd ro.cm.device to build.prop
Robert Burns [Thu, 5 Jan 2012 01:14:36 +0000 (20:14 -0500)]
Add ro.cm.device to build.prop

As requested by Ricardo Cerqueira:
http://r.cyanogenmod.com/#change,11423,patchset=1

Change-Id: If08cc13c0f0e92e0dd262a2f71610070a54aaead

7 years agoAllow override of device asserts, including multi-device support.
Steve Kondik [Wed, 21 Apr 2010 15:39:48 +0000 (11:39 -0400)]
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: I3d06bdc0e3e26bde0c0e646accd050364f9713b9

7 years agoSquashed commit of breakfast/brunch commands
Ricardo Cerqueira [Mon, 31 Jan 2011 00:49:49 +0000 (00:49 +0000)]
Squashed commit of breakfast/brunch commands

Add a CM-specific breakfast menu

We usually don't wan't all the devices in the lunch menu, so
we can now choose to pick up breakfast or brunch and get a
smaller selection of devices (i.e., those we support)

Make brunch more nutritious

* "breakfast device-name" will set up the environment, just like lunch.
* "brunch device-name" will actually do the whole setup and build :)

brunch: add a lazier mode

Since all of CM's targets have a predictable PRODUCT_NAME and BUILD_VARIANT
(i.e., "cyanogen_$(PRODUCT_DEVICE)-eng"), brunch can now be invoked passing
just the PRODUCT_DEVICE ("brunch passion" for the N1 setup+build, for
example).
The "classic" long form of $(PRODUCT_NAME)-$(BUILD_VARIANT) can still be used
if desired ("brunch cyanogen_passion-eng" still works).

breakfast in bed

breakfast in bed (aliased to "bib") is the baconless friend of lazy
brunch.
You can now use "breakfast passion", or "bib passion", to setup the
corresponding CM build without actually building it

Fix breakfast for the undecided

The menu presentation (i.e., giving no arguments to breakfast
or brunch) was broken, so if you didn't know the name of your
target you weren't given a list to choose from, just an error.

Change-Id: I85b8217daa2d511c16a1e82c700e1b0fadbb36ac
CyanogenNom: Now moar helpful!

7 years agoroomservice delivers you lunch combos from the CyanogenMod github.
Koushik Dutta [Sun, 27 Nov 2011 02:51:42 +0000 (18:51 -0800)]
roomservice delivers you lunch combos from the CyanogenMod github.

fix roomservice formatting

support product names with _ in them

fix roomservice to handle pagination

Change-Id: I4923c2f768094dbad8e06a72d9f27d46414030ab

roomservice: Add lightweight dependencies to repositories

Roomservice can already fetch your cm_<device> without the need for a
manifest entry.

However, when working with common repositories, there is no way of
actually fetching them without adding to the manifest. This patch
introduces a lightweight dependency system. Each repository can have a
cm.dependencies in the following json format:

[
  {
    "repository": "repository_name_on_cm_organization"
    "target_path": "target/path"
  },
  ...
]

For instance, for cm_anzu I need android_device_semc_msm7x30-common and
android_device_semc_mogami-common. I would add both to cm.dependencies
as follows:

[
  {
    "repository": "android_device_semc_msm7x30-common",
    "target_path": "device/semc/msm7x30-common"
  },
  {
    "repository": "android_device_semc_mogami-common",
    "target_path": "device/semc/mogami-common"
  }
]

Roomservice would then fetch the anzu repository, parse the dependency
files and add/fetch/sync these additional repositories if they don't
exist already.

This also adds pretty printing to the output xml.

Change-Id: I9cc847adfc717a06439bc6094213ed6492343158

roomservice: Add branch support to cm.dependencies

Allow the cm.dependencies entries to provide an optional "branch" for
the repository dependencies. Added to fully support
http://wiki.cyanogenmod.com/wiki/Integrated_kernel_building

Change-Id: I35b51920d296afa329411af6172c7bd9aeef4af8

roomservice: Fill in dependencies for already-deployed repositories

Change-Id: I01fd408c9c4bfa78097c7f848b2556d2b2b180f3

roomservice: Extend dependency-checks to devices in main manifest

CM currently keeps devices inherited from AOSP in the main manifest,
so take that into account as well when checking device paths

Change-Id: I9663f283617f237428b4eaa0cd60b5de2b86a7b9

make compatible with github v3 api

Change-Id: Iff6f1f9099cdc5d2b49e04000b5fe3d04aa5d7e4

Fixed build for full-eng

Previously
Traceback (most recent call last):
  File "build/tools/roomservice.py", line 153, in <module>
    repo_path = get_from_manifest(device)
NameError: name 'device' is not defined

** Don't have a product spec for: 'full'
** Do you have the right repo manifest?

Now
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76L
============================================

Change-Id: Ib513705aba9a7a52a971ab64102ecbe9fddfb97a

roomservice: Bump github request per_page to 100

Change the number of repos per page from the default 30
to 100.

We seem to be hitting the rate limit on the jenkins server.

Change-Id: Ie733feaa0414cbfebb7efcfc1e24d94e1e466d1b

roomservice: Add support for netrc

Change-Id: I1f5e11e40125abd0c4e4c8d8294d4fc09bfdc30a

roomservice: Handle missing netrc file

Change-Id: If981fe79dc3e2191434301239b0cd585be8b4730

roomservice.py: Verbose error when a branch is missing.
Also add ROOMSERVICE_BRANCHES environment variable to use fallback branches.

Change-Id: I3c2b1d79fc185c1f1e1d658e5ca4f78e688780e2

roomservice.py: Fixups around fallback branches not being used by dependencies when ROOMSERVICE_BRANCHES is defined.

Change-Id: Ifb42a023cae5f62ac8f9cf7832125b91b431169c

roomservice: Allow following up tag references

This is now needed for release builds

Change-Id: I8c5f87341059b3b15ee853312b71df73790ad0d8

build: local_manifest.xml deprecated, use local_manifests

Patch Set 2:- Use roomservice.xml instead of cm.xml.

Change-Id: I3d8a6ef3907b92808662cbba912cea5ed38d0bde

Fix fallback branch search in roomservice

If you provided a fallback branch to roomservice via the
ROOMSERVICE_BRANCHES environment var the branch search would fail
if the device repo had any tags.

Fixed this by appending the tag search results to the branch
search results instead of overwriting them

Change-Id: I73a11af1500bd04e346f08ec3f83454502f3a169

roomservice: Fix wrong assumption about path of active manifest

Change-Id: Id740ff4b848e6ccbfd658be4846197b8ca519237

roomservice: When validating the presence of a repo, check main manifest too

Change-Id: If680536484074b473458723d93e783d074d7f669

roomservice: Bump devices per page to 200

Limit was reached again when attempting to
lunch various projects, such as steelhead.

Change-Id: I2f3b9705e07e1e47b86857aeb383cf7c99fcdbdc
Signed-off-by: William Roberts <bill.c.roberts@gmail.com>
roomservice: Fix assumptions about the branch naming

We can't just split from the last slash anymore, since we're using
those to distinguish the stabilization branches

Change-Id: Ia175dd317f508e99b275b56e9c83bd4729a75ddb

roomservice: Add recursive dependencies

Dependency repositories can now have dependencies themselves

Change-Id: I33a28709170da52bc98f4a62387927e3a11b2450

roomservice: python3 support

Change-Id: I7621818ba7ed997676728fe865f37a25b3a5b8b5
Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
roomservice: Improve new device retrieval

Without credentials, GitHub's search API limits requests to 60/hr.
The existing method to add a new device is to fetch JSON-formatted info
for ALL CM repositories and then search for the device. In doing so,
more than 10 pages of results are returned (i.e. more than 10 requests
per device). This is clumsy, slow, and limits use of roomservice to
only ~5 devices per hour.

Instead, only return search results for repositories that have the
device name in the repository name. Then, one device = one request.
It's faster and allows closer to 60 device setups / hr.

Additional bailouts are included to stop the script earlier than later
if a device is not found.

Change-Id: I7f914d7ede82da0f100d9fd6cf8b603177962e48

roomservice: Fix search of devices forked to CM

Commit "roomservice: Improve new device retrieval" introduced a
regression where repositories that were forked to CM were omitted from
search results. This fixes that issue.

Change-Id: I7bf54129b5da1749abe5b2b9a492cb93e6ee41a6

roomservice: Improve error handling on search

Use the relevant forms of 'except' for urllib and parsing instead of a
general except which was performed too late anyways.

Change-Id: Ia1fc89dd5a8a703fc0175aef7b6dd013a44a2c8e

roomservice: use force-sync when adding projects with roomservice

This works around the error
GitError: --force-sync not enabled; cannot overwrite a local work tree
when using roomservice.

Since this should only trigger when the device repos haven't been
checked out yet, we can use force-sync to overwrite any roomservice
device paths in the .repo directory.

Change-Id: Iac54a8a2f2913f82f8ca6497b8785a9d5769640b
Ticket: CYNGNOS-735

roomservice: check uniqueness by path, not name

For repos such as hardware/qcom/media-caf we are using the same name
with different branches for different paths.

for eg.
  CyanogenMod/hardware_qcom_media-caf(branch:8994)
   - fetch to : /hardware/qcom/media-caf/8994
  CyanogenMod/hardware_qcom_media-caf(branch:8960)
   - fetch to : /hardware/qcom/media-caf/8960

For such cases roomservice won't pick up a new path
if one already exists.

We should check for unique by target path instead.

Change-Id: I89e561ca9a2d57ede8cf782f431a8e829ea47ee5
Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
7 years agoAdd otapackage support for backuptool
Chris Soyars [Wed, 22 Dec 2010 23:44:33 +0000 (00:44 +0100)]
Add otapackage support for backuptool

Change-Id: I512554c579d444067cd3ccbb0e6946a5eb6bc964a

7 years agobuild: Preliminary support for CM product builds
Ricardo Cerqueira [Fri, 25 Nov 2011 15:30:36 +0000 (15:30 +0000)]
build: Preliminary support for CM product builds

If building a cm_* product, skip crawling the filesystem for
AndroidProduct makefiles (and, of course, parsing their contents)
and aim directly for the device/cm/<product> device configuration

Change-Id: I2a5e70dda973a6fcdbba0d5e26b35b99d3f1aea2

Change how we search for CM makefiles.

build: Fix fastpath code for CM_BUILD

 * We need to adjust to the new validations

Change-Id: I9066d4f437beb9597027ee6bbb52504b5e7e84c5

build: Fix cm builds

the setup variable wasn't exported, and was being missed by part
of the scripts

7 years agoadd support for custom releasetools
codeworkx [Thu, 17 Nov 2011 16:33:44 +0000 (17:33 +0100)]
add support for custom releasetools

7 years agoadd support for overriding build.prop settings.
Koushik Dutta [Sun, 27 Jun 2010 05:53:55 +0000 (22:53 -0700)]
add support for overriding build.prop settings.

Change-Id: Ie4224d608b7bcb0c2087bd77bc954f8f5f9b6495

7 years agomake bacon
Tanguy Pruvot [Sat, 19 Nov 2011 00:34:12 +0000 (01:34 +0100)]
make bacon

Change-Id: I4f61b6a6b9b8bab8582fa5423c4134c07af17606

7 years agoenvsetup: cmremote,cmgerrit,cmrebase,mka,reposync
Andrew Sutherland [Fri, 18 Nov 2011 06:45:55 +0000 (00:45 -0600)]
envsetup: cmremote,cmgerrit,cmrebase,mka,reposync

    Add the cm specific functions (cmremote, cmgerrit, cmrebase,
    mka, reposync) that are present in the gingerbread branch

Change-Id: If28a5a206b8bb9ead5242c60f6c1e6af27141b57

7 years agoota: Remove cruft we don't care about
Ricardo Cerqueira [Wed, 16 Nov 2011 23:14:27 +0000 (23:14 +0000)]
ota: Remove cruft we don't care about

Skip the date check (downgrade to your content), and don't include
recovery in otapackages.
5.0.0 update: We want the recovery patchstuff back

7 years agobuild: Inline kernel building as a buildtime task
Ricardo Cerqueira [Wed, 11 Apr 2012 10:21:23 +0000 (11:21 +0100)]
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

kernel: Change path to kernel/<vendor>/<device>

Derive the kernel path from the device's own path (just replace "device"
with "kernel")

Change-Id: Idd44a0489e1ce280adf5ec4d9cfe2385c75dd115

kernel: Improve support for non-arm architectures

Remove hardwired references to the ARM arch and toolchains, and replace
them with the respective android build variables

Change-Id: Iae3eb548ca1d58ac808b5fa430d415283a809106

kernel: Fix ARM building

The default android ARM compiler, arm-androideabi-, does NOT work
for the Linux kernel. Special-case the ARM architecture to target
the ARM_EABI_TOOLCHAIN path directly

Change-Id: Ib672c99f114cb89d5fda3343d4dc68810d042d35

kernel: allow TARGET_KERNEL_MODULES to overwrite kernel modules

This is necessary to use compat-wireless since it needs to build a newer
version of cfg80211 (and sometimes mac80211) than the kernel sources version.
There are probably other instances of this type of need.

Change-Id: Ib5bf818286bc20987d8b9f9480a43f3e7690e239

kernel.mk: make use of ccache when requested

Change-Id: I9b6e28711bd5f590a76ac2b62a50b1d2de014e3e

kernel: Fix ccache inclusion logic

Builds were broken when CCACHE was missing from the environment
Change-Id: Ie8d6048f4600f1dc9c298593a50e37af04b96438

build: show accurate information on inline kernel warnings/errors

Having the variables on AndroidBoard as suggested causes errors
with mm/mmm, whereas having them on BoardConfig doesn't. Adjust
the warnings to reflect this.

Change-Id: I554c1f1073df678d36521f73bc236a1f4b02212e

This is causing generic_armv5-userdebug builds to fail. Commenting out for now to fix recovery build servers. Will fix properly later.

Change-Id: Ibe1cda8cd2b4c1914dfa3b8a29724c9069e047a6

kernel.mk: Also search PRODUCT_COPY_FILES for the kernel copy, as that is how AOSP does it now.

Change-Id: Id2d1cf079694d1996d4a85d8435c2e4562e5d444

kernel.mk: fix compiled kernel copy

Change-Id: Ifb2a3d4968e56eed236eaa2db9258cd0b8865fda

kernel.mk: workaround to fix kernel builds on darwin until the prebuilts/gcc is checked in by upstream.

Change-Id: I6321fb7f6814b207c821d974766d945351b3f546

build: fix ccache usage when building kernels

Change-Id: Id4edd4d85d9ba3ef42575f5fdebf22ed14957a99

kernel.mk: set KERNEL_OUT properly

It was hardcoded to $(ANDROID_BUILD_TOP)/$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
which wouldn't exist if OUT_DIR_COMMON_BASE was set to use another dir
(e.g. ramdisk)

Fix it so that it now points to $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
if OUT_DIR is not out

Change-Id: I1bf767d86548e41270d9cbb8f0c00512708501c5

build: add support for uncompressed kernels

build: kernel: remove hard coded darwin toolchain.

* Use latest kernel toolchain from $(ARM_EABI_TOOLCHAIN) variable.

Change-Id: I3b43408937dd5f193fcba19c034f868272de8963

envsetup: set OUT_DIR to an absolute path always

OUT_DIR was set to $(TOPDIR)out previously,
but $(TOPDIR) was null, so it was a relative path.
This broke releasetools, inline kernel building, etc
since they require absolute paths.
Fix it so that it is set to $(shell readlink -f .)/out
if $(TOPDIR) is null.

Also remove hacks which checked if (OUT_DIR) was out
and changed it to $(ANDROID_BUILD_TOP)/out to workaround
the aforementioned problem.

Change-Id: I459a3b1325a1bbea0565cd73f6acf160d4ed9b39

build: add strip on kernel modules

kernel modules are huge for prima wlan and we need to strip them
unstriped size 40mb
striped size 2mb

Change-Id: Iefd572732cad0a6f608439618673068a3586fcd5

kernel: Ignore errors with module building

Let kernel fully disable loadable modules

Change-Id: Ia37ec927b092c041ee4c68bf9fd0f28b7339c8ca

build: Add support for extra kernel build variables

 * This allows specifying a variant defconfig, and an selinux defconfig
   which are simply configuration fragments.

Change-Id: I97882ae3b8c2e16ff6a7dce8dd3a70d70f8aa866

s/cyanogenmod.com/cyanogenmod.org/

* And fixup a wiki link while I'm at it.

Change-Id: I0355b9a47eac1becc07e81659fbb2d11b14ece36

Fixes for Xcode 5 and OSX 10.9.
kernel.mk: Put elf.h into the include path on Darwin builds.

Change-Id: I7069b956965d27caac3b2e4c3cc2e8b4c1da7a82

Make the kernel image format parametric instead of a chain of if/elses

Change-Id: I54bfcdecb8647f7bcf744e72b2de19fcf4e4e7ac

build: Add "dtbs" target when building the kernel

 * This is needed for 3.10

Change-Id: I4044ea9e67017452efc25097a3327141a6627c24

Allow specifying kernel toolchain and prefix

Change-Id: Ib75cfe772e073f2196455f3e3dfba247f6b3feff

Fix libelf path

Fixes kernel build

Change-Id: Ic6cdb1734d7b865491e8e61403d32db4acafe514
Signed-off-by: Alvin Francis <nivlafx@gmail.com>
core: More flexible kernel configuration

 * Allow various combinations of kernel vs. userspace architectures
 * Get rid of various assumptions about everything being ARM or 32-bit
 * This adds the following target flags:
     TARGET_KERNEL_ARCH
     TARGET_KERNEL_HEADER_ARCH
     KERNEL_HEADER_DEFCONFIG
     TARGET_KERNEL_CROSS_COMPILE_PREFIX

Change-Id: If0bc202abd35c216ba3ea5707ffdb602526d8ed3

Fix kernel.mk if SELINUX or VARIANT_DEFCONFIG is defined

KERNEL_HEADER_DEFCONFIG was ignoring SELINUX_DEFCONFIG thus breaking
all selinux support

Change-Id: Idc3367d6b4b85343078e63e87dca6d6d052e7f53

build: kernel: Fix stray "@"

Nested "$(hide)"s (makefile @) don't work. There was one at the
beginning of the script, remove the inner one to prevent it from
being interpreted as a shell command

Change-Id: I08a829ee56b212366a0f5a3812f7a614667a9c2b

build: Add support for additional kernel config snippet

 * Add support for TARGET_KERNEL_ADDITIONAL_CONFIG which will append a
   config snippet from arch/$ARCH/configs/ to the main defconfig.
 * This can be used for various things, such as including DIAG support
   into debuggable builds.

Change-Id: Ifa48688a3f951dd8ecc9a13a27de3a476e7bf633

kernel: Fix kernelconfig build

* Copy the generated defconfig to the correct directory

Change-Id: Ia8e259946d67501675dd5a3433165d54df6c13c5

build: kernel: arm64 uses Image.gz as the target

Change-Id: Icc194d2a16f9ffcf5803226fc1f2a5b091b4d861

kernel: use merge-config.sh for integrating KERNEL_ADDITIONAL_CONFIG

Using 'cat' to combine defconfig fragments is not, in general,
safe. Overriding options is not correctly handled, and it's
possible to produce illegal configurations which violate Kconfig
dependency constraints.

Instead, use the merge-config.sh script from the kernel tree
which more intelligently combines defconfig fragments. An
'alldefconfig' make target is also introduced, as merge-config.sh
depends on it.

Change-Id: I91a8c5e4bcf7072a3f95651dffe17380174134e4

kernel: Don't update defconfig with KERNEL_ADDITIONAL_CONFIG options

If 'make kernelconfig' is run in an environment where
KERNEL_ADDITIONAL_CONFIG is set, the options in the additional
defconfig will be saved back to the defconfig when savedefconfig
is performed.

While not really a bug, this increases the likelihood of someone
accidentally committing these changes or getting confused by
unexpected deltas added to their defconfigs.

Fix this by skipping the merge-config.sh step for the 'kernelconfig'
make target. As a side-effect, options in KERNEL_ADDITIONAL_CONFIG
will also not be displayed in menuconfig. This is not easily
avoidable, and arguably not wrong anyway.

Change-Id: I920be0338bb8afc87f6061c55aafb27ba658974d

kernel: add `make kernelxconfig' target

kernelxconfig is identical to kernelconfig except that it launches
xconfig instead of menuconfig. xconfig easier to use if you need to
search the Kconfig tree.

Change-Id: I6d91c7e3efbc9f172b040425f2ec545e3f03b44d
(cherry picked from commit 60ca2b7897b552ce5dee2633fc84906222579763)

kernel: don't build modules or dtbs unless enabled

Build modules and dtbs only if enabled. The make commands were allowed to
fail silently to support builds that did not have these options
enabled.

This had a side effect of allowing builds to complete even if modules
failed to build. Don't suppress these error anymore.

Change-Id: I842124b465d9e14edd6a09ffe54f09da32f10632

kernel: prevent targets from being rebuilt needlessly

Fix some rules that listed directories as their dependencies.
Directories are always out-of-date because the rules that depend on
them touch file under the directories they depend on them.

Replace the directory dependencies with stamp file rules that handle
directory creation.

Change-Id: I2b36c846b6565b7f9aba5bb7583576ad300983b8

kernel: Fix usage of KERNEL_ARCH

* x86_64 defconfigs live in arch/x86/configs
* Use KERNEL_ARCH instead of TARGET_KERNEL_ARCH

Change-Id: Idc191ea658fc4100bc7ad40958023c5f936daf44

build: force .config update if additional kernel config changes

This patch forces a regeneration of the .config if either the
contents of TARGET_KERNEL_ADDITIONAL_CONFIG changes or the value
of TARGET_KERNEL_ADDITIONAL_CONFIG changes.

OPO-360
Change-Id: Ide28be3fab01b9f9ad72aa9d8706131e2b9ac0c7

build: add build module from root

Zenfone 5 have copies module to root , we use it

Change-Id: I734e45a09d445e97f2b3834c5941db27e537b803

kernel: Don't use override config in kernel(x)config

* It defeats the whole purpose of using KERNEL_CONFIG_OVERRIDE

Change-Id: Ia405562a0dcf623ae2bfca2803c2d3427d84bf0a

kernel: remove support for unused MTK Kernel

Remove unused MTK kernel build support.

Change-Id: I4f4df078ae03b1bd5edc7000e5b942bfc05c02bd

kernel: add docs for config vars

Add a header with documentation for the config vars currently in use
by the Kernel build.

Change-Id: I6930b41d716baabbb16c2f407b6b9fe6e5f2b4c8

kernel: allow toolchain prefix to be overridden

Allow the toolchain prefix defined in BoardConfig.mk to be overridden
via by setting KERNEL_TOOLCHAIN_PREFIX (alongside KERNEL_TOOLCHAIN) to
compile with an alternate toolchain.

Change-Id: If6f4f0dba9bd0b0056f76e380070cca74ea0a4df

kernel: add banner for defconfig and header install steps

Change-Id: Iddf9e1e206823573ebc38a8956a029d08dee83de

build: Add dt.img and kernel target

Change-Id: I4a266d8bd2b01ec4ec696f10f0cc7e912f25a38a

Fix libelf path for mm

Fixes kernel build on darwin

Updated for cm-13.0

Change-Id: Ic6cdb1734d7b865491e8e61403d32db4acafe514
Signed-off-by: Alvin Francis <nivlafx@gmail.com>
7 years agoAllow a device to generically define its own headers
Ricardo Cerqueira [Tue, 12 Apr 2011 09:57:22 +0000 (10:57 +0100)]
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: I41b62668b60e3f62a6ebd3738d8d2675103a81e6a

build: fix target header overlay

LOCAL_C_INCLUDES as defined by the makefile should be put AFTER
the overlay includes so the overlay always takes precedence.

Change-Id: I489b2aab6dbacd9122d834f85e07b63ed1271f07

7 years agoFix bug in the handling of LOCAL_HAL_STATIC_LIBRARIES
Ameya Thakur [Mon, 8 Aug 2016 19:28:56 +0000 (12:28 -0700)]
Fix bug in the handling of LOCAL_HAL_STATIC_LIBRARIES

The lib indicated by LOCAL_HAL_STATIC_LIBRARIES(foo) currently gets appended
to the end of the my_static_libraries list. As a result if foo is the only one
to reference something from the static_libraries_list(bar) we die during
linking since the linker would have stripped out bar. Fix this by prepending
foo to the my_static_libraries list instead.

Change-Id: Iefffcac65dd5f05d9be2d036b42729610d2394b3

7 years agoDebug messages added to know build failure reasons
Lalit Kansara [Wed, 3 Aug 2016 06:26:34 +0000 (11:56 +0530)]
Debug messages added to know build failure reasons

Debug messages added to know build failure reasons while building
image.

Change-Id: Iacf02b4228c761739859544eb3be025331d38597

7 years agoAdd Exchange APP into target build
weitan [Wed, 6 Jul 2016 02:13:14 +0000 (10:13 +0800)]
Add Exchange APP into target build

Change-Id: I1f2aaa08ccf5a604875b082b3c140166ccf2f82d

7 years agoControl building shared libs, static libs and executables with SDLLVM LTO
Mandeep Singh Grang [Fri, 20 May 2016 22:12:11 +0000 (15:12 -0700)]
Control building shared libs, static libs and executables with SDLLVM LTO

Change-Id: Ie71d09b0853954c44a37f708894eef68c2f6aafd

7 years agoAdd -Wno-vectorizer-no-neon flag for all compiles
Weiming Zhao [Fri, 17 Jun 2016 18:59:43 +0000 (11:59 -0700)]
Add -Wno-vectorizer-no-neon flag for all compiles

Prevent the warning for SDLLVM

Change-Id: Ie44b6ea12fab6a6f198a00c360fee98980f0b40c

7 years agoReplace hard-coded flags with variables-based
Weiming Zhao [Wed, 8 Jun 2016 22:59:13 +0000 (15:59 -0700)]
Replace hard-coded flags with variables-based

Currently, we always apply some flags to clang, which are actually not
always available.

Change-Id: Ia6404c36453cb10fc93624f1ae7d9f7aec587ebf