Commit graph

2271 commits

Author SHA1 Message Date
Hridya Valsaraju
70f8340a23 Merge "Allow for the DTB image to be built by the Android build system." am: 0c45b0d982
am: f8a9d57439

Change-Id: Iee1434697514a9d442c22562c0d1e36a031d9f92
2019-05-22 05:22:48 -07:00
Treehugger Robot
0c45b0d982 Merge "Allow for the DTB image to be built by the Android build system." 2019-05-22 07:28:24 +00:00
Hridya Valsaraju
59eaef078d Allow for the DTB image to be built by the Android build system.
The current solution expects BOARD_PREBUILT_DTBIMAGE_DIR to
contain prebuilt DTB files that are concatenated by the build system
to create $OUT/dtb.img. In order to accommodate devices that build
the dtb image locally, make boot.img creation depend on $OUT/dtb.img
only when BOARD_PREBUILT_DTBIMAGE_DIR is undefined.

Bug: 133161451
Test: Build with BOARD_PREBUILT_DTBIMAGE_DIR undefined and verify
using unpack_bootimg.py that $OUT/dtb.img was included in boot.img.

Change-Id: Iae2c634ccdc1d83589b26d382882f75fb8565a31
2019-05-22 03:51:41 +00:00
Chris Gross
99a22624a5 Merge "Add merging of apexkeys and apkcerts metadata" am: a489a92fdc
am: 07d985d122

Change-Id: Ib5e6d864f3704ffeeb4adb1933bb34f92d3511d8
2019-05-20 18:24:32 -07:00
Colin Cross
55a499b28b Merge "Move check-all-partition-sizes to a non-phony rule" am: 2ee5efd824
am: 468549471a

Change-Id: Ia83d37b549c97fd3dc91f6f3fddc7328fb2696bf
2019-05-20 18:23:36 -07:00
Chris Gross
a489a92fdc Merge "Add merging of apexkeys and apkcerts metadata" 2019-05-20 23:36:45 +00:00
Chris Gross
fabf50a577 Add merging of apexkeys and apkcerts metadata
Bug: 131437873
Test: Built system-only and vendor builds for merge. Compared
resulting apkcertx and apexkeys text files to that of a monolithic
build,
Test: Created colliding entries in both apexkeys and apkcerts text
files and ensure the script exited with an appropriate error message.
Test: Created unit tests to cover both non-colliding and colliding
entries
Change-Id: I6e42ce682ffa9059344e8cd63ba3a720c1f93452
2019-05-20 18:35:22 +00:00
Colin Cross
606c9f4d0d Move check-all-partition-sizes to a non-phony rule
Phony rules with recipes run on every build, move the recipe for
check-all-partition-sizes to a rule with an output.

Fixes: 132900128
Test: m && m
Change-Id: I9b4d335bf269cd09a01094e895fc15053b410415
2019-05-17 15:51:39 -07:00
Bowgo Tsai
813f0a975c Merge "Appending per-partition os_version into AVB props" am: 196f64bc6b
am: 5aa1aecc21

Change-Id: Ia1aa5965dfa03403f3bab5ea1acc42fbe6d9e113
2019-05-16 04:44:36 -07:00
Bowgo Tsai
9b54801b58 Appending per-partition os_version into AVB props
os_version is important for keymaster version binding, where it
refuses to perform operations with a key that is bound to an old
system version.  This ensures that an attacker who discovers a
weakness in an old version of system or TEE software cannot roll a
device back to the vulnerable version and use keys created with the
newer version.

Previously, os_version for system.img is added into boot.img header
for bootloader to read the value then pass to TEE before booting the
HLOS. However, with project Treble to modularize each partition, all
images are now in the trajectory to be built independently (still
on-going). Also, in the Generic System Image (GSI) compliance test,
the os_version in OEM's boot.img cannot reflect the actual version of
GSI.

This CL adds per-partition os_versions into AVB metadata, which is
readable by bootloader via libavb without file system dependency. It's
still unclear for how os_version in non-system partition should be used.
We just add them for completeness here.

See more details in:
https://source.android.com/security/keystore/version-binding

Bug: 132233601
Test: build and avbtool info_image $OUT/vbmeta.img
      - Prop: com.android.build.boot.os_version -> '10'
      - Prop: com.android.build.system.os_version -> '10'
      - Prop: com.android.build.system.security_patch -> '2019-06-05'
      - Prop: com.android.build.vendor.os_version -> '10'
      - Prop: com.android.build.vendor.security_patch -> '2019-06-05'
      - Prop: com.android.build.product.os_version -> '10'
      - Prop: com.android.build.product.security_patch -> '2019-06-05'

Change-Id: I21a77420f2e8a3456f7a8cae5158eb8fc41319e7
2019-05-16 12:56:41 +08:00
Hridya Valsaraju
6cf5155f31 Merge "Move ro.boot.dynamic_partitions to vendor/build.prop" am: e591ef32a0
am: 1c87bffec6

Change-Id: Iac569cd79d6cdbe33ed3761ffc6c2bbb3e3bb6d9
2019-05-08 15:29:56 -07:00
Treehugger Robot
e591ef32a0 Merge "Move ro.boot.dynamic_partitions to vendor/build.prop" 2019-05-08 21:39:26 +00:00
Chris Gross
b56351ac7b Merge "Add BUILD_RECOVERY_IMAGE and BUILD_BOOT_IMAGE flags" am: 84c96eba1e
am: e9425427c2

Change-Id: I367fdc842308a47b6a68dd416788bffa61f11764
2019-05-08 11:35:40 -07:00
Chris Gross
84c96eba1e Merge "Add BUILD_RECOVERY_IMAGE and BUILD_BOOT_IMAGE flags" 2019-05-08 18:21:42 +00:00
Hridya Valsaraju
1fd498d748 Move ro.boot.dynamic_partitions to vendor/build.prop
Bug: 132197773
Test: property present in vendor/build.prop

Currently, the property resides in product partition which gets
overwritten by the GSI image. Moving it to vendor will ensure
that the property is set even when a GSI image is flashed on the device.

Change-Id: I4d4a3c473194e15ba124a121f89bbb3ec1a73d19
2019-05-08 16:22:06 +00:00
Tao Bao
5a35c87281 Merge "Compute the needed shared libs for otatools." am: 5eba1c9a67
am: 5fd2a085c3

Change-Id: I1b82b6858c0b3e2578a1709f7e5ab65adf620735
2019-05-07 21:34:25 -07:00
Treehugger Robot
5eba1c9a67 Merge "Compute the needed shared libs for otatools." 2019-05-08 03:44:33 +00:00
Colin Cross
7d352e2e37 Merge "Use --ignore_missing_files when creating symbols.zip" am: 96ba044c94
am: 2022a3bea7

Change-Id: I8658224759864c9acfd94574117f6c2c972cd305
2019-05-07 15:34:14 -07:00
Colin Cross
8d34244739 Use --ignore_missing_files when creating symbols.zip
symbols.zip is created while files that are not part of the platform
build but were requested on the Make command line (for example by
passing "tests") are still being installed.  Installation often
involves removing and then recreating the file.  If the file
exists when the list of files to be zipped is created, but is
removed when soong_zip is zipping, it fails with an error.  Pass
--ignore_missing_files to silence the error and keep zipping.

Fixes: 79503862
Test: m checkbuild
Change-Id: I1fbbf1f1396948288ee133c319b2e19dee97983b
2019-05-07 11:47:13 -07:00
Chris Gross
a784ef197c Add BUILD_RECOVERY_IMAGE and BUILD_BOOT_IMAGE flags
Bug: 123428770
Test: Built system-only image and checked that no boot.img or
recovery.img files where created. Booted the resulting merged build on
device.

Change-Id: I760476502775e68125907c39e66b8665e789a798
2019-05-07 11:00:37 -07:00
Tao Bao
96daeebd0e Compute the needed shared libs for otatools.
This keeps the packed shared libs in sync with their executables.

This CL also changes the packing location of mke2fs.conf, from
system/extras/ext4_utils/mke2fs.conf to bin/mke2fs.conf.

Bug: 34738751
Test: `m -j otatools-package`. Compare the packed files against the ones
      prior to this CL.
Change-Id: Icae88e3cd898460f5ba7dc11ab8a57350630c432
2019-05-06 20:03:57 -07:00
Bowgo Tsai
dd0739a150 Merge "Using a test key to sign boot-debug.img if needed" am: 38809bdf99
am: f446127bfd

Change-Id: Ic674845eb69d1d73c7acc5c2014467ab88df7a08
2019-05-06 19:08:49 -07:00
Treehugger Robot
38809bdf99 Merge "Using a test key to sign boot-debug.img if needed" 2019-05-07 01:07:02 +00:00
Tao Bao
ff18d4a79a Merge "Remove unused shared libs from otatools." am: 59c700154b
am: 844d65efe8

Change-Id: I3ae40279986e54cb87fbd889e60b9a4876eb4b50
2019-05-06 09:47:52 -07:00
Tao Bao
59c700154b Merge "Remove unused shared libs from otatools." 2019-05-06 16:32:25 +00:00
Tao Bao
1d642bc382 Remove unused shared libs from otatools.
libcurl-host.so was added for delta_generator (commit f8e6fbe2f5).
libext2_misc.so and libext2_profile-host.so were added for e2fsck and
build_verity_tree (commit d0ec665727). None of them is actively used by
otatools.

Bug: 34738751
Test: `m -j otatools-package`. Unzip and check that there's no missing
      shared libs reported by ldd.
Change-Id: Id229e450f5f2eaa03a6c6cf568a1912add06754c
2019-05-05 20:42:25 -07:00
bohu
9492ee3d1b emulator: support dynamic partitions
BUG: 125540538

Change-Id: I9d486f57ac4ec11b1bbe9ab97890d12441c3054e
Merged-In: I9d486f57ac4ec11b1bbe9ab97890d12441c3054e
2019-05-05 20:34:02 -07:00
Bowgo Tsai
26b0a26e3e Using a test key to sign boot-debug.img if needed
When /boot partition is chained in AVB signing, libavb will try to
read AVB footer from the end of /boot partition, even if the device is
unlocked. However, this makes device unbootable when the unsigned
boot-debug.img is flashed on /boot partition. This CL uses a test key
from external/avb to sign the boot-debug.img if /boot partition is
chained.

Bug: 126493225
Bug: 129508966
Test: Enables chain partition for boot.img, `make bootimage_debug` then
      checks `avbtool info_image --image $OUT/boot-debug.img`
Test: `make bootimage_debug-nodeps`
Test: boot a device with a chained boot-debug.img

Change-Id: I870cb70c70b7d4d7a30b77bed58cbca6e007d5e3
2019-05-04 09:01:09 +08:00
Martin Stjernholm
f853c6c747 Merge "Add the library absence check as a kati stage check." am: 6c0a3af4bf
am: 175f8da975

Change-Id: I4fc27834a2f4285b18248c11755bae05a015226e
2019-05-03 08:24:46 -07:00
Treehugger Robot
6c0a3af4bf Merge "Add the library absence check as a kati stage check." 2019-05-03 15:09:18 +00:00
Tao Bao
721a294a1c Merge "Update the references to verity tools." am: 31c2bf905e
am: ee153db46a

Change-Id: I9f6b38c0538b8b0e9146c622dfb807f170398c8d
2019-05-03 06:59:30 -07:00
Tao Bao
31c2bf905e Merge "Update the references to verity tools." 2019-05-03 13:41:45 +00:00
Martin Stjernholm
b0382f0319 Add the library absence check as a kati stage check.
Primarily for use with build_test during presubmit.

Moved the check to main.mk to avoid nonobvious dependency on
product_target_FILES from main.mk to Makefile.

Test: m systemimage
Test: build/soong/build_test.bash
Test: m out/target/product/taimen/system/lib/libdexfile.so; m systemimage;
  check that "find"-based check fails
Test: Add a system library to APEX_MODULE_LIBS; m systemimage;
  check that "product_target_FILES"-based check fails;
  env DISABLE_APEX_LIBS_ABSENCE_CHECK=true m systemimage;
  check that it works
Bug: 124293228
Change-Id: I7a93cc0ac4480404a3d56c75eb43ae499e8a3a05
2019-05-03 13:02:51 +01:00
Tao Bao
d5ab10eed4 Update the references to verity tools.
Test: `m -j dist` with aosp_marlin-userdebug
Test: `atest releasetools_test`
Test: Run signing with otatools.
Test: TreeHugger
Change-Id: I60d5bad4435d588c5f97b2245ca67ed3d55299b7
2019-05-02 18:32:11 -07:00
bohu
a3deb4f04b emulator: support dynamic partitions
BUG: 125540538

Change-Id: I9d486f57ac4ec11b1bbe9ab97890d12441c3054e
2019-05-02 09:32:06 -07:00
Martin Stjernholm
e0db852037 Merge "Add libs that have been resolved to the library absence check." am: a6dc671385
am: 6806771997

Change-Id: If65dfcdf5492918ad4dc6f1e6d48d6087feadb8d
2019-05-02 07:26:05 -07:00
Martin Stjernholm
ee30c73c63 Add libs that have been resolved to the library absence check.
Note: libtombstoned_client.so was moved from the Runtime APEX to system with
http://r.android.com/941388.

Test: m systemimage
Bug: 124293228
Bug: 131587358
Change-Id: I9e517d3c2344b39cf2743a34723572e646675677
2019-05-02 12:01:02 +01:00
Anton Hansson
064f04343f Merge "Remove unneeded bootimage properties" am: 1739f23404
am: b5acdba94f

Change-Id: I0490824254c42cd1feb1d41d63923ab193de0d4b
2019-05-01 14:30:19 -07:00
Anton Hansson
f299889513 Remove unneeded bootimage properties
These were added as part of http://r.android.com/731514, but
most of these properties make no sense for the bootimage. Revert
to only defining date, date.utc and fingerprint.

Bug: 131066061
Test: inspect vendor/build.prop
Test: boot, no SELinux warnings for removed props
Change-Id: Ibbeff9870a5b71e83c2cceeb1327b12600077b23
2019-05-01 13:20:27 +01:00
Yifan Hong
e834be384e Merge "Add BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE flag." am: a2488b7d85
am: 6e2eb931a7

Change-Id: I7d1520bdaa9057680ecc3496d7baf2539d25d9e4
2019-04-30 13:14:11 -07:00
Yifan Hong
0e97dbb8ca Add BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE flag.
When set, product-img-tag.zip contains super.img instead of individual
user images from target files. For virtual devices, super.img is needed
to boot the device, but individual user images aren't needed.

Test: on A/B DAP, with flag set:
     - m updatepackage and look at img.zip
     - img_from_target_files
     both have super.img and not system / vendor / system_other
Test: on non-A/B DAP, with the flag set:
     - m updatepackage and look at img.zip
     - img_from_target_files
     both have super.img and not system / vendor
Test: on A/B retrofit, with the flag set:
     - m updatepackage and look at img.zip
     - img_from_target_files
     both have super_*.img and system_other.img, but not system / vendor
Bug: 113175337

Change-Id: I94e33091d0c837cae40776176b4dcfdd338aba90
2019-04-29 10:50:42 -07:00
Yifan Hong
7bf94ac60a Merge "Add BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT flag." am: 8bfcc69e38
am: c8be0f5942

Change-Id: I0c24addbe00f628657f470eb45637aa3702a3c0c
2019-04-26 14:42:27 -07:00
Yifan Hong
8bfcc69e38 Merge "Add BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT flag." 2019-04-26 21:30:07 +00:00
Yifan Hong
f17f1f6eef Merge "Fix mainline_mixed build" am: 484a6e53c1
am: f97b171594

Change-Id: I6bc6b76d21e49a5ade540b8130530d87e1eb7fc2
2019-04-26 14:17:43 -07:00
Yifan Hong
7e6397c2d5 Fix mainline_mixed build
build_mixed script can't merge system and product VINTF
data yet.

Fixes: 131418170
Bug: 131425279
Test: build 'target_files_package' for 'mainline_system_google_arm64',
see META/system_manifest.xml

Change-Id: I366d9bc802ee0e6bdf8fe480303f3fee827c579d
2019-04-26 12:30:31 -07:00
Pete Bentley
c3b9f66cd1 Merge "Remove libjavacrypto from system image." am: 4ec15d2c50
am: 229ba6c8ee

Change-Id: Ic879fa9a3b3137182ab77150fee563303148f3d4
2019-04-26 11:14:36 -07:00
Treehugger Robot
4ec15d2c50 Merge "Remove libjavacrypto from system image." 2019-04-26 18:00:38 +00:00
Martin Stjernholm
a943dcb4b1 Merge "Ignore vndk-* subdirectories in the library absence check." am: eccbfd5f4e
am: 13b81b4eee

Change-Id: Ie7a57bc37c9ff8fec4fad4b9f88d79a226c568a7
2019-04-26 07:46:01 -07:00
Treehugger Robot
eccbfd5f4e Merge "Ignore vndk-* subdirectories in the library absence check." 2019-04-26 14:23:54 +00:00
Martin Stjernholm
60bb358221 Ignore vndk-* subdirectories in the library absence check.
They only contain prebuilts from older releases.

Test: m systemimage on affected internal lunch targets
Bug: 124293228
Change-Id: I059c9d0edb78e52838a25cef0472807847d77417
2019-04-26 12:12:34 +00:00