Commit graph

130 commits

Author SHA1 Message Date
Nicolas Geoffray
c3ffeddc59 Add a new PRODUCT variable for forcing 'speed' preopt.
bug: 35872915
Test: build

(cherry picked from commit 4a0ad4ac61)

Change-Id: Idfea3c379a2b1dab30ee94a58ffe86d508f8522f
2017-06-15 12:40:15 +01:00
Julius D'souza
8756c0fedc Add the option to reserve headroom for partition
images. This is useful for device with low disk
space with different build variants.

This is a manual cherry-pick from aosp/master.

Bug: 37469715
Test: regular image builds successfully, errors occur
when the headroom size is greater than available
partition space.

Merged-In: I526cdd0f84981bbd16e3afcfe1cd7fc43dce98ef

Change-Id: I840d212bb46612074c43b39e94546901f60e4b4c
2017-05-19 14:27:28 -07:00
TreeHugger Robot
74e7a2dbeb Merge "Use product-based inclusive rule for enforcing RRO" into oc-dev 2017-04-04 02:27:01 +00:00
Jaekyun Seok
2a209997e8 Use product-based inclusive rule for enforcing RRO
Board-based rule can cause unexpected regression because build-time overlays
are different among products. So each product should be tested with its own
product-based rule considering its build-time overlays before applying
enforcing RRO.

Additionally RRO conversion is mandatory only for overlays of which target is
included in AOSP system image and is critical for CTS/VTS tests with AOSP
system image. So inclusive rule is more suitable instead of exclusive rule
to avoid unexpected regression due to unnecessary RRO conversion.

Note that we still support conversion for all the overlays by specifying
PRODUCT_ENFORCE_RRO_TARGETS as "*".

Test: building succeeded and tested with auto-generated RROs.
Bug: 36231603
Change-Id: I8e1d701d4f78b818c89ef3e7638110105370c5bc
2017-03-31 07:11:09 +09:00
Nicolas Geoffray
7d32b8bb4f Introduce a whitelist for core apps used by system server.
And by default 'speed' compile those apps at build time.

bug:33799337
Test: m -j32
Change-Id: I7be3bbfef59c020a34b9a82ef038bd27210bc9d7
(cherry picked from commit 9af483488a)
2017-03-30 11:47:13 +00:00
Alex Deymo
8fe63c3899 Add PRODUCT_IOT to the list of product vars.
This variable tells whether the product is an Android Things variant of
Android.

Bug: 32549448
Test: `make dist` on an iot product.
Change-Id: I0875951ae57867bc8bf47885e77e494d6284acdb
2017-03-02 22:08:41 -08:00
Mathieu Chartier
192b91c97f Add support for preopted app images
Enable iff WITH_DEXPREOPT_APP_IMAGE is true.

Test: Clean + build with the flag on and off. Tested Sailfish
booting.

Bug: 34927277

(cherry picked from commit e8ab2a71d7)

Change-Id: I63f98a85c69d99746b11bb6e85c23cf5e48910cf
2017-02-10 13:39:08 -08:00
Hiroshi Yamauchi
64594c4f53 Add ART_USE_READ_BARRIER to product variables.
Bug: 33492005
Test: top-level build for angler.
Change-Id: I12aa2e18487c16423223f110b6dfb0d6dff1e7e8
2016-12-19 16:25:00 -08:00
Dan Willemsen
db3bfcea66 Remove variables exported by Soong
These are all variables that we export from Soong, and are only used
after Soong's make_vars.mk is read.

Test: Compare build-aosp_flounder.ninja before/after -- only whitespace
Change-Id: Ibb6c6d7bc00ff5840a72c2bba5d97ac4b4724df3
2016-10-18 17:26:07 -07:00
Dan Willemsen
c1f17ffc7d Replace product variable stashing with .KATI_READONLY
Instead of using rot13 / rot26, use the Kati extension to mark these
variables as readonly.

Move $(strip) for a few variables to before they're marked readonly. Use
a different variable for modifications to BOARD_KERNEL_CMDLINE in
build/core/Makefile.

Test: build/tools/kati_all_products.mk on AOSP and internal master
Test: build-aosp_bullhead.ninja the same before / after
Change-Id: If98b24af763831a9c5c2de38037a69ab1bf9e023
2016-10-06 10:50:26 -07:00
Dan Willemsen
b011810c25 Optimize rebuilds by reducing $(shell) usage
$(shell) isn't particularly fast in Kati, and they have to be executed
both when reading the makefiles and determining whether the ninja file
needs to be regenerated.

Right now, the regen time is mostly hidden because we run them in
parallel. We've also configured it to ignore any commands that contain
"echo", "date", or the output directory. That happens to remove most
commands that contain side effects, so running them in parallel is fine.

But the side effects contain some important things, like the clean up
necessary when switching products. So I'm removing those filters, and
then we'll need to run the shell commands in sequence, since there will
be side-effects. That makes regen take longer though, so use pure-Make
implementations instead of $(shell) where possible.

This set of changes reduces aosp/master aosp_arm64-eng build $(shell)
usage and time by 2/3:

*kati*: func shell time: 3.135095 / 709
*kati*: func shell time: 1.067331 / 236

Bug: 30947985
Test: Manual test lines for math functions
Test: Compare build-aosp_arm64.ninja before/after
Change-Id: I4fc9d6318957992921972994f277c17918e7e1eb
2016-09-30 21:14:13 -07:00
Andreas Gampe
ae492fd5f2 resolve merge conflicts of 9d73af0 to stage-aosp-master
Change-Id: I984c48310e72cb509b859501cfb07258214038fa
2016-06-30 21:42:44 -07:00
Andreas Gampe
6b30d770f0 Build: Add module-level product configuration of sanitization
To allow special sanitizer settings for modules shared between
products, add product-specific module settings.

This was copied from the product-specific dexopt settings.

Bug: 29498013
Change-Id: I17a96b975bb6ac7f4ffb3d5b08e2f00b21bd97a1
(cherry picked from commit bb5454b6db)
2016-06-30 16:21:36 -07:00
Hung-ying Tyan
200da242a5 Merge \"Add VENDOR_PRODUCT_RESTRICT_VENDOR_FILES\"
am: 2acb2d5bcf

Change-Id: I3c151949bcc6b8d75f2c46619b6ce38561084338
2016-06-28 06:22:17 +00:00
Hung-ying Tyan
3c054d8e1f Add VENDOR_PRODUCT_RESTRICT_VENDOR_FILES
Allow exceptions specified by module (VENDOR_EXCEPTION_MODULES) and
path (VENDOR_EXCEPTION_PATHS, not including leading vendor/).

BUG=26968426

Change-Id: I068e43f3eae14f8793c33ae916d46979ab1681d1
2016-06-28 10:10:53 +08:00
Vikas Marwaha
98dce87fe1 resolve merge conflicts of 07886f1 to nyc-dev-plus-aosp
Change-Id: Iae0444b9e9e7b4db3bfd94f5712e22aa08a122b5
2016-06-09 05:46:40 +00:00
Vikas Marwaha
404ccc83c4 Add variable PRODUCT_SHIPPING_API_LEVEL and make files with the
new read only product property ro.product.first_api_level.

PRODUCT_SHIPPING_API_LEVEL declares which API level a device first
shipped with. We use this variable to set a read-only property that
can be used in CTS/GTS tests.

Change-Id: If54202075d3b92ed380655cde8b3fc50c5ba73b3
2016-06-03 23:02:27 +00:00
Gustav Sennton
81ee18670d Add variable PRODUCT_SHIPPING_API_LEVEL.
PRODUCT_SHIPPING_API_LEVEL declares which API level a device first
shipped with.

We use this variable to set a read-only property that can be used in
CTS/GTS tests.

Bug: 26381401
Change-Id: I9dfeaf423146c35f57e69ac26c27e8a9e205bc4f
2016-06-03 09:11:34 +00:00
Mohamad Ayyash
1868a601b7 Rename incr ext4 base_fs path vars. Add to product_var_list.
BUG: 27698960
Change-Id: I4624f782846ee54525d0ac29b866a04c0d67aa40
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-04-25 15:47:42 -07:00
Ying Wang
7dfdb843b2 Speed up lunch/tapas/etc. shell utility functions.
1. Combined ~10 calls to the make build system to only one.
   We added a phony target "dump-many-vars" to the build system to dump
   "<var>=<value>" pairs. We then store the pairs as shell variables.
   With this cache get_build_var/get_abs_build_var can just return
   the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.

In internal source tree lunch time was reduced from ~15s to ~1.5s.

Bug: 27429759

(cherry picked from commit 08800fd905)

Change-Id: I862a0ec3c1aae97c552054dacec133e857042edf
2016-03-04 14:02:03 -08:00
Ying Wang
08800fd905 Speed up lunch/tapas/etc. shell utility functions.
1. Combined ~10 calls to the make build system to only one.
   We added a phony target "dump-many-vars" to the build system to dump
   "<var>=<value>" pairs. We then store the pairs as shell variables.
   With this cache get_build_var/get_abs_build_var can just return
   the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.

In internal source tree lunch time was reduced from ~15s to ~1.5s.

Bug: 27429759
Change-Id: I24e88598f6fab598ef26518885fd5e86e71a772d
2016-03-04 11:01:57 -08:00
Gaurav Shah
af80a461d6 Merge "envsetup,product,ninja: enable symlink traversal"
am: f589c7b442

* commit 'f589c7b442feb02843bdf82305b599b686fc5204':
  envsetup,product,ninja: enable symlink traversal
2015-11-02 22:27:27 +00:00
Gaurav Shah
881ec090c4 Merge "build: Add support for defining products in /product"
am: acb8a7c1f8

* commit 'acb8a7c1f8cacaf136edba1a25d64467d352a432':
  build: Add support for defining products in /product
2015-11-02 22:27:08 +00:00
Will Drewry
c13f9c952d envsetup,product,ninja: enable symlink traversal
When searching device, product, or hardware, allow
find to follow symlinks.

Add KATI_EMULATE_FIND=false to allow disabling the find
emulator which changes findleaves.py behavior wrt
symlinks.

BUG=24605247
TEST=works with CL:783781 (without the find wrapper in that CL)

Change-Id: Ia9d0e4add391a56f34828a09a6cec3f435ccc548
2015-11-02 14:18:45 -08:00
Lee Campbell
455f6f458d build: Add support for defining products in /product
The build will now search for AndroidProducts.mk in /product

BUG: 22030305

Change-Id: I2d067d95d0c8dc1341a55167f9ac7f6926e04ce3
2015-11-02 14:17:47 -08:00
Ying Wang
3482ea54a2 Merge "Normalize the product makefile path in inherit-product."
am: aabff90bfe

* commit 'aabff90bfe2312a95d3cf57564845fef8dc469a2':
  Normalize the product makefile path in inherit-product.
2015-10-28 23:55:10 +00:00
Ying Wang
a174261042 Normalize the product makefile path in inherit-product.
Some vendor product makefiles call $(inherit-product) on the same
product makefile with different paths, by using "../" in relative paths.
However inherit-product requires unique path as ID for a product
makefile, for bookkeeping purpose.
Normalize the product makefile path in inherit-product, if the path
contains "../".

Change-Id: I1a864ce120c713d8e79ec179213b9fc9352aba53
2015-10-28 15:20:41 -07:00
Sami Tolvanen
58a748d37e am 87f58261: Merge "Error correction: Append codes to verified partitions"
* commit '87f582611a5a5c23abf3237abe0e467e46111567':
  Error correction: Append codes to verified partitions
2015-10-19 02:55:51 -07:00
Sami Tolvanen
f99b53143d Error correction: Append codes to verified partitions
Append error-correcting codes to verified partitions provided that
PRODUCT_SUPPORTS_VERITY_FEC is true.

This moves verity metadata to be after the hash tree, and requires
matching changes from
  Ide48f581bbba77aed6132f77b309db71630d81ed

Bug: 21893453
Change-Id: I6945cbab99e214566a1f9d3702333f2dbbc35816
2015-10-14 18:06:20 +01:00
Dan Willemsen
7c4b2cedd6 am 05bb4fed: am edc3e6cd: Merge "Sort more instances of wildcard and find"
* commit '05bb4fed0d0e701ba13fef5f20b57eb1642cc40a':
  Sort more instances of wildcard and find
2015-09-30 23:59:46 +00:00
Dan Willemsen
05bb4fed0d am edc3e6cd: Merge "Sort more instances of wildcard and find"
* commit 'edc3e6cd6a0d6af4df3d6f07f40de17980b66ad0':
  Sort more instances of wildcard and find
2015-09-30 23:44:10 +00:00
Dan Willemsen
7c3e3f8314 Sort more instances of wildcard and find
Many of these may not make a difference in the output images, but it's a
good idea to keep the make system as repeatable as possible.

Change-Id: I31804b8ad5805148ed08be7426a242a16f4d0df3
2015-09-30 22:25:49 +00:00
Tom Cherry
7958b8b6b6 am 2899727f: am bcbd4eb9: Merge "remove TARGET_PROVIDES_INIT_RC"
* commit '2899727fd7c97729df11c59a4ebf76df73379a28':
  remove TARGET_PROVIDES_INIT_RC
2015-08-24 23:35:25 +00:00
Tom Cherry
00c9b1b323 am 2899727f: am bcbd4eb9: Merge "remove TARGET_PROVIDES_INIT_RC"
* commit '2899727fd7c97729df11c59a4ebf76df73379a28':
  remove TARGET_PROVIDES_INIT_RC
2015-08-24 23:35:17 +00:00
Tom Cherry
2df35aea43 remove TARGET_PROVIDES_INIT_RC
Change-Id: I765b80d48333f54fb995e4ccfd77d38683c6cbb9
2015-08-24 13:55:02 -07:00
Furquan Shaikh
5620d94c5f am 449b8a06: am c4904316: am ffe86de5: Merge "vboot_signer: Add kernel subkey required for signing kernel keyblock" into mnc-dr-dev
* commit '449b8a0664db86e9a556c323e3f4720303abae95':
  vboot_signer: Add kernel subkey required for signing kernel keyblock
2015-08-10 12:53:56 +00:00
Furquan Shaikh
e8c212235f vboot_signer: Add kernel subkey required for signing kernel keyblock
Currently, the keyblock was being generated using
data_key.vbprivk. However, we need to use kernel_subkey.vbprivk for
kernel keyblock generation. This did not create any issues until now
because dev-mode just throws a message saying that keyblock is
invalid. But, normal-mode does not boot if keyblock is
invalid. Add extra parameter for passing in kernel subkey to
vboot_signer script.

TEST="make bootimage-nodeps" generates correctly signed
boot.img. Verified that the image boots fine in normal mode.

Change-Id: I0fc2183b466e34ddf1d98c9532072548504fcec4
Signed-off-by: Furquan Shaikh <furquan@google.com>
2015-08-07 12:01:20 -07:00
Dan Albert
8b36f7fcc7 am 2bb996f6: am 46cb2ee3: Merge "Force some clang Werrors that *will* break things."
* commit '2bb996f6a58dd4b9e682f9c59a7dad94412bdd86':
  Force some clang Werrors that *will* break things.
2015-06-13 02:25:20 +00:00
Dan Albert
d160041149 Force some clang Werrors that *will* break things.
Clang is really aggressive at optimizing a handful of cases (read:
clang will ruin your day some if you write bad code). Fortunately, it
also emits a warning when it's about to do this.

To prevent anyone from suffering from these optimizations, make these
warnings errors and make them impossible to disable.

Change-Id: I5e10bb0fc2ca23190017da716b3b84635577a0bd
2015-06-10 17:24:38 -07:00
Dmitriy Ivanov
594c0868d4 resolved conflicts for merge of 6cb3732d to master
Change-Id: I6415638ccde1e78f74ae5d9527dc696d40f15e5f
2015-04-20 14:08:43 -07:00
Dmitriy Ivanov
4eb120b999 Remove unsupported *_COMPRESS_MODULE_SYMBOLS
Change-Id: Ibb7da2997a0bb5b9f435213c9d3206bc4aad18db
2015-04-20 12:24:12 -07:00
Sami Tolvanen
8b3f08bc7b Separate boot and recovery image signing from dm-verity
Allow dm-verity to be enabled without boot and recovery images being
signed. This makes it possible to enable only dm-verity to detect
corruption without confusing bootloaders that do not understand signed
images.

Bug: 19985143
Change-Id: Ie52c6ff595faa7a5c1f1bc1b37f6899c4d0c7001
2015-04-08 12:30:16 +01:00
David Riley
17be3d3921 Add support to sign boot images with vboot.
Change-Id: I924468fe06f7d38d4fc49c2ae9dfee734fd58867
Signed-off-by: David Riley <davidriley@google.com>
(cherry picked from commit 14fb7236c1942a9f5050b3e608a0f5f4cd1cae1d)
2015-03-26 17:54:40 +00:00
Mohamad Ayyash
9b19382f0e resolved conflicts for merge of fc759204 to stage-aosp-master
Change-Id: Icf58e881286a66cb3ca4cb122fa8c11ec217fbab
2015-03-04 15:43:45 -08:00
Mohamad Ayyash
b97746ef09 Allow flashing a squashfs system image
Change-Id: Ic51d11274784a8d2e9d57d5f0b821ebc89680e5a
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-03-03 18:54:50 -08:00
Mohamad Ayyash
6894695819 Allow flashing a squashfs system image
Change-Id: Ic51d11274784a8d2e9d57d5f0b821ebc89680e5a
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-03-03 15:14:37 -08:00
Dan Albert
13baa31921 am 876f45e7: Merge "Make some warnings impossible to override."
* commit '876f45e73f938cdaa7cfc25c43822fc6b274f105':
  Make some warnings impossible to override.
2015-02-25 23:17:56 +00:00
Dan Albert
0c91fa84ff Make some warnings impossible to override.
These CFLAGS and CPPFLAGS will always be added last, and are
controlled by the build system. This way we can add warnings that
users are not allowed to disable.

Change-Id: Id71f69249078f62ca2687ecbf764aff0fd3a1c1b
2015-02-23 10:05:51 -08:00
Ying Wang
16ba2ed82b resolved conflicts for merge of 4c178ebc to lmp-mr1-dev-plus-aosp
Change-Id: If84527e9333b855d406dc7ac317868f4cfd3f1f2
2015-02-04 11:28:56 -08:00
Ying Wang
14cc23d433 Remove support of factory ramdisk/bundle.
Bug: 18779515
Change-Id: Ia6d51d43965447e2e95944a7d2b4b41adb121cb7
2015-02-04 11:00:01 -08:00