unzip sometimes fails with:
checkdir error: cannot create out/target/product/.../system/framework/oat
File exists
I think this happens when two unzips run in parallel, see that the
parent directory is missing, race to create it, and then one of them
treats the EEXIST when creating it as an error instead of continuing.
Work around this by creating the directories with mkdir -p before
running unzip.
Test: m installclean && m
Bug: 119412419
Change-Id: Ie7daa94e107d53eff075ca58dbe721bd9d7fc8c2
uncompress-prebuilt-embedded-jni-libs uses zip2zip, add a dependency
to the rule that calls it.
Test: treehugger
Change-Id: I39d580999947ee54cfefe875b57a028be5333bd7
build_super_image.py calls `lpmake` and expects that (i.e.
HOST_OUT_EXECUTABLES) in PATH. However, we have to explicitly set up
that inside the build.
Bug: 120553014
Test: Set OUR_DIR and build blueline-userdebug.
Change-Id: I000f9d069902a902c9504a2ba31dba6dbc6917a2
BOARD_USES_<X>IMAGE is not equivalent with that image actually
existing. Since these targets depend on the INSTALLED_<X>IMAGE
variables being defined, gate the conditionals on that instead.
This logic is used in other places in Makefile
Bug: 120974093
Test: make
Change-Id: I6766042c801bf7fddc4b84671dbe5d3a157aea6b
Move the dexpreopting logic into Soong. Make modules will be
dexpreopted by executing the Soong logic in the standalone
dexpreopt_gen binary, which will generate scripts that will
perform dexpreopting for each module. Export global configuration
as JSON to $OUT/dexpreopt.config, which will be used by
dexpreopt_gen and Soong, and per-module JSON configuration that
will be used by dexpreopt_gen.
Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
only expected changes to dexpreopt outputs on system_other
(.vdex files for privileged Soong modules no longer incorrectly
contain .dex contents).
Change-Id: I59b20c931ee3e5a8d35eb30da4148691c5095502
Add a LOCAL_SANITIZE_NO_RECOVER variable that allows specifying which
sanitizers running in diagnostics mode shouldn't recover. This can help
debugging as we test enabling sanitizers in new libraries since it'll
cause tombstones to be generated along with the diagnostics information.
Bug: 80195448
Bug: 110791537
Test: Compiled test module with this flag, checked compiler command.
Test: Test module crashed, tombstone contained diagnostics information.
Change-Id: I441b9c873e54bf6404325f4d0ac59835350c2889
Generate the images for recovery's wipe data menu. And use the lossless
tool zopflipng to compress the generated image. This saves space
in the boot image at the cost of the increase of build time. In practice,
it adds about ~20 seconds to build the bootimage with 32 threads.
zopflipng generally runs slower. Even with a predefined filters
strategy, it runs about 3 times slower than pngcrush, e.g. ~40s vs 15s
to compress a 1.8M png file. However, zopflipng also gives a better
compression: ~1.4M vs 1.6M for the same image. So I guess the time
consumption is a price worth paying.
Bug: 74397117
Test: build the bootimage and check the resource images
Change-Id: I3e71f8bedd3c183a3374b1a9464bf05500e1aa61
We've already added new APIs in Q, so we shouldn't be claiming a
value of "0", which signals a production platform release.
Bug: 120797950
Test: manual
Change-Id: I6c9063ac4ace79b3ee6b1c67ccdf76f4063ad165
The final APK may contain compressed or uncompressed dex files,
and this affects dex2oat compilation.
Test: build sailfish, test that SystemUI.vdex and Settings.vdex
don't have the dex code.
Change-Id: Ic032f61ed67dcdf342f6eaef71d805b89d6fc99a
We used to manually generate the background text images for recovery. That
process requires opening various emulators and takes a long time. Now that
the host Java tool is ready to generate these images, we can embed the
generation step into the build of the recovery image.
Since there's currently no make variable that defines screen width of the
device, we put the commonly used values for pixels here, i.e. 1440 for
xxxhdpi and 1080 for xxhdpi. Devices with other dpi can still use this
feature if they define the screen width in their config files.
Test: build bootimage with screen with set/unset
Change-Id: Ic8389a527e6e7194de58a9c50763e841e886652b
Same as soong. This needs do match, otherwise, for example, CFI may be
disable in a static library in soong, and left enabled in a shared
library in make; that would not work as CFI only supports DSO granularity.
Bug: 120508119, 112709969
Change-Id: I00d6b1c9c373bcb6804c135407c6eeae88b375b6
Test: hwasan build of master branch boots
This adds support for overlays to be placed in the product and
product_services partitions.
LOCAL_VENDOR_MODULE := true #/vendor/overlay
LOCAL_ODM_MODULE := true #/vendor/odm/overlay
LOCAL_PRODUCT_MODULE := true #/system/product/overlay
LOCAL_PRODUCT_SERVICES_MODULE := true #
/system/product_services/overlay
Bug: 110869880
Test: built overlay with different partitions and verified correct apk
location
Change-Id: I21f594e784a18cf59f4ff03c00e30b463ec85008
* New clang compiler makes some integer santizers enabling
implicit-integer-sign-change, but Android code does not
boot with this new sanitizer yet.
Bug: 119329758
Test: build and boot with new clang compiler
Change-Id: Ic80cde49d3ef51277fbe2a0aa8c1b8f2f8bfd80c
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
Use the script to build it to avoid having duplicate logic in
build-superimage-target-args and build_super_image.py
Test: build it
Change-Id: I82f74d56d744c5f5b8dd38d41fedd264b042bc7a
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
Bug: http://b/117796718
ucrt is either preinstalled in newer Windows or can be installed in
older Windows, whereas a dependence on msvcr110 doesn't work on Windows
without additional dependencies.
Test: Run generated binaries on Windows VM (7, 8, and 10) without
installing any extra dependencies.
Change-Id: If5a5ffaa9d822ca05b4b54896937f224103f33d7
Combine existing hiddenapi-* txt files into a single CSV containing
a list of all class members and their corresponding flags.
Test: m, phone boots
Change-Id: I67f1b5f331b262e9b681d9a3c78c9e4cbb5ea082
ODM can already be built with dynamic sizes (in that
build_image.py builds it correctly). Add it to the list of
valid dynamic partitions.
Test: builds
Change-Id: Ib5d1348530d2120e3af7dbe422ac3ebe6149b4fb
Fixes: 120047099
Pass --avoid-storing-invocation to dex2oat, which will remove the
command line from the final .odex files. This will help make the
.odex files reproducible across devices and build system changes,
simplifying comparisons.
Bug: 119412419
Test: m checkbuild
Change-Id: I46cedadab9a87addc0f9e35f7bbe578beae1df60
This was only needed for pushing first stage init to the recovery
image. This isn't actually needed however, as the recovery image can
be fully shared and can run full init as long as there is a symlink
from /init to /system/bin/init, so that is added instead.
Bug: 80395578
Test: boot to recovery via this symlink
Change-Id: I8910543525a841401b209bfd98af30c5a0dc2688
AArch64 execute-only memory is only supported when using lld as the
linker. There's still a few modules which don't use lld, so in those
cases we need to disable this option.
Bug: 77958880
Test: Module with LOCAL_USE_CLANG_LLD false builds without XOM
Test: Module without LOCAL_USE_CLANG_LLD defined builds with XOM
Change-Id: I5dfe3cd1e1cac2b3ead13912af9f7fe896d507e9
Only use one consecutive tab in make rules and use spaces
for any additional indentation. This should generally prevent
tabs from appearing on the cmdline.
This cl is the result of 3 regex replaces:
\\\n\t\t([^\t]) -> \\\n\t \1
\\\n\t\t\t([^\t]) -> \\\n\t \1
\\\n\t\t\t\t([^\t]) -> \\\n\t \1
Test: make mainline_system_arm64
Change-Id: Ic3f72deed35e39e4b1a4b492db65aeabc5bef0d5
Like TARGET_SYSTEM_PROP, but is merged into /product/build.prop.
Also change the formatting of the output of both of these macros
slightly, so make the start and end clearer.
Bug: 119911662
Test: migrate downstream products to use this
Change-Id: Iddae7aac3c51b5706f3fb2690c5ca5a98840ad34
Adds build system support for generating AArch64 binaries with
execute-only memory layouts via a new LOCAL_XOM property. Also adds
support for an ENABLE_XOM build flag for global builds.
Bug: 77958880
Test: make -j ENABLE_XOM=true
Change-Id: I6af9e3615d0a9fdff802eae50e6ad94311ec8046
When PRODUCT_RETROFIT_DYNAMIC_PARTITIONS is empty, collapse-pairs will
write this line to build.prop:
ro.boot.dynamic_partitions=ro.boot.dynamic_partitions_retrofit=
... which is not what we want.
Test: build without dynamic partitions
Change-Id: I04c3c75fad20604657814b7f9cce2cc0635627ee
Test: with this is true, build
`verified_assembled_system_matrix.xml`;
file includes kernel requirements
Change-Id: I833b4fefabefb2f0457171055afe5722981e3589
Now that we have two supers for retrofit devices, modify
the size checks. Only A/B devices launched with dynamic partitions
will get the / 2.
Test: builds
Bug: 116608795
Change-Id: Icdddcc0b3f3be307b3907e1c789933c2ace61867
TARGET_FLATTEN_APEX, when set to true, flattens APEXes that are on
/system. Flattening an APEX means files in it are not packaged as a mini
file system image, but exist in the /system partition as individual
files. This option is for devices where kernel does not support loopback
devices or the maximum number of loopback devices is too small (though
the threshold is TBD as of now).
Bug: 118485880
Test: TARGET_FLATTEN_APEX=true m apex.test; tree
out/target/product/.../system/apex/apex.test shows list of files in it.
Test; m apex.test, then a file out/target/product/.../system/apex/apex
.test.apex exists.
Change-Id: Ie13cb062c1387d55689692ba2b123e606ada8aa4
asan builds create many artifacts that normal builds do not, and
are only used for testing. Disable artifact requirements for them.
Bug: 119270428
Test: build internal asan product
Change-Id: I8692ee7e8916d40a8a787c3a07dcf7d677b19cab
$(align-package) uses $(ZIPALIGN), add it as a dependency to the
rule.
Bug: 119403628
Test: rm out/host/linux-x86/bin/zipalign && m out/target/product/sailfish/obj/APPS/SystemUI_intermediates/oat/arm64/package.odex
Change-Id: Iffc9506fd3168481ad998c5d8423ed4e13e6d11b
Filter out the relevant deps for /vendor, /product and
/product_services, and make the /system version depend
on the rest.
Also filter out phony packages, which do not produce
license files on their own (though their deps might).
Bug: 118089975
Test: diff blueline notice files before and after
Change-Id: Idc621b16237dfecafd0befa742c8d3b93be1f611
Move things around so that we don't need to check whether
we're in the "split license file mode" over and over, and
some other moves to improve readability.
Also rename the html_or_xml variables to the correct name
given the branch of the conditional we're in, to make it
easier to grok.
Bug: 118089975
Test: diff notice files for blueline before and after
Change-Id: I00fcdce31503c543c6c0ab6901531c54c9705617
Newer cores are implementing armv8-2a ISAs.
Enabling 2nd arch. variant to support for new type of cores.
Test: set TARGET_2ND_ARCH_VARIANT := armv8-2a, build without warnings and not ignore armv8-2a
BUG: 118414869
Change-Id: I1cd64ab0ad9b253ec3d109ebd1dbc7882011ce77
This adds BOARD_SUPER_PARTITION_BLOCK_DEVICES, which must contain a list
of the (non-A/B suffixed) partitions that will comprise the super
partition. It is only intended for devices which cannot have a partition
named "super". For each entry, there must be a
BOARD_SUPER_PARTITION_x_DEVICE_SIZE variable defined with the exact size
of that partition (not its image size). The sum of these sizes must be
equal to BOARD_SUPER_PARTITION_SIZE.
Bug: 116802789
Test: device with BOARD_SUPER_PARTITION_BLOCK_DEVICES builds
Change-Id: I1a79c2e08ca99ce7e42207893ef3285caffecf44