Makes pretty-error and pretty-warning behave more like $(error) and
$(warning), where you don't need to do things like quote parentheses.
Bug: 118833208
Test: trigger the private_apis && sdk set error in sdk_check.mk,
which no longer produces bash syntax errors
Change-Id: I766ff98ad4e652f59dbef9dd5654f1cd10a2d038
Add ext4 dedupe to system_other, product, product_services, odm and
oem images. Experimental savings without any other configuration
changes was 0%, .75%, 3.4% respectively for the raw image file size
for the first three.
Test: manual
Bug: 111302946
Change-Id: Ia8fb5696151acad59bb144ea93f2c2ddac962bbd
To more quickly settle on a no free space result, recognize that
there is roughly 1/58.5 overhead managing the free space pool as
determined experimentally. This algorithm carries with it some
risk of being sensitive to any alterations in ext4.
This also addresses the issue of a much larger apparent free space
available calculated on the sample pass when deploying ext4 dedupe,
and resolves the poorer estimation that happens without accounting
for the overhead.
The alternative of adding a second pass works to a similar, and
likely more comforting algorithm and result. But doing so adds
a minute to the typical incremental build time, or +50% to the
time it takes to determine ext4 right sized images.
Test: manual
Bug: 111302946
Change-Id: Id5ae6645b9aa2d036e6fefe2fb17672e8f8ef6f0
Prevents additions of non-aosp artifacts to these products.
Bug: 80410283
Test: lunch mainline_arm64; m nothing
Test: lunch mainline_system_arm64; m nothing
Change-Id: Id12a77bd7f4cc9917aecbca76e8a2842d7c77613
The existing 'generic' targets are emulator devices, and targeting
it has the side-effect of including emulator-specific artifacts.
Create a mainline device instead, which is really generic. This also
allows specifying tweaks unsuitable for the emulator.
Include BoardConfigGsiCommon for now, even though it includes a few
things we likely won't want in the future.
Bug: 80410283
Bug: 111538404
Test: lunch mainline_arm64; m
Change-Id: I15e7cb41fcbd3c0592a091ba7a8575ddf10bda71
When we're using a dont_bother_goals (including snod), we don't load
build/make/core/tasks/*.mk, so sdk_addon isn't defined as a PHONY rule.
This causes a build break because build/make/core/Makefile uses
dist-for-goals with sdk_addon. dist-for-goals requires its arguments to
be PHONY targets.
Test: m snod
Change-Id: I69937fe9360be57766d17ed4c28b5d2a1e348308
For A/B devices, append slot suffix to dynamic
partition group names. This ensures that during an
update, partitions from target slot doesn't take
more than half of the super partition.
Test: flash and lpdump
Bug: 111610495
Change-Id: I07a082b67d0f9faada150c7ac3527eb737a81655
This avoids showing a message as below:
raise BuildImageError("Failed to get tune2fs usage:\n{}".format(output))
UnboundLocalError: local variable 'output' referenced before assignment
The `output` won't be set under such a case, which unfortunately hides
the real cause. This CL addresses the issue by letting it throw
implicitly, which contains the command and outputs.
Test: `m dist`
Test: `python -m unittest test_build_image`
Change-Id: Icf015bab8869d150516246ed73552f6502127cdf
Change command-line flags of hiddenapi
The `hiddenapi` build tool now reads a dex file from one filename
and writes a modified dex file to another. Change the build rule
to reflect it.
This reverts commit 5381eb684e.
Test: m
Change-Id: I8d37935c5ea381348278ec668d474f6ffb8e8411
This reverts commit fab820c5f1.
Reason for revert: sed -i requires an argument on mac, break build on mac.
Change-Id: I0b72e28968072afbbb862bd827ee59764dd8a0be
The option will:
- Produce APK with uncompressed dex
- Declare to prefer integrity in manifest
Test: unzip -vl, dex compression looks correct with the option provided
or not.
Test: similarly, aapt dump correct attribute
Bug: None
Change-Id: I16b9a37255150c2ad84af84087dfabb536a3b07a
This reverts commit 6b00bfd2fb.
Reason for revert: marlin running out of space
Exempted-From-Owner-Approval: Needed to unblock build, no
buildcops on call in EMEA today.
Change-Id: I9e86545c8ada2523bc21116c6e958f69fb94dc26
Pass DONT_UNCOMPRESS_PRIV_APPS_DEXS, PRODUCT_LOADED_BY_PRIVILEGED_MODULES,
DEX_PREOPT_DEFAULT, and WITH_DEXPREOPT to Soong so it can determine when
to store uncompressed dex files in APKs and when to strip them.
Also convert DEXPREOPT.$(TARGET_PRODUCT).$(LOCAL_MODULE).CONFIG=disabled
to a DEXPREOPT_DISABLED_MODULES list, and export it to Soong.
Test: m checkbuild
Change-Id: I8652032d4b9f5d2e119e73acdf91b8148563eedd
nostripping causes confusing double negatives, allow nostripping
in LOCAL_DEX_PREOPT and DEFAULT_DEX_PREOPT, but convert to
LOCAL_STRIP_DEX outside of dex_preopt_odex_install.mk.
Test: m checkbuild
Change-Id: I996e9258ce20c394900d9fe937d638bc2ab8589d
If partition_reserved_size is 0 or undefined, and
use_dynamic_partition_size is true, we should approach no space
and no free inodes automatically.
Estimate the space and number of inodes required, then do a first
pass build to see how much space actually used, and use those values
to refine the estimate.
Depends on tune2fs to report the characteristics of the filesystem,
so only support for ext filesystems. In the future if there has to
be a more generic ability, either a tool per a filesystem has to be
found, or we will need root capabilities to mount the filesystem to
acquire the characteristics live from the host system.
Test: manual + python -m unittest test_build_image
Bug: 111302946
Change-Id: I933a388be43516b6de7b5007b296765bd5556fde
Chained vbmeta images should be included into the top-level vbmeta.img
as chained partitions. It's done in the path of `m`, but not `m dist`.
Bug: 118115607
Test: `m dist` a target that uses chained vbmeta.
a) Check that the `vbmeta.img` in target-img.zip contains the image
descriptor of `vbmeta_system.img` (`avbtool info_image`).
b) `avbtool verify_image --image vbmeta.img \
--expected_chain_partition \
vbmeta_system:1:/path/to/vbmeta_system/pubkey`
c) `avbtool verify_image --image vbmeta_system.img`
Change-Id: I064e583b247c44b9b2f19355838550bb5dbb8f26
In preparation for moving BUILD_NUMBER and FILE_NAME_TAG handling to
soong_ui, mark BUILD_NUMBER as obsolete and FILE_NAME_TAG as readonly.
Later changes will remove BUILD_NUMBER entirely, and move FILE_NAME_TAG
handling into the kati packaging step via dist-for-goals renames.
Test: build_test on master
Change-Id: I0e340d32fe0cb6296d3b5a7fec349b50632d044e
Recovery can now parse the pem encoded x509 keys from a zipfile. So
instead of dumping the keys into a text file with some intermediate format,
we can simply create a zipfile with the keys.
Bug: 116655889
Test: make bootimage and check the generated zipfile, run sign_target_files_apks
Change-Id: Ib76feecfb26d6be713a07644e80ec96133759004
It's sufficient to have the flag in top-level vbmeta.img, and libavb
expects no disable flag in chained vbmeta.img.
Bug: 118115607
Test: `m vbmetaimage` with an -eng target using vbmeta_system.img. Check
the flag in the generated image
(`avbtool info_image --image vbmeta_system.img`).
Change-Id: Ia429dd8a5cf0243e16ae305da210d3ea27c68abf
dist-write-files will add dist targets to the sdk_addon target,
but the sdk_addon target is not declared as phony when building
with mm (ONE_SHOT_MAKEFILE set), causing:
build/make/core/main.mk:1495: error: writing to readonly directory: "sdk_addon"
Always define sdk_addon as phony even if ONE_SHOT_MAKEFILE is set.
Bug: 118144231
Test: mm
Change-Id: I99d14a98a7597ebd694c765f94b0d6f4486860dc