The new variable stores the name of the <uses-library>, if for some
reason it is different than the name of the module for that library
(normally they are the same, but sometimes differ). If the variable is
undefined or defined to an empty string, the name of the <uses-library>
is considered to be the same as the name of its module. It is recorded
in a module's dexpreopt.config file as "ProvidesUsesLibrary" field.
Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Iac1be0fac79a944e4c26867cc58e274b76709da8
For now the subcontexts are always empty. A follow-up change will
actually populate that field from dependencies' dexpreopt.config files.
Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: I6cf0e8363dff4b406cb62ba3d76d566dbfec57e7
vendor-ramdisk-debug.cpio.lz4 will be packed into a
vendor_boot-debug.img and usually won't be flashed directly.
Moving it to the intermediate build directory.
Bug: None
Test: make vendorbootimage_debug
Change-Id: I86ea72c7a3484a90286139624408d07ce4bf994c
Bug: 176171716
Test: build_mainline_modules.sh and ensure that the ART boot image is
built: `find out -type f -name '*.art'` is nonempty for every arch.
Change-Id: I5163ebe1f8db3d4d921bab0f83cd388ba29419ec
Test: mm -j && mm -j dist, make sure virtual_ab_compression is set to
true in dynamic_partition_info.txt of target_File.zip
Change-Id: Id0d46bd8ed738b2b69a0c01481b7db0c7127f773
When building vendor_boot v4 with multiple vendor ramdisks, pass the
name of each ramdisk to mkbootimg.
Bug: 177882072
Test: Modify a device BoardConfig and verify the built vendor_boot.img
with unpack_bootimg
Change-Id: I679d277aa88f1e10678d2f74b579e4140536e267
Commit I56dda56bab7def1540f4fb506323e3e605620cd4 adds
BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT and includes
$(TARGET_RECOVERY_ROOT_OUT) directory when building vendor
ramdisk if BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT is set.
We should do the same thing when building the vendor debug
ramdisk as well. Otherwise, lacking some recovery files
makes the device unable to boot into fastbootd/recovery mode.
Bug: 177712689
Test: `make vendorbootimage_debug`, then unpack
./obj/PACKAGING/vendor-boot-debug_intermediates/vendor-ramdisk-debug.cpio.lz4
to check it includes recovery resources via:
`lz4 -d -c ../vendor-ramdisk-debug.cpio.lz4 | cpio -idm`
Test: device can boot into fastbootd after flashing vendor_boot-debug.img
Change-Id: I4744c6600866436ed7d5a321e67e20b8f3da8a81
By enabling these hiddenapi CSV files to be prebuilt, it
becomes possible to create a split build that supports
the hiddenapi encode dex step, but doesn't contain all
of the java sources needed to generate the CSV files.
Bug: 175048716
Test: m nothing
Test: new TestHiddenAPISingletonWithPrebuiltCsvFile
Test: local build without prebuilt hiddenapi
Test: local build with prebuilt hiddenapi
Change-Id: Ia38c5016d2aeba54aa537a5ce601898d46330730
New clang compiler enables unsigned-shift-base as part of
integer sanitizers. But it makes some daemons crash at
libc++.
Bug: 177566116
Test: build.
Change-Id: I6d64fa5002b6035be4d960441eb5176c97152af9
As we add more partitions, INTERNAL_*IMAGE_FILES variables has grown
and the places where the variables are referenced had to be touched
everytime. This change introduces a new variable
INTERNAL_ALLIMAGES_FILES which concatnates INTERNAL_*IMAGE_FILES, and
replaces the uses of the variables with the new one.
Bug: N/A
Test: m
Change-Id: I62a0f725a0f6999421d04a6261370be9124e62d7
The reason that the jar file depended on modules_to_install was to
collect files from other partitions, not just system. It isn't the
intention to gather fake modules like phony modules and more importantly
their dependencies (LOCAL_REQUIRE_MODULES). This change explicitly
filters out the fake modules to make the intent clearer.
In fact, the jar file depending on fake modules can have a side effect
that overridden modules are installed. It can happen as follows:
PRODUCT_PACKAGES += A B C
LOCAL_MODULE := A
LOCAL_REQUIRED_MODULES := B
include $(BUILD_PHONY_PACKAGE)
LOCAL_MODULE := B
include $(BUILD_XXX)
...
LOCAL_MODULE := C
LOCAL_OVERRIDES_MODULES := B
include $(BUILD_XXX)
modules_to_install is set to
out/target/product/xxx/fake_packages/A-timestamp
out/target/product/xxx/system/.../C
; B is correctly overridden.
But there still is an order-only dependency from A to B which is created
by add-all-target-to-target-required-modules-deps. Unfortunately,
overridden isn't take into account here.
So, if the jacoco jar file depends on modules_to_install, both B and C
are installed. And if the creation of system.img happens later, the two
are included together, which is an error.
A preferred way of fixing this is to amend
add-all-target-to-target-required-modules-deps so that override is take
into account. However, it will likely to require more Make tricks. This
change takes a much easier path; pruning the fake packages from the
dependencies so that its dependencies which might be wrong can't be
installed.
Bug: 175400393
Test: build/soong/soong_ui.bash --make-mode SKIP_ABI_CHECKS=true
SOONG_COLLECT_JAVA_DEPS=true TARGET_PRODUCT=cf_x86_phone
TARGET_BUILD_VARIANT=userdebug
TARGET_USERDATAIMAGE_PARTITION_SIZE=17179869184 droid dist
DIST_DIR=out/dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true
CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="*"
NATIVE_COVERAGE_EXCLUDE_PATHS="art bionic/libc device"
continuous_instrumentation_tests continuous_native_tests device-tests
platform_tests
No com.android.art.apex in system.img
Change-Id: Ie8a917b7c3985c3a4f19372a4430accd84124e83
When an APK is packaged without any classes.dex files the resources
are packaged directly, and so the packaging rule must depend on the
resources.
Fixes: 177295654
Test: prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-aosp_cf_x86_64_phone.ninja -t query out/target/product/vsoc_x86_64/obj/APPS/CtsSplitApp_x86_64_intermediates/package.apk
Change-Id: I786e71439f11e7bd5e20e010b66fbf529eb57a5a
Now that the feature guarded by this flag has landed in Linux 5.10
we no longer need the flag, so we can remove it.
Bug: 135772972
Change-Id: I02fa50848cbd0486c23c8a229bb8f1ab5dd5a56f
Bug: 177214554
Test: lunch cf_x86_phone-userdebug && m
Test: Ensure that `find out -name dexpreopt.config` lists before and
after the fix are identical (for target cf_x86_phone-userdebug).
Test: TARGET_PRODUCT=mainline_modules_x86_64 \
TARGET_BUILD_VARIANT=userdebug \
build/soong/soong_ui.bash --make-mode UipbUtil
Change-Id: I28b38c08ad570d53dc679f9b42975545d457416e
A fake vendor snapshot is a vendor snapshot whose prebuilt binaries and
captured headers are all empty. It's much faster to be built than the
real vendor snapshot, so users can exploit the fake vendor snapshot to
reduce the size of vendor snapshot they need, by installing the fake
snapshot and then inspecting the ninja dependencies.
Bug: 157967325
Test: m dist vendor-fake-snapshot
Change-Id: I7fa5d5033a296965b21e840765cc7fe02fd1f44e
Revert "Export soong license data to make."
Revert "Add ability to declare licenses in soong."
Revert submission 1377717-metalics
Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442
Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.
Change-Id: I1f672e6e8ec48f0141bb4b6cc4eb2efed1eeef6b
Revert "Export soong license data to make."
Revert "Add ability to declare licenses in soong."
Revert submission 1377717-metalics
Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442
Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.
Change-Id: Iaf2243cba16f6191b022371a14f81ef8194a47d1
Vendors can now generate only needed modules by setting the following
Makefile variables:
- DIRECTED_VENDOR_SNAPSHOT: set to true
- VENDOR_SNAPSHOT_MODULES: list of snapshot candidates
e.g.
DIRECTED_VENDOR_SNAPSHOT := true
VENDOR_SNAPSHOT_MODULES := toybox_vendor sh_vendor libbase libcutils ...
Bug: 157967325
Test: m dist vendor-snapshot after setting those in BoardConfig.mk
Change-Id: Iea1ddbe78e143316fb6cb5027de90b9c83252f80
Now newer system policy and older vendor policy can be built together by
setting following variables:
- BOARD_SEPOLICY_VERS
- BOARD_REQD_MASK_POLICY (copy of older system/sepolicy/reqd_mask)
- BOARD_PLAT_VENDOR_POLICY (copy of older system/sepolicy/vendor)
- BOARD_(SYSTEM_EXT|PRODUCT)_(PUBLIC|PRIVATE)_PREBUILT_DIRS (copy of
older system_ext and product policies)
Bug: 168159977
Test: try normal build and mixed build
Test: boot and check selinux denials
Change-Id: I4e2890c96cab69e60c83c60f8c396cfe049ec05b
The APEX symlink optimization is a build-time trick to save the
storage/RAM usage of APEX by replacing some files in APEX with symlinks
to the files in the system partition. The optimization however is
automatically turned off for 'updatable: true' APEXes because doing the
optimization for them will hide the sys-health implication until when
the APEXes are built unbundled (i.e. prebuilt) and thus the
optimization is impossible.
TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION forcibly disables the safety net.
When it is set to true, the symlink optimization is done regardless of
the 'updatable' property. This is useful for some of the devices like Go
where most APEXes (even the 'updatable: true' ones) should be
effectively non-updatable.
Bug: 175630508
Test: TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION=true m and check that
updatable APEXes have symlinks to system libs
Change-Id: I261fd4ab2dd8e62ff435306b11168121cbcf662a
The patch rename the original ro.product.cpu.abilist* to
ro.system.product.cpu.abilist*. The property service will
define ro.product.cpu.abilist* by the intersect ABIs of
ro.{partition}.product.cpu.abilist*.
Bug: 176520383
Test: build aosp_arm64-userdebug and check the system/build.prop
Change-Id: I26e404632b28e9f6abd462920e0084ad2022a763
If that happens it will be left out entirely.
It would be nice to catch this on the Soong level, but there are
several separate code paths there so this ensures it isn't missed.
Test: `m nothing` with packages/modules/ArtPrebuilt/Android.bp that
had this mistake
Bug: 172480615
Change-Id: I2d31679b2ca5b57bf14f35703c10093275209890
Common ro.product properties are always generated for the
product partition, even if it is not present. This was introduced
for the R release with Ia88c8efecb18db9c27baa466e492bfd898b581d3
"Generate product build props always" commit.
It violates CDD requirements for the devices which were released
earlier. Add optional parameter to build-properties which allows to
skip the common properies generation and product partition specific
checks to make sure common properties are not generated for
the devices released before R and without product partition.
Test: manual, build product/etc/build.prop for shipping levels 28, 30
and for the devices with and without product partitions
Bug: 174677451
Change-Id: Ia3275d7229d0a873e0a4f1d1ea7a25c758c85bb9
Enables us to switch the default in .bp files, so ART prebuilt builds
can be tested with `m SOONG_CONFIG_art_module_source_build=false`.
Test: m
Test: m SOONG_CONFIG_art_module_source_build=false
Test: `m nothing` on some lunch targets that failed on internal
Bug: 172480615
Change-Id: I78725f77819dc29b47d2438dfe724532e4d2df47
Add support for partitioning the vendor_boot kernel modules into
multiple vendor ramdisk fragments. The partition granularity is kernel
module directory. This mechanism builds upon the existing
BOARD_KERNEL_MODULE_DIRS mechanism. For example, say we have three
kernel module directories:
BOARD_KERNEL_MODULE_DIRS := foo bar baz
We can then define a vendor ramdisk fragment:
BOARD_MKBOOTIMG_ARGS += --header_version 4
BOARD_VENDOR_RAMDISK_FRAGMENTS := dlkm_foobar
And let said ramdisk to contain the DLKM directories "foo" and "bar":
BOARD_VENDOR_RAMDISK_FRAGMENT.dlkm_foobar.KERNEL_MODULE_DIRS := foo bar
BOARD_VENDOR_RAMDISK_FRAGMENT.dlkm_foobar.MKBOOTIMG_ARGS := <mkbootimg args>
The built vendor_boot image would contain two ramdisks.
The first one being the "default" ramdisk, which contains DLKM directory
"baz" and the rest of the files that get's installed to
$(TARGET_VENDOR_RAMDISK_OUT).
The second one is the "dlkm_foobar" ramdisk, which contains the two DLKM
directories.
Design doc: go/vendor-boot-v4
Bug: 162864255
Test: Modify BoardConfig.mk to have a product build v4 vendor_boot
Test: Use unpack_bootimg to verify the vendor_boot image
Test: Teach a bootloader how to handle v4 boot image, flash boot &
vendor_boot and boot device
Change-Id: Ibb1bbd7ebe36430c55ec6c4818c1d3888a319089
jacocoagent and its dependencies emits artifacts to system/,
hence it belongs to base_system.mk. It was rather incorrect
to add jacocoagent to EVERY product makefile because those
product makefiles may be enforcing artifact path requirements
(e.g. generic_ramdisk.mk).
Test: EMMA_INSTRUMENT=true m nothing
Bug: 175605139
Bug: 173742069
Change-Id: If9cb93ab8fd69d11e764ab830dc791bbe6106cf5
Not setting TARGET_ARCH is ok if TARGET_ARCH_SUITE is set instead. Skip
certain TARGET_ARCH-specific steps of the config:
- don't run the 'select' steps to figure out cpu flags
- don't generate dexopt config for TARGET_ARCH
Bug: 174315599
Test: lunch <product that sets TARGET_ARCH_SUITE but not TARGET_ARCH>
Change-Id: I74a9e71d0cc5c7f74d3b10b1c8bb89682c096d7c
Add a new TARGET_ARCH_SUITE which, when set to 'mainline_sdk' or 'ndk',
sets `Aml_abis: true` in soong.variables.
This is required to enable removing the custom soong.variables that
are being maintained for the ndk and mainline sdk builds.
Bug: 174315599
Test: TARGET_ARCH_SUITE=mainline-sdk m nothing; inspect soong.variables
(ditto for ndk)
Change-Id: Ib651a637457310270840d721cdccf50bede3ee58
Allows for adding comments between variable definitions. This matches
the style in product.mk
Test: m nothing
Change-Id: Icc1e3d635a885000c49371997a55001739c02587
This allows system-only builds (which disable vendor images) to inherit
from device makefiles that normally place GSI AVB keys on vendor boot.
Bug: 175594737
Test: lunch system-only build, m, observe warning not failure
Change-Id: Ib6c199d0a47b3b3be2143241d83ab586966cfd1e
Now that we have moved the AB_OTA_BOOTLOADER_PARTITIONS &
AB_OTA_RADIO_PARTITIONS to BoardConfig, we can make the
ab_ota_partitions read only.
Eventually, the variable will be exposed as a product build
property. And we want its value to stay unchanged during the
build process.
Bug: 162148770
Test: build coral
Merged-In: I37ab41cf2ed7bc9cb6db6b4700c03ab48ed31fff
Change-Id: Ied45347c3e56e56d1372d51b98d7e52b02ff4755
(cherry-picked from commit 6e93f484ac)
This is useful when a makefile will produces different artifacts
depending on other configuration. Having an allow-list that's too strict
can make it a little difficult to make progress.
Test: m nothing in follow-up
Change-Id: Ic8235912bcbaa8e249a752e042d4f42be4466e34
(cherry picked from commit 0b6fde311ac6bc2b64e69858382117a362645502)
Add flags that is used for java_sdk_library enforcement
to product.mk.
PRODUCT_ENFORCE_INTER_PARTITION_JAVA_SDK_LIBRARY is flag
for enabling java_sdk_library enforcement.
PRODUCT_INTER_PARTITION_JAVA_LIBRARY_ALLOWLIST is allowlist
for java_sdk_library enforcement, and it is consists of name
of dependency modules.
Test: m nothing
Bug: 168180538
Change-Id: I8743d9475be53b16f2c9e43d731c576bc56ddfbc
Raise build error when PRODUCT_ENFORCE_INTER_PARTITION_JAVA_SDK_LIBRARY
is true while BOARD_VNDK_VERSION is not set because
PRODUCT_ENFORCE_INTER_PARTITION_JAVA_SDK_LIBRARY doesn't have any
meaning in that case.
Test: m nothing
Bug: 168180538
Change-Id: Ied2f99763a7cce7674ad50867403a66b18968071
* Prerequisites: external/f2fs-tools: sload compression support
* Must work with corresponding changes in system/extras repository
* If Board config does not change, it falls back to old behavior,
i.e. no compression for the system partition
* Kernel f2fs compression support is a prerequisite if the Board config
enables the compression (see below)
* Necessary board config change
(e.g. device/<vendor>/<product>/BoardConfig-common.mk)
BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := f2fs
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 200000000
BOARD_SYSTEMIMAGE_FILE_SYSTEM_COMPRESS := true
BOARD_SYSTEMIMAGE_F2FS_SLOAD_COMPRESS_FLAGS := <sload compress sub-options>
Setting BOARD_SYSTEMIMAGE_FILE_SYSTEM_COMPRESS to true enables both the
compression support when the initial empty file system be made (mkfs.f2fs)
and the compression flag (-c) when the system image files be side-loaded
by sload.
Sload compress sub-options (i.e. options other than -c) will be provided
by BOARD_SYSTEMIMAGE_F2FS_SLOAD_COMPRESS_FLAGS. If it is not given, or
is empty, the default sub-options will be used
Please refer to the sload.f2fs manual page.
Setting BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE to f2fs is trivially necessary.
* File system table (fstab), notably the file 'fstab.hardware', should
also changed:
- The file type must be changed to f2fs
- Perhaps also other f2fs-specific options
Bug: 170918499
Test: Pixel4a userdebug build (from build id 6918751)
Signed-off-by: Robin Hsu <robinhsu@google.com>
Change-Id: Id9d67b5cb35dc806e06ff1320e89114abc996a28
main.mk was a bit cluttered/difficult to follow wth all the indents. Put
the logic in a separate file instead.
Test: m nothing
Change-Id: I545bcd117a6bcd33b520ad279be1bab9b2d89393
It was in the middle of some other logic in main.mk
Put it in Makefile instead next to the other "information" dist txt
files.
Test: make and diff certificate_violation_modules.txt
Change-Id: I5b73a0f89ccf3de69e7608a0568d2b4b6f37e98c
Protected KVM relies on protected VM firmware (pvmfw) to bootstrap the
trust in protected VMs. This firmware is AVB protected and stored in the
pvmfw partition.
Test: build a target with BOARD_PREBUILT_PVMFWIMAGE set, saw the image
included in the product files and used avbtool to check the footer
and vbmeta.img details.
Bug: 171280178
Change-Id: I4d6a1819f307c77ca60c0dd3dff39ee28cece4f6
The debug vendor boot image needs to include the debug ramdisk in order
to retain adb root. So make sure this still happens when recovery is
moved to the the vendor boot image.
Bug: 172510680
Test: verify adb root when using vendor_boot-debug.img
Change-Id: I20fe27635dd33e4d8a59e873e704891de223204b
The product flag is only defined in this CL. No device has been
configured to use this flag yet.
The flag is overridable using environment variable. This way, developers
can enable APEX compression on various targets.
Bug: 137802149
Test: build/soong/soong_ui.bash --dumpvar-mode PRODUCT_COMPRESSED_APEX #false
Test: export OVERRIDE_PRODUCT_COMPRESSED_APEX \
build/soong/soong_ui.bash --dumpvar-mode PRODUCT_COMPRESSED_APEX #true
Change-Id: I10e4909258cee9b4670bc3f10ff3a0ad5013c864
This is needed after
commit 21c34f78e8
which starts calling host_init_verifier in merge_target_files,
a binary in releasetools.
Test: m otatools
Change-Id: Iee762de9fd6f890b5cc26ee5507da2f3f284fc14
Files are copied into the recovery installation directory by a rule
that runs rsync. The previous logic tried to avoid racing with the
rsync rule by depending on the final packaged recovery image, but
if BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT is set then
INSTALLED_RECOVERYIMAGE_TARGET is left empty and no dependency was
added. Depend on the timestamp file used as the output of the rule
that runs rsync instead.
Test: query dependencies of installed-files-recovery.txt
Fixes: 173772240
Change-Id: I5ec77a6933e3a83fe4e4819e0e246017d824d8a5
List of stub libraries from system (and bionic APEX) is currently
managed in static file. This change generates the list at build time and
adds to the system config so linkerconfig can use it.
Bug: 172889962
Test: Build cuttlefish and confirmed list is generated in
/system/etc/linker.config.pb
Change-Id: Idd5a93442f398dd8e88c767c694ddae64d1bb713
Remove unit tests jar from official suite packaging
they will be run & tested externally as real unit tests.
Include the compatiblity-tradefed.jar element as it will
be needed.
Test: make cts; run cts-unit-tests
Bug: 173811050
Change-Id: Ie808c7422e35c48c9392f7179806745ef392de64
Add installed-files-vendor-ramdisk.txt build artifact, so that it is
easy to see what files landed on the vendor ramdisk.
Test: clean build, inspect installed-files-vendor-ramdisk.txt
Change-Id: Ie84d06dc968ad972ab2bfa79db4d1839ba09e09f
Also includes passwd_system_ext in copy-init-script-file-checked,
seemingly left out as an oversight.
Bug: 163089173
Test: Treehugger build targets
Change-Id: I3b972e4677a6adad2c515f5762e0062803453d18