Commit Graph

6708 Commits

Author SHA1 Message Date
Hridya Valsaraju
e8e7958c13 Increase slack for inode estimation algorithm
This is required to prevent build failure on some targets.

Test: mmm
Bug: 119115481

Change-Id: Idf7c21b163a4e10e2ef435c2b2a7795a42feb200
2019-01-04 09:18:07 -08:00
Yifan Hong
b1e9cec952 Merge "Put system_other in super.img" am: 6dc878bd87 am: 59823773b4
am: 2f0ab84cd7

Change-Id: I784bbb26acf70977f27762d9a37146d52e89de6e
2019-01-03 00:23:39 -08:00
Yifan Hong
2f0ab84cd7 Merge "Put system_other in super.img" am: 6dc878bd87
am: 59823773b4

Change-Id: I764b0bf5b18d9df4e1ca1434e47bbab324ecf790
2019-01-03 00:15:28 -08:00
Dan Willemsen
63e48db6d1 Add BUILD_USERNAME and BUILD_HOSTNAME
These replace $USER and `hostname`, which will soon become stable values
due to sandboxing the build on Linux.

Bug: 122270019
Test: check build.prop
Change-Id: I7493e45a2a2defbdba5d82596cb91d68480f0187
2019-01-02 14:33:29 -08:00
Yifan Hong
cc46eae994 Put system_other in super.img
... for launch A/B devices.
Test: build super image and lpdump
Bug: 113182233

Change-Id: I79ad9da2f6852b39b23e862ff00f320b6565db2f
2019-01-02 12:05:10 -08:00
Dan Willemsen
2ac14d0d0b Merge "Produce ro.build.version.preview_sdk_fingerprint" am: 5723181c53 am: 74e22a4baa
am: e878b5ae54

Change-Id: Iebaa524a695a8a7a422d5b484e5a4fe3b1a109a7
2018-12-31 22:21:55 -08:00
Dan Willemsen
e878b5ae54 Merge "Produce ro.build.version.preview_sdk_fingerprint" am: 5723181c53
am: 74e22a4baa

Change-Id: I14f7f87bb691fc7e59b19936e75a7ef6931ecd21
2018-12-31 22:11:41 -08:00
Dan Willemsen
ad6a15433e Produce ro.build.version.preview_sdk_fingerprint
This is just a hash of the current.txt and system-current.txt right now,
though it may expand to include other API surfaces in the future.

Once prebuilts/sdk/current is populated with api_fingerprint.txt files,
we can use those for unbundled builds, but until then, just use the
PLATFORM_PREVIEW_SDK_VERSION as a placeholder.

MD5 was just the most convenient, since we don't have a sha tool that we
can use on Mac currently. I'm hoping we can get a toybox-based tool in
the future that standardizes that, but we aren't currently using sha*sum
from toybox on Linux, much less on Darwin yet.

Test: m dist out/dist/api_fingerprint.txt
Test: m out/target/product/.../system/build.prop
Change-Id: If69f270560d05135cb81a9bb2d1b208ea78f86df
2018-12-27 12:30:05 -08:00
TreeHugger Robot
2a79ca3f3e Merge "Migrate build/make to androidx.test" 2018-12-21 06:36:44 +00:00
Tianjie Xu
616ef5302c Merge "blockimgdiff: add a function to select and convert 'diff' to new" am: 28b6654ee7 am: 134178e370
am: e6610488f0

Change-Id: I4022d2e5a7728e64d300fbef4bb712b11a81083b
2018-12-20 12:43:12 -08:00
Tianjie Xu
e6610488f0 Merge "blockimgdiff: add a function to select and convert 'diff' to new" am: 28b6654ee7
am: 134178e370

Change-Id: Id0c2a97ffb3a5c5c824644b8819fa31046407dfd
2018-12-20 12:33:56 -08:00
xunchang
3df4d5eb6d blockimgdiff: add a function to select and convert 'diff' to new
Package size will be unintended large if we stash more blocks than the
stash limit specified by the cache size. To reduce the maximum size of
simultaneous stashed blocks, we will inevitably convert some 'diff'
commands to 'new' commands.

To mitigate the impact, we add a new function to smartly select the
transfers to convert based on their patch size and compressed size.
This cl converts the transfers that have a larger patch size than the
compressed target sizes. And there's a slightly improvement in the
final package size: from 194M -> 185M.

Bug: 120561199
Test: build a non-A/B incremental package, run simulator
Change-Id: Id73ff736ba4e6901d245ad5549d42310d0740284
2018-12-19 20:21:25 -08:00
Hridya Valsaraju
3c4d2241e1 Merge "Relax inode usage estimation slack for DAP right sizing" am: 7cac3adf1a
am: 4ace8926ba

Change-Id: I8c2a82dc493dc2c6f9341992b238267f3caf113e
2018-12-17 18:35:57 -08:00
Treehugger Robot
7cac3adf1a Merge "Relax inode usage estimation slack for DAP right sizing" 2018-12-18 02:13:10 +00:00
David Anderson
212e5dfb53 Add an extra metadata slot to super[_empty].img.
This change excludes retrofit devices from getting a third metadata
slot, until code is in place to correctly upgrade those devices through
fastbootd/update_engine.

Bug: 121149247
Test: lpdump super_empty.img
Change-Id: Id147c42cee93a1f6d61ee0edc9cddc0c0540a279
2018-12-17 13:59:19 -08:00
Tom Cherry
8de582149b Merge "Add owners for fs_config" am: 7a005549ae am: e699395c25
am: 58c94abf4c

Change-Id: I2674da4e90ec699a1d9ec61ef7bd00618a74b899
2018-12-14 16:49:26 -08:00
Tom Cherry
58c94abf4c Merge "Add owners for fs_config" am: 7a005549ae
am: e699395c25

Change-Id: I53574a1dffe253887562b49e9b8163250af330c5
2018-12-14 16:36:17 -08:00
Hridya Valsaraju
bd17fab260 Relax inode usage estimation slack for DAP right sizing
The current increase of 4 % is insufficient for some
targets.

Test: mmm
Bug: 119115481
Change-Id: Idcba8025b913da9b70794bfc7464d15b4d99ad34
(cherry picked from commit 3e02e34090)
2018-12-14 14:13:24 -08:00
Tom Cherry
0377f12108 Add owners for fs_config
Test: n/a
Change-Id: I3f81216444240acfbc86c3ef5c21e142107eb044
2018-12-14 10:55:29 -08:00
Brett Chabot
49183d3ec3 Migrate build/make to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: If6a6b751c4a6ca837c3166688a0c93d2e923ee4c
2018-12-13 19:06:34 -08:00
Joe Onorato
4b10be2625 Merge "Add a print command to fs_config_generator.py" am: e1c81d74e2 am: 08d6dfe12f
am: 34ac6c73e4

Change-Id: I8313d4c91eca5bd6e10ed08c1042063915d5976f
2018-12-13 18:32:46 -08:00
Joe Onorato
34ac6c73e4 Merge "Add a print command to fs_config_generator.py" am: e1c81d74e2
am: 08d6dfe12f

Change-Id: I4784129d4653b01b9f284afdbe39be5a5f536287
2018-12-13 18:22:12 -08:00
Tianjie Xu
6d1fcd8553 Merge "blockimgdiff: Factor out the diff_worker" am: 8ab919dcce am: 5437eeeb1c
am: ec7c8ac120

Change-Id: Ie891b59e51772eb6ea8093073b8f4969dd4d6db4
2018-12-13 14:27:19 -08:00
Tianjie Xu
ec7c8ac120 Merge "blockimgdiff: Factor out the diff_worker" am: 8ab919dcce
am: 5437eeeb1c

Change-Id: Ibdad9aed6ef21b85b694bf10a168aead0ba37f1e
2018-12-13 12:44:49 -08:00
Joe Onorato
2afb6eb22e Add a print command to fs_config_generator.py
This prints the uid map in a very simple format, with
AID_CONSTANT<space>uid
on each line.  This is super easy for other tools to
parse, and generate their own mappings, without requiring
edits to fs_config_generator.py itself.

Test: make, treehugger
Change-Id: I10e24ac29d440a24d43580880343d122ae1cdf02
2018-12-13 11:38:07 -08:00
Tianjie Xu
8ab919dcce Merge "blockimgdiff: Factor out the diff_worker" 2018-12-13 18:45:30 +00:00
TreeHugger Robot
868c81ccc3 Merge "Relax inode usage estimation slack for DAP right sizing" 2018-12-13 08:55:37 +00:00
Hridya Valsaraju
3e02e34090 Relax inode usage estimation slack for DAP right sizing
The current increase of 4 % is insufficient for some
targets.

Test: mmm
Bug: 119115481
Change-Id: Idcba8025b913da9b70794bfc7464d15b4d99ad34
2018-12-12 18:03:41 -08:00
xunchang
2153183acf blockimgdiff: Factor out the diff_worker
We will call it at an earlier time to compute the patch size; and
choose the transfers to convert to 'new'.

Bug: 120561199
Test: Generate an incremental update on shiner
Change-Id: I29a0c8e75c9e5b66a266c1387186692a86fcbe43
2018-12-12 17:02:39 -08:00
Mark Salyzyn
2db5e766e8 Merge "fs_config: remove empty fs_config_* automation." am: c8b3d5f92f
am: 10d6aab12c

Change-Id: I1cb553fa10db427f8dc41c88d43bcbd5c3fe5864
2018-12-12 13:51:02 -08:00
Mark Salyzyn
640816eb42 fs_config: remove empty fs_config_* automation.
The code to manage citing empty <partition>/etc/fs_config_{files|dirs}
content by specifically setting the file(s) to access mode 00000 is
bitrotted and ill-suited for multiple partitions and was written for
a more paranoid time when DAC and MAC rules were not nearly as mature.

Striking out the complications as it affected deterministic results.

Test: compile and boot
Bug: 119310326
Change-Id: Iec02e0c1194eaa799ab95adff4ff0951a24652a4
2018-12-12 08:40:19 -08:00
Chen, ZhiminX
978911ab95 Merge "Add recovery_acpio option to make recovery image" am: 53de7a71f6
am: 7961f460d7

Change-Id: Icbd5c8615436b641de9ab4a785ec15498d27e204
2018-12-12 00:39:46 -08:00
Chen, ZhiminX
752439b321 Add recovery_acpio option to make recovery image
Test: can generate recovery image with recovery_acpio
Fixes: 111871613

Change-Id: I9174a4741f571a00bcadc548cd9e1316b4175132
2018-12-11 15:23:28 +08:00
Chih-hung Hsieh
2038007fa1 Merge "Allow the include directive." am: 0252d6e5cf
am: 73a7a0ebaf

Change-Id: Icd377551cda0a56f9b2792342683c90900998a0e
2018-12-07 15:48:42 -08:00
Chih-Hung Hsieh
651294908f Allow the include directive.
* The include directive is ignored for now here.

Bug: 112259977
Test: ./checkowners.py  -v -c OWNERS
Change-Id: I671f3643ea88e50aea0957db59c36f10bff3b92d
2018-12-07 14:29:38 -08:00
Yifan Hong
e4348c86d1 Merge "Don't build super image if source images are missing" am: f37236df5f
am: 40b9882e71

Change-Id: I6baa7f1cea1c892aeb3af48bbf059c0e24241cb7
2018-12-07 13:52:09 -08:00
Yifan Hong
e98427ac3f Don't build super image if source images are missing
For some internal branches, vendor.img isn't built, so there
is no need to build super image / super split images there.

Test: remove vendor.img and VENDOR/ from target_files_intermediates, then
      run add_img_to_target_files
Fixes: 120634805

Change-Id: I2834a27ce232538f203733c204dd257279c789fc
2018-12-07 11:01:21 -08:00
Mark Salyzyn
a1aee9bb84 Merge "fs_config: add product and product_services" am: e717da446b
am: 9be41822ed

Change-Id: I3ab683e16b02d7503e534708cbf5fc858dd5c7ec
2018-12-07 09:11:21 -08:00
Tao Bao
ed817268f4 Merge "releasetools: Keep the original RangeSet for 'uses_shared_blocks' case." am: 70edcab678
am: a9ead89c9d

Change-Id: Icc429013fad7704783a0f983aeada274db0e00fa
2018-12-06 15:49:34 -08:00
Mark Salyzyn
cf343a6d1e fs_config: add product and product_services
Mechanical extension of mount directories to also support product/
and product_services/ as individually supplied images.

NB: In the distant past, a prototype placing the make rules into a
    macro was rejected as too difficult to maintain within the macro
    rules, so rules are rolled-out to make them easy to understand.

Test: compile
Bug: 119310326
Change-Id: Ief137cbe62db7175ee02275804ff1d644858dc3d
2018-12-06 22:13:26 +00:00
Tao Bao
2a20f344fc releasetools: Keep the original RangeSet for 'uses_shared_blocks' case.
Setting 'uses_shared_blocks' indicates that the block list for a given
file is incomplete, as some of the blocks are "owned" by others. As a
result, such a file will be skipped from imgdiff'ing.

This CL makes a copy of the original block list before removing the
shared blocks. It uses the original RangeSet as the value of
extra['uses_shared_blocks']. validate_target_files.py will try to read
the file as in the original RangeSet, unless the original list is also
incomplete or has non-monotonic ranges.

Test: Run validate_target_files on a target that uses
      `BOARD_EXT4_SHARE_DUP_BLOCKS := true`.
Change-Id: I259e871ecc249ba0c14b5796bef413185a1b8242
2018-12-06 10:28:49 -08:00
Vic Yang
0451e75be4 Merge "Move android_ids from .data.rel.ro to .rodata" am: 4379a28921
am: 7699a2e468

Change-Id: Ibd176ac6e9783964eb6e022bf2be53992cd6d5bb
2018-12-05 22:34:39 -08:00
Vic Yang
4379a28921 Merge "Move android_ids from .data.rel.ro to .rodata" 2018-12-06 06:04:23 +00:00
Vic Yang
5b3a7c0069 Move android_ids from .data.rel.ro to .rodata
Pages in .data.rel.ro are always dirty.  Move whatever we can to
.rodata so that we reduce memory pressure.

The size of rodata, text, and data.rel.ro sections of libc on cuttlefish
before/after this change:
    rodata: 0xfd70 -> 0x101d0 (+1120 bytes)
    text: 0xb5715 -> 0xb56e5 (-48 bytes)
    data.rel.ro: 0x57e0 -> 0x5230 (-1456 bytes)

While this change alone doesn't reduce the number of dirty pages
from data.rel.ro on cuttlefish, it is a step in that direction.

Test: Build and boot cuttlefish
Change-Id: Iff8203940495109dd01c40f31b034cfb2882e7f4
2018-12-05 00:10:19 -08:00
Yifan Hong
f1aebb02fb Merge changes from topic "super_target_files" am: 5df29604b9
am: c452235483

Change-Id: I74b7bfcf0cc8834c55eeae4071ec3281fdb65c3f
2018-12-04 15:52:54 -08:00
Yifan Hong
5df29604b9 Merge changes from topic "super_target_files"
* changes:
  add_img_to_target_files uses build_super_image
  Build super_empty with build_super_image.py
  Build super.img from images in target_files
2018-12-04 23:20:21 +00:00
Yifan Hong
055e6cf5c8 add_img_to_target_files uses build_super_image
Use the new script to build super_empty and super split images. No more
transformation to lpmake_args.

Test: build target_files_package for retrofit device
Change-Id: Id5f6bd607654ca869bcdf58d86b7ae300e3927eb
2018-12-03 11:33:44 -08:00
Yifan Hong
2b891ac024 Build super.img from images in target_files
For non-retrofit (launch) devices, super.img is used for factory, so
source images should be from target_files.

In this change, build-superimage-target procedure is converted to a
more flexible script so that it can be built.

Bug: 119322123
Test: build target files for device launch with dynamic partitions
Change-Id: I6ee0cc3e145357dfc74be248f81f5f8f4e51fc5c
2018-12-03 11:33:44 -08:00
David Anderson
989d0f0b33 Merge "releasetools: Specify a minimum size for right-sized images." am: ca676bc662
am: 7031e19f0f

Change-Id: I175260e080057aa09270de870b3edcdcdfdba612
2018-11-30 00:12:38 -08:00
David Anderson
6f693f04c2 releasetools: Specify a minimum size for right-sized images.
On aosp_blueline, system_other gets right-sized to 61,440 bytes. This
messes up the AVB footer calculation, and is too small to store an ext4
image.

Bug: 116608795
Test: build aosp_blueline w/ dynamic partitions
Change-Id: If0138a9d858765ff82cb957532504a066fd113ff
2018-11-29 13:27:47 -08:00