Commit graph

933 commits

Author SHA1 Message Date
Tao Bao
f8e6fbe2f5 Build delta_generator for A/B update.
delta_generator computes the OTA package (aka payload) for A/B update.
Also add its dependent libraries into otatools.zip.

Bug: 25715402
Change-Id: Iddf4b9ac188cc4c8bf3f89ce3641d68451632ba1
2016-01-04 09:57:32 -08:00
Tao Bao
4594d0e0fd Makefile: Clean up the condition for RECOVERY_RESOURCE_ZIP.
Change-Id: I6909d4572bd54da48f7fd6b76d4a5ee03c84206c
2015-12-22 11:28:35 -08:00
Daniel Rosenberg
40ef35b9e9 Allow building recovery as boot.
With BOARD_USES_RECOVERY_AS_BOOT = true, we skip building the
non-ramdisk boot.img but building the recovery image as boot.img. It
contains recovery's ramdisk (e.g. with /sbin/recovery). It depends on
the bootloader parameter (skip_initramfs) to determine the actual mode
to boot into.

Change-Id: Id6e2d0a2b94383944ca8f35bba688c6401745622
(cherry picked from commit d80bef2b9e)
2015-12-21 11:17:08 -08:00
Todd Poynor
b2a555e6fc Make squashfs sparse image generation optional
Allow non-sparse squashfs image generation, a la ext filesystems.

Bug: 26218766
Change-Id: Ifd596af16411e0cf69a2e7e05d725fd9442dc79c
2015-12-15 20:11:12 -08:00
Alex Klyubin
9667b18f23 Make signapk use Conscrypt.
This makes the signapk tool use Conscrypt (where possible) instead of
the platform-default JCA providers and the Bouncy Castle JCA provider.
This speeds up (by 10-30%) APK and OTA update signing because
Conscrypt's crypto primitives are backed by BoringSSL.

Previously, the signapk tool consisted only of the signapk.jar.
Because Conscrypt is backed by native code, signapk now consists of
signapk.jar and crypto_openjdk_jni shared library. This requires that
users of the tool be updated to provide a suitable -Djava.library.path
argument to the Java runtime. This change updates all known users of
the tool inside the Android source tree to do so.

Bug: 26097626
Change-Id: I8411b37d7f771ed99269751a3007dff103083552
2015-12-11 08:36:42 -08:00
Alex Deymo
41ac44ed2b Rename libext2 host libraries to standard suffix.
libext2_uuid_host was renamed to libext2_uuid-host to match the
"-host" suffix used in most libraries.

Bug: 24619596
TEST=make dist

Change-Id: Ic5faccb4d5fdbbf3d3bba6f4a35cf99d4961bb54
2015-12-09 18:02:56 -08:00
Ying Wang
03b6e8b6c4 Fix TARGET_ASAN build.
Bug: 26044735
Change-Id: I9c6b3b16637ca2d0da4765e896a9f03c1d5dc51c
2015-12-07 10:45:19 -08:00
wei qiao
6fa82b50f4 make USER limited to 6 characters when generating BF_BUILD_NUMBER
the value of USER is dependent from the compilation environment,so
when compiling one same device project, the BUILD_FINGERPRINT may
exceed 91 characters because ${USER} is long, but with short ${USER}
the compilation can pass.

Signed-off-by: wei qiao <qiaowei224@gmail.com>
Change-Id: Ia0f7dfa9cf7d605f1f2603f70dd0e6877482eb8a
2015-12-02 11:47:27 +08:00
Tao Bao
a04fca31bf Stop packaging obsolete OTA tools.
applypatch, applypatch_static and sqlite3 are no longer needed.

Bug: 24621915
Change-Id: I6de5bc45bc8434b9c387e1d3d1b6c347c23a5290
2015-11-30 12:22:24 -08:00
Sen Jiang
8f22e2a0bb Write AB_OTA_POSTINSTALL_CONFIG to META/postinstall_config.txt.
The config file will be passed to delta_generator to add the postinstall
field in the update payload.

Bug: 24537566
Change-Id: I06b8d9d0b2c37f9a3e7a844ac4d9e2eead8cd4d2
TEST: make dist
2015-11-13 10:46:09 -08:00
Tao Bao
cb4abef523 build: Remove check_prereq.
check_prereq is a tool for recovery API v2, which has been obselete
since we moved to v3 in [1].

[1] commit e08991e02a7d678f2574e85289a34b2a9a537c82

Bug: 24621915
Change-Id: Ie96348fb56c5a3e029cac2417b59d8eb62dc085b
2015-11-11 21:26:29 -08:00
Lee Campbell
b463fcde80 build: Add LINUX_KERNEL_COPYING license file
The build requires LINUX_KERNEL_COPYING when building
the notices. Change from depending on a file in
prebuilds/qemu-kernel to one in /build/core.

This is required as Brillo does not have the qemu-kernel
in its checkout.

BUG=25578534

Change-Id: Ieff6970035d27884c0769106e507284c1096c33f
2015-11-09 02:27:01 +01:00
Steve Fung
4044b38f0a Add the build type to META folder in target files.zip
For AB builds, add the build type to META/build_type.txt so the
server can easily determine user, userdebug, and eng builds
from each other.

Bug: 25420005
Change-Id: I6e4de2ba36a6fd1208c65a434d4725bb93d2cee6
2015-11-05 15:04:11 -08:00
Ying Wang
5d88770f26 Don't run ziptime on host zip files.
ziptime fails on zip file larger than 2GB.
These zip files won't installed on device and we don't care that much
about their reprodudcibility across builds.

Change-Id: I47062928d075a59eda92dd5333e59502f490d1cb
2015-11-04 10:06:25 -08:00
Dan Willemsen
a0975edc16 Merge "Remove changing uids/timestamps from zip/jar files" 2015-11-03 21:38:45 +00:00
Dan Willemsen
48a621c277 Remove changing uids/timestamps from zip/jar files
Pass -X to zip so that Unix UID/GID and extra timestamps aren't
saved into the zip files.

Add a new tool, ziptime, that uses a very stripped down copy of
zipalign. It no longer depends on libandroidfw, and now rewrites the
timestamps in place instead of making a copy of the zipfile. This should
improve speed and reduce disk requirements, especially with the large
packaging zip files.

Bug: 24201956
Change-Id: I50f68669f659da1b4393e964ad40b6aafb00c1e7
2015-11-02 14:51:54 -08:00
Gaurav Shah
00b8cd9a15 Merge "Support build targets with no installable apps/packages"
am: aed6805380

* commit 'aed6805380810f51bb0d8b93fc5eac005a6de364':
  Support build targets with no installable apps/packages
2015-11-02 22:27:20 +00:00
Gaurav Shah
64ea350dd8 Merge "build: Add extra build customization for /product"
am: a80f1e3257

* commit 'a80f1e32575db5d66f4b4e6efdf79dd10dd2295e':
  build: Add extra build customization for /product
2015-11-02 22:27:14 +00:00
Gaurav Shah
aed6805380 Merge "Support build targets with no installable apps/packages" 2015-11-02 22:22:40 +00:00
Gaurav Shah
a80f1e3257 Merge "build: Add extra build customization for /product" 2015-11-02 22:22:32 +00:00
Gaurav Shah
67c2ed390f Support build targets with no installable apps/packages
Specifically, do not error out if no installable apps are found.

- When creating an archive of all the apps, and if no apps exist
for the target, generate an empty archive file.
- If building for a target with no installable jar(s) or apk(s),
generate an empty package stats file.

The former is just an output artifact. The latter is used
by the upload_pkg_stats.py script which correctly handles
an empty input file.

BUG: 23421592

Change-Id: I48db9f9e1f61914d8fd938130e09b41849685450
2015-11-02 14:18:30 -08:00
Lee Campbell
04ba31236e build: Add extra build customization for /product
This makes /product more consistent with /device & /vendor

BUG: 22030305

Change-Id: Ic65bfde7fb3e9fab8c8fb8d99af15404574abde0
2015-11-02 14:18:13 -08:00
Ying Wang
cce30b6daa Merge "Add _asan suffix to ro.build.flavor for ASAN builds."
am: f0a8dd43b2

* commit 'f0a8dd43b26d49ad67e2c6c8c936e64a62df8582':
  Add _asan suffix to ro.build.flavor for ASAN builds.
2015-11-02 19:52:04 +00:00
Ying Wang
603e4ed594 Merge "Fix "make product-graph" and "make dump-products"."
am: 888f30aa44

* commit '888f30aa448370206a49ff7df940e134b8ff7017':
  Fix "make product-graph" and "make dump-products".
2015-11-02 19:51:57 +00:00
Ying Wang
f0a8dd43b2 Merge "Add _asan suffix to ro.build.flavor for ASAN builds." 2015-11-02 19:47:31 +00:00
Ying Wang
888f30aa44 Merge "Fix "make product-graph" and "make dump-products"." 2015-11-02 19:46:53 +00:00
Dan Willemsen
d8d06da814 Merge "Revert "Remove changing uids/timestamps from zip/jar files""
am: 49d8c5196e

* commit '49d8c5196eb690fc987673c27cb61087c5886be4':
  Revert "Remove changing uids/timestamps from zip/jar files"
2015-10-29 21:33:39 +00:00
Dan Willemsen
b589ae4e26 Revert "Remove changing uids/timestamps from zip/jar files"
This reverts commit 3c2c064c87.

zipalign depends on libandroidfw, and some setups don't include frameworks/base.

Bug: 24201956
Change-Id: I48ee95808924f6b2221f0a49ab205c2565096b1f
2015-10-29 21:26:18 +00:00
Dan Willemsen
a51b1d532e Merge "Remove changing uids/timestamps from zip/jar files"
am: 9f25219371

* commit '9f252193714c82dbce702e8055ffaa7eec4afe66':
  Remove changing uids/timestamps from zip/jar files
2015-10-29 19:12:37 +00:00
Dan Willemsen
3c2c064c87 Remove changing uids/timestamps from zip/jar files
Pass -X to zip so that Unix UID/GID and extra timestamps aren't
saved into the zip files.

Add a new option to zipalign, -t, to replace all timestamps with static
timestamps (2008 Jan 1 00:00:00). Use this for all non-APK zip files.
APK zip timestamps are set based on the certificate date in SignApk.

Bug: 24201956
Change-Id: Ifb619fc499ba9d99fc624f2acd5f8de36d78ef8e
2015-10-29 11:57:16 -07:00
Tao Bao
e5eb4567d4 Merge "Honor TARGET_NO_RECOVERY flag."
am: c448e91c3d

* commit 'c448e91c3d3d095f8f200c9925f7db2ad525132f':
  Honor TARGET_NO_RECOVERY flag.
2015-10-29 16:45:31 +00:00
Ying Wang
21ec03d186 Add _asan suffix to ro.build.flavor for ASAN builds.
Bug: 25344475
Change-Id: I27f2472906631239ca725ee09da2ab791cad2195
2015-10-28 18:47:00 -07:00
Ying Wang
67132baa4d Fix "make product-graph" and "make dump-products".
- For unmodified "make product-graph" and "make dump-products",
  load only the current product configuration makefiles. This is much
  faster than loading all product makefiles.
- For "make product-graph ANDROID_PRODUCT_GRAPH=--all",
  "make dump-products ANDROID_DUMP_PRODUCTS=all", load all product
  makefiles.
- Move product-graph.mk out of build tasks, so we can skip loading all
  the Android.mks, which takes long and we don't really need them.
  More importantly, with all product makefiles loaded, modules in
  Android.mks are prone to clash (if they are conditionally included
  by variables set up in product makefiles) and lead to parse-time
  error.

Change-Id: Idc1d6b0c23eb2c8bb34fdd7a1fa4d56171768d21
2015-10-28 16:49:44 -07:00
Tao Bao
db45efa647 Honor TARGET_NO_RECOVERY flag.
Don't generate recovery.img when calling 'make dist' if
TARGET_NO_RECOVERY is set. The build system passes the flag to the
packaging script which then generates recovery.img conditionally.

Bug: 25329471
Change-Id: Ifbc999300d5c31e897878f81e231ae7dd2aca660
2015-10-27 20:00:10 -07:00
Tao Bao
ada3927e53 Merge "Bump up the BBOTA version to 4."
am: ac4ec1a4ea

* commit 'ac4ec1a4ea83a150e08ccd43f30fe34de52cdebf':
  Bump up the BBOTA version to 4.
2015-10-23 18:45:35 +00:00
Tao Bao
eba409c4da Bump up the BBOTA version to 4.
To accommodate new changes (such as error correction in [1]) to BBOTA
in N release. We bump up the version to keep the OTA script backward
compatible.

Needs the matching CL in commit
1fdec8685af858c5ff4f45d2e3059186ab5ed2ab.

[1]: commit 0a7b47397db3648afe6f3aeb2abb175934c2cbca

Change-Id: Ib9158b455cd5905fe2d4742ce81feb1b7583054f
2015-10-23 10:45:36 -07:00
Alex Deymo
7410ed86c6 Merge "Rename UPDATE_AB_PARTITIONS to AB_OTA_PARTITIONS."
am: c82b873b9b

* commit 'c82b873b9b6c234da128cdbc0dde6624e45f5b6d':
  Rename UPDATE_AB_PARTITIONS to AB_OTA_PARTITIONS.
2015-10-23 14:48:30 +00:00
Alex Deymo
49be2b115c Rename UPDATE_AB_PARTITIONS to AB_OTA_PARTITIONS.
In order to have all the A/B updater variables in the same AB_OTA_
namespace we rename UPDATE_AB_PARTITIONS to AB_OTA_PARTITIONS.

Bug: None
Test: `make dist` includes the partitions.txt file if properly configured.

Change-Id: Ied4faabd7e2f0ab8a5007afb44ad2f38df8d630d
2015-10-22 18:17:36 -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
87f582611a Merge "Error correction: Append codes to verified partitions" 2015-10-19 09:49:18 +00:00
Steve Fung
a6968d8f1d am 2af58637: Merge "Add the Product ID to target_files.zip"
* commit '2af586376d2b99c75a5672c72a704f2031adc0fe':
  Add the Product ID to target_files.zip
2015-10-15 18:19:52 +00:00
Steve Fung
22d624a904 Add the Product ID to target_files.zip
When using the A/B updater, include the product id string to
target_files.zip.
This is needed by the Omaha backend.

Bug: 24946811
Change-Id: I2ce5f6cffe440c29a1820348ee215c71cec07861
2015-10-14 15:56:50 -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
Bertrand Simonnet
5df7366e12 am f698ca63: Merge "Add the product version to target_files.zip."
* commit 'f698ca63d970e1ed7f9b5c4090d2cf5cfa659e55':
  Add the product version to target_files.zip.
2015-10-13 20:08:37 +00:00
Bertrand SIMONNET
4af7259c2d Add the product version to target_files.zip.
When using the A/B updater, include the product version string to
target_files.zip.
This is needed by the Omaha backend.

BUG: 24743570
Change-Id: Idaba06624c1de452b1e1f9d3ebec851229af987a
2015-10-08 16:10:04 -07:00
Steve Fung
a9722e2927 am 9782fc4c: am 46fbaa56: Merge "Exclude OTA/bin tools when using A/B OTA updater"
* commit '9782fc4cddac3e31e1e08b1ec86fc61c84a943ec':
  Exclude OTA/bin tools when using A/B OTA updater
2015-10-03 02:02:38 +00:00
Steve Fung
9782fc4cdd am 46fbaa56: Merge "Exclude OTA/bin tools when using A/B OTA updater"
* commit '46fbaa564071e682e3cef7580723249af153ca71':
  Exclude OTA/bin tools when using A/B OTA updater
2015-10-03 01:55:34 +00:00
Steve Fung
48e49f592f Exclude OTA/bin tools when using A/B OTA updater
The OTA/bin tools are not needed in the target files zip when using
the A/B OTA updater.

Bug: 24577767
Change-Id: I7938a906e4d73709aaa944e8065f922536072e27
2015-10-02 17:23:14 -07:00
Alex Deymo
f9bd3d82f1 am 35907067: am e89dd69c: Merge "Pack META/ab_partitions.txt when using the A/B OTA updater."
* commit '3590706735ac41b6956ef07de20cac3994a046f2':
  Pack META/ab_partitions.txt when using the A/B OTA updater.
2015-10-02 03:52:50 +00:00
Alex Deymo
3590706735 am e89dd69c: Merge "Pack META/ab_partitions.txt when using the A/B OTA updater."
* commit 'e89dd69c7632e23bf1cf7db5be1cf1b0f6f345f8':
  Pack META/ab_partitions.txt when using the A/B OTA updater.
2015-10-02 03:46:07 +00:00