Age | Commit message (Collapse) | Author |
|
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: I1ce8bc782666586633ded9cfaf1b9590e3c0efde
|
|
|
|
|
|
|
|
Some partitions (e.g. recovery) are transitive dependencies of
android_device module, and are not directly listed as partitions. This
change allows the installed files of `Include_files_of` partitions to be
propagated to the rdep filesystem module, so that it can reach the
android_device module and be disted.
Test: m nothing dist --soong-only && aninja -t query _dist_droidcore-unbundled
Bug: 395162005
Change-Id: Icc0e902d5d42b925d04470b60b5e62daac4c4a17
|
|
To match the names to those in soong+make build.
Test: m droid dist --soong-only && ls -l out/dist
Bug: 395162005
Change-Id: I196fa46de628a3dded9ba9f804337c19ddea119b
|
|
Add an alternative way of collecting metadata in soong-only build, which
is initially done in make.
Bug: 398039178
Test: presubmits
Test: lunch aosp_cf_x86_64_phone-trunk_staging-eng && m && m sbom
Change-Id: I94476db21cf9eac8be7693043f2cd7a2b1bcd8a6
|
|
This CL creates an apkcerts.txt of the apps installed on the device, and
any apk-in-apex of installed apexes. Note that this behavior is unlike
make. There is some ongoing discussion on whether the make behavior can
be updated to only list the installed apps as well.
To implement this, androidDevice will consult the following providers
from the list of installed modules
- AppInfoProvider (android_app, android_app_import, ...)
- AppInfosProvider (for apk-in-apex)
- RuntimeResourceOverlayInfoProvider (for checked-in and autogen rros)
Test: With https://r.android.com/3529333, apkcerts.txt is identical for
aosp_cf_x86_64_phone between make and soong
Bug: 399788149
Change-Id: I10009ea8761a197dd2301acf9615079bd28af3f5
|
|
This file is packaged into META/target_files.zip. It is also an implicit
input for `add_img_to_target_files` invocation, which creates additional
metadata files for target_files.zip like apex_info.pb, care_map.pb and
vbmeta_digest.txt
This CL implements the minimum fields necessary to run
`add_img_to_target_files`.
Bug: 399788119
Test: Built target_files.zip locally.
Test: Verified META/misc_info.txt exists, but is not identical to make
Change-Id: I52b9c9ff7b33e74d79b9321aa94312397a830693
|
|
* changes:
Soong filesystem generates aconfig files for subpartitions
Revert "Treat system_ext as system container"
|
|
When system had system_ext or other subpartitions, aconfig files for
the subpartitions were missing. Generate those aconfig files for the
subpartitions.
With this fix, we don't need to import aconfig files from system_ext
to generate system aconfig files.
Bug: 385213580
Test: lunch gsi_x86_64-trunk_staging-userdebug && m
Change-Id: Ie3db5c73c50af97f3ad0bea5e0c84273c9fce886
|
|
genNoticeBuildRules to use ModuleProxy.
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: I7507a580e3533b01f552778a7815bcc43d301e23
|
|
buildTargetSingleton
exportedJavaDeclarationsLibrarySingleton
javaFuzzPackager
kytheExtractAllSingleton
kytheExtractJavaSingleton
kytheExtractRustSingleton
lintSingleton
logtagsSingleton
makeVarsSingleton
ndkAbiDiffSingleton
ndkAbiDumpSingleton
phonySingleton
platformCompatConfigSingleton
sdkSingleton
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: I625ac8a209ca93755b2ba232202cfb44ecefde0a
|
|
This builds the zips but doesn't dist them, I'll do that in a followup.
Bug: 395160816
Test: Diffed proguard-dict.zip proguard-usage.zip and proguard-dict-mapping.textproto between soong and make
Change-Id: Ic112427e4a2fdaf92a1d0a96d0f1c100b57be37a
|
|
|
|
* changes:
Propagate owners info in filesystem provider
Introduce Soong API ctx.OtherModuleSubDir(m Module)
|
|
This list later shows up in the ninja file in soong-only builds, make
sure it's deterministic.
Test: Presubmits
Change-Id: Id121b8b95a543cd019f7c51f4121aa2c761f8a9f
|
|
Owners contain information about the name and the variants of the
modules that are installed in the partition. This information can be
used to determine whether the dependency module is installed or not.
Utilization of this information will be done in a follow up change.
Test: m nothing
Bug: 395989947
Change-Id: I8c63ed5765a3f582ff0d2ce98f63e6e0fc6edad8
|
|
interfaces directly, the next step is to change it to use ModuleProxy once IsDepInSameApex is ready." into main
|
|
interfaces directly, the next step is to change it to use ModuleProxy
once IsDepInSameApex is ready.
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: I13a4e256a26dbf7f9b3b746d628ac8f68b4e598e
|
|
We should not be checking
ctx.DeviceConfig().BoardMoveRecoveryResourcesToVendorBoot() in
android_device, because there may be multiple android_devices in the
tree with different partition layouts. Instead, get the recovery image
files transitively from the vendor_boot image.
Bug: 376539388
Test: Built target_files.zip, checked all the files are still there.
Change-Id: I1837aedacf71063879b26b51b8fe28b684b96d78
|
|
* changes:
Add Ramdisk_node_list to target_files.zip
Generate $partition_filesystem_config.txt for target_files.zip
|
|
These files will be packaged into META subdir of target_files.zip
Some details
- This CL adds the filesystem_config.txt files for system, vendor, ...
Some other partitions like system_other are currently missing
(different module type)
- There is a subtle difference between the make and soong build rule. In
the make rule, it uses $TARGET_OUT (all partitions) as the -D in `fs_config`. In the
soong rule, this implementation passes the staging directory of the
filesystem. This difference does not seem to have a difference on the
final result.
- Some filesystem_config are currently missing/not bit-identical. These
include boot, init_boot. For these, we actually want to use the
configs from their ramdisk filesystems. I will do this in a followup
CL
Test: diff'd target_files.zip
The following files are identical except NOTICE.xml.gz entry
- odm_dlkm, odm, product, system_dlkm, system_ext, vendor_dlkm, vendor
The following files are _not_ identical in names and/or contents
- boot_filesystem_config.txt
- root_filesystem_config.txt
- system_other_filesystem_config.txt
- vendor_boot_filesystem_config.txt
Bug: 388633394
Change-Id: I3a3997c0ffd8100c44b4a50a63bf0709a61d4472
|
|
Historically, the build has put the staging directories for partitions
in out/target/product. But in soong-only builds, the main staging
directory is in the out/soong/.intermediates path for the filesystem
modules, and then later also replicated in out/target/product for
backwards compatibility with tools like adb sync.
However, adb sync determines which files to push by if they have
a different timestamp than on device. Since the device images were
built using a different staging directory than the one adb sync is
looking at, the have different timestamps, and adb sync syncs all files
on the device the first time it's run.
To work around this, ensure the files in both staging directories
have the same timestamp by preserving the timestamp from their
source file with the `cp -p` flag.
This cl only does that change for real files right now, not symlinks.
We could also do it for symlinks in the future, but they're more
complicated and I didn't want to deal with that right now. This means
the first adb sync will resync all symlinks on the device, but there
are relatively few of them and they're small so it's not that big of
an issue.
Long term, we should rewrite adb sync to not depend on staging
directories. If it looks at the actual module intermediates files,
it will see a more consistent timestamp.
Bug: 396466053
Test: Manually ran m sync workflows. Also testing togging soong-only on and off and rebuilding
Change-Id: Ia0076a2f8e58404c5c3a0bf0d33b09b6846e95bd
|
|
This CL introduces a new field in FilesystemInfo with the selinux_fc
path of the filesystem(s). android_device will copy this file to the
META subdirectory of target_files.zip
Test: Built soong target_files.zip
Bug: 388633394
Change-Id: Ia81bd2c2d90d6beb116d57adf53deb5736579c3a
|
|
Test: Built the soong target_files.zip locally
Bug: 388633394
Change-Id: I2a87d24dc675dfb13eb02941956ec5a8593e5bb5
|
|
|
|
Implementation details:
- Define static rules for building installed-files.txt and
installed-files.json
- Avoided adding dependency on the root dir and added dependency
on the output image file instead
- Propagate the generated installed-files.* via filesystem info provider
and generate the dist rule in the main android device
Test: m droid dist --soong-only && ls -l out/dist
Bug: 395162005
Bug: 394365683
Change-Id: I615b0374c557fd11c19fcd190232cab411e2d299
|
|
https://r.android.com/3470135 disabled target_files.zip generation since
the previous implementation built two copies of .img files when building
droid. This increased full build times slightly.
This CL adds the build rule for creating the hermetic version of .img
files, but keeps it outside the transitive closure of droid.
Implementation details
- Split the monolithic cmd into three
- cmd1 assembles the staging dir and creates a timestamp file
- cmd2 depends on timestamp file and creates .img file using build_image
- cmd3 depends on timestamp file and creates a hermetic .img file using
build_image. It does so by creating an intermediate propfile with
`use_fixed_timestamp=true`
Bug: 393203512
Test: Built the soong target_files.zip locally
(There are some preexisting diffs with the make target_files.zip, which
I will resolve in ongoing work)
Change-Id: Ibd14da93a6534d5544deffa2c44bac3fb97052ad
|
|
This makes the make packaging system resilient to filename changes.
Test: lunch aosp_cf_x86_64_phone-userdebug && m systemimage
Change-Id: I166d78cd49f72a875b9648ca9285f7ebc2307a76
|
|
Index 0 is reserved for the vbmeta partition.
This works even for chained vbmeta partitions
as the "father" index location is used instead
of the one bundled within the image description.
Test: aosp_arm64; m --soong-only
Change-Id: Ibb033878e4e56e77b1621a32ba1f2ba7d8ceeedd
|
|
into main
|
|
This change only impacts android_filesytem and android_system_image
soong modules which are currently only used to build microdroid images.
Also add a neverallow rule to discourage usage of sha1.
Bug: 341123987
Test: m
Test: manually set avb_hash_algorithm: "sha1" check build fails
Change-Id: I5449f711c751752db42dcca785ff1a2de054fb2d
|
|
This is a partial revert of aosp/3308088. We need the symbol file
to still be installed, because a later ctx.InstallSymlink file adds
a dependency on the it.
We removed that install initially so that it didn't get installed in
filesystems, to replace that, just exclude files installed to the
"apex" partition from filesystems.
Bug: 393617060
Test: cd bionic; mm
Change-Id: Id4abe966c630d1e356575386af233eab92849934
|
|
Adevice does a `ninja -t inputs -i droid` and filters the results
for out/target/product/ to find files in the staging directories.
We were just copying the staging directories without creating ninja
rules before, so that failed. Actually create the ninja rules.
The rules are created in the android_device module instead of the
filesystem so that if you have multiple filesystems, they don't create
conflicting installation rules.
We should provide a way for tools like adevice to query the build system
for installed files, no matter where they are in the out/ dir, and
use that to replace this logic.
This cl produces the following diff in out/target/product compared
to soong-only builds before this change:
https://paste.googleplex.com/4624734193713152
It's mostly empty directories, which I don't think matter for adevice.
Bug: 393464638
Bug: 392957226
Test: `m installclean && m && launch_cvd && adevice update` says the device is up-to-date.
Change-Id: Ifb52aaf5bc3edd2e3900546bf9df73a52d1022c0
|
|
The current implementation chains the non-hermetic and hermetic file
creation in a single cmd. This causes `m droid` in --soong-only to do
some redundant work. Since the hermetic file is used in
target_files.zip, and this file is currently not fully migrated to soong
builds, comment this out for now.
Test: Set PRODUCT_SOONG_ONLY locally
Test: m droid
Bug: 393203512
Change-Id: Iff3a6a553922533c58b3d0206898bd627281c3fb
|
|
This change modifies the logic in selecting the chain and include
partitions for the top level vbmeta partition generation to follow that
in make.
Implementation details:
- Introduce separate functions for selecting the include and chain
partitions
- Set vbmetaPartitionProvider in boot images and filesystem modules
given that boot images can be selected as chained partitions.
Test: compare soong and make generated vbmeta partitions command
Bug: 390204058
Change-Id: I7940629212c4624e88d25b162755205503cfa469
|
|
|
|
main
|
|
Make also sorts the lines, sort them in soong so it's easier to
compare.
Bug: 376727180
Test: m --soong-only
Change-Id: I9a5e61a9348a7d2ff5058260768e89065a06e7c8
|
|
The same block_list file is currently declared in the propfile of
primary .img file as well the secondary .img file (for
target_files.zip). Both the .img files are created in the same ninja
command, but in the current implementation the block_list file is
generated twice with the same contents.
This CL moves the block_list file to the image prop file of the
secondary .img creation.
Test: presubmits
Change-Id: I0f8f4e4c7bec1ae5e370ac97d6608f9754e719e3
|
|
This makes system_other almost identical to the make-built one,
but there's still a diff in just one file:
system_other/system/priv-app/CredentialManager/oat/x86_64/CredentialManager.art
Bug: 390269431
Test: m --soong-only
Change-Id: I440097cead56a20d0268f4e766ac1be8fe11b34b
|
|
This just builds an empty system_other image for now, the dexpreopt
files will be added in a followup change.
Bug: 390269431
Test: m --soong-only
Change-Id: Ic4a9bcb8b7ba1eb4444b3339d6c0b0cdfd485714
|
|
Bug: 390269431
Test: m nothing
Change-Id: I18b9b90ac7c29f78e47415a89805a71e65b41650
|
|
We're not using this anytime soon, so just remove it for now.
Bug: 390269431
Test: m nothing
Change-Id: I51bbf104dceabafc08d562cfecb31a845cb88d12
|
|
Move the logic to android_device. The reasons for this are:
- As we start to check in android_device and filesystem modules,
only one set should do the copying. It's easy enough to mark the
android_device as the one, but harder for the filesystem modules
given that they may be reused between different devices and now
that top-down mutators are no longer supported.
- It's easier to manage this code in one place, especially since it's
temporary and should be removed eventually.
Having this higher confidence that there's only 1 copy rule set in
the build makes it less of a problem to use actual ninja rules for
the images.
Bug: 376727180
Test: m --soong-only && ls out/target/product/vsoc_x86_64/
Change-Id: If20ea2c55053cc962de9f9770db002edbc194835
|
|
Make packaging generates build rules for two $partition.img files
1. Containing inodes with build timestamps
2. Containing inodes with pinned timestamps
The former is useful for adb sync. The latter is used for
target_files.zip.
This CL creates a build rule to generate (2) with soong `filesystem` modules.
The propFile for (2) will be created by concat'ing the propFile for (1)
with `use_fixed_timestamp=true`
Test: m out/soong/.intermediates/build/soong/fsgen/aosp_cf_x86_64_phone_generated_device/android_x86_64_silvermont/target_files.zip out/target/product/vsoc_x86_64/obj/PACKAGING/target_files_intermediates/aosp_cf_x86_64_phone-target_files.zip
Test: diff -r out/target/product/vsoc_x86_64/obj/PACKAGING/target_files_intermediates/aosp_cf_x86_64_phone-target_files/ out/soong/.intermediates/build/soong/fsgen/aosp_cf_x86_64_phone_generated_device/android_x86_64_silvermont/target_files_dir/ --no-dereference
- super_empty.img and system_other.img are missing
- vbmeta*, boot* and userdata have binary diffs
- the rest are identical
Change-Id: If078220f215693660796090eb9b690b0ad41fd38
|
|
This is a text file with block size information of the contents of the
.img files. build_image supports creating this as an implicit output.
This CL creates the build rule to generate this output. This
will be copied to IMAGES/ subdir of target_files.zip
There is a subtle difference between the make and soong implementation.
In make, we generate two $partiton.img files. One is hermetic (for
targret_files.zip), and other is non-hermetic (for adb sync). The block
file is generated from the hermetic one.
OTOH, in the soong implementation, we are generating the block file from
the non-hermetic one. This should not matter, since pinning the
timestamp should not have an effect on block sizes. This implementation
detail can be changed in a follow up CL if necessary.
Test: diff'd target_files.zip locally, all $partition.map files are
identical
Bug: 388635097
Change-Id: I984d4fb55071296a82dae38ef09be6804ff0f3ae
|
|
Currently, filesystem module automatically adds `disable_sparse` entry
when generating the prop file. However, this property should not be
added when partition_size is specified, given that partition_size
property is introduced in filesystem module with
https://r.android.com/3451348.
Test: m out/soong/.intermediates/build/soong/fsgen/aosp_cf_x86_64_phone_generated_userdata_image/android_common/userdata.img
Bug: 388920173
Change-Id: Ia86210be77284c71f3831464149789b934c55001
|
|
Implementation details:
- Introduce support_casefolding, support_project_quota and
enable_compression properties in filesystem modules.
- Specify the userdata partition-specific props in filesystem_creator.
Test: m out/soong/.intermediates/build/soong/fsgen/aosp_cf_x86_64_phone_generated_userdata_image/android_common/userdata.img
Bug: 388920173
Change-Id: Id37c677e9bf28c1a338459e28ac6b05e5f58b407
|