Commit graph

45675 commits

Author SHA1 Message Date
Tao Bao
f87ea90d76 Merge "releasetools: Rename the ramdisk_dir in prop dict to root_dir."
am: d094713952

Change-Id: I013c82846a143c5eac050325e66092afc66c958f
2018-07-23 09:41:25 -07:00
Tao Bao
d094713952 Merge "releasetools: Rename the ramdisk_dir in prop dict to root_dir." 2018-07-23 16:33:46 +00:00
SzuWei Lin
14f90c4016 [automerger skipped] Merge "Add A/B update to GSI"
am: 9f5ea99a34  -s ours

Change-Id: Ib44ef891c95834d68472fd0c6a52423c6c97f655
2018-07-23 07:29:53 -07:00
Tao Bao
1a3d83d667 Merge "releasetools: Make scripts pylint clean."
am: 23a4070483

Change-Id: I4f4b35565f7d154dd47e4b5b8444e76c6c7227c6
2018-07-23 07:22:59 -07:00
SzuWei Lin
9f5ea99a34 Merge "Add A/B update to GSI" 2018-07-23 14:22:56 +00:00
SzuWei Lin
9295ccaef4 Merge "Add A/B update to GSI" into stage-aosp-master 2018-07-23 14:20:13 +00:00
Tao Bao
23a4070483 Merge "releasetools: Make scripts pylint clean." 2018-07-23 14:11:37 +00:00
Neil Fuller
35f744966b Make host targets use non-repackaged targets
A host build target was depending on a target that is intended for
on-device, repackaged (com.android.) use. This switches to using the
unbundled target instead.

Test: Build
Bug: 111055375
Bug: 111734251
Change-Id: Ie81dd7257a14756fc21fa6f956175e5bd2ff80c1
2018-07-23 13:00:32 +01:00
Anton Hansson
8c3d79dd37 Dump artifacts offending path reqs into a file
Dump offending artifacts into a file that can be inspected after a
build regardless of whether path requirements are enforced or not.

This makes it easier to track progress for products not yet ready
to enable enforcement.

Bug: 80410283
Test: lunch mainline_arm64; m out/target/product/generic_arm64/offending_artifacts.txt
Change-Id: Id05fbf256edf3689ab0b9851b34658d6d84939b2
2018-07-23 09:51:52 +00:00
SzuWei Lin
2927f2185c Merge "Move some BoardConfig settings from EmuCommon to GsiCommon"
am: bcc4081cd1

Change-Id: I456dde1025f2e61c3c9c463c38279aa0404d91ac
2018-07-23 00:35:49 -07:00
SzuWei Lin
bcc4081cd1 Merge "Move some BoardConfig settings from EmuCommon to GsiCommon" 2018-07-23 07:28:10 +00:00
SzuWei Lin
d13c1719b9 Add A/B update to GSI
The feature should work fine on the devices with partition _a and _b.
and will not be enabled on the devices without partition _a and _b.

Bug: 110763858
Test: build aosp_arm64-userdebug and aosp_arm64_ab-userdebug
Change-Id: I9f783dd6fe69eff2536a6aac0506e41c724510b2
Merged-Id: I9f783dd6fe69eff2536a6aac0506e41c724510b2
2018-07-23 06:48:22 +00:00
Tao Bao
3e53ef7b1c releasetools: Clean up AppendVBMetaArgsForPartition().
Drop the parameter of public_key_dir. It's not necessary to stage all
the extracted public keys into the same temporary dir.

Redirect the stderr output to STDOUT while calling avbtool, so that it
can dump the error message accordingly.

Also remove the check for having empty img_path arg. It doesn't look
like a clean logic to allow the function to be called with invalid /
empty arg. The only caller (i.e. AddVBMeta) already asserts img_path
being valid as well.

Test: python -m unittest test_add_img_to_target_files
Test: `m dist` with aosp_walleye-userdebug
Change-Id: Id58c5ae780ac8a22661ffea629144d4836839175
2018-07-22 22:36:27 -07:00
Christopher Ferris
175a63112a Merge "Add a few unwinder tools to debug tools."
am: ae08b51891

Change-Id: I64a9f4deabdd28ab09706ad046b901cb26b5af1d
2018-07-21 12:45:41 -07:00
Christopher Ferris
ae08b51891 Merge "Add a few unwinder tools to debug tools." 2018-07-21 19:38:46 +00:00
Chih-Hung Hsieh
d83446d789 Merge "Escape special HTML characters in warning messages."
am: a14c131154

Change-Id: Ia8a2afa3d765d7a07a5c7c732af9f66912c1483c
2018-07-20 17:24:14 -07:00
Treehugger Robot
a14c131154 Merge "Escape special HTML characters in warning messages." 2018-07-21 00:20:02 +00:00
Tao Bao
708ca5f60b Merge "releasetools: Track the change to applypatch arguments."
am: 80810b9d36

Change-Id: I9df643323e5624596b5981e9a4d48fdafb1db2f3
2018-07-20 17:12:39 -07:00
Yifan Hong
9c35a022e1 build_image.py recognize BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE
Test: builds
Bug: 79106666
Change-Id: I00c1a96c09cf7bd9274b65ac0afc47462686171d
2018-07-20 16:51:26 -07:00
Yifan Hong
56a6c3bb34 build_image.py recognize BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE
Test: builds
Bug: 79106666
Change-Id: I26aba694fd3d6a2feed7601524dde52569ba41e2
2018-07-20 16:51:26 -07:00
Christopher Ferris
8421f6fb9d Add a few unwinder tools to debug tools.
These tools are useful for dumping elf information. Also, some of the
scripts in development are being modified to use some of these tools,
specifically, unwind_symbols.

Test: Do a clean userdebug build and verify that the tools are built.
Change-Id: Id26b8d2220dc542e8aa73d4b701916fa3d2ea804
Merged-In: Id26b8d2220dc542e8aa73d4b701916fa3d2ea804
(cherry picked from commit 6605dc01b4)
2018-07-20 16:06:22 -07:00
Tao Bao
8bfd3c7483 releasetools: Rename the ramdisk_dir in prop dict to root_dir.
This property indicates the path to the root directory (i.e.
TARGET_ROOT_OUT at build time, or ROOT/ in a target_files.zip).
build_image.py will only use this property when building a target using
system_root_image. Under such a configuration, files under this dir
never land into a ramdisk, but as part of system.img. This CL renames
the property name to avoid confusion.

Note that with this change releasetools keeps working with older
target_files zips that contain 'ramdisk_dir'. Because common.py doesn't
read the value of that property, but sets it to ROOT/ directly.

Test: `m dist` on aosp_marlin-userdebug.
Test: `m dist` on aosp_angler-userdebug.
Test: Run add_img_to_target_files.py with a new target_files.zip and an
      old target_files.zip respectively.
Change-Id: Ie9e19dd17d8c2abb4c4a97449e436774d5dd2a36
2018-07-20 16:05:36 -07:00
Tao Bao
80810b9d36 Merge "releasetools: Track the change to applypatch arguments." 2018-07-20 23:04:33 +00:00
Chih-Hung Hsieh
b2afb63ac9 Escape special HTML characters in warning messages.
Bug: 111699078
Test: run warn.py with a build.log file
Change-Id: I553dad57a6d81ea6cc89289741d9963f49cc3b47
2018-07-20 15:36:26 -07:00
Sharif Elcott
c1c8ec7a39 Merge "Added Address Sanitizer clang config for x86_64."
am: f6658018f6

Change-Id: I2612e483e2144309c82faeb37b8ebac9f23786dc
2018-07-20 04:11:08 -07:00
Sharif Elcott
f6658018f6 Merge "Added Address Sanitizer clang config for x86_64." 2018-07-20 10:59:39 +00:00
Jim Tang
4a7244aa26 Merge "Add Atest tab completion script."
am: ee17f42142

Change-Id: I374864568ae33256ae661fdb600765781b923087
2018-07-20 03:35:56 -07:00
Treehugger Robot
ee17f42142 Merge "Add Atest tab completion script." 2018-07-20 10:27:27 +00:00
Anton Hansson
33831e520e [automerger skipped] Merge "Move dep on PRODUCT_COPY_FILES to main.mk"
am: 78e36736fe  -s ours

Change-Id: I685ad200432e1f4768a6ecef064f096dbba8b897
2018-07-20 03:18:51 -07:00
Anton Hansson
78e36736fe Merge "Move dep on PRODUCT_COPY_FILES to main.mk" 2018-07-20 10:12:37 +00:00
Dario Freni
5f9ddc95a2 Merge "Add support for /product-services partition"
am: 3cf03b775a

Change-Id: I1b0b3628d1b96967e569093b93b12fbc5acd7ad5
2018-07-20 02:09:37 -07:00
Dario Freni
1aef906c01 Merge "Run appcompat on all /product modules."
am: 88858574b0

Change-Id: I4af0e942659b9a6b7a0ee091af679b15517a8a7e
2018-07-20 02:08:20 -07:00
Dario Freni
3cf03b775a Merge "Add support for /product-services partition" 2018-07-20 09:00:25 +00:00
Dario Freni
88858574b0 Merge "Run appcompat on all /product modules." 2018-07-20 08:59:35 +00:00
Anton Hansson
eccff5a946 Merge "Skip auto-gen rro packages for path requirements."
am: 5558838be1

Change-Id: I7335715433a80a79f02d0979290d1270d6d08403
2018-07-20 01:20:32 -07:00
Anton Hansson
5558838be1 Merge "Skip auto-gen rro packages for path requirements." 2018-07-20 08:10:50 +00:00
Sharif Elcott
b71c33fbdc Added Address Sanitizer clang config for x86_64.
Without this, binaries built for an x64 target with Address Sanitizer enabled
fail to execute at runtime, failing with the error message "No such file or
directory".

Test: 1) Build any Android target that has asan enabled, such as statsd, on
any lunch target with suffix "_x86_64-eng". 2) Run 'file' on the generated
executable. 3) You should see "interpreter /system/bin/linker_asan64" rather
than "interpreter --gc-sections"

Bug: 111667639

Change-Id: I5d7e7f307d954d4cd48ff88a7d9d6a5732276296
2018-07-20 16:10:51 +09:00
SzuWei Lin
0472eec62c Add A/B update to GSI
The feature should work fine on the devices with partition _a and _b.
and will not be enabled on the devices without partition _a and _b.

Bug: 110763858
Test: build aosp_arm64-userdebug and aosp_arm64_ab-userdebug
Change-Id: I9f783dd6fe69eff2536a6aac0506e41c724510b2
Merged-In: I9f783dd6fe69eff2536a6aac0506e41c724510b2
2018-07-20 06:59:14 +00:00
Tri Vo
60b687383d Merge "Add 28.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS"
am: 3e583e0b3d

Change-Id: I297a53cd1acd73250967c6a9669f876d68694354
2018-07-19 18:02:51 -07:00
Tri Vo
3e583e0b3d Merge "Add 28.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS" 2018-07-20 00:56:27 +00:00
Tao Bao
b1750e2825 Merge "releasetools: Remove the assertion of not allowing thumbprint in Treble world."
am: 805ab25e05

Change-Id: Iee41170414e8b17f05d2defa405b18834bc7e8f3
2018-07-19 15:05:39 -07:00
Treehugger Robot
805ab25e05 Merge "releasetools: Remove the assertion of not allowing thumbprint in Treble world." 2018-07-19 21:57:06 +00:00
Tao Bao
76def243ec releasetools: Make scripts pylint clean.
Clean up the following scripts.
  blockimgdiff.py
  common.py
  edify_generator.py
  img_from_target_files.py
  ota_from_target_files.py

Seems we don't have a way to force pylint-ing the scripts using
per-directory pylintrc files (and we don't have pylint tool in AOSP
repo), per
https://android.googlesource.com/platform/tools/repohooks/#todo_limitations.

Test: `m dist`
Test: pylint --rcfile=pylintrc <script.py>
Change-Id: Ia6fd1ddc86f4d84c68e500f225d4a89d0fea8ec7
2018-07-19 10:39:05 -07:00
Tao Bao
4223012099 releasetools: Remove the assertion of not allowing thumbprint in Treble world.
The claim in the original CL doesn't seem to hold. We may still have
devices using both of thumbprint and Treble compatibility check.

Bug: 111640956
Test; python -m unittest test_ota_from_target_files
Test: Build an incremental package for a target using thumbprints.
Change-Id: Ia491d5279901c2385d1c30802abcb99d65d919cc
2018-07-19 10:16:45 -07:00
Dario Freni
5f681e1dd7 Add support for /product-services partition
This CL is largely an adaptation of Change-Id
I774e6a38003734421591e51bed103802ff84f432

It adds the following variables:

- BOARD_AVB_PRODUCT_SERVICES_KEY_PATH
- BOARD_AVB_PRODUCT_SERVICES_ALGORITHM
- BOARD_AVB_PRODUCT_SERVICES_ROLLBACK_INDEX_LOCATION
- BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT
- BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
- BOARD_USES_PRODUCT_SERVICESIMAGE
- LOCAL_PRODUCT_SERVICES_MODULE
- PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH
- PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION
- PRODUCT_PRODUCT_SERVICES_PROPERTIES
- TARGET_COPY_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES_*

Bug: 80741439
Test: Successfully built product-services.img with one module in it, and flashed
on device. Also successfully built image with /system/product-services directory
and no /product-services partition.
Change-Id: I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d
2018-07-19 11:15:11 +01:00
Tri Vo
047c4d544c Add 28.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS
Bug: 72458734
Test: m selinux_policy
Change-Id: I5104c14bcc45067723080c229895c9a7771b2651
2018-07-18 13:24:43 -07:00
Anton Hansson
c62d15f077 Skip auto-gen rro packages for path requirements.
The way these packages are currently added to the build is via
modifications in product makefiles inheriting from mainline_system,
but with have the side effect of changing the REQURIED modules for
the source of the auto-gen RRO package.

Whitelist auto-generated RRO packages from the path requirement checks
for now.

Bug: 80410283
Test: make
Change-Id: Ib070e28e0ef87a57adfaedf6456585e8bfa29dd3
2018-07-18 15:52:57 +01:00
Anton Hansson
404d33c578 Move dep on PRODUCT_COPY_FILES to main.mk
Prior to this change the product-installed-files macro didn't include
PRODUCT_COPY_FILES, which is a problem for the artifact path
enforcements. Fix this by moving the dep on PCF into main.mk.

Leave the declaration in Makefile for now.

Test: diff modules_to_install before and after
Bug: 80410283
Change-Id: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
Merged-In: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
2018-07-18 14:05:20 +01:00
Dario Freni
1ecc925995 Run appcompat on all /product modules.
The output of the appcompat tool is store on $(PRODUCT_OUT)/appcompat.

Bug: 110073830
Bug: 78924201
Test: m
Change-Id: Ia77cc53fc241a048958cf243ba298298f800f933
2018-07-18 12:18:49 +01:00
SzuWei Lin
e592c965ee Move some BoardConfig settings from EmuCommon to GsiCommon
Move the settings which effect the system image to the file
BoardConfigGsiCommon.mk

Bug: 80117040
Test: build aosp_arm64-userdebug and pass
Change-Id: I42b14a124992c21b2da0e9e6197b1c38c6e58ce3
Merged-In: I42b14a124992c21b2da0e9e6197b1c38c6e58ce3
2018-07-18 10:19:46 +00:00