Commit Graph

1038 Commits

Author SHA1 Message Date
Tao Bao cffaf73f84 Makefile: Pack squashfs and f2fs tools into otatools.zip.
The following tools are essential to create squashfs and f2fs images
during signing (if applicable).

squashfs: mksquashfs and mksquashfsimage.sh
f2fs: make_f2fs and mkf2fsuserimg.sh

Bug: 28179154
Change-Id: Ia48bc6d9a40d2667bc6f2c973bd0c55eed7a06fc
2016-04-14 13:33:35 -07:00
Joe Onorato 969b6f8ada Remove unused module-info.txt generation.
Change-Id: Ic2e384ad3e2bae8e76a98818c18a99bf5d427b0e
2016-04-06 14:49:55 -07:00
Johan Redestig 8d3311f50d DO NOT MERGE ANYWHERE - Add libbase to otatools
build_verity_tree uses libbase since b104044.

Change-Id: I6d3406a107ceb6cd58d1a51aa79935209d4c435f
2016-03-31 14:20:38 -07:00
Baligh Uddin f9d685008d Add ability to package verifiedboot keys 2016-03-28 13:09:03 -07:00
Yohann Roussel 29b1afee9e Remove JILL, JACK_JAR and JILL_JAR
Also ensure that sdk.atree can find jack.jar and jill.jar from prebuilt.

Bug: 27372042

(cherry picked from commit 233584bb80)

Change-Id: Ie266104e51c09fa21ccb09c1f27ad7068472965c
2016-03-18 11:38:05 +01:00
Ying Wang fc16dca602 Merge "Rebuild odex files in PDK fusion build." into nyc-dev 2016-03-15 21:23:50 +00:00
Sami Tolvanen a8c37be285 Revert "Revert "build: pass version and patch level to mkbootimg""
This reverts commit 494a9090f9.

Bug: 27498078
Bug: 22914603
Change-Id: Iee6a784271ec32c6bfcc0a6ad3f0395d82016df3
(cherry picked from commit 3303d909a1)
2016-03-15 11:23:56 -07:00
Ying Wang 3a61eeb6cb Rebuild odex files in PDK fusion build.
To rebuild odex files of Java libraries and apps,
we store the jars/apks without stripping the classes.dex inside the
platform.zip. We also save the build variables that may affect how we
rebuild an odex in pdk_dexpreopt_config.mk in the platform.zip.
We store the files and configuration only for libraries/apps that get
installed to the system.img (or vendor.img).

In PDK fusion build, we auto-generate prebuilt module definitions for
the javalib.jar and package.dex.apk carried in the platform.zip, using
configuration stored in pdk_dexpreopt_config.mk.
With the prebult modules, we override the implicit rule that directly
copies the odex from the platform.zip.
To rebuild odex of javalib.jar, we added support for prebuilt shared Java
library to prebiult_internal.mk. An installable prebuilt Java library is
treated as shared Java library, i.e. with classes.dex in the jar instead
of a set of .class files.
For apks in the platform.zip, we install the stripped version from
platform files inside platform.zip, instead of the package.dex.apk,
using a new variable LOCAL_REPLACE_PREBUILT_APK_INSTALLED. We can't
strip package.dex.apk because we can't re-sign the stripped apk at this
point.

We generate prebuilt module only if it's not already defined in the
source tree.

Bug: 27543283
Change-Id: I9e146f8b713d6f57c397fd28d88c9ab700757ca1
2016-03-14 21:01:46 -07:00
Sami Tolvanen b3038bedcd Merge "Revert "build: pass version and patch level to mkbootimg"" into nyc-dev 2016-03-14 15:49:15 +00:00
Sami Tolvanen 1bca9fb6d4 Revert "build: pass version and patch level to mkbootimg"
This reverts commit e555f77962.

Bug: 27580174
Change-Id: I0fd1ddb64d2fd4f91b0ecbc1ab8953a1324a10eb
2016-03-14 15:47:11 +00:00
Ying Wang bd07ad01b5 Add dependency on boot_singer and vboot_singer if necessary.
Change-Id: Ic10c2ae6a0debf51100a30eb11217e77060a6066
2016-03-10 21:01:54 +00:00
Mohamad Ayyash 6a3185f23d Merge "Hook incremental ext4 image generation into build" into nyc-dev 2016-03-09 20:56:19 +00:00
Sami Tolvanen e555f77962 build: pass version and patch level to mkbootimg
Add --os_version and --os_patch_level arguments to mkbootimg.

Needs matching changes from
  I57682611e0c27fec5ed284da7d9a788383ff98b1

Bug: 27498078
Bug: 22914603
Change-Id: I04e20b0de40d864aac92ac7bcf466a6cbde3d0e4
(cherry pick from commit 8fb47f191f)
2016-03-08 08:21:52 -08:00
Mohamad Ayyash f876555893 Hook incremental ext4 image generation into build
Allows passing the *.base_fs or *.map files for system and vendor in
INTERNAL_SYSTEM_BASE_FS_PATH and INTERNAL_VENDOR_BASE_FS_PATH variables
respectively.

Internal Design Doc: go/incremental-ext4
BUG: 26839493
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>

Change-Id: Ie57ef6dbfa6084268b6535fe0a673a3b4aaa6e2f
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-03-03 12:07:21 -08:00
Dan Willemsen 4fbc164da8 Warn more clearly when there are duplicate copied headers
When more than one makefile tries to copy a header to the same
destination, the warning is not clear, and hard to track down and assign
blame:

build/core/copy_headers.mk:15: warning: ignoring old commands for target `out/target/product/bullhead/obj/include/qcom/display/copybit.h'

With this change, the same behavior is kept, but the warning message is
more descriptive, and contains the offending Android.mk files:

build/core/Makefile:54: Duplicate header copy: out/target/product/bullhead/obj/include/qcom/display/copybit.h
build/core/Makefile:54: Defined in: hardware/qcom/display/msm8994/libcopybit/Android.mk hardware/qcom/display/msm8994/libcopybit/Android.mk

In this case, a $(CLEAR_VARS) is missing, so the same Android.mk file is
copying the same headers twice.

Bug: 27302058
Change-Id: Icf8f580ae71a78741db21c1d8f3213424459e637
(cherry picked from commit 6f60f020d7)
2016-02-23 16:09:49 -08:00
Tao Bao fdd2693b65 Makefile: Add the missing library in otatools.zip.
With the change in [1], delta_generator now needs
libprotobuf-cpp-lite.so instead of libprotobuf-cpp-lite-rtti.so to
generate A/B payloads.

[1] commit ab5bd668f6be600a8cceb8772e426c0aa902a5e1

Bug: 27145830
Change-Id: Ib9a93bf0fbe7fa44fc5fb94668d17fa1a2e07b05
2016-02-11 09:53:51 -08:00
Patrick Tjin e11aa50bb2 Add compressor options for squashfs vendor images
Change-Id: I4f9f5d62e24654cb37d436cb73dd5893aed30fa8
2016-02-09 15:41:07 -08:00
Patrick Tjin 426ec55b41 Allow squashfs for vendor image only
Previously, the squashfs dependencies were included only if
the system image was squashfs.  Allow the vendor image trigger
the dependency.

Change-Id: I5b1c513e9c13d83efc3ca6a904f08a91d9cca85f
2016-02-09 14:12:47 -08:00
Colin Cross c2f1d01eec Merge "Don\'t build otatools for PDK" am: 9e8866f4a4
am: 3611f2f440

* commit '3611f2f440944dadd74b36a235c41c7957a6963c':
  Don't build otatools for PDK
2016-02-05 00:04:43 +00:00
Colin Cross 3611f2f440 Merge "Don\'t build otatools for PDK"
am: 9e8866f4a4

* commit '9e8866f4a4ec60778d55366afaf29f7d2e22e9ee':
  Don't build otatools for PDK
2016-02-05 00:01:49 +00:00
Colin Cross 481cc5a005 Don't build otatools for PDK
Change-Id: I5e73d103300ac938f80b3ff0af978c123d649fed
2016-02-04 15:09:23 -08:00
Alex Deymo 0128329745 Merge "Place the META/ dir first in the target_files.zip." am: 2857b7a3d7
am: 95b0f7d3cc

* commit '95b0f7d3ccfc10659a0c6ac1eaed18284b4e9b55':
  Place the META/ dir first in the target_files.zip.
2016-01-27 03:35:09 +00:00
Alex Deymo 95b0f7d3cc Merge "Place the META/ dir first in the target_files.zip."
am: 2857b7a3d7

* commit '2857b7a3d7e2057cf60db36a528358a58a8711bc':
  Place the META/ dir first in the target_files.zip.
2016-01-27 03:33:20 +00:00
Alex Deymo 92cfd6fc2b Place the META/ dir first in the target_files.zip.
To help early verification of a target_files.zip being uploaded to our
servers, we place the META/ directory first in the .zip file, so checks
against the product_id.txt and product_version.txt don't need to wait
for the whole file to upload.

Note that META/*filesystem_config.txt files are generated and added to
the .zip file at a later point, so they are not included at the
beginning.

Bug: 26806325
TEST=`make dist` and `unzip -l out/dist/edison-target_files-eng.$USER.zip` shows most META/ files first.

Change-Id: I1955645412688f5c7823063ed56606b251daccfd
2016-01-26 18:52:10 -08:00
Tao Bao b6459cc143 Merge "Makefile: Fix the location for payload signing key." am: 27a1201989
am: 3ea04365dc

* commit '3ea04365dc39c14d458d69eb3954cbf099654681':
  Makefile: Fix the location for payload signing key.
2016-01-21 23:25:48 +00:00
Tao Bao c2a8b0b6b1 Merge "Makefile: Add the payload public key into system image." am: b49d05e72e
am: cf7eb025f8

* commit 'cf7eb025f88349797032b649fd47e8b4de80235e':
  Makefile: Add the payload public key into system image.
2016-01-21 23:25:19 +00:00
Tao Bao 3ea04365dc Merge "Makefile: Fix the location for payload signing key."
am: 27a1201989

* commit '27a1201989d782af30a30186a05448dbbe3304b8':
  Makefile: Fix the location for payload signing key.
2016-01-21 23:19:16 +00:00
Tao Bao cf7eb025f8 Merge "Makefile: Add the payload public key into system image."
am: b49d05e72e

* commit 'b49d05e72e03c4d51c81ec8fcedd463ea5b0e28f':
  Makefile: Add the payload public key into system image.
2016-01-21 23:18:50 +00:00
Tao Bao 23c3db9372 Makefile: Fix the location for payload signing key.
CL in [1] put it in a wrong path.

[1] commit 38812d684b

Bug: 25715402
Change-Id: I01a105888844011eee083d5f4d694223599fa067
2016-01-21 14:33:22 -08:00
Tao Bao 38812d684b Makefile: Add the payload public key into system image.
For non-Brillo devices using AB update, add the payload signing public
key to the system image
(system/etc/update_engine/update-payload-key.pub.pem).

We first need to sign the payload with some private key, and pack it
into an Android OTA package. Then the whole zip package will be signed
again with the device key. This is to comply with the two existing OTA
flows (Android and CrOS).

We use the same device key to do the two signings, but update_engine
expects the key in RSA public key format. This CL extracts the public
key from x509 certificate and adds it to the system image.

Bug: 25715402
Change-Id: I6f6c1148534250ddb6d9e554175c7a35bceda99e
2016-01-20 21:29:00 -08:00
Tao Bao 49fe96c376 Merge "Makefile: Pack brillo_update_payload and shflags into otatools." am: 4dc400e753
am: d08cc69b6e

* commit 'd08cc69b6ec59654a0ff59e5a4e286faa31629c7':
  Makefile: Pack brillo_update_payload and shflags into otatools.
2016-01-19 23:06:40 +00:00
Tao Bao d08cc69b6e Merge "Makefile: Pack brillo_update_payload and shflags into otatools."
am: 4dc400e753

* commit '4dc400e75336d0e09f509c9fd100c49cfb42ed5c':
  Makefile: Pack brillo_update_payload and shflags into otatools.
2016-01-19 23:04:12 +00:00
Tao Bao 6d8a8cc634 Makefile: Pack brillo_update_payload and shflags into otatools.
brillo_update_payload and shflags are the scripts to generate A/B OTA
package (payload). Include them into otatools.zip.

brillo_update_payload was already included in previous CL. Move it to
the folder for executables.

Bug: 25715402
Change-Id: Idf9c05767c24c55d058cc30e696f06d4eb5fd53b
2016-01-19 14:51:51 -08:00
Tao Bao 1269cfbd02 Merge "Fix mounting /sdcard under recovery." am: 948b9c30b4
am: 506cbfa8b4

* commit '506cbfa8b4f8e70900527311528a60053dae1c61':
  Fix mounting /sdcard under recovery.
2016-01-13 18:50:12 +00:00
Tao Bao 506cbfa8b4 Merge "Fix mounting /sdcard under recovery."
am: 948b9c30b4

* commit '948b9c30b4197a709846e604c8e571d90161b17f':
  Fix mounting /sdcard under recovery.
2016-01-12 22:32:11 +00:00
Tao Bao 3f56a33041 Fix mounting /sdcard under recovery.
The CL in [1] changed to create a symlink to /storage/self/primary for
/sdcard. It breaks the mount of /sdcard under recovery.

[1] commit 595003a3d06a13862052ef2f4f578371dae5ad65

Bug: 26509280
Change-Id: I98d02d54d707c2c8826c5ee119cf1a3ffa0c4bc9
2016-01-12 11:40:30 -08:00
Tao Bao ebedd55277 Merge "Build delta_generator for A/B update." am: bf4213ebae
am: 7da6338cf3

* commit '7da6338cf3a1969b03b641ceae7b80390a1c92a3':
  Build delta_generator for A/B update.
2016-01-04 19:53:27 +00:00
Tao Bao 7da6338cf3 Merge "Build delta_generator for A/B update."
am: bf4213ebae

* commit 'bf4213ebaee1c505fa5070419aba4cd5ddccaae2':
  Build delta_generator for A/B update.
2016-01-04 19:51:30 +00:00
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 5f3873c897 Merge "Makefile: Clean up the condition for RECOVERY_RESOURCE_ZIP." am: 9d4dbe09ed
am: 647a1d779a

* commit '647a1d779a0f0bbc6cd896df57d18725d300546f':
  Makefile: Clean up the condition for RECOVERY_RESOURCE_ZIP.
2015-12-22 14:29:10 -08:00
Tao Bao 647a1d779a Merge "Makefile: Clean up the condition for RECOVERY_RESOURCE_ZIP."
am: 9d4dbe09ed

* commit '9d4dbe09edcaeccd461138b5aefceb76759f5fd9':
  Makefile: Clean up the condition for RECOVERY_RESOURCE_ZIP.
2015-12-22 14:27:04 -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
Tao Bao c27ad030b6 Merge "Allow building recovery as boot."
am: 781b7b20d4

* commit '781b7b20d41cfe80472707aec46d0eac5473bfc5':
  Allow building recovery as boot.
2015-12-21 19:22:00 +00: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
Daniel Rosenberg d80bef2b9e 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
2015-12-18 17:16:32 -08:00
Todd Poynor 5bf7fdaac2 Merge "Make squashfs sparse image generation optional" am: ffce16c7e6
am: 77d1b2ec31

* commit '77d1b2ec314dee2a381d3f0164a940dedb883281':
  Make squashfs sparse image generation optional
2015-12-16 23:44:33 +00:00
Todd Poynor 77d1b2ec31 Merge "Make squashfs sparse image generation optional"
am: ffce16c7e6

* commit 'ffce16c7e6bdabb909a36c2b97b7881eddd5ba54':
  Make squashfs sparse image generation optional
2015-12-16 22:32:31 +00: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 c1b31821ef Merge "Make signapk use Conscrypt." am: 7884a63731
am: dfd2199ef6

* commit 'dfd2199ef66dcc162a0165f9a34652ae2877538d':
  Make signapk use Conscrypt.
2015-12-11 10:47:26 -08:00
Alex Klyubin dfd2199ef6 Merge "Make signapk use Conscrypt."
am: 7884a63731

* commit '7884a63731a876f483c13288c87d8e7af7a533e4':
  Make signapk use Conscrypt.
2015-12-11 10:37:16 -08:00