Commit Graph

1303 Commits

Author SHA1 Message Date
Badhri Jagan Sridharan 131e1977f6 Extract public key ID from cert
Extracts keyid inline using openssl commands.
The keyid is passed as one of the kernel command line parameters
for the dm-android-verity module to mount root fs(system)
with verity enabled.

(cherry-picked from 3af315aed5
https://googleplex-android-review.git.corp.google.com/#/c/1061691/)

BUG: 28384658
Change-Id: I8efbe1b0e415ef1d396f9b51cfa4b3fa01b22484
2016-06-28 23:35:41 +00:00
Badhri Jagan Sridharan 9898553d62 resolve merge conflicts of 00046ad to nyc-mr1-dev-plus-aosp
Change-Id: I9540ecace4b20e8931fdf591e2d6604caf194f4c
2016-06-28 15:18:58 -07:00
Alex Light 4e358ab2c3 Add system_other partition, install odex files
For AB devices, support flashing two system partitions for factory use.
The normal system image on one partition, but without dex preopt. And a
system_other image that just contains the odex files. The dex files will
not be stripped out of the system image, in case the second system
partition is wiped.

Setting BOARD_USES_SYSTEM_OTHER_ODEX := true in the BoardConfig.mk
enables this behavior.

One can control which directories are placed in system_other by the
SYSTEM_OTHER_ODEX_FILTER configuration variable. Currently we default
to only copying only app and priv-app odexs.

Bug: 29278988
Change-Id: I7f4e87da919e7dc6a89fd8c668193cd4e98631bc
2016-06-24 11:07:15 -07:00
Guang Zhu a9bc78af69 move test artifact build rules into open source location
Bug: 29404304
Change-Id: I5553d275fe478fac0d6fe00a931a1c1f1e3bdd59
(cherry picked from commit 8322be7252)
2016-06-21 15:49:09 -07:00
Dan Willemsen f87820dbca Merge \\\"Clean up vendor image handling\\\" am: 4f807026e2 am: edc6ed7aa0
am: a988de3baa

Change-Id: Iba81d7bf977c85334b98f8c023b8b84c97743aa2
2016-06-21 22:10:37 +00:00
Dan Willemsen a988de3baa Merge \\"Clean up vendor image handling\\" am: 4f807026e2
am: edc6ed7aa0

Change-Id: Ia5dea45324ee41c84d997ca3e83401713e3a9ba9
2016-06-21 22:03:30 +00:00
Dan Willemsen edc6ed7aa0 Merge \"Clean up vendor image handling\"
am: 4f807026e2

Change-Id: I637ed099a6f127aa8abca980329ddc6ecad5e3ec
2016-06-21 22:00:21 +00:00
Badhri Jagan Sridharan 3bcc137b49 Add build variant to kernel command line
Verity is not enabled in eng builds. Pass the build variant so
that kernel does not try to enable verity in eng builds

BUG:29276559
Change-Id: I7f412196ac59aa63e91c21d825ad15bae9f51691
2016-06-21 13:14:14 -07:00
Guang Zhu 1a866dc217 move test artifact build rules into open source location
am: 8322be7252

Change-Id: Icd0d1a2410a8da58810c6a4d050b4d92d96ce558
2016-06-21 17:47:26 +00:00
Guang Zhu 8322be7252 move test artifact build rules into open source location
Bug: 29404304
Change-Id: I5553d275fe478fac0d6fe00a931a1c1f1e3bdd59
2016-06-20 22:32:16 -07:00
Dan Willemsen 6c3e79b8e3 Clean up vendor image handling
Standardize symlinking /system/vendor -> /vendor for aosp_* devices,
since some /vendor binaries still use /system/vendor/... paths.

Support using a prebuilt vendor image and including it into all the
normal packaging steps.

Bug: 28987532
Change-Id: I27040e8a8d1df0777e16cd1e3c3a9f1b28695e96
2016-06-18 17:47:12 -07:00
Mohamad Ayyash 44dc2a973f resolve merge conflicts of 8ebbc4e to nyc-mr1-dev
am: 423862500b

Change-Id: I8f8dd48e52c1ab7cb3462725569cf7c1e0443d38
2016-06-16 20:22:30 +00:00
Mohamad Ayyash 423862500b resolve merge conflicts of 8ebbc4e to nyc-mr1-dev
Change-Id: I2349bb3fede317487227b16cb7c7b093a93a3876
2016-06-16 13:11:45 -07:00
Mohamad Ayyash 3336f9ae67 Merge \"squashfs: make disable-4k-align a parameter\" into nyc-dev
am: 8ebbc4e7e2

Change-Id: Ia5c59b7bfc7f2b25fa9b13c2ce52c1bd75ccecce
2016-06-16 16:39:39 +00:00
Mohamad Ayyash 1b6d3485fc squashfs: make disable-4k-align a parameter
BUG: 29388879
Change-Id: I121d2b76db5fb269e2f7152abb2e78098437a0d5
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-06-15 16:37:21 -07:00
Tao Bao f2edbceb76 Merge \"Track the name change for wipe_ab.\" into nyc-mr1-dev
am: 943f19868a

Change-Id: I1e760f39750b1decdb8a13a7697a82e845027036
2016-06-13 16:50:47 +00:00
David Zeuthen 029f3fe2f4 Merge \\\"bvb: Update path to key since repo was moved.\\\" am: 8b3b1727da am: 8ab7487660
am: a787117cc5

Change-Id: I564533914e0267411a0aa363735222845cc0e38f
2016-06-13 16:11:27 +00:00
David Zeuthen a787117cc5 Merge \\"bvb: Update path to key since repo was moved.\\" am: 8b3b1727da
am: 8ab7487660

Change-Id: I04b9b35c392b6e99b15f4c78358c70c9a9794532
2016-06-13 16:06:54 +00:00
David Zeuthen bca24302bb bvb: Update path to key since repo was moved.
We recently moved Brillo verified boot from system/bvb to external/bvb
so update the path accordingly.

TEST=Build with 'BOARD_BVB_ENABLE := true' succeeds.
BUG=29099910

Change-Id: I66f3b90e23d6b2afc09f81af571ede7b573325e9
2016-06-13 11:26:26 -04:00
Tao Bao c3c17534da Track the name change for wipe_ab.
Bug: 27253717
Change-Id: I0d4c91e99267afdc4846ea50e602a2383898b9b4
2016-06-10 10:14:14 -07:00
Tao Bao 97b55bc7a5 Merge "Add support for TARGET_RECOVERY_BRICK." am: daf55776be
am: 88df5bee3a

* commit '88df5bee3addaacddd32adf7f78fd5fe1493c38a':
  Add support for TARGET_RECOVERY_BRICK.

Change-Id: I90717df1ee18cadb89bec8afa5280b3ebf434a13
2016-06-02 22:56:43 +00:00
Tao Bao e3470e1380 Merge "Add support for TARGET_RECOVERY_BRICK." into nyc-mr1-dev
am: 6af05e733c

* commit '6af05e733ca0a9e9f33babeb0ef14b3d3bb13376':
  Add support for TARGET_RECOVERY_BRICK.

Change-Id: Ib2dfcddbde8f6b918af075b3ed529a1efad1ddf4
2016-06-02 21:51:32 +00:00
Tao Bao a062c7e62d Add support for TARGET_RECOVERY_BRICK.
TARGET_RECOVERY_BRICK specifies the file that lists all the partitions
to be bricked under recovery. The file, if present, will be copied to
'$(TARGET_RECOVERY_ROOT_OUT)/etc/recovery.brick'.

Bug: 27253717
Change-Id: Id84195b5ee1031a83bf7a077be070a3728416580
(cherry picked from commit 3051f4f11a)
2016-06-02 14:46:53 -07:00
Tao Bao 3051f4f11a Add support for TARGET_RECOVERY_BRICK.
TARGET_RECOVERY_BRICK specifies the file that lists all the partitions
to be bricked under recovery. The file, if present, will be copied to
'$(TARGET_RECOVERY_ROOT_OUT)/etc/recovery.brick'.

Bug: 27253717
Change-Id: Id84195b5ee1031a83bf7a077be070a3728416580
2016-06-01 15:18:06 -07:00
Badhri Jagan Sridharan f380da3704 resolve merge conflicts of e053d5c to nyc-mr1-dev-plus-aosp
Change-Id: I90684bbe225000a172cec85814e04a49a7aac3f7
2016-05-27 09:49:49 -07:00
Badhri Jagan Sridharan e053d5c56f Merge "Extract public key ID from cert" into nyc-mr1-dev 2016-05-27 15:46:06 +00:00
Badhri Jagan Sridharan 3af315aed5 Extract public key ID from cert
Extracts keyid inline using openssl commands.
The keyid is passed as one of the kernel command line parameters
for the dm-android-verity module to mount root fs(system)
with verity enabled.

BUG: 28384658
Change-Id: I8efbe1b0e415ef1d396f9b51cfa4b3fa01b22484
2016-05-26 17:35:50 -07:00
Mohamad Ayyash 000d71dc1d Pass squashfs block size as a parameter
am: dfec815882

* commit 'dfec815882d2253c6c9130e3241a1906161f3824':
  Pass squashfs block size as a parameter

Change-Id: Ie767254ce653b6a0d21ca9922434ad350fd61a48
2016-05-24 21:08:17 +00:00
Mohamad Ayyash dfec815882 Pass squashfs block size as a parameter
BUG: 28920352
Change-Id: Ifed02bd1565131814047991ec87fa61691bfe240
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-05-24 20:55:13 +00:00
Baligh Uddin 5349e26a0e Merge commit \'9b4daacaf8f7ce5a534fae524507e4a4f7622ce4\' into nyc-dev am: 0418406186
am: 6187c1dabe

* commit '6187c1dabe142e9644706dfd5962e1db6376eb8f':
  Add Oem Props to otatools package

Change-Id: I56a7440bb7cb189b7bd25223165d083a12bdb195
2016-05-21 00:33:54 +00:00
Baligh Uddin 6187c1dabe Merge commit \'9b4daacaf8f7ce5a534fae524507e4a4f7622ce4\' into nyc-dev
am: 0418406186

* commit '0418406186f67096a3c42fa276799095620e2296':
  Add Oem Props to otatools package

Change-Id: I11ac21e62912328ec5bb19cb4b341c5b8e331ba1
2016-05-21 00:31:19 +00:00
Baligh Uddin ae8784bbc8 Merge commit \'9b4daacaf8f7ce5a534fae524507e4a4f7622ce4\' into nyc-dev
am: 0418406186

* commit '0418406186f67096a3c42fa276799095620e2296':
  Add Oem Props to otatools package

Change-Id: Ib278834d9237965f9f663508ff312fad89ef920a
2016-05-21 00:31:19 +00:00
Baligh Uddin 0418406186 Merge commit '9b4daacaf8f7ce5a534fae524507e4a4f7622ce4' into nyc-dev 2016-05-20 17:27:18 -07:00
Baligh Uddin 9b4daacaf8 Merge commit '6c70b85cb3c75650e5154366fb5e08e3aadf9a50' into mnc-dr1.5-dev 2016-05-20 17:14:04 -07:00
Baligh Uddin 6c70b85cb3 Merge commit \'8c0c5e61498783496eec848da4f2aa4e30fe98b6\' into mnc-dr-dev
am: 275af3429f

* commit '275af3429f3049378862883dc6a0db2701f9311f':
  Add Oem Props to otatools package

Change-Id: I7e26f26d773c1dac31b274b6c7e708aee1537be8
2016-05-21 00:04:37 +00:00
Baligh Uddin 275af3429f Merge commit '8c0c5e61498783496eec848da4f2aa4e30fe98b6' into mnc-dr-dev 2016-05-20 16:59:14 -07:00
Baligh Uddin 8c0c5e6149 Merge commit \'c1937df4b12afecfdfc6a5d3b37f0aaf6ffdda5b\' into lmp-mr1-ub-dev
am: 50cae53b10

* commit '50cae53b10b7e6a18fe6016bd5dc9eaba715545d':
  Add Oem Props to otatools package

Change-Id: I4ca967ea935f4a3a5c709047ca2ed486d196e974
2016-05-20 23:50:56 +00:00
Baligh Uddin 50cae53b10 Merge commit 'c1937df4b12afecfdfc6a5d3b37f0aaf6ffdda5b' into lmp-mr1-ub-dev 2016-05-20 16:44:27 -07:00
Baligh Uddin c1937df4b1 Add Oem Props to otatools package
am: 4f8df41cef

* commit '4f8df41ceff7434ece651737b15bf1035f5549e8':
  Add Oem Props to otatools package

Change-Id: I2b5ba1bb090c5144f4ea0b17153352eb31b46e7f
2016-05-20 18:43:25 +00:00
Baligh Uddin 4f8df41cef Add Oem Props to otatools package
Bug: 23967152
2016-05-20 11:29:53 -07:00
Baligh Uddin 74da4d6eef DO NOT MERGE - Add verifiedboot keys to otatools.zip (this is needed for Shamu)
otatools.zip is used to release key sign device images.

Bug: 23967152
2016-05-19 08:50:19 -07:00
Patrick Tjin b6e119caac Merge "Makefile: exclude cache symlink on devices with no cache partition" into nyc-mr1-dev
am: 216040ca0b

* commit '216040ca0b4603f9674f0da571845d840fe6d17c':
  Makefile: exclude cache symlink on devices with no cache partition

Change-Id: I0cf4a3bd034f0d11de53f6604ac43cb6a439242b
2016-05-14 03:36:25 +00:00
Patrick Tjin f3b0dc290e Makefile: exclude cache symlink on devices with no cache partition
rsync will complain due to broken cache symlink on devices
without cache partition when creating the recovery disk.
Recovery does not depend on /cache.

Bug: 28747374
Change-Id: Ie2dc6e84194fbc3bbb39fe59ef92a6e8936b71e2
2016-05-13 15:26:09 -07:00
Baligh Uddin f193546d65 DO NOT MERGE ANYWHERE - Fix otatools on lmp-mr1-dev
Bug: 23967152
Change-Id: I2e2f1ead28f51f549dafacfc7d1d1e65b0b84bc7
2016-05-12 15:55:26 -07:00
Shinichiro Hamaji b9179f9886 Merge "Correct some dependencies around zip packages" am: b6f2c8fac8
am: eac63ed087

* commit 'eac63ed087e7e84a80ddc6c45d2f21bfae5617b0':
  Correct some dependencies around zip packages

Change-Id: I783119bdce2044473c96c680cd035d131604dc94
2016-05-12 02:23:45 +00:00
Shinichiro Hamaji b6f2c8fac8 Merge "Correct some dependencies around zip packages" 2016-05-12 02:06:42 +00:00
Baligh Uddin 16690162c3 DO NOT MERGE ANYWHERE - Add verifiedboot keys to otatoools.zip.
This is needed for nemo* signing off emerald-dev.

Bug: 28726512
2016-05-11 16:32:17 -07:00
Wei Wang 2c5e71fbe8 Merge "Include BRILLO_VENDOR_PARTITIONS in target zip generation" am: 648ea82b04
am: a22d0a88ba

* commit 'a22d0a88ba74bba43a8683e542b5f46eb9afce22':
  Include BRILLO_VENDOR_PARTITIONS in target zip generation

Change-Id: I44390a1512b24880183d40d35087409b9693435f
2016-05-11 22:03:31 +00:00
Wei Wang 2e735ca34e Include BRILLO_VENDOR_PARTITIONS in target zip generation
This change will enable the target zip to include partition defined in
BRILLO_VENDOR_PARTITIONS. This is necessary for OTA to support
partitions other than boot and system in ab_partitions.txt.

The target zip will include images in BRILLO_VENDOR_PARTITIONS if
defined, under VENDOR_IMAGES/ with path kept. Also any vendor partitions
defined in AB_OTA_PARTITIONS will be copied to IMAGES/ in the target zip.

BUG: 28623063
Change-Id: Ic479048dfb8ac506acf827865e784fcb0432a1d5
2016-05-11 12:26:04 -07:00
Shinichiro Hamaji ee2d21195c Correct some dependencies around zip packages
Add scripts which creates these packages to their dependencies.
$(SYMBOLS_ZIP) contains symbol info of the updater binary so
it should depend on it.

Bug: 27954979
Change-Id: If78746ec843dd57fe5fdda3ed504a12bb298ea1d
2016-05-12 02:07:56 +09:00
Tao Bao ec960e2b55 Merge "Revert "Include vendor partitions in target zip generation"" am: 7ff7c2d870
am: b1963b65a4

* commit 'b1963b65a45ddef3159b542ee49d82a6c310f1d4':
  Revert "Include vendor partitions in target zip generation"

Change-Id: I468caee113cba2b51ca225a9d8de8b791ed502fd
2016-05-11 15:21:28 +00:00
Wei Wang 05e6f679e6 Revert "Include vendor partitions in target zip generation"
This reverts commit 421fe44ae8.

Change-Id: Id45781de73735783bc7dfb6fc2838957578d00d3
2016-05-11 14:49:50 +00:00
Wei Wang 90b4658904 Merge "Include vendor partitions in target zip generation" am: bb05fd768c
am: eb06b4d3b3

* commit 'eb06b4d3b3862759ca15e9c52802808debc0a295':
  Include vendor partitions in target zip generation

Change-Id: I9646c90fbe5c57a1f8c6022b8aad03f4e19f56e7
2016-05-11 02:27:00 +00:00
Wei Wang 421fe44ae8 Include vendor partitions in target zip generation
This change will enable the target zip to include partition defined in
BRILLO_VENDOR_PARTITIONS. This is necessary for OTA to support
partitions other than boot and system in ab_partitions.txt.

BUG: 28623063
Change-Id: I6e0969c31c9ad2e8285c6f560825c160aa8c4d55
2016-05-10 11:00:09 -07:00
Tao Bao be9457cad2 Pack base_fs files into target_files.zip.
am: f54216f292

* commit 'f54216f29238a67aad1199a0e85d09e443740bf0':
  Pack base_fs files into target_files.zip.

Change-Id: Ia68c3a707def1865151f071ca33a3bdc513f9045
2016-05-02 16:45:31 +00:00
Tao Bao f54216f292 Pack base_fs files into target_files.zip.
Pack the base_fs files ({system,vendor}.map) into target_files.zip,
which would be needed when rebuilding the images at signing.

Reset the base_fs paths to point to the files in META/.

Also add blk_alloc_to_base_fs into otatools.zip.

Bug: 27698960
Change-Id: If4eb274b3f3d839c4365624f46f0dc89bd2fa440
2016-04-30 23:56:10 -07:00
Mohamad Ayyash 0d97b0202b Merge "Rename incr ext4 base_fs path vars. Add to product_var_list." into nyc-dev
am: b88afd7

* commit 'b88afd7aca281801bf7d6c77462da825759dc4d5':
  Rename incr ext4 base_fs path vars. Add to product_var_list.

Change-Id: I61f40e96bb64c03fe4f2633b0dbecda045ff0a4a
2016-04-27 21:25:26 +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
Baligh Uddin 69cf5dfc4d DO NOT MERGE ANYWHERE - Add squashFS tools to otatools
Bug: 23967152
2016-04-24 12:40:03 -07:00
Shinichiro Hamaji 506668bccf Merge "Add input dependencies to .img targets" am: bd0bab233d
am: 8196646d27

* commit '8196646d2782ce7847ab081843a7ad5c2b553055':
  Add input dependencies to .img targets

Change-Id: I3053b20a56804b268dbd78e793d3d5da71ecd487
2016-04-21 06:17:47 +00:00
Shinichiro Hamaji 3deb87d5fd Add input dependencies to .img targets
They should have build/tools/releasetools/*.py as their
prerequisites.

Bug: 27954979
Change-Id: I51595fc91caaad38be3e47befb5df7ac2683bf14
2016-04-19 18:41:27 +09:00
Tao Bao d337f5614c Merge "Makefile: Pack squashfs and f2fs tools into otatools.zip." into nyc-dev
am: 8fe9274

* commit '8fe9274ab99a0a5e8894a8984d47a9c5a9c0c17c':
  Makefile: Pack squashfs and f2fs tools into otatools.zip.

Change-Id: I1e6830d90b471c70d6de450e0f0c04943dc38fec
2016-04-14 22:20:45 +00:00
Tao Bao d5cd404f6e 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
(cherry picked from commit cffaf73f84)
2016-04-14 15:13:46 -07:00
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
David Zeuthen 39b6a8db6a Merge "Add support for Brillo partitioning." am: 2528968
am: 93a3423

* commit '93a34234c6a032251163992728def631c14a6e90':
  Add support for Brillo partitioning.

Change-Id: I349463c75e8ddb312cf83bad845864e530c50405
2016-04-14 16:20:15 +00:00
David Zeuthen 25328627ba Add support for Brillo partitioning.
To generate partition tables in the Android build system, simply add
the path to a .bpt file to the BOARD_BPT_INPUT_FILES variable.

 BOARD_BPT_INPUT_FILES += "hardware/bsp/vendor/soc/board/board-specific.bpt"

The variable BOARD_BPT_DISK_SIZE can be used to specify or override
the disk size, for example:

 BOARD_BPT_DISK_SIZE := "10 GiB"

Additional arguments to 'bpttool make_table' can be specified in the
variable BOARD_BPT_MAKE_TABLE_ARGS.

If BOARD_BPT_INPUT_FILES is set, the build system generates two files

 partition-table.img
 partition-table.bpt

in ${ANDROID_PRODUCT_OUT} using 'bpttool make_table'. The former is
the binary partition tables generated using bptool's --output_gpt
option and the latter is a JSON file generated using the --output_json
option. These files will also be put in the IMAGES/ directory of
target-files.zip when running 'm dist'.

BUG=27831397
TEST=Manually tested.

Change-Id: Iedd15354afb2dd483dcb9bc001360b2a37fd6dc0
2016-04-13 12:45:20 -04:00
Joe Onorato c76b3ab7ad Merge changes I8f95f3f8,Ic2e384ad into nyc-dev
am: 4b60ee5

* commit '4b60ee5b7b61ac7bdeb983469547e23d698332a2':
  Add generation of a module-info.json file
  Remove unused module-info.txt generation.

Change-Id: Ia291b6b93922bfacee331e2870a52eec89f0b108
2016-04-07 18:41:48 +00:00
Joe Onorato 969b6f8ada Remove unused module-info.txt generation.
Change-Id: Ic2e384ad3e2bae8e76a98818c18a99bf5d427b0e
2016-04-06 14:49:55 -07:00
Sen Jiang d7c791429d Merge "Remove libdivsufsort shared library from otatools." am: aef8e28
am: 881a812

* commit '881a81226c580b8e86d2425215c0af3c4f067fcb':
  Remove libdivsufsort shared library from otatools.

Change-Id: I3eadccc20045ff30eb88c95e229ad7fb79852793
2016-04-04 21:50:41 +00:00
Sen Jiang f1ae051bb0 Remove libdivsufsort shared library from otatools.
The library is now a static library.

Bug: 26955860
Change-Id: I64525737da1451895c255a30904a1e3e4ad8d253
2016-04-04 13:44:06 -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
Shinichiro Hamaji fbd5d8de0f Merge "Fix dependencies around tools/*-event-log-tags.py" am: 4487319
am: a2be61e

* commit 'a2be61ed16bcb406030ff01a30e4dec90a8ff5de':
  Fix dependencies around tools/*-event-log-tags.py

Change-Id: I8fee3f7846e723d46eb26356798eedb9566f3a28
2016-03-29 20:51:05 +00:00
Shinichiro Hamaji d3ce14c325 Fix dependencies around tools/*-event-log-tags.py
We should regenerate merged tag files and java sources when
these scripts are updated.

Change-Id: Id5f11d6f480f3f74dab08f01e929ee2d7fafd2d0
2016-03-30 03:04:40 +09:00
Baligh Uddin ce49c77515 Add ability to package verifiedboot keys
am: f9d6850

* commit 'f9d685008d573bc34b247e586ff45588a2fdb808':
  Add ability to package verifiedboot keys
2016-03-28 22:24:57 +00:00
Baligh Uddin f9d685008d Add ability to package verifiedboot keys 2016-03-28 13:09:03 -07:00
Ying Wang fbc5b9f56b 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
(cherry-pick from commit 3a61eeb6cb)
2016-03-25 11:06:04 -07:00
Johan Redestig 90adcf0d66 Merge "Add libbase to otatools"
am: 20d4e10

* commit '20d4e10bf399932c9e91d535fd0fb54301552210':
  Add libbase to otatools
2016-03-24 22:42:44 +00:00
Johan Redestig 8f800df5f0 Add libbase to otatools
build_verity_tree uses libbase since b104044.

Change-Id: I6d3406a107ceb6cd58d1a51aa79935209d4c435f
2016-03-24 14:17:51 +01:00
Dan Willemsen 1e061d789a Merge "Remove ALL_PREBUILT, all users have been removed"
am: cfb5545

* commit 'cfb554566447b31cd045a5b67b960018418fe874':
  Remove ALL_PREBUILT, all users have been removed
2016-03-23 23:19:27 +00:00
Dan Willemsen 3006962257 Remove ALL_PREBUILT, all users have been removed
Change-Id: I37154506ef419e7a68ce7e2d864624d2ae53206f
2016-03-23 14:15:16 -07:00
David Zeuthen 1b61e038e6 Merge "Add support for Brillo Verified Boot."
am: 003bec4

* commit '003bec431cc133134bbb29040f6c01d3f608e6ee':
  Add support for Brillo Verified Boot.
2016-03-21 15:55:23 +00:00
David Zeuthen d995f4b04d Add support for Brillo Verified Boot.
The following variables are introduced

 BOARD_BVB_ENABLE: can be set to true to build boot.img and system.img
 files compatible with Brillo Verfied Boot.

 BOARD_BVB_ROLLBACK_INDEX: can be set to an integer to use for the
 rollback index.

 BOARD_BVB_KEY_PATH, BOARD_BVB_ALGORITHM: If set, the former must be a
 path to the private key used to sign the boot image and the latter must
 be the algorithm to use. If unset, a test-key stored in the tree will
 be used.

 BOARD_BVB_MAKE_BOOT_IMAGE_ARGS: Extra options to pass to 'bvbtool
 make_boot_image'.

 BOARD_BVB_SIGN_BOOT_IMAGE_ARGS: Extra options to pass to 'bvbtool
 sign_boot_image'.

 BOARD_BVB_ADD_IMAGE_HASHES_ARGS: Extra options to pass to 'bvbtool
 add_image_hashes'.

 BOARD_CUSTOM_BVBTOOL: Can be set to specify what bvbtool program to
 use.

The existing BOARD_KERNEL_CMDLINE variable is also used, as are existing
kernel and initrd-related variables. Therefore, simply adding

 BOARD_BVB_ENABLE := true

to an existing Makefile should do the trick.

Bug: 26185038
TEST=Added 'BOARD_BVB_ENABLE := true' to hardware/bsp/intel/soc/edison/soc.mk
  and built an image and then ran bvbtool's info_boot_image and
  info_image_hashes commands on the resulting boot.img and system.img
  files and verified that the information was correct. Also ran 'm dist'
  and verified that the boot.img and system.img files in the resulting
  target_files.zip file had similar information.

Change-Id: I08045ed8b0cbddc7c3acdd3a6f2c4bb75cb44bbc
2016-03-18 15:25:43 -04: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
Yohann Roussel 0ee9995724 resolve merge conflicts of c8cfac9 to nyc-dev-plus-aosp
Change-Id: I77317dcaaa4154d6649b36b215df1474721a6503
2016-03-18 10:12:27 +01:00
Yohann Roussel c8cfac947b Merge "Remove JILL, JACK_JAR and JILL_JAR" 2016-03-18 08:54:30 +00:00
Sen Jiang 80bcf0f580 Merge "Add zlib_fingerprint to target_files.zip"
am: 4e9a86f

* commit '4e9a86fb6e9a9f31c505dfa68285067964f70a8f':
  Add zlib_fingerprint to target_files.zip
2016-03-17 19:53:04 +00:00
Yohann Roussel 233584bb80 Remove JILL, JACK_JAR and JILL_JAR
Also ensure that sdk.atree can find jack.jar and jill.jar from prebuilt.

Bug: 27372042
Change-Id: Ie266104e51c09fa21ccb09c1f27ad7068472965c
2016-03-17 15:21:28 +01:00
Sen Jiang 4438fd909e Add zlib_fingerprint to target_files.zip
Test: make dist on edison-userdebug
Bug: 27156099

Change-Id: I4ba9095ecc5bb1730b8d0ba2d56d20fdbff3acaa
2016-03-16 11:28:19 -07:00
Sen Jiang 8d754a5e0b Merge "Revert "Add zlib_fingerprint to target_files.zip""
am: d2ca52d

* commit 'd2ca52df8c7ac08c3191118fa8606816d20ac119':
  Revert "Add zlib_fingerprint to target_files.zip"
2016-03-16 04:12:44 +00:00
Sen Jiang 040141becb Revert "Add zlib_fingerprint to target_files.zip"
This reverts commit d8c715bf34.

Change-Id: Ie0c3c5b2db89fe076d678b67f013c20e836d825f
2016-03-16 03:38:29 +00:00
Sen Jiang e55b1ffa8c Merge "Add zlib_fingerprint to target_files.zip"
am: 65aa976

* commit '65aa9761539736e4ab5622d0cff5d8160cc620f8':
  Add zlib_fingerprint to target_files.zip
2016-03-16 03:06:32 +00:00
Ying Wang c9a19779a2 resolve merge conflicts of fc16dca602 to nyc-dev-plus-aosp
Now we can remove all uses of $(ACP) in prebuilt_internal.mk.

Change-Id: I07a449f3acca9b56c6a387ff8ca1535d19c872d1
2016-03-15 14:46:12 -07: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
Sami Tolvanen 4abe19c584 Merge "Revert "Revert "build: pass version and patch level to mkbootimg"""
am: b1e99acb00

* commit 'b1e99acb00818c0dc244a4203106177eb28ca66b':
  Revert "Revert "build: pass version and patch level to mkbootimg""
2016-03-15 17:47:08 +00:00
Sami Tolvanen b1e99acb00 Merge "Revert "Revert "build: pass version and patch level to mkbootimg""" 2016-03-15 17:37:27 +00:00
Sami Tolvanen 3303d909a1 Revert "Revert "build: pass version and patch level to mkbootimg""
This reverts commit 494a9090f9.

Bug: 27498078
Bug: 22914603
Change-Id: Iee6a784271ec32c6bfcc0a6ad3f0395d82016df3
2016-03-15 16:49:30 +00: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
Sami Tolvanen 478eb605b7 Merge "Revert "build: pass version and patch level to mkbootimg""
am: 926096eff6

* commit '926096eff685265912f3050bb43715cfa36df0aa':
  Revert "build: pass version and patch level to mkbootimg"
2016-03-11 00:24:23 +00:00
Sami Tolvanen 926096eff6 Merge "Revert "build: pass version and patch level to mkbootimg"" 2016-03-11 00:11:25 +00:00
Sami Tolvanen 494a9090f9 Revert "build: pass version and patch level to mkbootimg"
This reverts commit 8fb47f191f.

Bug: 27580174
Change-Id: Id87fd1e8da217438757d5a0fa4bbef7aea6770fc
2016-03-11 00:08:57 +00:00
Ying Wang 6b7497ad1a Add dependency on boot_singer and vboot_singer if necessary.
am: bd07ad01b5

* commit 'bd07ad01b554694f1d3b290fb066033866ededc4':
  Add dependency on boot_singer and vboot_singer if necessary.
2016-03-10 22:18:25 +00:00
Sen Jiang d8c715bf34 Add zlib_fingerprint to target_files.zip
Test: make dist
Bug: 27156099

Change-Id: I4608de70ad4dfe6523b832bbf7002dcccefe932f
2016-03-10 13:46:47 -08: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 2b4ddff0eb Merge "Hook incremental ext4 image generation into build" into nyc-dev
am: 6a3185f23d

* commit '6a3185f23d820f31cc928d5467eda94f3a93e31c':
  Hook incremental ext4 image generation into build
2016-03-09 21:07:30 +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
Sami Tolvanen 01347fce66 Merge "build: pass version and patch level to mkbootimg" am: b32d845090
am: 450f15111c

* commit '450f15111ccd9fa54382e159a145954273f45b15':
  build: pass version and patch level to mkbootimg
2016-03-08 16:10:23 +00:00
Sami Tolvanen 450f15111c Merge "build: pass version and patch level to mkbootimg"
am: b32d845090

* commit 'b32d845090d19d2dfbbf32d4628ef81478325927':
  build: pass version and patch level to mkbootimg
2016-03-08 16:08:14 +00:00
Sami Tolvanen 8fb47f191f 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
2016-03-07 11:55:22 -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 23afb78cf9 Merge commit 'cdaf748e3abefd93a4e45393e96717fad8564c51'
Change-Id: I3c44564b08ed46f46719dbca54d4225718bb8c59
2016-03-01 15:36:08 -08:00
Dan Willemsen cdaf748e3a Merge changes I12810c1b,I62287a80,Ied96fdc3
am: a65b01fc09

* commit 'a65b01fc09b47c83e59dc4757c76eafba1e15cbc':
  Remove LOCAL_ACP_UNAVAILABLE
  Remove unused dependencies on $(ACP)
  Replace some uses of acp with cp
2016-03-01 23:19:33 +00:00
Dan Willemsen 7f016150a0 Remove unused dependencies on $(ACP)
Most of these are calling to copy-file-to-target or similar, which no
longer use $(ACP).

Change-Id: I62287a80c577c34df587b74e70055c2f56050ce7
2016-03-01 13:15:35 -08:00
Dan Willemsen 3d29cc30f2 Merge "Warn more clearly when there are duplicate copied headers" am: ca4b755563
am: 25afe2deec

* commit '25afe2deec50fe4d9250bf2362d67560d29b5049':
  Warn more clearly when there are duplicate copied headers
2016-02-24 00:20:05 +00: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
Dan Willemsen 25afe2deec Merge "Warn more clearly when there are duplicate copied headers"
am: ca4b755563

* commit 'ca4b755563aa8d6d7544b38067bb82567f5fa255':
  Warn more clearly when there are duplicate copied headers
2016-02-23 23:53:58 +00:00
Dan Willemsen 6f60f020d7 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
2016-02-23 13:40:07 -08:00
Bill Yi 4a459aee75 Merge commit '75bbddecaa9f9d82c2f2751b389188f0a41e3284' into HEAD 2016-02-17 09:50:15 -08:00
Tao Bao 3124af3028 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
(cherry picked from commit fdd2693b65)
2016-02-11 10:50:05 -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
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 0d79956676 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

(cherry picked from commit 41ac44ed2b)

Change-Id: I07e3a5e896230ed3ce1c102c607cbd1aa02c67e0
2015-12-10 18:12:36 -08:00
Alex Deymo 2001743c7a Merge "Rename libext2 host libraries to standard suffix."
am: 6950168f1d

* commit '6950168f1d4bd6ddfd64755c26d7de6ef3709f00':
  Rename libext2 host libraries to standard suffix.
2015-12-10 14:28:46 -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 207744061e Merge "Fix TARGET_ASAN build." am: 9bbc67b55a am: 4f0cb0307b
am: 8d5ff73ce4

* commit '8d5ff73ce4a3a48a414f25289ba5220f3e91f0cd':
  Fix TARGET_ASAN build.
2015-12-08 03:04:43 +00:00
Ying Wang 8d5ff73ce4 Merge "Fix TARGET_ASAN build." am: 9bbc67b55a
am: 4f0cb0307b

* commit '4f0cb0307b93b407abe110f3d17085d7807c137c':
  Fix TARGET_ASAN build.
2015-12-08 03:01:18 +00:00
Ying Wang 03b6e8b6c4 Fix TARGET_ASAN build.
Bug: 26044735
Change-Id: I9c6b3b16637ca2d0da4765e896a9f03c1d5dc51c
2015-12-07 10:45:19 -08:00
Ying Wang 7cc096ed20 Merge "make USER limited to 6 characters when generating BF_BUILD_NUMBER" am: 88ca8aff3e am: 79215cdeab
am: 4c6b66e617

* commit '4c6b66e6172ffcc879ff48f2a245f670471f52e2':
  make USER limited to 6 characters when generating BF_BUILD_NUMBER
2015-12-02 17:58:00 +00:00
Ying Wang 4c6b66e617 Merge "make USER limited to 6 characters when generating BF_BUILD_NUMBER" am: 88ca8aff3e
am: 79215cdeab

* commit '79215cdeabbc43e47cbfe212eed02e6958ebfb8b':
  make USER limited to 6 characters when generating BF_BUILD_NUMBER
2015-12-02 17:55:18 +00: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 0ed2001f91 Merge "Stop packaging obsolete OTA tools." am: b98fa19703 am: e82ea963e8
am: 2867533add

* commit '2867533add946cd9d2294ed3b4976f5ecf7aa76e':
  Stop packaging obsolete OTA tools.
2015-12-01 02:34:58 +00:00
Tao Bao 2867533add Merge "Stop packaging obsolete OTA tools." am: b98fa19703
am: e82ea963e8

* commit 'e82ea963e8cf5d7eb2dd6d2c7aacee86ddfba853':
  Stop packaging obsolete OTA tools.
2015-12-01 02:31:24 +00: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
Tao Bao fe77901c19 Add ro.build.ab_update property. am: 532fdf4479
am: c684a97329

* commit 'c684a973299fa21ed945db8ccca2034e7a5b12b3':
  Add ro.build.ab_update property.
2015-11-19 18:45:56 +00:00
Tao Bao c684a97329 Add ro.build.ab_update property.
am: 532fdf4479

* commit '532fdf4479acb50cdb480e6fdfe24f0698fcd67b':
  Add ro.build.ab_update property.
2015-11-19 18:42:52 +00:00
Tao Bao 532fdf4479 Add ro.build.ab_update property.
Set ro.build.ab_update if AB_OTA_UPDATER is true. Device will depend on
this property to call the proper update API.

Change-Id: I5916ef5b30ea3351d323382f7ce83a17df2b0a70
2015-11-16 12:38:07 -08:00
Tao Bao f4d759930c build: Fix "adb shell" in recovery for system_root_image.
For system images that contain the root directory, "adb shell" in
recovery stops working if the image is mounted at "/system", because
sh now locates at /system/system/bin/sh. We fix the issue by mounting
the image on /system_root and create a symlink to /system_root/system
for /system.

Bug: 22855115
Change-Id: Ia6b257b75aeb67687c3909063d1725a23a5ccd60
2015-11-16 12:38:07 -08:00
Tao Bao 97b906b004 build: Support packaging for system_root_image.
If system image contains the root directory
(BOARD_BUILD_SYSTEM_ROOT_IMAGE == "true"), we package the root directory
into ROOT/ instead of BOOT/RAMDISK/ in the target_files zip.

Change-Id: I817776ca97194991308b2131d0e34ab136283464
2015-11-16 12:02:24 -08:00
Tao Bao 6ed1491402 Support systems that use a full copy of recovery image.
If BOARD_USES_FULL_RECOVERY_IMAGE == true, a full copy of recovery
image will be carried as /system/etc/recovery.img instead of a patch
at /system/recovery_from_boot.p.

Bug: 22641135
Change-Id: Ie271d3e2d55d7b003f667ac5b44203d69b23c63b
(cherry picked from commit 8beab69bd5)
2015-11-16 12:02:24 -08:00
Daniel Rosenberg 752ecc219a build: core: Fix issue in recovery
Now that symlinks are created at build time, the rsync while
making recovery runs into issues around the etc symlink

Change-Id: Ie781507b22e4661629840075b274eaab2f712de6
2015-11-16 12:02:24 -08:00
Daniel Rosenberg fa7f9f7e0c Add ro.build.system_root_image
ro.build.system_root_image is true if the root directory is built
into the system image.

Change-Id: I17208ebd004c63aebb09db6c3e5f795619e73bd2
2015-11-16 12:02:24 -08:00
Tao Bao 37b96ef26b 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: Ia7f08943834ee39e781d7e9b5beb1b31d95a73d9
(cherry picked from commit db45efa647)
2015-11-16 12:02:24 -08:00
Tao Bao 60ad0cdc22 build: Don't call make_recovery_patch if there's no recovery.
Change-Id: I7ae57f6d69293645f88cbe9cc61b7cbbe8d12430
(cherry picked from commit cbc6dc29d6)
2015-11-16 12:02:24 -08:00
Sen Jiang c969984b96 Merge "Write AB_OTA_POSTINSTALL_CONFIG to META/postinstall_config.txt." am: 99d5f361b4 am: 48ea511512
am: 0cac39037d

* commit '0cac39037d68e6efc9caa2745d1ff41e22c8f6a3':
  Write AB_OTA_POSTINSTALL_CONFIG to META/postinstall_config.txt.
2015-11-13 19:23:41 +00: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 2fd618ac56 Merge "build: Remove check_prereq." am: 79dd4b2983 am: 741c16686e
am: 0fa52e0d15

* commit '0fa52e0d1598290bd83b4a7a6536848e20628db2':
  build: Remove check_prereq.
2015-11-12 23:04:44 +00: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 e7d5d9f46c Merge "build: Add LINUX_KERNEL_COPYING license file" am: 8b2c37c953 am: 5bd31df419
am: b1c8a7ee94

* commit 'b1c8a7ee9454ca6c43a6d3257563b13b710d86e5':
  build: Add LINUX_KERNEL_COPYING license file
2015-11-09 20:53:44 +00: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 ce99cbca6c Merge "Add the build type to META folder in target files.zip" am: 53a6fd6498 am: dc43cddbf6
am: 60bc4bf8fc

* commit '60bc4bf8fc5828d1725d8bbf1ef35c4e1a8ccbdf':
  Add the build type to META folder in target files.zip
2015-11-06 03:28:04 +00: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 16a27b40eb Merge "Don\'t run ziptime on host zip files." am: 7f50cf7f50 am: 3a5c02e295
am: 3932de119a

* commit '3932de119a79ec3ddf5972722a9cb6fb8e4526b1':
  Don't run ziptime on host zip files.
2015-11-04 18:45:19 +00: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 641e8888fa Merge "Remove changing uids/timestamps from zip/jar files" am: a0975edc16
am: c789be850c

* commit 'c789be850ca14b945e72412457991d7a5e13126e':
  Remove changing uids/timestamps from zip/jar files
2015-11-03 23:43:30 +00:00
Dan Willemsen a0975edc16 Merge "Remove changing uids/timestamps from zip/jar files" 2015-11-03 21:38:45 +00:00
Gaurav Shah e5d70ac39a Merge "Support build targets with no installable apps/packages" am: aed6805380 am: 00b8cd9a15
am: 4b566a1d8b

* commit '4b566a1d8be4946cf0b756fe5a98af3ff57cb267':
  Support build targets with no installable apps/packages
2015-11-03 00:49:10 +00:00
Gaurav Shah 5af8f74bae Merge "build: Add extra build customization for /product" am: a80f1e3257 am: 64ea350dd8
am: 8e712959cf

* commit '8e712959cf8a8b9b454d1e50f960eef9d97cfbc9':
  build: Add extra build customization for /product
2015-11-03 00:49:03 +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