Commit graph

55030 commits

Author SHA1 Message Date
Treehugger Robot
d6d27517f7 Merge "Remove stray ZIPALIGN_PAGE_ALIGN_FLAGS" 2019-10-11 13:12:29 +00:00
Treehugger Robot
46cfab96d8 Merge "Fix odm output directory for devices w/o vendor partition" 2019-10-11 10:46:43 +00:00
Xin Li
51a7d20229 Merge "DO NOT MERGE - Merge QP1A.191005.007 into master" 2019-10-11 02:56:40 +00:00
Treehugger Robot
0ffe0c6248 Merge "Add Vibrator HAL 1.4" 2019-10-11 00:35:05 +00:00
Xin Li
66ec993fe5 DO NOT MERGE - Merge QP1A.191005.007 into master
Bug: 142297020
Merged-In: I063f0430347d9f1e6ea5a8133204585833ed5ddc
Change-Id: I6fe9ad3f71b30ba7c1cf9d6941450809cfc66909
2019-10-10 22:54:06 +00:00
Tao Bao
549325427b Merge "AVB: decouple vbmeta.img from recovery.img for non-A/B devices" 2019-10-10 20:18:35 +00:00
Colin Cross
bf086436b0 Remove stray ZIPALIGN_PAGE_ALIGN_FLAGS
Iae26e4676c29c68fa3f76187512c82786bfa0522 removed the definition
of ZIPALIGN_PAGE_ALIGN_FLAGS in favor of always using the -p flag,
but left accidentaly left one usage.  Replace it with -p.

Bug: 141212627
Test: m checkbuild
Change-Id: Ica69d9195426f8f30039da211ed1a0ad5dffe8e8
2019-10-10 12:52:13 -07:00
David Anderson
5ff715d088 Merge "Add boot@1.1 to VNDK" 2019-10-10 19:19:49 +00:00
cfig
1aeef725a7 AVB: decouple vbmeta.img from recovery.img for non-A/B devices
For following cases:
Case 1: A/B devices: no change
Case 2: non-A/B devices, with unsigned recovery image:
    not allowed anymore by mandating BOARD_AVB_RECOVERY_KEY_PATH
Case 3: non-A/B devices, with signed recovery image:
    vbmeta.img should not include ChainPartitionDescriptor of recovery.img,
    otherwise device can not even boot into normal mode if recovery partition
    is damaged

This CL will cause a build break if BOARD_AVB_RECOVERY_KEY_PATH
is not set for non-A/B targets with recovery.img
The following is an example to fix the build break by specifying
AVB signing configs for the recovery.img.

BOARD_AVB_RECOVERY_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_RECOVERY_ALGORITHM := SHA256_RSA2048
BOARD_AVB_RECOVERY_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION := 2

Also note that libavb in bootloader needs an update to include this
commit Iaa886037edb18c2ff6c60fa2a7f883ab7303ba1a, to support verifying
recovery.img independently (not through vbmeta.img).

Bug: 130351427
Test (Case 3):
  normal   mode: avb_slot_verify(flags=AVB_SLOT_VERIFY_FLAGS_NONE)
  recovery mode: avb_slot_verify(flags=AVB_SLOT_VERIFY_FLAGS_NO_VBMETA_PARTITION)
Test: PYTHONPATH=build/make/tools/releasetools \
    python -m unittest test_validate_target_files
Test: Use a lunch'd target. `atest --host releasetools_test releasetools_py3_test`
Test: validate_target_files.py with Case-3 target files
Change-Id: I2a73252b385fa463b4abd444923a8acc473df0b4
2019-10-10 14:28:34 +00:00
Lev Proleev
f5f487be03 Merge "Revert "Add NeuralNetworks HAL v1.3"" 2019-10-10 14:06:42 +00:00
Lev Proleev
f1cec4b4a4 Revert "Add NeuralNetworks HAL v1.3"
This reverts commit bace8c091c.

Reason for revert: the topic breaks git_qt-dev-plus-aosp

Change-Id: Idf87926dd40b56b9d6acc2e207be785463f6830a
2019-10-10 13:54:21 +00:00
Lev Proleev
4b49e75a40 Merge "Add NeuralNetworks HAL v1.3" 2019-10-10 10:25:21 +00:00
dianlujitao
339ef4cf3f Fix odm output directory for devices w/o vendor partition
Change-Id: Iba6c169630ea6bf61b9057a9994e5eb824915304
2019-10-10 09:55:09 +08:00
Treehugger Robot
818df7b0d0 Merge "Adding boot-test-harness.img" 2019-10-09 23:49:46 +00:00
Tao Bao
3d33aa7c2c Merge "Remove the workaround that forces rebuilding recovery patch." 2019-10-09 18:22:26 +00:00
Harpreet "Eli" Sangha
a0e253ef0e Add Vibrator HAL 1.4
Test: Build
Change-Id: I8de47f2914cd89a0521c520504ff0dc8000205df
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2019-10-09 13:49:17 +09:00
Tao Bao
cbd6d498d2 Remove the workaround that forces rebuilding recovery patch.
The issue has been addressed on releasetools script side, by specifying
UUID and AVB salt to get reproducible images [1].

[1] https://android-review.googlesource.com/c/platform/build/+/1135332

Fixes: 134525174
Test: `m dist` with a non-A/B target.
      `validate_target_files out/dist/target_files.zip` passes.
Change-Id: Ida6750291706036c9b0c192d8abcde6d65155287
2019-10-08 22:23:37 +00:00
Tao Bao
17f505e7ea Merge "releasetools: Fix the support for getting reproducible images." 2019-10-08 19:53:55 +00:00
David Anderson
a8b633d181 Merge "Add IBootControl HAL 1.1." 2019-10-08 19:03:05 +00:00
Tao Bao
163df7d40b Merge "releasetools: Move BuildInfo into common." 2019-10-08 17:44:15 +00:00
Lev Proleev
bace8c091c Add NeuralNetworks HAL v1.3
Bug: 139120468
Test: m check-vndk-list
Test: m
Change-Id: Id1baae2c00a38e5327ab144db76189f53bcb04cf
Merged-In: Id1baae2c00a38e5327ab144db76189f53bcb04cf
(cherry picked from commit fde53f4e3e)
2019-10-08 16:57:59 +01:00
Tao Bao
dc66f02c54 Merge "releasetools: Move MockScriptWriter into test_utils." 2019-10-08 14:13:47 +00:00
Treehugger Robot
3da3191366 Merge "Fix zsh compatibility issue in build/envsetup.sh" 2019-10-08 11:41:26 +00:00
Bowgo Tsai
5c40c7166f Adding boot-test-harness.img
In commit I30137c3caef91805d9143d404e5e4d06c0fccc30, we added
a boot-debug.img to allow adb root when using an user build GSI image.

However, to run automated tests, it requires additional properties,
which are not needed for GSI compliance:
    ro.audio.silent=1
    ro.test_harness=1

This CL adds an additional boot-test-harness.img for automated tests,
and keeps the original boot-debug.img for GSI compliance.

Note: boot-test-harness.img won't be built by default, it needs
      explicit `make bootimage_test_harness`.

Bug: 140036184
Test: `m bootimage_test_harness`, flashes boot-test-harness.img and checks
      adb root works and test harness props are set.
Test: `m bootimage_test_harness dist -j32`, checks both
      boot-test-harness.img and ramdisk-test-harness.img are under ./out/dist/.
Test: `system/tools/mkbootimg/unpack_bootimg.py --boot_img $OUT/boot-test-harness.img --out ramdisk-test-harness`,
      checks the extracted out/ramdisk is as expected
Test: Run `gunzip -c ramdisk | cpio -idm` for the ramdisk extracted from
      $OUT/boot-test-harness.img and $OUT/boot-debug.img, respectively.
      Then compare the root dirs of both, e.g.,
      `diff -rq --no-dereference ./ramdisk-test-harness ./ramdisk-debug`
Test: `m ramdisk_test_harness-nodeps` and `m bootimage_test_harness-nodeps`
Change-Id: Iadea0b5c933c3b7fa10dcf3d9e85596916b3333d
2019-10-08 10:22:13 +00:00
Tao Bao
3ed35d3d25 releasetools: Fix the support for getting reproducible images.
We used to support getting idempotent images when given the same inputs,
by specifying UUID and AVB salt to the image builders. The support was
broken by Q changes that moved away from build-time fingerprints [1].

This CL addresses the issue by updating the logic in computing UUID and
AVB salt to be based on BuildInfo.fingerprint, as opposed to the
deprecated static build fingerprint.

[1] https://android-review.googlesource.com/c/platform/build/+/892933

Bug: 134525174
Test: TreeHugger
Test: lunch a target; `atest --host releasetools_test releasetools_py3_test`
Test: `m dist`; `unzip out/dist/target_files.zip IMAGES/\*`;
      `zip -d out/dist/target_files.zip IMAGES/\*`
Test: `add_img_to_target_files -a out/dist/target_files.zip`. Verify that
      the rebuilt images are identical to the ones deleted.
Change-Id: I8844fc7f044e9abfcd96a00e8958fa0583c70eaf
2019-10-07 23:32:07 -07:00
Tao Bao
1c320f8573 releasetools: Move BuildInfo into common.
There is no change to module functionalities. Testcases are moved around
accordingly.

Bug: 134525174
Test: TreeHugger
Test: lunch a target; atest --host releasetools_test releasetools_py3_test
Change-Id: I7bc8f49cc239e7c6655fe5e375508f01c1743b94
2019-10-07 20:13:59 -07:00
Tao Bao
e114804150 releasetools: Move MockScriptWriter into test_utils.
Bug: 134525174
Test: TreeHugger
Test: lunch a target; atest --host releasetools_test releasetools_py3_test
Change-Id: I6d30f4d153d59d65227275e1d3285e30dfafd90e
2019-10-07 20:00:34 -07:00
Tao Bao
7e49064030 Merge "releasetools: Update OWNERS." 2019-10-08 02:12:22 +00:00
David Anderson
b9e8d8cac8 Add IBootControl HAL 1.1.
Bug: 138861550
Test: m check-vndk-list
Test: m
Change-Id: If09d031e5acf1178fce942526782a41426c5180b
Merged-In: If09d031e5acf1178fce942526782a41426c5180b
2019-10-07 17:13:11 -07:00
Treehugger Robot
4dc0c25643 Merge "Check if installable before installing unstripped" 2019-10-07 23:56:05 +00:00
Tao Bao
60f5d67677 releasetools: Update OWNERS.
Test: N/A
Change-Id: Ie476ff08a360f15f769e54dca7428a2d055f1a37
2019-10-07 12:39:55 -07:00
Tao Bao
7b1c49a70d Merge "releasetools: Update the handling of recovery fstab." 2019-10-07 19:33:21 +00:00
Tao Bao
e3c95f71e7 Merge "Enforce the consistency between AB_OTA_UPDATER and AB_OTA_PARTITIONS." 2019-10-07 19:06:46 +00:00
Tao Bao
ae3a9a138d Merge "releasetools: Fix releasetools_py3_test." 2019-10-07 19:06:07 +00:00
Tao Bao
d253f8a614 Merge "releasetools: Update tests to match SparseImage change." 2019-10-07 18:52:04 +00:00
Nikita Ioffe
42b2b54c2b Merge "Unconditionally install shim apex on system partition" 2019-10-07 15:10:10 +00:00
Jooyung Han
66bd7385d2 Check if installable before installing unstripped
When LOCAL_UNINSTALLABLE_MODULE is true, the module is not installed.
But its unstripped output is installed to the path based on
my_module_path which is not set for it is not installable. Moreover,
my_module_path is not reset after use.

As a result, when LOCAL_UNINSTALLABLE_MODULE is true, the path for
unstripped output is unexpected.

The installation is guarded by LOCAL_UNINSTALLABLE_MODULE now,
which was LOCAL_VNDK_DEPEND_ON_CORE_VARIANT.

Test: m
Change-Id: If18cf76118e058a9e0701a8d66f7ff0f534e5881
2019-10-07 22:33:47 +09:00
Nikita Ioffe
b6eeae7289 Unconditionally install shim apex on system partition
Trying to do it on per-device basis is prone to errors and already
bitten us several times. For example, currently aosp_taimen doesn't
install shim apex on system partition, but specifies
ro.apex.updatable = "true", which means that it doesn't pass CTS tests.

Unconditionally installing shim APEX shouldn't introduce any problems
since apexd will skip its activation of devices that don't support
updatable APEX.

Test: m checkbuild
Bug: 140957666
Change-Id: I6b5e668b40b97752295c831684a7291842533c40
2019-10-07 12:14:08 +01:00
Yo Chiang
8ca4bf76d6 Merge "Clean up mainline whitelist in aosp_product.mk" 2019-10-07 10:28:46 +00:00
Roland Levillain
81681abfef Merge "Introduce build variable OVERRIDE_TARGET_FLATTEN_APEX." 2019-10-07 10:27:41 +00:00
Treehugger Robot
16652990ec Merge "Add x86 / x86_arm mainline_system product" 2019-10-07 10:27:14 +00:00
Treehugger Robot
7c7f144484 Merge "Remove healthd from base_product.mk" 2019-10-07 10:10:34 +00:00
Tao Bao
615b65d097 releasetools: Fix releasetools_py3_test.
Test: Use a lunch'd target;
      `atest --host releasetools_test releasetools_py3_test`
Change-Id: Ibcced83a7989ef8fc15464728ab1d5fa71ca988e
2019-10-06 23:29:34 -07:00
Tao Bao
a264feffe8 releasetools: Update tests to match SparseImage change.
The previous change in commit 22632cc82c
changed the behavior in loading file map. It now always puts a copy of
the input text in `extra` field. Update the tests accordingly.

Bug: 79951650
Test: Use a lunch'd target; `atest --host releasetools_test`
Change-Id: Iccf06c817c1305bf9946d7759c6f6f6af21fe85e
2019-10-06 22:21:14 -07:00
Tao Bao
99d855db8f Merge "releasetools: Support verifying files with non-monotonic ranges." 2019-10-07 01:33:30 +00:00
Yo Chiang
e9b513a35a Clean up mainline whitelist in aosp_product.mk
Bug: 138281437
Bug: 140912362
Test: for prod in aosp_bonito aosp_arm64 aosp_cf_x86_phone ; do \
        lunch ${prod}-userdebug \
        m -j100 nothing || exit 1 \
      done

Change-Id: I2bc1f49ce68e49313e5c00104aad7b21a101ca7a
2019-10-05 09:06:36 +00:00
SzuWei Lin
24e6bcd0b6 Remove healthd from base_product.mk
healthd had been deprecated from Android P.
Does not need to support it now.

Bug: 142164625
Bug: 138284857
Test: lunch gsi_arm64-userdebug;make -j
Test: No healthd in out folder
Change-Id: I48db70f4bf39f6322bd2e80e536e2ec96b3a6408
2019-10-05 14:05:48 +08:00
Tao Bao
765668fff7 releasetools: Update the handling of recovery fstab.
First, remove the use of info_dict['fstab'] in add_img_to_target_files.
 - info_dict['fstab'] corresponds to recovery fstab
   (`/etc/recovery.fstab`), which may differ from the one used for
   normal boot.
 - When calling build_image.ImagePropFromGlobalDict, we already have the
   desired info from global dict (`META/info_dict.txt`).

Second, common.LoadInfoDict now loads recovery fstab only for non-A/B
devices. Because the info is only meaningful for installing non-A/B OTAs
(under recovery mode).

Fixes: 132458722
Test: TreeHugger
Test: Build non-A/B incremental OTAs.
Change-Id: Id23e7b17264c123319fe00b1663d52bfd9b4a5e2
2019-10-04 22:39:32 -07:00
Yo Chiang
8b674819ac Add x86 / x86_arm mainline_system product
- Add mainline_x86 / mainline_x86_arm board
- Add mainline_system_x86 / mainline_system_x86_arm product
- BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4

These products build only system.img and vbmeta.img.
These serve as a "golden example" for x86 / arm64 CSI.

Bug: 141972143
Bug: 141657175
Test: lunch mainline_system_x86-userdebug; m
Test: Compare $ANDROID_PRODUCT_OUT against sdk_phone_x86 / aosp_cf_x86_phone
Change-Id: I40dec69ceadfe7057c1706b883b81958d3c0a416
2019-10-05 11:35:33 +08:00
Yo Chiang
491966fb7f Merge "Re-submit "Make mainline device use apex"" 2019-10-05 03:32:45 +00:00