Commit graph

665 commits

Author SHA1 Message Date
Pengxuan Zheng
7f5d4e1050 Add support for using the secondary SDLLVM toolchain
If LOCAL_SDCLANG_2 is set to true, the secondary SDLLVM toolchain
(SDCLANG_PATH_2) will be used instead.

Change-Id: Icb7492562aeaa3c584edcbced8fe1e98776774bd
2018-03-27 17:09:52 +00:00
Mandeep Singh Grang
dc8df22add Rules to enable LTO for Adreno GFX driver.
This patch controls rules when LTO is enabled for Adreno GFX driver.

Change-Id: I45bd163889ffd3e0237d5451adaca0fc411b14f8
2018-03-27 17:09:52 +00:00
Rashed Abdel-Tawab
31eec2059a soong: Add TARGET_USES_QTI_CAMERA_DEVICE
Change-Id: I925b137edeed9fa11bbe566002147b444328c661
2018-03-24 18:33:48 +00:00
Simon Shields
6f68de1a32 lineage: add generic lineage targets
These are used for building addonsu.

Change-Id: If6def9729328ea2ce1e977fd7b9ff42cfc2f6dda
2018-03-23 23:44:07 +00:00
Joey
19d4fb0438 lineage: fix sdk documentation generation
Change-Id: I800a8bca5667bccd7761ed56f25376574a267891
Signed-off-by: Joey <joey@lineageos.org>
2018-03-09 16:18:35 +01:00
Ethan Chen
3a0f2fb0e0 qcom_target: Move RIL path mapping to core/config.mk
* hardware/ril is a required project for any build.
  Move the path mapping logic to core/config.mk so
  any build has access to the correct default mapping.

Change-Id: Ia52919d7877ddc91f8a4a988fd0858d14837fc4c
2018-03-07 00:23:23 +00:00
Ethan Chen
87b787abd9 pathmap: remove duplicate include-path-for
* include-path-for is already part of build/core/pathmap.mk

Change-Id: I3133265559b4d4b5cc6c32b49f430422e55b34ac
2018-03-06 16:51:07 +00:00
Michael Bestas
a3f97c75bf extract_utils: Fix vendor framework makefile generation
* Fix copy-pasta

Change-Id: I9b2f61702985cb59af34ad146fd61bedba043f81
2018-02-27 22:32:50 +02:00
Ethan Chen
5bc3c8426b extract-utils: Use LOCAL_VENDOR_FILE instead of LOCAL_PROPRIETARY_FILE
* Oreo expects VNDK compatible files to be listed as LOCAL_VENDOR_FILE,
  not LOCAL_PROPRIETARY_FILE.

Change-Id: Ia2384c4f3ab3a99b79df52c796c53dc25a0f4a88
2018-02-26 02:17:37 +00:00
Jaap Jan Meijer
1fdbf7ad8b Don't enable ANDROID_BINDER_IPC_32BIT for mixed userspace/kernel
TARGET_USES_64_BIT_BINDER should be used for the userspace binder now.

Change-Id: I5cede00e7667969e394d06169dff54659900d90f
2018-02-24 20:52:30 -06:00
Dan Pasanen
f65a6dfd63 kernel: fix ccache variable sanitation for clang builds
* When using "?=", expansion doesn't happen right away, so the ccache
  variable is sanitized before KERNEL_CC gets expanded and no ccache
  is ever used for clang builds.

* With ":=", expansion happens immediately. So let's manually check
  if KERNEL_CC is already set somewhere else to determine whether or
  not we should set it ourselves using ":=".

Change-Id: I8a61767606a4f3d4c6ba88c68b10fd2e11783406
2018-02-19 04:20:53 +00:00
Adrian DC
ae509e410c lineage: Sort soong variables and configurations
Change-Id: I4a191f8ce61123e30f780f8e39411a7723fb6197
2018-02-18 20:59:12 +00:00
Stricted
52602baa49 lineage: soong: replace space with colon on TARGET_LD_SHIM_LIBS
that way we can split the shim list logically into multiple lines like

TARGET_LD_SHIM_LIBS := /system/bin/gpsd|/vendor/lib/libshim_gpsd.so \
    /system/lib/libexynoscamera.so|/vendor/lib/libexynoscamera_shim.so \
    /system/lib/libstagefright.so|/system/lib/libstagefright_shim.so

to not have one single huge line

Change-Id: Ice1411ee22b78da1dbf22eac412b9e4978acebdf
2018-02-18 11:30:00 +00:00
Paul Keith
10084bf867 lineage: soong: Add var for linker shim libs
* To limit security exposure, we're forcing all devices
  to define shim libs with a TARGET_LD_SHIM_LIBS

Change-Id: Ic8722c42807429f2faa3546316c71c40533ce195
2018-02-17 09:08:28 +00:00
Joey
546c9a1ec5 lineage: add BUILD_RRO_SYSTEM_PACKAGE target
Allows to ship rro packages in system instead of vendor

Change-Id: I8822ca477e80297dce477de2d87bd3e74d4cbfb0
Signed-off-by: Joey <joey@lineageos.org>
2018-02-05 21:13:24 +01:00
Paul Keith
4e75f576f9 extract_utils: Fix regressions from 3f9b94cb67
Change-Id: I78fc47c63e6bfbd5ee98a56a1d80f763e96ac266
2018-01-29 23:33:57 +02:00
Michael W
2e203941cc envsetup: Clean up for install[boot|recovery]
* Remove the files from device after installation

Change-Id: I52dc60c22abde972a066b879b3a74459261966e5
2018-01-29 02:50:01 +02:00
LuK1337
f017e36e65 lineage: Change 'bailing out' message to something more friendly
Change-Id: Iee519ea5cbfa92b6bb26e33d2bac3d2335c770a8
2018-01-27 14:40:17 +00:00
Michael Bestas
3f9b94cb67 extract_utils: Split optional args with semicolon instead of colon
* Fix optional flags like PRESIGNED
  after I1f5a1abd6929e4a7e0ccd6370d3a3dd986f94fed

Change-Id: I889f995d7f19b09908cfbaf7474442ce48bfabdb
2018-01-27 00:42:57 +00:00
Michael Bestas
c982836ca6 extract_utils: Fix makefile generation issues
* Fix makefile generation for packages that have set
  a different target destination

* Thanks to rashed and javelinanddart for their help
  in debugging and solving this issue.

Change-Id: I1f5a1abd6929e4a7e0ccd6370d3a3dd986f94fed
2018-01-27 00:42:46 +00:00
Aaron Kling
a078a220bf Fix kernel build failure on some devices and build hosts
Change-Id: Ib6ba53994b4e04503ee4636a6aaab9c0bc3f676c
2018-01-12 18:19:27 -06:00
Tom Marshall
6b83d830df lineage: build: kernel: Rework kernel header logic
The existing kernel header logic has several issues:

 * It does not depend on the actual kernel headers, so it does not
   detect actual kernel header changes.

 * It does depend on the kernel config, which should not be used to
   generate (user space) kernel headers.

The end result is that kernel headers aren't properly regenerated when
needed, and spuriously regenerated when not needed.  Additionally, the
kernel header rebuild mucks around with the kernel config, which is
unneccesary and fraught with danger.

Rewrite the kernel header dependency and generation logic as follows:

 * Use the dependency file $(KERNEL_OUT)/.headers_install_deps to
   manage dependencies on the actual kernel header files which are
   exported to user space (and the top level kernel Makefile, which
   is used to generate version.h).  The dependency file is exactly
   the same as what GCC would output for a C/C++ dependency with the
   M/MM flags.

 * Conditionally include the dependency file to detect when headers
   should be (re)generated.

 * Introduce the phony target INSTALLED_KERNEL_HEADERS for modules to
   declare a dependency on kernel headers.

Additionally:

 * Get rid of TARGET_KERNEL_HEADER_ARCH and KERNEL_HEADER_DEFCONFIG.

 * Get rid of KERNEL_OUT_STAMP and move commands to the appropriate
   places in the rules.

 * Fail the build when $(KERNEL_OUT)/usr is mentioned in a dependency.
   Note a separate commit to build/core/binary.mk will provide a
   migration path and a suitable deprecation warning.

 * Declare the kernel*config targets phony.

Change-Id: I8b46f4ea1c622d8e73cca5157be96ec09d42ebb3
2018-01-09 03:09:57 +00:00
Christian Oder
8d5db3c24f kernel: Allow building dtbo.img
taimen uses the dtbo.img as an DTB Overlay in order to use the same defconfig for both, taimen and wahoo.
The dtbo.img is built with "make dtbo.img". Allow automatically building it when setting TARGET_NEEDS_DTBOIMAGE to true, or by manually calling make dtboimage.

Thanks to luca020400 for help with the kernel.mk logic

[raymanfx] Add AVB hash footer support

Change-Id: Iaddafaa98e3e84880462a2c35b899e3fea21e161
2018-01-08 07:04:05 +00:00
nailyk
8ce26b3b51 tools: repopick: Correctly order changeset
* Without key=int sorting is done in alphabetical order.
       This cause 999 being picked after 1000.

Change-Id: I540f0e55093a33d80d78a0cf0c31dc83f7168279
2018-01-05 10:16:45 +00:00
Arne Coucheron
73296f14dc soong_config: Add TARGET_USES_QCOM_BSP_LEGACY
Change-Id: Ia5ddfa263df71388b19c77d2509c29791177208d
2018-01-04 20:42:38 +00:00
Dan Pasanen
8ee5d891b0 kernel: don't build for TARGET_NO_KERNEL targets
Change-Id: I14ad45c06922c0775e0574ddbcfcdc33353af465
2018-01-04 20:42:27 +00:00
Rashed Abdel-Tawab
064b06967f build: Merge UM platforms into common HALs and disable BSP
While UM platform HALs are interchangable and very much interoperable
between platforms and kernels, some have qualms about commonizing
platforms that Qualcomm hasn't fully commonized themselves yet. Therefore
introduce 2 seperate UM platforms, UM3.18 and UM4.4 (corresponding to
the kernel version used for that "version" of UM) and use msm8996 for
UM3.18 and msm8998 for UM4.4 (sdm845 will probably be UM4.9).

Also disable TARGET_USES_QCOM_BSP on the UM platforms to match Qualcomm
trees as it causes WiFi display not to work and calls for missing headers
and struct elements at build time.

Change-Id: Ia574231243b7d628d35959b474dd28bd37ac4031
2018-01-04 01:14:38 +00:00
Michael Bestas
480e2ee431 qcom_target: Commonize UM target HALs
* Use msm8996 HAL for 8953 & 8937 since they share the exact same
  git history sha1 in all 7.0+ released tags.

Change-Id: I764a9a092b6d530de8a9b9e6e54f41c0b5d8a593
2018-01-04 01:14:38 +00:00
LuK1337
e67b6cb4fd lineage: Allow roomservice to check non device/* repos
Change-Id: I840bcf945c746b3fcdda0ffd567bec7466a22207
2018-01-02 21:01:09 +00:00
Rashed Abdel-Tawab
0d07fa5af5 lineage: qcom: Set power HAL pathmap
Change-Id: I063821f8405cafc57b37a61d119a9b8b7ef9df4a
2017-12-31 02:29:26 +00:00
Joe Maples
da32895b61 tasks: kernel: Add support for Clang kernel builds
Add support for compiling kernels with Clang as intoduced on android-4.4

In order to compile with clang, you must set TARGET_KERNEL_CLANG_COMPILE.
If you wish to specify a specific clang version, also set TARGET_KERNEL_CLANG_VERSION,
but if that is not set, the build system will default to the latest version of clang
available in prebuilts/clang

Change-Id: I79dc1dca9758a930f2f5ba1754b5d8de114af900
Signed-off-by: Joe Maples <joe@frap129.org>
2017-12-31 01:42:06 +00:00
Ethan Chen
bf38db2a5e kernel: Handle kernel modules correctly
Place kernel module output in the correct location.
Perform depmod steps (copied from build-image-kernel-modules function in
build/make/core/Makefile).
See: https://source.android.com/devices/architecture/kernel/modular-kernels

Change-Id: I6e70012a5c1acdb276f9bee0d57631d2805f71ea
2017-12-31 01:41:57 +00:00
Dan Pasanen
9fc50bbf73 qcom_utils: allow overriding get-vendor-board-platforms
* Some devices need this function to return something, yet also do not
  set BOARD_USES_QCOM_HARDWARE. Allow them to override this.

Change-Id: I3cf78da39b006ba805ae35fde7379357faa10250
(cherry picked from commit 012cc275e09346ef7909b6a5a144aed59b375ccd)
2017-12-26 00:36:18 +00:00
Rashed Abdel-Tawab
b52c70881d
envsetup: Automatically replace qcom/opensource with qcom-opensource
CAF doesn't use qcom/opensource in their paths, so automatically adjust
the project path for this when using cafremote

Change-Id: I6252fbd1c3e8a545c0d54eefb6b730b893821574
2017-12-24 22:44:11 +02:00
Dan Pasanen
1cdd380e69 repopick: support auth'ing to gerrit and picking drafts
* Use requests if installed. If not fall back to urllib. This is
  done because users may or may not have requests installed and
  requiring them to do so for simple http stuff isn't really
  reasonable.

* If requests is installed and a .gerritrc file exists in the
  user's HOME directory, try to get credentials out of it
  for the given gerrit instance. If auth for the correct gerrit
  instance exists, use it to auth to gerrit. If no .gerritrc
  exists, just use requests with no auth.

  Example ~/.gerritrc entry:
  review.lineageos.org|invisiblek|httppasswordhere

Change-Id: I95be26d51bfd31b53f3613e8dbfb7bba46324571
2017-12-21 00:11:43 +00:00
Dan Pasanen
2965342b9a repopick: use https by default for repopicking
Change-Id: Iae1fde3515b0377a2b9253102c82d28b0fdaca4a
2017-12-15 16:50:12 +00:00
Rashed Abdel-Tawab
61f5e144d5 lineage: Add TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY variable handling
Change-Id: I6f1cbcd883e91c8c3724dbe53732c7e777e21657
2017-12-05 15:32:55 -08:00
conbold
575c63567e extract_utils: Use temporary folder for system dump
* This way it's automatically deleted at the end of the extraction

Change-Id: I77b3357875b8070d370f04c5a245f9aa3ca1939c
2017-12-03 22:44:11 +00:00
Adrian DC
df29022a38 repopick: Support overriding the default commits count to check
* Support passing -c 20 to consider 20 changes instead of 10

Change-Id: I2b36228fb0020501896c800b13713aef284a5772
2017-11-28 09:41:19 +00:00
Paul Keith
d402d120d4 extract-files: Bring back old behavior for SRC
* Previously, you could just specify a SRC directly
  after './extract-files', and it would work, but
  now, the arg '-p/--path' is required for the same
  behavior to be applied for the extraction
* Add a catch-all case that just sets SRC if the arg
  doesn't match any of the args that we care about
* Make the ordering of the cases alphabetical

Change-Id: Ia2ad42d444904ead6b3bd6d910af363eb7f015cc
2017-11-24 15:38:07 +00:00
Tom Marshall
f15c371403 lineage: build: kernel: Rework kernel module logic
The existing kernel module logic does not detect failed kernel module
builds.  This is because the module build logic is a long shell chain
that invokes make macros which are not intended to be used in this way.
The essense of the issue is that we get a shell chain that looks like:

	cmd && cmd && var=value; cmd && var=value; cmd;

The shell breaks this into three separate commands.  The first builds
the modules.  The other two are the macro invocations.  So the result
of the command is the result of the last macro invocation, which will
always succeed even if the modules fail to build.

The issue is made worse by the existing build rule conflating the built
kernel modules and the installed kernel modules.

Fix this by reducing the built kernel module command to a single shell
command and creating a separate target INSTALLED_KERNEL_MODULES.  Any
kernel module build failure will show up properly.  The commands for
INSTALLED_KERNEL_MODULES do not invoke any macros and should avoid the
issue described above.

Finally, this also removes the fake target no-external-modules and
unifies the install logic for in-tree and out-of-tree modules.

Change-Id: I3d13056e217e1e937c8c3a345032682ffc394bca
2017-11-15 23:57:39 +00:00
Paul Keith
b11d5736b0 build: Make eat use the latest zip in $OUT
* Fixes weird issues with timestamp differences

Change-Id: Ibeb0c5043b646faab6ce372290acf7efb4f22e15
2017-11-15 17:39:12 +00:00
Sam Mortimer
477d8fee68 vendor/lineage: Rebrand cleanup
*) Rebrand remaining text references

Change-Id: I70ffb30519d40237c8266e208449a5e27140d2b3
2017-11-14 05:32:14 +00:00
Gabriele M
e6df25b3d9 extract_utils: Fix pinning when not cleaning vendor dir
Skip the extraction of pinned files if the ones currently available
have the expected sha1. If we don't, we will overwrite pinned files
with potentially incorrect files when the current vendor files are
not moved to a temporary directory (i.e. when not cleaning vendor).

Change-Id: I640d6bf2ed98eb366a4df17f0ebeaec81cb5274b
2017-11-13 12:27:13 +00:00
Rashed Abdel-Tawab
fd8b8290b6
envsetup: Create remotes with build if repo is build/make
Google moved the repo on O and its causing chaos with
aospremote and cafremote

Change-Id: Ie8b02d21c981cabfc95e7c2545194e79734c4de6
2017-10-24 22:01:00 -04:00
Dan Pasanen
edc1cebc2f kernel: clean up this madness
* WARNING: this intentionally breaks the build on devices who
  are not setting BOARD_KERNEL_IMAGE_NAME and are still setting
  TARGET_USES_UNCOMPRESSED_KERNEL or TARGET_KERNEL_APPEND_DTB

* The logic here is insanity and if all of this can be done
  by simply setting BOARD_KERNEL_IMAGE_NAME, why have all this
  extra cruft?

* Use cases:
  - Set a kernel image name without "-dtb" on the end, you get a kernel.
    Nothing more.
  - Set a kernel image name with "-dtb" on the end, you get an kernel
    with an appended dt.
  - Set a kernel image name without "-dtb" on the end, and set
    BOARD_KERNEL_SEPARATED_DT. You get a kernel and a separated dt.img.
  - Set a kernel image name with "-dtb" on the end, and set
    BOARD_KERNEL_SEPARATED_DT. You're crazy.

Change-Id: I5c3fc6eb727255684278ff562c0ee3faa7124b6b
2017-10-17 16:19:19 +00:00
Gabriele M
6c3c2c0bca extract_utils: Allow to interrupt the extraction
We want to cleanup our temporary files independently on the signal,
so just execute a trap on 0. This will ensure temporary files are
always removed and doesn't require any extra care when trapping
signals such as SIGINT that require an explicit exit call.

Change-Id: Ieff4f15c44a9ac9d5a543d14c140ebd72c0e7344
2017-10-14 22:55:22 +01:00
Sam Mortimer
19ce2d3ad2 vendor/lineage: sdk rebrand: step 2: update file contents
Change-Id: Ib61b9b559c4b0e536979e5cb25fba50aa56c138d
2017-10-12 22:33:59 +00:00
Sam Mortimer
f13a6df311 vendor/lineage: sdk rebrand: step 1: update paths
Change-Id: If51b9122d7d7d0ee25fd77278a808442d461b8a0
2017-10-12 22:33:45 +00:00
Rashed Abdel-Tawab
00c0766852
extract_files: Mark vendor etc files as proprietary
Change-Id: Iad8d87a18e5b1dc68c7f2265c0e35a9313804408
2017-10-08 17:34:12 -04:00
Christian Oder
c16f327f51
extract_utils: cover vendor/frameworks
Change-Id: If60b9b6c47cfd9c32477f92ad87011eddb41753b
2017-10-08 23:17:18 +02:00
Rashed Abdel-Tawab
0ca7643957 extract_files: Add support for treble compatible makefiles
To be honest, this name is a little misleading, this is how it should
have been done in the first place. This allows devices to copy vendor
files to the proper location depending on TARGET_COPY_OUT_VENDOR rather
than hardcoding system/vendor. This allows devices with dedicated vendor
partitions to copy directly to vendor. The only reason it's optional
is that some nexi set TARGET_COPY_OUT_VENDOR to system which would cause
some weird breakage.

Change-Id: Ic46bc1086737835340abef9f61693d386bc6a5dc
2017-10-07 21:24:15 +00:00
Rashed Abdel-Tawab
11186d6c83 extract_files: Adjust deodex path and tmpdir
* Make a tempdir using the mktemp command rather than just making a
  dir in /tmp to accomodate for systems that don't set proper perms
  or dont have /tmp
* Fix the deodex procedure to pull files from the right path

Change-Id: I181863599b6670e3a149069dbb7b13ebf73bae8e
2017-10-07 21:24:15 +00:00
M1cha
15f226c23a
extract_utils: implement LOCAL_MODULE_RELATIVE_PATH
Change-Id: Ia97633652ff9647a6e82013b208097be5c5575a9
2017-09-20 22:12:36 -04:00
Rashed Abdel-Tawab
54b5d5e1e5
extract_utils: Add VDEX deodex capabilities for oreo
Oreo introduces new optimized dex files (or vdex). While smali/baksmali
have supported vdex since 2.2.1, you actually have to have the .vdex in
the same location as the .oat or else the smali will fail due to not
finding the .vdex. Copy it (if it exists) and echo a warning since vdex
deodexing is still experimental.

Change-Id: Ic612751be45a8b6e54b8794b426a4d5adbbf13d2
2017-09-20 22:12:36 -04:00
Adrian DC
cf7f7d48d0 soong_config: Add TARGET_NEEDS_PLATFORM_TEXT_RELOCATIONS
* Soong product variable 'needs_text_relocations'

Change-Id: Ia22c94922f37c49f0d66a67747efa0ee97b4e477
Signed-off-by: Adrian DC <radian.dc@gmail.com>
2017-09-13 00:28:09 +02:00
Simon Shields
7ef0e17066 build: soong: put lineage variables in the "Lineage" struct
Change-Id: I9ed55cea0c55f0078f8f97ad4037b16ed11c0156
2017-09-12 22:25:15 +00:00
Michael Bestas
ad3a57032a lineage/aosp/cafremote: Make variables local
* Certain order of running these commands on different repos can
  end up producing broken remotes, because the variables are
  exported globally (looking at you PFX)

Change-Id: I0b679f04264d964ed9a0f0d1adfdbaeac9403ec8
2017-08-27 12:39:42 +00:00
Michael Bestas
af3532bef5 envsetup: Fix lineageremote for AOSP projects
* lineageremote was not working properly for pure AOSP projects
  because there is no github remote.
* Read and convert AOSP remote name if there is no github remote

Change-Id: I629f0a8ae3be09d539e18d63a9738c32fb24496c
2017-08-27 12:39:15 +00:00
Adrian DC
154df245a5 build: Remove breaking global flags
Change-Id: I9bbc75ce4701dc70c17b1d80c40e8b98e961dd2a
2017-08-25 07:57:31 -05:00
André Pinela
f3a4230e9f tasks: enhancement to create LineageOS ota package
- modify for LineageOS
- add bacon target
- don't touch aosp otapackage target

Change-Id: Id243c3099b4914ed3b53efc42c0c7dac9d56dea8
Signed-off-by: André Pinela <sheffzor@gmail.com>
2017-08-25 07:57:31 -05:00
Simon Shields
4ed4605ed8 lineage: add soong bits for boardflags
Change-Id: If01db1eb6b1432a6c4d26d5c9701895ab4dc3ff5
2017-08-25 07:53:37 -05:00
Luca Stefani
52b7080796 vendor: Add project pathmap defs
Change-Id: I5357eadcf6efe6ddbd6686ed69db0d59114e0a5d
2017-08-25 07:53:02 -05:00
Luca Stefani
076c27b91a
vendor: build: Add mk_timer
Change-Id: Ib7ce1e7c662fe0555d296e125241c222f89f671d
2017-08-23 17:33:26 +03:00
Luca Stefani
085af72a05
vendor: build: Kill schedtool
Change-Id: Idd6cc6679b1e84f365a5a18645590c549af20af5
2017-08-23 17:33:25 +03:00
Luca Stefani
74df07039a
envsetup: Update mka for O
Change-Id: I36ec10be9152f135ec3645b4304e63ea30d06774
2017-08-23 17:33:25 +03:00
Luca Stefani
eae93144d2
envsetup: Kill mms
* soong/ninja is blazing fast rendering this command useless

Change-Id: I2241d7309f41c0d11b6c32b9a2c1193f6e0a2ab2
2017-08-23 17:33:25 +03:00
Luca Stefani
5c60e4fd24
lineage: Complete the rebrand
* TODO: Rebrand cmsdk when it's in a working state

Change-Id: I0d8d573f9e0032110ae3a0f54ebe11a877b83137
2017-08-23 17:33:22 +03:00
Dan Pasanen
91f7620c4d
vendor: change vendor to lineage
Change-Id: I2df13091f5d62b552ef434aef1a389f4fe1249e0
2017-08-23 03:26:28 +03:00
Ashwin Ramesh
b0ea62a5df envsetup: Fix installboot on ZSH
* ZSH errors out when it doesn't find anything in $OUT/system/lib/modules/.
* So add a check to avoid error while using installboot() with a target
  that doesn't have modules enabled.

Change-Id: Ibe66f6962943e9b90c7059a4c9b4ded558318326
2017-08-21 16:46:34 +00:00
Luca Stefani
d6e2fbcf8e tasks: kernel: Kill unexisting wiki reference
Change-Id: Ib43012206ba7028072d39495bda32d82dd72bdc6
2017-08-17 18:54:35 +00:00
dianlujitao
3bc9c18e11 build: qcom_target: Add sdm660
Change-Id: I90a44e040280bd43c40b06e14f658a5cf7e30297
2017-08-17 16:55:48 +00:00
Bruno Martins
0753ae0d68 templates: Default to sanitize vendor folder during extraction
* This was always the default behaviour and doesn't require
   any additional argument in order to make use of pinning feature
   (pinned blobs are only considered when vendor folder is removed)

Change-Id: I34ff7678bd6800a2c593e9fe128cc151c59967da
2017-08-16 23:00:21 +01:00
Harry Youd
9c5d129d90 Fix extract_utils when not using blob sections
"$3" evaluates as "" when $3 is empty, and so $# is still 3
When $3 is empty, do not use it

Change-Id: I87df7dd8ed23cac3d4cff16dce0996bbe0a3e6cc
2017-08-05 08:21:38 +00:00
Rashed Abdel-Tawab
deed26fd06
qcom: Allow setting custom audio, display, and media HALs
Currently, using project-set-path is blocking us from overriding the pathmap
for the audio, display, and media HALs, so set them with set-device-specific-path
to allow overriding the HALs with USE_DEVICE_SPECIFIC_* and DEVICE_SPECIFIC_*_PATH

Change-Id: Iee3723cf251d0f485a77a17fd61cb62178833582
2017-08-01 02:23:17 -04:00
Rashed Abdel-Tawab
58ce825b6e
templates: Update to show usage for new extract_files features
* Allows extracting only a specific section from proprietary-files.txt
* Defaults to not cleaning vendor folder before extraction
* Adds script options rather than depending on apredefined order

Change-Id: I74cd3bf4a1f652232c97c78d6164f0730599c1a7
2017-07-30 14:09:29 -04:00
Rashed Abdel-Tawab
8b87b09ef7
extract_files: Add support for paths without system/
Sometime blob directories are contained in dirs not named system
(ex. extracting blobs from another vendor dir) so check if the file
exists without system/ before appending "system/" to filenames.

Change-Id: I4ba946e178260b4f4804b1ac4422645e3085c665
2017-07-30 12:48:18 -04:00
Rashed Abdel-Tawab
855fbdd4bc
extract_files: Add support for specifying blob sections
Sometimes the need arises to update one specific subset of blobs
while holding others steady. Introduce a way to specify the "section"
of blobs to update (obviously requires the proprietary-files to be
properly split up first)

Requires additional changes in device tree extract_files.sh to support
passing the additional arguments

Change-Id: I98feab56f8bfade2818b1b5264e019440d4c57c5
2017-07-30 12:48:18 -04:00
Rashed Abdel-Tawab
675d9595e4
build: Update smali and baksmali to 2.2.1
Change-Id: I5a8d195ef3b67c5ccee4e34f4ec294a880c7a083
2017-07-30 12:27:53 -04:00
Gabriele M
b6effb3ebb extract_utils: Fix cleanup variables assigment
The current assignment is wrong, we cleanup the files when we tell
not to do so.

Change-Id: I73a9a17f5ebae6f2dbdc3d6d9aaa28cd75fb4f87
2017-07-29 16:46:53 +00:00
Michael Bestas
32378953b7 templates: Remove empty cat << EOF
Change-Id: I68388202f42b7522f3fd3965d4ce518c142e7ce3
2017-07-28 16:24:40 +00:00
Harry Youd
1c9c5a314d repopick: Add 'reset' option
In case of conflict, reset to initial state by aborting the cherry-pick,
leaving the working directory clean

Change-Id: I2353b92254b67ea49835bc88b6fc9bc3910b5107
2017-07-19 10:15:32 +00:00
Michael Bestas
296008cc79
kernel: Add savedefconfig target
* Add a build target to simply regenerate the kernel
  minimal defconfig and copy it to the kernel source

Change-Id: I04be945eb6dae3042c236785328c7c9995d42e49
2017-07-12 20:56:35 +03:00
Luca Stefani
c835d38e3e qcom: Enable TARGET_USES_QCOM_MM_AUDIO
Change-Id: Iff693650db4b9423bc4bb16c12f592c2a74248af
2017-07-11 19:42:50 +00:00
Dan Pasanen
63f767edd9 repopick: don't bail on drafts
* When using an ssh gerrit instance (-g) it is perfectly
  reasonable to pick a draft commit. Don't require force
  picking (-f) in order to do so.

Change-Id: I420f566ee1bb1f0b0d2a2ef29d95e0545db70b89
2017-07-09 09:41:34 -05:00
Michael Bestas
736c6fe6ad qcom_utils: Cleanup supported QCOM_BOARD_PLATFORMS
* Organize per family
* Remove unsupported mpq8092 and msm_bronze
* Add msm8998

Change-Id: I662a8e403045affa2a9b40511414ac6e8057f967
2017-06-29 20:31:22 +00:00
Michael Bestas
e65a25087f build: qcom_target: Define MASTER_SIDE_CP_TARGET_LIST
Currently, in the display HAL, we're replacing the usage
of this variable with a check for TARGET_BOARD_PLATFORM.

Instead of having to do that every time a new branch is made,
define the variable in qcom_target.

Change-Id: Iddcc38c70adc52267e70c985b7a0ad3d8c4c8929
2017-06-29 20:31:22 +00:00
Michael Bestas
e5969e2d1c
roomservice: Search for repos in lineage snippet too
Change-Id: Id544d4bce731b14dbc7656382163d4657c347b83
2017-06-17 20:01:23 +03:00
Michael Bestas
21b9d391e7
roomservice: Remove support for devices in main manifest
* We are using roomservice for all devices since a long time

Change-Id: Ice5c37de154ca3fb4cf69a8401e5bbe3c9e56e2a
2017-06-17 19:58:55 +03:00
Dobroslaw Kijowski
65f03f1408 extract_utils: fix extracting XML files containing binary characters
When a line from the XML file contains a character which grep classifies
as a binary one, it will omit this line at all. Moreover it will append
'Binary file matches' to the stdout. This behavior breaks some XML files.
To fix this issue, let's tell grep to process a binary file as if it were
text.

Change-Id: I6ec5689f73a0926870e502f3f8ee77346b47d05f
2017-05-18 12:37:08 +02:00
Michael Bestas
d67ef7821d
addonsu: Add Lineage version to zip name
* Avoid confusion

Change-Id: I823d77e037b0d0dc2a4b9f0466d594213c72e179
2017-04-28 23:55:39 +03:00
Gabriele M
5b33c6c1d5 Add target to make a flashable su addon
Run 'make addonsu' to make a flashable zip to install the addon and
'make addonsu-remove' for a flashable zip that removes it.

Change-Id: I5b2fe67f98f2474b923c074dc6025b47c6db2ae0
2017-04-20 04:06:38 +00:00
Christopher N. Hesse
1e7c3f00c6 kernel: Fix broken C_INCLUDE_PATH for Darwin
Commit 7fb9251dfc modified
the expansion in an illegal way.

Fix the broken env variable.

Change-Id: Ib3029fa995d6a4b0416887a2ef2e4792c9e6bb27
(cherry picked from commit 90b437e784c19fc428c24891cc96705b89b786df)
2017-04-11 23:08:32 +00:00
Rashed Abdel-Tawab
7fb9251dfc kernel: Include openssl headers and dylibs on darwin
The easiest and best way to get openssl on darwin is using homebrew,
however homebrew refuses to link openssl (and for good reason) in
order to prevent conflicts with Apple's homegrown version. Include
the openssl headers and dylibs from the dir that homebrew installs
openssl to let 4.4 kernels compile.

Change-Id: I06b66768fbdd4855fd57b88100d646ed6e311a59
2017-04-09 00:44:05 -05:00
Rashed Abdel-Tawab
c59cbe0c90 build: Update smali and baksmali to 2.2.0
Change-Id: I4ee68b1152d41a80138e1df92f2f8316e471d658
2017-04-09 00:43:57 -05:00
Michael Gernoth
29f3b5775b roomservice: handle devices with underscores
This change correctly handles devices with underscores in their
name even if there is a device with the same name after the last
underscore (spyder, umts_spyder) by not allowing any underscores
in the manufacturers name.

Without this change, spyder gets resolved to:
device/motorola_umts/spyder
device/motorola/spyder

Only the last one is valid.

With this change, both spyder and umts_spyder get resolved correctly.

Change-Id: I0c95ff126d827a2d6b58875dfcb9327e999f4913
2017-04-03 07:25:01 -05:00
Dan Pasanen
7dc287f4b9 extract_utils: support extracting directly from an ota zip
* Specify the ota zip name as the only parameter to extract-files.sh
  * Will extract to $CM_ROOT/system_dump
  * Bail out on A/B OTA zips. We cannot support these.
  * Handles block based OTA zips by using sdat2img.py
  * Store the zip's MD5 and check if its already extracted. If so, don't
    bother extracting again

Change-Id: I03038e38dac51e6cb60d493c7e6362754d1daf02
2017-03-27 08:46:48 -05:00
LuK1337
ad5d9a0ff0 cm: build: Don't convert patchset to int if it's None
* donuts *

Change-Id: I65bfb1741481b01874f21d83b5a43b0902b7d8ea
2017-03-24 23:25:44 +01:00
LuK1337
2756418873 cm: build: Fix cherry picking specific patchsets
Change-Id: I396a1218f141a1ff4cb45252cc01a1487c2afd31
2017-03-24 21:49:55 +00:00
Dan Pasanen
d4ee2f6d04 repopick: encode commit subjects in utf-8 for printing
* Fixes errors like UnicodeEncodeError: 'ascii' codec can't encode
  character u'\xb0' in position 51: ordinal not in range(128) with weird
  characters in a commit message

Change-Id: I700198481630b4b29fd6d5d1f0c79bb94e59ad86
2017-03-16 20:30:41 +00:00
Christopher R. Palmer
070fcfc612 vendor: Add templates for proprietary extraction scripts
Change-Id: I1be5d0f4cd103cf159de4f6323e2994f0df28b37
2017-03-11 11:11:15 +00:00
Paul Keith
85cf0bb8c6 extract_utils: Fix locale issue with sort
* On some machines, LC_ALL=C is set, causing the sort
  order of makefiles to be different than those without
  this locale change that is set
* Set LC_ALL=C on all machines for consistent ordering
* From 'man sort':
  The locale specified by the environment affects sort order.
  Set LC_ALL=C to get the traditional sort order that uses native byte values.
* Thanks to haggertk and rashed for verifying this for me

Change-Id: I5bbb94b0dfe599a67036de4312e8af913e9b8d30
Signed-off-by: Paul Keith <javelinanddart@aidenswann.com>
2017-03-08 15:03:51 -06:00
Rashed Abdel-Tawab
cf65ecf8e6
qcom: Automatically set TARGET_USES_COLOR_METADATA for msm8996/8
Change-Id: I47d71f6f9f5f5c656b89b0ae9f4ec6ec2ff30915
2017-03-07 19:51:36 -05:00
Zhao Wei Liew
311fd6f991 cm: build: tasks: Remove BUILD_TINY_ANDROID check
This flag has been obsolete for a while now.

Change-Id: Ib78a1b141ddd757d2546b2eff2158e6e0cc0d673
2017-03-05 19:22:52 +08:00
Christopher R. Palmer
052d9d9384 extract-utils: Fix handling of pulling src:dest pairs from dumps
Currently, the priority of the src and dest is inverted between
pulling from adb and pulling from a system dump.

Assume that we have a camera wrapper and write the proprietary-files.txt

lib/hw/camera.msm8996.so:lib/hw/camera.vendor.msm8996.so

If we pull from a phone running Lineage that has both files, we get

camera.vendor.msm8996.so

as the pulled blob.  If we take the exact same build and pull it
from the system dump (aka, your own $OUT directory that built the
installed software) you get

camera.msm8996.so

pull instead!

Make both paths follow the same logic so that you get the same
file independent of the source.

Change-Id: I479e0ae765339cc38fa05fcaad7943c528129463
2017-03-04 05:16:28 -05:00
Tom Powell
aefc461a94 Use releasekey instead of platform for extra recovery keys
Change-Id: I4beb623477b91d1ce193769e37e6fd802148ef07
2017-02-24 01:25:38 +00:00
frk
f85ec8a22e build: Pass path into grep instead of using cat
grep should be given the filename directly instead of using cat
to pass the file contents.

Change-Id: Ic5275ac0f057f3d134fe57f43672a73fa7e3d7de
Signed-off-by: frk <frk@haze-productions.com>
2017-02-23 18:49:38 +00:00
Dan Pasanen
efe4823542 tasks: dt: add flag to optionally compress dt with lz4
* Gotta save that space somehow. This is in the continuing
  effort to remove custom mkbootimg.mk files in device trees

Change-Id: Ie8b3cedf6e37d1d11c2383dd3590f9908ad7818c
2017-02-09 18:59:12 +00:00
Rashed Abdel-Tawab
0180664282 envsetup: Use GNU sed commands if GNU sed is detected
The current check only checks for Linux, but many of us
use GNU sed on darwin as well, which means the non-Linux
command will fail, so read the sed version and use the GNU
command if GNU is found in the version string.

Change-Id: I7eefd0309751b069eef5e5e2b907d3d4f38f1638
2017-01-27 14:58:14 +00:00
Rashed Abdel-Tawab
b48c27f04f
build: Append -dtb to kernel image name if TARGET_KERNEL_APPEND_DTB is set
Currently devices that have TARGET_KERNEL_APPEND_DTB set also have to set
BOARD_KERNEL_IMAGE_NAME to Image.gz-dtb (or zImage-dtb on arm32) in order
to properly build the image with an appended DT. Automatially append -dtb
if TARGET_KERNEL_APPEND_DTB is set so BOARD_KERNEL_IMAGE_NAME does not need
to be set.

Change-Id: I5464c67092a7b9f86669902e5c0e4a47836f7cbd
2017-01-19 15:57:13 -05:00
Adrian DC
3c6bdac74b extract_utils: Detect output existence before moving it for backup
* Avoids:
    Cleaning output directory (./../../../vendor/.../.../proprietary)..
    mv: cannot stat './../../../vendor/.../.../proprietary/*':
    No such file or directory

Change-Id: I3258e64f3997f139d8db4fb4e07d14964a469c78
2017-01-18 23:20:47 +00:00
Zhao Wei Liew
e407ec7035 cm: build: kernel: Remove obsolete checks
* BOARD_USES_UBOOT is unused.
 * Same goes for BOARD_USES_UNCOMPRESSED_BOOT. Furthermore,
   it is superseded by TARGET_USES_UNCOMPRESSED_KERNEL.

Change-Id: I9f0e2848fcd0cd212bccacf14df55ad03f821051
2017-01-14 19:48:07 +08:00
Ziyan
54648c2a3b build: kernel: build arm kernel modules with -fno-pic
With androidkernel (androideabi) toolchains, -fpic is enabled by default.
At least on my 3.4 arm kernel, this causes an issue with kernel modules:
"Unknown symbol _GLOBAL_OFFSET_TABLE_".

On traditional armeabi toolchains, -fpic is not enabled, resulting in working
kernel modules; let's follow that here.

Change-Id: I3058b5213b34bdde9bb9d744563c7d55cd42d2a5
2017-01-12 18:28:12 +00:00
David Marble
20c06fd75e http_prebuilt: Improve retrieval of artifacts from archive
The current version always redownloads the artifact.
Kali does not like the nested md5sum command and ignores it
leaving file checksum value blank so the test always fails.
A temporary variable is used to get around this limitation
of kali.

The echo "Downloading..." command has been modified to actually
print and has been moved so it only does so when downloading
the artifact.

Change-Id: I115860a87e55399a652d6548fe50f6204337f854
2017-01-12 00:50:44 -06:00
Brandon McAnsh
66792510a9 http_prebuilt: Implement archive of artifacts
* checksum will be downloaded and asserted to prevent a
    redownload every clean
* Archives will exist (invisibly) at vendor/cm/prebuilt/archive

Change-Id: I637e86cacd146d665044a119885900dc4660e22b
Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
2017-01-09 13:42:29 +00:00
Matt Mower
8945f5e8c7 extract_utils: Introduce variable INITIAL_COPYRIGHT_YEAR
Let a device specify INITIAL_COPYRIGHT_YEAR=XXXX in setup-makefiles.sh
so that the correct copyright(s) is/are included in vendor makefiles.
The CyanogenMod copyright is retained when INITIAL_COPYRIGHT_YEAR<2017
and the LineageOS copyright is now included for >=2017.

Change-Id: I6895b5b69bc7ba399042ac3c29e17f3209d15f1b
2017-01-09 01:26:44 +00:00
Dan Pasanen
c6b5c382a2 build: core: include platform helper macros in target makefiles
* These are now needed sooner than we had been importing them
  in android_build. This ensures they'll be imported before
  their macros are needed.

Change-Id: Id7e31f36393414f6d51a8bc80686ceaebfe7cb28
2017-01-08 07:47:39 +00:00
Zhao Wei Liew
fb4b8c54b5
build: envsetup: Update CAF remote
CAF recommends using https://source.codeaurora.org/quic/la now.

Change-Id: Ic8d6451111f0e71bce044ffaae79f0acfc34caa1
2017-01-08 05:14:08 +02:00
Zhao Wei Liew
a63bf9536b build: qcom_target: Define MSM_VIDC_TARGET_LIST
Currently, in the media HAL, we're replacing the usage
of this variable with a check for TARGET_BOARD_PLATFORM.

Instead of having to do that every time a new branch is made,
define the variable in qcom_target.

Change-Id: Idd85b6f0b167bbc64833eb03335abcaa7b9de4a9
2017-01-08 10:14:07 +08:00
Zhao Wei Liew
9838ea37f6 build: qcom_target: Clean up QCOM_HARDWARE_VARIANT checks
Change-Id: I97f812412f94a0638e78eaf7e45112b6924120a9
2017-01-08 10:11:14 +08:00
Ethan Chen
b69c2ff494 envsetup: Fix indentation of eat function
Change-Id: I14afa4c8f7c705cfa04ad07f56f7e7a13a8c9378
2017-01-08 01:58:14 +00:00
Tom Powell
e4c8c8296f build: include lineage releasekey in recovery
Change-Id: I3335af3b490ef1af5fdd786654f4e68bb3290b27
2017-01-06 22:29:06 -08:00
Tom Powell
343b594650 build: remove deprecated recovery keys
Change-Id: I7bb6548315520b387a06b5d66a85dcfbeb5c3f82
2017-01-06 22:26:29 -08:00
Luca Stefani
7021706d0d extract_utils: Update smali/backsmali to v2.2b4
Change-Id: I91a2c5569ac0e6cf99d742f2b207f8222f9c01f0
2017-01-06 10:24:41 +00:00
Gabriele M
4cf635a5ad extract_utils: Update backsmali command
-e no longer exists starting from v2.2b3, so update the
command. While at it, add the logic to deal with Android N
separated boot oat files.

Change-Id: Iab8e3946d6421824fea74e26dc43d2db38573022
2017-01-06 10:23:46 +00:00
Matt Mower
ed8c248ec0 envsetup: Fix check for deprecated CM device tree
By the time lunch is run on a product name, it's too late to check
whether a deprecated CM device tree is being used (roomservice runs in
lunch). Instead, rely on check_product() to identify whether a tree
uses cm_ or lineage_ before running lunch.

Change-Id: I16288365f791ff68c3226f3808427168b2fc06fa
2017-01-02 03:00:58 -06:00
Zhao Wei Liew
321dde5f70 cm: Rebrand CM_VERSION to LINEAGE_VERSION
Change-Id: I79433c4d2fa14784c5b41985ed91e3712aacafa4
2017-01-02 04:08:40 +00:00
Ricardo Cerqueira
0a656b6446 tools: getb64key - print the base64 version of a PEM public key file
Change-Id: Ia94ff560c88dfe85c3fa55db5c8219aa0d3419ee
2017-01-02 01:20:45 +00:00
Dan Pasanen
8d0369c962 vendor: Add a task for getting prebuilts via http
* Gello being our first pawn
 * Use curl instead of wget (more powerful)
 * Ensure the intermediates directory exists prior to download

Change-Id: If19c18638a14a8b9ab55470ae6ee5a2deda2e3ec
2017-01-01 00:44:10 +00:00
Simon Shields
63ce74b055 cm: support lineage device trees
Change-Id: Id7d7c5747639903d1289557dab38341d5c7cc287
2016-12-31 21:29:32 +00:00
Dan Pasanen
0344771b53 vendor: we are now LineageOS
* Change necessary bits to support our project move

Change-Id: I085470d448a243cc9d60b4ce920dee52086f64cd
2016-12-28 19:44:28 +00:00
Dan Pasanen
0fdc085c2e build: repopick: point to LineageOS gerrit
Change-Id: Ibf58b111360c17cee919efd585f5ec48be1e2eec
2016-12-27 10:32:16 -06:00
Adrian DC
13b02ff101 repopick: Avoid failing on commits lookup
* Some projects with multiple merges and
    discountinuous histories could trigger
    an error here when the HEAD~{?} does
    not exist, hence avoid this by ignoring
    the commit and continue the search

Change-Id: Ice28c87d1bf8897da52236b637bbb0c5d349f848
2016-12-10 11:03:57 -08:00
Zhao Wei Liew
64fc5aeb49 cm: build: envsetup: Add mmmap command
It doesn't make sense to have:
1. mm and mmp
2. mma and mmap
3. mmm and mmmp
4. mmma BUT NO mmmap

Add the mmmap command for consistency.

Change-Id: I8cb1041113e6d56a0ac1d34898b07615da22b459
2016-12-10 16:48:27 +08:00
Adrian DC
01bdd55142 roomservice: Follow fetched android_device_ projects
* In a situation where the Android tree is already
    fetched and entirely set for a device tree,
    all additions to cm.dependencies in a common
    project were ignored due to being already fetched

 * Add a new array of projects to verify but not
    necessarily fetch, and fill it upon fetch request
    or if the project starts with "android_device_",
    to let the iterations follow the common trees

Change-Id: I9eea0ab9c46a4bed8366baa37a4e7e8696481504
Signed-off-by: Adrian DC <radian.dc@gmail.com>
2016-12-03 01:56:54 -08:00
Luca Stefani
c66825b158 build: kernel: Remove duplicated targets
We call them already in TARGET_KERNEL_BINARIES

Change-Id: I1a9cf89d59416fdb6c9c570d17fb490440d44159
2016-11-24 15:54:11 +01:00
Luca Stefani
84fda60f6b build: Set android jack args to global jack server args if existing
Change-Id: Iafd416aaac81642c7ec736712b45ecbe05b0d55e
2016-11-24 05:31:23 -08:00
Rashed Abdel-Tawab
5b38c4fb34 extract_utils: Use shasum on macOS
macOS doesn't have sha1sum but instead shasum, so use that
if 'uname -s' returns Darwin

Change-Id: I1ab8721327a561e8df78562bbc0b12e884cc4a93
2016-11-23 20:39:44 -08:00
Ethan Chen
2a5d907bbd qcom_target: Remove unused support for CAF manifests
* This code was introduced to support building from Qualcomm hardware
  manifests, placing the appropriate Qualcomm HALs at the AOSP
  hardware/qcom/$(HAL_TYPE) location. This isn't a supported use case
  anymore, so remove the dead code.

Change-Id: Id7d53b33f53289bc1ead8eb983d7e252940b0387
2016-11-13 13:46:38 -07:00
Ethan Chen
367802bcad qcom_target: Remove unused sony HAL support
Change-Id: I046d860127918858af98e9ab73bebc253502d08f
2016-11-13 12:46:05 -08:00
Ethan Chen
3681177eb4 qcom_target: Restore original AOSP hardware/qcom/media pathmap
Change-Id: I3d11f750e0c784da049c9618a44934f8a4c9d304
2016-11-13 11:04:02 -08:00
Zhao Wei Liew
9689bb9dba build: kernel: Set prefix based on KERNEL_ARCH
KERNEL_ARCH specifies the kernel architecture, not TARGET_ARCH.

Change-Id: I97407caa15cacf53489e8ebb31f5c059991a9493
2016-11-10 15:55:42 -08:00
Zhao Wei Liew
e7573daa4c build: qcom_target: Enable BOARD_USES_ADRENO
Newer QCOM HALs use this flag for libc2dcolorconvert,
examples being msm8937 and msm8996 media HALs.

Change-Id: I28e8a42b58b4f5f71126df7ad97c377724da5bab
2016-11-10 06:13:15 -07:00
Alexander Martinz
1bbf3e9346 envsetup: block SDCLANG on Darwin for now
Snapdragon LLVM is not supported on Darwin yet.
There might be the case where the directory structure is set up
by default and the build system will try to execute the linux binaries.

This will fail obviously:
  /bin/bash: /Volumes/Android/build/prebuilts/snapdragon-llvm/toolchains/llvm-Snapdragon_LLVM_for_Android_3.8/prebuilt/linux-x86_64/bin/clang: cannot execute binary file

Change-Id: I1f4d0bbda88b540b7ac3159f8e83de4501b9073b
Signed-off-by: Alexander Martinz <eviscerationls@gmail.com>
2016-11-06 21:28:57 -08:00
Sam Mortimer
b0cecb7335 Always create a kernel defconfig build artifact
It's just easier having it always built for you
(and it really takes no time).

Change-Id: If183cef50b1de0bf228e27bab77607df71350345
2016-11-05 08:25:45 -07:00
Steve Kondik
26e669badc cm: Autodetect SDCLANG in prebuilts/snapdragon-llvm
* Will be used by the build servers

Change-Id: I5d31a7c41adc283cb9336314e9d54412cc740e9e
2016-11-04 12:08:06 -07:00
Elektroschmock
082e0ec07b extract_utils: Add option to define the certificate for jars
Change-Id: I3fb4ff29b2ce898989f5599b47f47ee7fcfc5e92
2016-11-04 06:12:04 -07:00
Steve Kondik
36ae30b879 cm: mka nicer
Change-Id: Iec38c313c9eb88a74c7bf7a5cf424131b568ac0a
2016-10-26 17:37:40 -07:00
Marc K
97b035dd88 envsetup: dopush: fix finding files to be pushed with ninja
Change-Id: I27b4e62d08dcd2a6dc95519197c6284c8c44636d
Signed-off-by: Marc K <morckx@gmail.com>
2016-10-26 01:12:03 -07:00
Marc K
2be9cac81b envsetup: dopush: allow (symbolic) host names for adb connect
Change-Id: Icfab874abab64b0a3e5e63091cb6c25dd9630737
Signed-off-by: Marc K <morckx@gmail.com>
2016-10-26 01:11:49 -07:00
Marc K
299137f39d envsetup: dopush: fix test if device is in recovery
Change-Id: I1687b879e00918813886b2c9c54535376aa62d99
Signed-off-by: Marc K <morckx@gmail.com>
2016-10-26 01:07:17 -07:00
Michael Bestas
e724a1c496 envsetup: Fix cafremote/aospremote for projects with non-standard paths
* Fix -caf and -caf-<platform> projects
* Fix AOSP HALs that are synced in "/default" subfolder

Change-Id: I33cc344a3234de6698676c32035622acbec03dd1
2016-10-24 10:40:12 -07:00
Sam Mortimer
2e994ce952 Update to smali/baksmali v2.2b3
The cli changed slightly:
https://github.com/JesusFreke/smali/wiki/SmaliBaksmali2.2

And, for deodexing angler at least, baksmali needs access to boot*.oat
rather than just boot.oat so point at source rather than copy


Resurrected from http://review.cyanogenmod.org/#/c/164958/

With fixed adb $SRC deodexing

Change-Id: Id6ae0e9d7a5554687124e99fb03a808f3115bb95
2016-10-13 04:13:32 -07:00
HashBang
d303031019 extract_utils: Do not change app SRC if there are arguments
Do not prepend app or priv-app to the src when a path is explicitly
given as an argument. This fixes the SRC path in such conditions.

Change-Id: I43370f17fe224df323fcfa9b0d5eae4ee2996524
2016-10-06 18:01:56 -07:00
Rashed Abdel-Tawab
d53bff1f45
extract_utils: Add ability to set custom device guard
In some cases we may not want to check against TARGET_DEVICE so allow
setting a custom variable to check against

Change-Id: Ia2fb338f453137a95a59c6940b0cc16b261505bf
2016-10-04 16:02:09 -04:00
Rashed Abdel-Tawab
5f173157c4
extract_utils: Add ability to set custom vendor.mk name
In some circumstances we might want to set a custom vendor.mk
filename. If not set, then just default to the current device name

Change-Id: Icb59ebee67ce17b41ac613020685773efb01103d
2016-10-04 16:02:09 -04:00
Michael Bestas
1d55ece94a
kernel: Default to androidkernel toochains
* androidkernel is a set of toolchain symlinks for kernel builds that
point to the regular toolchain binaries, except with ld pointing to bfd
instead of gold.

Change-Id: Id1e2d3b1c50db581bff13cfa00b5b35d5badb8ed
2016-09-28 20:16:25 +03:00
Simon Shields
2bdb18f3cd repopick: fix indentation derp
Change-Id: I0673779363b1963219a2765399f2e20c9cdd78a8
2016-09-26 17:52:03 +10:00
Steve Kondik
6a3782824f cm: Add missing bits from system-ccache commit
Change-Id: I5936a9a3f3ded09aa7d3ec4f1061cbccf324c759
2016-09-25 22:37:01 -07:00
Michael Bestas
3952f6cb0d Import CM build additions
Change-Id: Id1eb902129754e61dfcc2b5d95c3a75172ff0c5e
2016-09-25 22:32:37 -07:00
Steve Kondik
a3765ca9ef hax: Disable system-api generation
* Do we even need this? CMSDK doesn't annotate anything as SystemApi,
   and it fails on N.

Change-Id: I73e1021079e05ab56f96008446f12b086d8b41c6
2016-09-04 04:40:57 -07:00
Steve Kondik
79fa59b3be extract_utils: Add flag to disable pinning
* We might want to disable pinning entirely for an extract run.
 * Set DISABLE_PINNING=1 to turn it off and override everything.

Change-Id: I1be90dda68f0de1c5f5a70c946052d70bfaab7ed
2016-09-04 02:52:04 -07:00
Steve Kondik
7561d19795 extract_utils: Fix device online check
* No need to look for /sbin/recovery as adbd will report
   the device as being in recovery mode already. Also, this
   check appears to hang on N.

Change-Id: I3bcb427835ae3cd37c7ea56cbc57bba0d18fcc04
2016-09-02 20:43:02 -07:00
Hashbang173
3b3a0e1c8b extract_utils.sh: Disable dex preopt on prebuilt apks
Change-Id: I230f1a8bb95cbc1df36bc652b03e58829ec278f5
2016-08-28 20:50:03 -04:00
Luca Stefani
9b58af504a build: Kill colors
* Also exclude apickeck if cm sdk is disabled

Change-Id: I48fbb3b2c3130d2a5d49ca726883babea4e5a455
2016-08-26 23:49:44 -07:00
Adnan Begovic
a194731dd4 cm: "Released" means current.
Since mainline devices will always identify as a latest
  release api level (due to userbase volume), make sure
  we check against the current api vs api -1.

Change-Id: I9e9b41a1af5d3a93f58b2e0e0545b979d1cef978
2016-08-17 14:15:14 -07:00
Steve Kondik
48f8df8ddb extract-utils: Add pinning support
* In many cases, we would like to keep certain files which do not
   exactly match what might be extracted from a factory ROM. This
   becomes extremely annoying over time to manually reconstruct,
   and it's easy to miss these special cases when updating to a
   new vendor release. It's also useful to flag additions which
   aren't found in the upstream release at all.
 * To solve this, we can now "pin" files to a specific sha1 hash.
   Simply append the sha1sum of the file to the appropriate line
   in your bloblist, prepended by a | delimiter.
 * This works by backing up the current files first, running the
   extraction, then checking if any pinned files need to be
   restored.
 * Also add an exit trap to clean up all of our tempfiles

Change-Id: I2010b5175b5701e19a3efb112e8907062ca37d66
2016-08-14 14:10:53 -07:00
Louis Popi
a516c2f0ac cm: extract_utils: Add a firmware extraction method
Change-Id: If14f6932cbdccf45ca0cc91c403e951363e91260
2016-08-05 08:31:55 +01:00
Luca Stefani
3a03012242 cm: extract_utils: Fixup xml files
Change-Id: Icb8efcca0e6e37a3ea7432716fcbfbd631d96c19
2016-08-05 00:01:45 -07:00
Luca Stefani
7f9fff2317 cm: extract_utils: Implement oat2dex
* Shipping baksmali and smali (version 2.1.3) in vendor/cm
   (Official sources: https://github.com/JesusFreke/smali)

Change-Id: Iaca6337fa2d4b5f2d6654ef5142ec0313af63f5a
2016-08-05 00:00:52 -07:00
Steve Kondik
03ce400352 Revert "extract_utils: Don't write multilib tags on 32-bit only devices"
* Not gonna work without preparsing all the lists combined together.

This reverts commit b7b7f88443.

Change-Id: I63ceead414d7f8416e2c2c8e4b12098077b545e2
2016-07-29 04:24:05 -07:00
Bruno Martins
3b96ba5841 cm: extract_utils: Rewrite file existence checks
Change-Id: I7c1584ec7162e0e18fae471e6aceef6123a5d10b
2016-07-28 16:24:28 -07:00
Steve Kondik
b7b7f88443 extract_utils: Don't write multilib tags on 32-bit only devices
Change-Id: I41b6f71c45a566ba1b4dd5cb72c4ebf44388b363
2016-07-28 16:12:19 -07:00
Steve Kondik
a991cf1f9b extract_utils: Add support for files in rootfs
* A final "rootfs" tag in the last column will place
   the chosen file into the ramdisk
 * Currently only supports files in /sbin
 * Cleaned up usage of class-specific flags
 * Simplified code

Change-Id: Id823d70aab51f8767522f697eaf65f52fc64b94b
2016-07-28 16:12:19 -07:00
Steve Kondik
52f3680199 cm: Remove stray echo from extract_utils
Change-Id: I2d893a3f8472a86835feef24540e82c47b69fd67
2016-07-21 09:43:52 -07:00
Steve Kondik
60ef86de1a cm: Underp dumping of 64-bit only libraries
Change-Id: I9c2140b40747fc7f847f1a532c42fb7ae5bfc3fd
2016-07-20 20:08:54 -07:00
Steve Kondik
4e2aaabd13 cm: Add generic tools for extract-files / setup-makefiles scripts
* Instead of having to enumerate packages and do a bunch of tedious
   shit, we now have a way to do it automatically based only on
   the blob lists.
 * Devices still need to implement a short script, but this library
   handles all the core functions.
 * Yes, we should probably be doing this in Python- Bash is
   absolutely horrible at dealing with arrays and lists.

Change-Id: I73b30ff4531c4d1b33ac53db33abf62555f500b4
2016-07-18 10:10:44 -07:00
Luis Vidal
1117dae753 cmsdk-api-coverage: Don't prepend ANDROID_BUILD_TOP to file path
$@ already contains the full path of the output, so no need
to prepend ANDROID_BUILD_TOP to the path

Change-Id: Ieeeb9fa16352e80b878cddb89b1e7c04b82ab43c
2016-06-13 17:29:48 -07:00
Adnan Begovic
c385e3691b cm: Use cmsdk-api-coverage executable for coverage.
Change-Id: I8610f402d7c9a55213a520f317d7c94074c96df9
2016-06-13 14:51:01 -07:00
Adnan Begovic
3ab3d0e81c cm: Include CMSettingsProvider in test coverage report.
TICKET: CYNGNOS-3016
Change-Id: Ia02464614b02b98a535f963aae5a1b13281abaa7
2016-06-07 10:49:16 -07:00
Adnan Begovic
64cb3b6fe3 cm: Change output html name for cmsdk test coverage.
Change-Id: Idbea6064b89051b5db99aaadeec71502b65724bf
2016-06-07 10:48:45 -07:00
Adnan Begovic
10e4f5a66f cm: Amend api text message.
Change-Id: Idfa73b8ec3f9375766e01d8fb7b69079d776b751
2016-04-15 10:43:09 -07:00
Adnan Begovic
07661487a9 cm: Support maven artifact as aar for publish.
Change-Id: Ie0b81e46823e15b1cadfd1426f6d6cbb6daf4e10
TICKET: CYNGNOS-2305
2016-04-12 14:53:45 -07:00
Adnan Begovic
de0b2d324f cm: Actually have checkapi-cm match against prior release.
Change-Id: I10b88f962d9410687640a40ce7f564e0bd04c2c6
TICKET: CYNGNOS-2303
2016-04-01 16:40:20 -07:00
Adnan Begovic
3bfd87e5ac cm: Add further verbose messaging for api breaking changes.
Change-Id: I2a53cbfb1aff682f0d39c7f600cc755aa9e4baa9
2016-03-30 11:25:00 -07:00
Adnan Begovic
6a04a23a52 cm: Always verify against current CMSDK version.
Since cmsdk prebuilts lives in a single master branch,
  previous branches that apicheck will fail since they'll
  verify against an api that exists in future releases.

Change-Id: I56594d075b89cb1a3d7a606cc9c1699dfffd94cb
TICKET: CYNGNOS-2220
2016-03-10 12:25:26 -08:00
Adnan Begovic
651dd50e59 cm: Create cmsdk coverage task.
Add ability to `make cmsdk-test-coverage`
  to generate an html page which denotes how
  much the testing package from vendor/cmsdk
  covers public interfaces.

Change-Id: I76556df1822934a6b7e86ebf2ff42e302acff46d
TICKET: CYNGNOS-2189
2016-03-04 15:24:11 -08:00
Adnan Begovic
97ac30ec9c cm: Set explicit dependencies on stubs for checkapi-cm.
Change-Id: I2c8b8425262a6812f1061326c55ffc7418967444
TICKET: CYNGNOS-1950
2016-02-10 15:22:17 -08:00
Adnan Begovic
f84ce1b738 cm: Fix checkapi makefile typo.
Change-Id: I96d1acba8e8f665dabf6d18dac5fc5c3132ad0f7
TICKET: CYNGNOS-1950
2016-02-09 11:38:40 -08:00
Adnan Begovic
e738087fdd cm: Provide verbosity for checkapi-cm.
Also a helper text for how to unbreak yourself.

TICKET: CYNGNOS-1950
Change-Id: I8311e19905b507c3a65eba37a6b4ea6606108e4f
2016-02-09 11:05:03 -08:00
herriojr
f0a6f1ec8b Fixed mmm For Maven APK
Maven APK (Why are these in maven anyways?) will crash due to it not
needing to generate a jack file.  This wasn't noticed before as brunch
succeeded, however, doing an mmm on one will cause this to fail. This
adds in logic to not generate a jack file for an apk in maven.

Change-Id: I44036bfd51ae3edd9437b153898b419ffc6ba2d6
2016-01-18 10:32:36 -08:00
herriojr
04864b10aa Fixed Maven Artifactory to work with jack
Prebuilts weren't generating their .jack file when doing an mm or mmm
but would work with a brunch or full make.  This makes it so mmm/mm
will properly generate it.

Change-Id: If5ccd1b557ef124b3c57fa09b172ec11caff886e
2016-01-15 16:58:02 -08:00
Adnan Begovic
d2bc6c2b69 cm: Fixup maven artifact publish inclusions.
TICKET: CYNGNOS-1529
Change-Id: Ie7307d43f0b38b179ae42b7c54a790bb7e4c5ea5
2016-01-05 20:12:23 -08:00
Adnan Begovic
4198cf685f cm: Modify maven artifact publish makefile.
Now allows you to specify a target module to be
  compiled prior to publish via LOCAL_MAVEN_TARGET_MODULE.

  This utilizes the definition for intermediates-dir-for on
  the target module after it sets an explicit dependency from
  remote to local module.

Change-Id: I65b5e07fdcc3368e350b1935ccca381b74dce59e
2016-01-05 17:36:46 -08:00
Adnan Begovic
39ba595215 cm: Publish system api as part of publish process.
Change-Id: Iba8b2fbc43dfd7592d7526b03ce6e1338ea095d0
2015-12-23 12:38:15 -08:00
Adnan Begovic
62869cd7d6 vendor/cm: Don't be so noisy.
Change-Id: I3aa12c87b4b3e7f3da4fc4971659b981f460872a
2015-08-13 12:34:16 -07:00
Adnan Begovic
f192636b82 vendor/cm: Always use gpg sign-and-deploy for deployments.
- Also support LOCAL_MAVEN_SOURCES and LOCAL_MAVEN_JAVADOC

Change-Id: Icfab8d23d8a9e9993eb74adf7349439bc4b6d1ed
2015-08-07 13:28:56 -07:00
Adnan Begovic
44716fb0ee vendor/cm: Provide means of uploading an artifact to maven.
Change-Id: Ide225d75807a917773520ae1b7772e8de9b1ab73
2015-08-06 20:43:49 -07:00
Chris Sarbora
bf1bcdbc44 Specify the maven-dependency-plugin version directly so as to force Maven 3.0.5 to use the correct version.
Change-Id: Ia8b943feeb13d8835e0510404d067a2760608aa6
2015-07-25 17:54:15 -07:00
Adnan Begovic
4397d1d238 vendor/cm: Introduce update-cm-prebuilts-latest-public-api.
Change-Id: I6a09d3b26573c81e74dc0338ef8899bebb1b5320
2015-07-18 15:12:53 -07:00
Adnan Begovic
5dd3371ed8 vendor/cm: Clean up paths to known files.
Change-Id: I867300c04aae1f429be5e2bd057e559a00bc12b5
2015-07-18 15:12:28 -07:00
Chris Sarbora
9bf517f89d Hack in support for the old version of Maven that Ubuntu apparently ships with
Change-Id: I39094627ff114901cc49f792ab601ab5b1677c19
2015-07-16 18:54:08 -07:00
Chris Sarbora
b1f4115b47 Prevent Maven target from grabbing transitive dependencies
Dependencies of Maven targets will have to be managed manually. The prebuilt
target that the Maven target is based off of wasn't designed to handle multiple
artifacts per project. Additionally, this target is mainly intended for grabbing
APKs or other standalone blobs, not for pulling in a full jar dependency tree.
If that is your use case, you may want to investigate simply converting your
project to Gradle (or the Maven build system, if you can stomach it).

Change-Id: Iaf48c95c704cfdc85e0074394ff3c7464937e60c
2015-07-08 08:27:29 -07:00
Adnan Begovic
51fd84224f vendor/cm: Represent as CyanogenMod API's
Change-Id: I4c0807df9f2412fef9d44464ab01d019116a7e85
2015-06-23 17:34:30 -07:00
Adnan Begovic
3314aacd79 vendor/cm: Remove search widget from developer docs.
Since github.io is a static page, and we lack an enpoint to search,
  the search widget is useless.

Change-Id: I7c5728abaac880359daa71aa1d7093e38061231c
2015-06-23 17:32:33 -07:00
Adnan Begovic
be48647b37 vendor/cm: Point to proper prebuilts/cmsdk directories.
Change-Id: I80ac94fd9b2d3a80d91a82d65a260d26b1436e60
2015-06-22 14:57:24 -07:00
Chris Sarbora
ea326686fb Support downloading from Maven
Change-Id: I94b8627a3bd15726cb4918b9a64b696f2a26e587
2015-06-19 20:52:45 +00:00
Adnan Begovic
ecc8b17853 cm: Point to the right files for checkapi-cm.
Change-Id: If67f1121add724e4b92e862fa3ec56002ba14382
2015-06-04 14:03:43 -07:00
Adnan Begovic
744a2571fd CM: Provide apicheck and cm-specific config inheritance.
Change-Id: Id5e488c5fb653bf2c330d2581d28a70971d56690
2015-06-04 18:08:07 +00:00
Adnan Begovic
8f7444802c CM: Make sure we're parsing api versions for cmsdk docs.
Change-Id: If6223fbc2f22378bb993a09f92d4a7e6972c022a
2015-05-29 17:51:32 +00:00
Adnan Begovic
e190d66b8a CM: Update droiddoc template for cmsdk
Resolve index page.

Change-Id: I5546f49f3d4b277686c2e07ed1ef0082b4a4b6ce
2015-05-21 15:16:03 -07:00
Adnan Begovic
88e99ec1e7 CM: Update styles for droiddoc.
Change-Id: Ia994ae1b17a0ee3cf0e997f7ef3501228310c29e
2015-05-19 17:27:11 -07:00
Adnan Begovic
7ebb507c02 CM: Provide droiddoc cmsdk template.
Change-Id: I3825b2a1dbd680d25c28bfad49c71b94119dcd8f
2015-05-19 16:12:17 -07:00
Adnan Begovic
b53c503fee Build CM Platform Library
Change-Id: If62e6b1d2ac41730ff2a8d562173abd2cb768f93

Add cmstatusbar service to system server services context

Change-Id: I77c5de75722cc5f36a5326e3da57ab661b89d189

Build Platform resource package.

Change-Id: Id60f66b6db23989db1472a19bcb079b0083f7393

vendor/cm: Lock cm platform library/cmsdk to non-release builds.

Change-Id: I01c1c3fe559d438e28339ce426d7ba7e42724002
2015-05-12 17:45:07 -07:00
Steve Kondik
ffe07b85eb cm: CM-specific build macros
* vendor/*/build/core/definitions.mk is automatically sourced by the
   build system to load custom macros. Start using this for some
   of our own.
 * Adds a "uniq" macro to remove duplicates from a list without changing
   it's order.

Change-Id: Id5f1eb4b9f81bb31ca0b3d5e74c298b3d105da10
2015-04-07 02:27:35 +00:00