Commit graph

46759 commits

Author SHA1 Message Date
Treehugger Robot
2647067ae9 Merge "Envsetup: Fix lunch choice with number in zsh" 2018-10-04 05:23:16 +00:00
Bowgo Tsai
3ac95b53f4 Revert "Fix build error for sdk_gphone_x86_64-userdebug"
This reverts commit 6924b25729.

Reason for revert: with the following fix, this workaround is no longer needed.
  https://android-review.googlesource.com/c/platform/build/+/762663

Bug: 112322265
Change-Id: I07363f6a5aa1697b6f7702343f3120e1049f07d8
Test: build sdk_gphone_x86_64-userdebug
2018-10-04 04:35:55 +00:00
Tao Bao
2f057467eb releasetools: build_image.BuildVerityTree() returns a tuple.
We don't need verity_root_hash or verity_salt to be in the prop dict.

Test: `m dist` with aosp_marlin-userdebug
Test: python -m unittest test_verity_utils
Change-Id: I5a9c50f4741dfb1083b3f590136335b6bc0e5216
2018-10-03 16:37:58 -07:00
Tianjie Xu
ebf3195528 Merge "Generate the compute_hash_tree command"
am: 08fff56237

Change-Id: I7453e6c367cf0ffd83e06c75c0684f3c2975a0ec
2018-10-03 16:22:55 -07:00
Tianjie Xu
08fff56237 Merge "Generate the compute_hash_tree command" 2018-10-03 23:09:15 +00:00
David Anderson
b954afec0b Remove uuidgen.py and update lpmake parameters.
Bug: 117229984
Test: device builds with PRODUCT_USE_LOGICAL_PARTITIONS=true
Change-Id: Ib39d19726861dd79d90923163f9e594ed91da4ca
2018-10-03 14:24:34 -07:00
Tao Bao
db6450a6e4 Merge "releasetools: Raise on image building errors."
am: fabb2c9792

Change-Id: Ice30d5a972e30302ae233dc2013c051ee287a0e7
2018-10-03 13:42:09 -07:00
Tianjie Xu
67c7cbb9c8 Generate the compute_hash_tree command
Generate the transfer command "compute_hash_tree" for incremental
updates of the non-A/B devices that enable verified boot 1.0

Other changes include:
i.  factor out verity_utils to use both in build_image and blockimgdiff
ii. add a new flag 'hashtree_info_generator' in sparse_image to generate
    the hashtree information.

Bug: 25170618
Test: generate a package for aosp_angler; and run simulator
Change-Id: I4d4d7a3e41dc3da810d2cbf8988e85d187c9ab0e
2018-10-03 13:36:35 -07:00
Tao Bao
fabb2c9792 Merge "releasetools: Raise on image building errors." 2018-10-03 20:26:35 +00:00
Tao Bao
c6bd70a5e6 releasetools: Raise on image building errors.
The image building functions in build_image.py have been returning
(success, result) or special values to indicate the validity of the
result. The same logic can be better expressed by raising exceptions
instead, because
 a) using a special value relies on caller to check for that magic
    value;
 b) exceptions can carry additional messages other than a boolean does,
    e.g. the output from the failing command;
 c) caller can have cleaner code flow without explicitly checking for
    the validity of the result.

This CL changes such functions to raise on errors. The majority of these
functions are internal to build_image.py only, except for BuildImage()
that has a few callers in add_img_to_target_files.py (which all die upon
error anyway).

Test: `m dist`
Test: python -m unittest test_build_image
Test: python -m unittest test_add_img_to_target_files
Test: python -m unittest test_validate_target_files
Test: Inject an error to the depended binaries (e.g. avbtool), and check
      that build_image.py exits with error messages.
Change-Id: Ibe4d51e267756bb1a00fa9238a213f9d55fd9b58
2018-10-03 11:31:44 -07:00
Anton Hansson
9920578c25 Merge "Fix TWS requirement in definitions.mk"
am: ee08d635c7

Change-Id: I45983ac80720fa969f953b3a7ddd312f252eb85a
2018-10-03 08:56:54 -07:00
Anton Hansson
ee08d635c7 Merge "Fix TWS requirement in definitions.mk" 2018-10-03 15:41:22 +00:00
Anton Hansson
4967b34ddd Move a few more string functions to strings.mk
So they can be used in product.mk

Bug: 80410283
Test: make
Change-Id: Ic94754f6b48a3281ca1dd8c195a3410b543eb366
2018-10-03 15:59:39 +01:00
Bowgo Tsai
09db6562ae Merge "Prevent AVB signing from using _RESERVED_SIZE"
am: 943be51cf1

Change-Id: I23d25dd55cf41e0b0547df0b1f2a81b61f3748bd
2018-10-03 07:42:17 -07:00
Treehugger Robot
943be51cf1 Merge "Prevent AVB signing from using _RESERVED_SIZE" 2018-10-03 14:32:47 +00:00
Anton Hansson
a0f91bd506 Fix TWS requirement in definitions.mk
Removing this TWS breaks the build. Add a backslash to avoid
needing it.

Test: make
Change-Id: I4f8e127218ffbf55a3e11600569f0100e914d2e2
2018-10-03 13:38:00 +01:00
Anton Hansson
49b96de883 Merge "Add a few apps to mainline_system."
am: 65fd432a91

Change-Id: I58cd4eaa082c48ac56068ca9f2bf232b571f0648
2018-10-03 03:50:25 -07:00
Jim Tang
0e3397b225 Envsetup: Fix lunch choice with number in zsh
(zsh)$ source build/envsetup.sh; lunch 23
will result in selecting #22 because array in zsh starts from 1
instead of 0. This CL is to fix this issue.

Bug: b/117202855
Test: below commands should have the same output:
    (zsh)$ source build/envsetup.sh; lunch 23
    (zsh)$ source build/envsetup.sh; lunch aosp_walleye-userdebug

Change-Id: I0570585417878bc7c73eda0e1a416232fe147fb4
2018-10-03 18:35:37 +08:00
Anton Hansson
65fd432a91 Merge "Add a few apps to mainline_system." 2018-10-03 10:32:57 +00:00
Anton Hansson
7cf752a9dd Merge "Tidy up TARGET_COPY_OUT_X variable defs"
am: dd34185ae1

Change-Id: Ib15c863191e5a178d5b216b05f8aebfe21c30225
2018-10-03 02:09:44 -07:00
Anton Hansson
dd34185ae1 Merge "Tidy up TARGET_COPY_OUT_X variable defs" 2018-10-03 08:56:46 +00:00
Colin Cross
39b2705b4b Merge "Pass TARGET_PREFER_32_BIT_APPS to Soong"
am: 9c68021f67

Change-Id: Ibfeec922cee943935097be7b208c890fbc1dc09a
2018-10-02 20:16:12 -07:00
Treehugger Robot
9c68021f67 Merge "Pass TARGET_PREFER_32_BIT_APPS to Soong" 2018-10-03 03:05:08 +00:00
Bowgo Tsai
040410c104 Prevent AVB signing from using _RESERVED_SIZE
When AVB is enabled with PRODUCT_USE_DYNAMIC_PARTITION_SIZE, AVB
metadata (e.g., hash tree, fec metadata) will consume _RESERVED_SIZE,
resulting in smaller reserved size in file system (e.g., ext4).

Adding additional space for AVB signing and keep the _RESERVED_SIZE only
for file system. This is done by adding a function to binary search an
optimal partition size for a given image size (disk usage + _RESERVED_SIZE).

Bug: 112322265
Test: Build aosp_arm64-userdebug, calculate the running time of
      AVBCalcMinPartitionSize() is about 0.3-0.4 seconds.
Test: python -m unittest test_build_image
Change-Id: I8f0051b57701d6fbba6a9db3756dd194066c74b8
2018-10-03 10:08:45 +08:00
Jayant Chowdhary
3daa23eeb3 Merge "Reland "Add libbinderthreadstate to the VNDK."""
am: 8a8cf7b081

Change-Id: I736b2b798f8036b54580b7bbfa993bca9b8b3cd3
2018-10-02 13:57:09 -07:00
Jayant Chowdhary
8a8cf7b081 Merge "Reland "Add libbinderthreadstate to the VNDK.""" 2018-10-02 20:14:37 +00:00
Vladimir Marko
a3af0a2bea Merge "Build: Remove boot*.art.rel file generation."
am: 0e01669293

Change-Id: Ic54949d05a04bbd6f0c3a57dcbcc1c8cf09af99e
2018-10-02 09:58:58 -07:00
Vladimir Marko
0e01669293 Merge "Build: Remove boot*.art.rel file generation." 2018-10-02 16:38:11 +00:00
Anton Hansson
379b2ba485 Tidy up TARGET_COPY_OUT_X variable defs
- Don't duplicate the same comment over and over
- Stop defining values that are immediately overwritten

Test: make
Change-Id: I87cb2c2b76bb69a026695e145849f4acee197b94
2018-10-02 14:12:50 +01:00
Anton Hansson
ae9f10544d Change install paths of libs in sanitize builds
This changes the paths for partitions modules inside the 'asan'
subdirectory to match those used when not making sanitized builds.

This fixes get_non_asan_path macro, which just strips the 'asan' dir
from the lib paths.

For example, on a device without a product partition, previously
libraries would install install in:
- out/target/product/x/asan/product/lib[64]/y.so (with SANITIZE_TARGET)
- out/target/product/x/system/product/lib[64]/y.so (no SANITIZE TARGET)

Stripping the asan dir would look for the lib in out/.../<x>/product/,
which didn't exist. The new path for SANITIZE_TARGET builds is now
out/target/product<x>/asan/system/product/lib[64]/<y>.so

Bug: 117089649
Test: m; SANITIZE_TARGET=address m (for a device without /product)
Change-Id: Id663c5f284e3b4fc65ed8cb8c2da6bcf6542e034
2018-10-02 13:16:05 +01:00
Vladimir Marko
e47795ba3d Build: Remove boot*.art.rel file generation.
These files are now unused, patchoat shall be removed soon.

Test: m
Test: Pixel 2 XL boots.
Bug: 77856493
Change-Id: I07babe7e6b2657e340265e74042e958a91678329
2018-10-02 08:54:11 +01:00
Anton Hansson
240c1c0606 Merge "Record installed JNI libs in INSTALLED files."
am: ec382da316

Change-Id: Ia5f506ecfa40d97d869af1a16233ba608c99c949
2018-10-02 00:51:38 -07:00
Anton Hansson
ec382da316 Merge "Record installed JNI libs in INSTALLED files." 2018-10-02 07:35:31 +00:00
Colin Cross
4aa10a3cc5 Merge changes I9e73c0b8,Iac5c4327,Idf6fbc94
am: 7307de5e0c

Change-Id: Ifa95c4ec335d9bf913f851101f09c55840091dce
2018-10-01 19:15:18 -07:00
Colin Cross
7307de5e0c Merge changes I9e73c0b8,Iac5c4327,Idf6fbc94
* changes:
  Disable sdk_addon for mmm
  Use soong_zip for platform.zip
  Use soong_zip for otatools.zip and otacerts.zip
2018-10-02 01:55:47 +00:00
Jayant Chowdhary
18a75cb2c4 Reland "Add libbinderthreadstate to the VNDK.""
This reverts commit 13467f5993.

Reason for revert: Dependencies which broke tests due to exclusion from 
                   LOCAL_JNI_SHARED_LIBS have been added.

Change-Id: I4aca69d7bfa12a132b8334deb61ed350b434f5df
2018-10-01 22:52:07 +00:00
Colin Cross
d0f3a3b01a Pass TARGET_PREFER_32_BIT_APPS to Soong
Bug: 80095087
Test: m checkbuild
Change-Id: I1ca8bebb360dd1e8102bb5840709f79cc22be03c
2018-10-01 15:31:54 -07:00
Colin Cross
8c200e1865 Merge "Fix boot_profile_jars.zip"
am: e70d749190

Change-Id: Idd1e917dbd85fbfe5aea8d0d2b9598a0f7a7a50c
2018-10-01 14:14:47 -07:00
Treehugger Robot
e70d749190 Merge "Fix boot_profile_jars.zip" 2018-10-01 20:53:22 +00:00
Colin Cross
731b73fdf9 Merge "Fix PDK builds"
am: aa1645504f

Change-Id: Ia910bb42dcb225cc8e0d648bd0d890552251183f
2018-10-01 13:48:30 -07:00
Colin Cross
8b6c94c744 Disable sdk_addon for mmm
mmm has a smaller view of the world and cannot generate sdk-addon
zip files.

Bug: 116818719
Test: m checkbuild
Change-Id: I9e73c0b84a42aaaa353704d6ab245b449166606d
2018-10-01 13:41:27 -07:00
Colin Cross
7363cde33e Use soong_zip for platform.zip
soong_zip produces more reproducible zip files that are not
affected by umask values or timestamps.

This partially reapplies I2eca2f7618e06c0b5893ff54c79261921fe051d6
with fixes for 64-bit only builds and directories that are changing
during zipping.

Bug: 69500920
Test: m checkbuild
Test: m checkbuild platform
Test: lunch hikey64_only && m platform
Test: contents of zips is unchanged
Change-Id: Iac5c43276f7ae700d4d13d0ef27003d09c1c87e0
2018-10-01 13:41:27 -07:00
Colin Cross
21122f901c Use soong_zip for otatools.zip and otacerts.zip
soong_zip produces more reproducible zip files that are not
affected by umask values or timestamps.

This partially reapplies I2eca2f7618e06c0b5893ff54c79261921fe051d6.

Bug: 69500920
Test: m checkbuild
Test: contents of zips is unchanged
Change-Id: Idf6fbc94e257dc34af4f5b115d740b7cb9bac015
2018-10-01 13:41:27 -07:00
Colin Cross
aa1645504f Merge "Fix PDK builds" 2018-10-01 20:30:30 +00:00
Colin Cross
1a81e372b5 Fix boot_profile_jars.zip
soong_zip was previously ignoring trailing command line arguments,
but now they are an error.  boot_profile_jars.zip had all its
files as trailing arguments instead of as -f flags, previously
resulting in an empty zip, but now causing an error.  Fix the
arguments to use -f before each file.

Test: m PRODUCT_DIST_BOOT_AND_SYSTEM_JARS=true out/target/product/sailfish/boot_profile_jars.zip
Change-Id: I8ac4aa4fbca812b8aa2ff9526e1ed7c769dd8420
2018-10-01 17:45:59 +00:00
Anton Hansson
74871e1ba3 Merge "Create a dump-files phony target."
am: b7b43c2cd5

Change-Id: I48267a69f78550e63436f5eb0830750e523ab6f4
2018-10-01 10:36:16 -07:00
Anton Hansson
a88a8b6bb1 Merge "Add wrapped net utils to mainline_system."
am: 0820a93d69

Change-Id: I8eeabce2ced5b80205d02db366989650b1191bde
2018-10-01 10:31:42 -07:00
Anton Hansson
b7b43c2cd5 Merge "Create a dump-files phony target." 2018-10-01 17:25:11 +00:00
Anton Hansson
0820a93d69 Merge "Add wrapped net utils to mainline_system." 2018-10-01 17:22:05 +00:00
Anton Hansson
6961e53876 Create a dump-files phony target.
This is more convenient than the current always-off conditional,
because it doesn't require changing the build system to dump
the installed files.

Bug: 80410283
Test: m dump-files
Change-Id: I7d395750673aff07d2018ffce8321dd280b94ccf
2018-10-01 16:26:17 +01:00