Commit graph

46059 commits

Author SHA1 Message Date
Treehugger Robot
3f7223984c Merge "Move zipalign off NO_ERROR." 2018-10-09 02:00:27 +00:00
Colin Cross
0ab356ac20 Merge "Use zip2zip for uncompress-dexs and uncompress-shared-libs" 2018-10-09 00:29:14 +00:00
Colin Cross
f05a023a5a Merge "Don't zip hiddenapi output jar into jar" 2018-10-08 22:04:59 +00:00
Dan Willemsen
159693a3e5 Merge "Update for flags passed from Soong" 2018-10-08 21:34:46 +00:00
Treehugger Robot
976f1d4577 Merge "base_system: Add iorapd as core product target" 2018-10-08 20:12:59 +00:00
Colin Cross
dac94fff8f Use zip2zip for uncompress-dexs and uncompress-shared-libs
Unzipping and rezipping files causes the umask of the host machine
to affect the permissions in the APK.  Use the new zip2zip -0 feature
to rewrite the zip file with selected files uncompressed.

Bug: 69500920
Test: m checkbuild
Change-Id: I82dd3aa441712772a1d1ddd6aaf5f41179facaa7
2018-10-08 12:49:11 -07:00
Colin Cross
c3c62fba96 Don't zip hiddenapi output jar into jar
Zip classes*.dex so that the jar does not contain an empty
classes.jar.

Test: m out/target/common/obj/JAVA_LIBRARIES/android.test.base.impl_intermediates/javalib.jar
Change-Id: I53bdd2035b2963dd781734da64058c95e1cff9d4
2018-10-08 11:23:59 -07:00
Elliott Hughes
ad7d562d27 Move zipalign off NO_ERROR.
I really only care about code that's built for Windows, but I may as
well clean up anywhere that's easy to clean up too...

Bug: N/A
Test: builds
Change-Id: I3ef34fb12ac90e9411b6421e9c23dd8524f056ae
2018-10-08 11:19:28 -07:00
Dan Willemsen
7a5c5d730f Update for flags passed from Soong
Obsolete more GCC-specific flags, TARGET_(arm|thumb)_CFLAGS now contains
pre-filtered clang flags, and GLOBAL_CLANG_CFLAGS_NO_OVERRIDE now
contains all flags instead of just the clang additional flags.

Test: m
Change-Id: I068f155041e681068d38e1a5b6b04d354b85ccee
2018-10-07 19:43:23 -07:00
Treehugger Robot
c18b2b28c2 Merge "aidegen: Collect all java sources from makefile system." 2018-10-06 02:14:54 +00:00
Igor Murashkin
962e2dde0a base_system: Add iorapd as core product target
This makes iorapd be built as part of the system image
with a regular 'make' command.

Part of a topic that has 'iorapd' start up by init_rc.

Bug: 72170747
Change-Id: I300bc35f508fbe36bf0f545e20236c718392d571
2018-10-05 16:28:12 -07:00
patricktu
b23d8e6502 aidegen: Collect all java sources from makefile system.
Bug: 117129969
Test: make -j64 out/target/product/generic_x86_64/module-info.json
Change-Id: I4bc6cab8e56a1ed6485ad2f5f22fe9b8149b25d0
2018-10-05 14:55:36 +08:00
Tao Bao
d124240719 Merge "releasetools: Set default stdout and stderr in common.Run()." 2018-10-05 03:03:56 +00:00
Tao Bao
73dd4f45f3 releasetools: Set default stdout and stderr in common.Run().
stdout and stderr will default to subprocess.PIPE and subprocess.STDOUT
respectively (which is the expected behavior from most of the existing
callers), unless caller specifies any of them.

Test: `m dist`
Test: python -m unittest \
          test_common \
          test_add_img_to_target_files \
          test_ota_from_target_files \
          test_validate_target_files
Change-Id: I43b3f08edfa8a9bcfe54baf9848dc705c048e327
2018-10-04 17:05:09 -07:00
Yifan Hong
3f0d1ad451 Merge "Support "updatable groups"." 2018-10-04 22:21:57 +00:00
Yifan Hong
b43012f0ad Support "updatable groups".
* BOARD_SUPER_PARTITION_GROUPS defines a list of "updatable groups". Each
updatable group is a group of partitions that share the same pool of free
spaces.

* For each group in BOARD_SUPER_PARTITION_GROUPS, a BOARD_{GROUP}_SIZE and
BOARD_{GROUP}_PARTITION_PARTITION_LIST may be defined.
    - BOARD_{GROUP}_SIZE: The maximum sum of sizes of all
      partitions in the group.
      If empty, no limit is enforced on the sum of sizes for this group.
    - BOARD_{GROUP}_PARTITION_PARTITION_LIST: the list of partitions that
      belongs to this group.
      If empty, no partitions belong to this group, and the sum of sizes is
      effectively 0.

* BOARD_SUPER_PARTITION_PARTITION_LIST should not be defined
by the device. It is now computed from all
BOARD_{GROUP}_PARTITION_PARTITION_LIST.

* Each 'updatable group' has its own pool of space for its
partitions to grow into. Enforce the following:
    * sum(all partitions) <= super partition (/ 2 for A/B)
    * For each group, sum(partitions in group) <= group size
    * sum(all group sizes) <= super partition (/ 2 for A/B)

Test: builds
Bug: 111610495
Change-Id: I072b011714ec31a1d8813cc75edd27da3c6ff39a
Merged-In: I072b011714ec31a1d8813cc75edd27da3c6ff39a
2018-10-04 13:08:56 -07:00
David Anderson
d1428e2748 Merge "Remove uuidgen.py and update lpmake parameters." 2018-10-04 18:20:47 +00:00
Tao Bao
4d36fcba8c Merge "releasetools: build_image.BuildVerityTree() returns a tuple." 2018-10-04 14:35:26 +00:00
Anton Hansson
d6e5cb1add Merge "Move a few more string functions to strings.mk" 2018-10-04 13:47:55 +00:00
Treehugger Robot
3e795ee38b Merge "Revert "Fix build error for sdk_gphone_x86_64-userdebug"" 2018-10-04 06:37:38 +00:00
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
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
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
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
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
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
dd34185ae1 Merge "Tidy up TARGET_COPY_OUT_X variable defs" 2018-10-03 08:56:46 +00: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
8a8cf7b081 Merge "Reland "Add libbinderthreadstate to the VNDK.""" 2018-10-02 20:14:37 +00: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
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
ec382da316 Merge "Record installed JNI libs in INSTALLED files." 2018-10-02 07:35:31 +00: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
Treehugger Robot
e70d749190 Merge "Fix boot_profile_jars.zip" 2018-10-01 20:53:22 +00: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