summaryrefslogtreecommitdiff
path: root/android/variable.go
AgeCommit message (Collapse)Author
2024-12-13Merge "Make Security_patch an `android_filesystem` property" into main am: ↵ Spandan Das
f7f3b06907 am: afe1f461f7 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3408450 Change-Id: Ib4f306d4f1d07a54a40ff8c2719558a670775b0e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-12Make Security_patch an `android_filesystem` property Spandan Das
Make-built partitions use partition specific security_patches for build_image, but Soong-built partitions currently use the platform security patch for all partitions (including vendor,odm,...). This CL introduces a `Security_patch` property to set this value explicity. The name and description have been copied from `bootimg`. This CL also updates `fsgen` to set this property on the autogenerated partitions. The logic has been copied from `build/make/core/Makefile`. It is currently missing `boot` and `init_boot` (I have not tested bit-identical for those partitions yet). Bug: 383357338 Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug Setup - export COPY_IMAGES_FOR_TARGET_FILES_ZIP=true - export BUILD_DATETIME=10 - commented out installed_*_notice_xml_gz in build/make/core/Makefile Test: verified that the following .img files are bit identical in top of CL stack odm,system_dlkm,vendor_dlkm,odm_dlkm Change-Id: I9ae9bf957ffd479c57f12a49864589d285d93a71
2024-12-12Merge "Auto generate recovery build.prop module" into main am: 53b17f2868 ↵ Treehugger Robot
am: f58c759f95 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3404719 Change-Id: I143bf005246e718cc4e720fc7b8aa9ff1d122485 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-12Auto generate recovery build.prop module Jihoon Kang
Implementation details: - Introduce recovery_build_prop module type given that the build rule of the recovery partition's build.prop file is quite different from that of the other partitions' build.prop files. - Modify the visibility of the Soong-defined build_prop modules to allow the recovery_build_prop module to depend on them. - Auto generate the recovery_build_prop module and add it to deps in FsGenState. Test: build soong generated recovery partition and inspect the content of the generated prop.default file Bug: 381888358 Change-Id: I17eaa969da245863c11fab259fbbbb81aa46dfc4
2024-12-05Merge "Add super_image module type and create super image module in fsgen" ↵ Zi Wang
into main am: a242492bb7 am: db55b7aaf4 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3389110 Change-Id: Iec678109d2e55a40d0877ce6b3ae7e2e030c6f3b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-04Add super_image module type and create super image module in fsgen mrziwang
fsgen processes the variables exported from make and create the super image module. This module generates the misc-info.txt, which is used by build_super_image.py to build the super image. Test: CI Bug: 376726109 Change-Id: I74a3e68d697704f36a770b3c83e5f8821b3ac128
2024-12-04Merge changes from topics "recovery_prebuilt_res", "target_screen_density" ↵ Treehugger Robot
into main am: 18bad5f5c7 am: 579810a672 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3391020 Change-Id: I3aea4a257e6e088acaf29b22ad9f4cc3a4dae368 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-04Add recovery-resources-common-* module to FsGenState Jihoon Kang
This change selectively adds the recovery-resources-common-*dpi module to FsGenState based on the logic converted from make. Test: m soong_generated_recovery_filesystem_test Bug: 381888358 Change-Id: I5620b8b349728cc83d436bf5df45d836064ed1c6
2024-12-03Auto generate recovery partition am: 3216c986a9 am: a16adebe23 Jihoon Kang
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3387562 Change-Id: Ic2ac0bb9765ec695f8006c959d41f6d4ef10838c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-03Auto generate recovery partition am: 3216c986a9 Jihoon Kang
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3387562 Change-Id: Iefe4971c13ce9c5f834b82e7280263a388187d4a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-03Merge changes from topic "recovery_soong_export" into main Treehugger Robot
* changes: Support auto-generating prebuilt_* modules for recovery partition Support auto gen module type matching in neverallow Introduce prebuilt_vendor module type Auto generate recovery partition
2024-12-03Merge "Generate fsv meta only when PRODUCT_FSVERITY_GENERATE_METADATA is ↵ Spandan Das
true" into main am: 4e305cec97 am: 5a34406059 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3387732 Change-Id: I1ab06d26c7be4655dd73305df74da0dfd48541ab Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-02Auto generate recovery partition Jihoon Kang
This change conditionally auto generates the recovery partition in filesystem_generator. Test: m soong_generated_recovery_filesystem_test Bug: 381888358 Change-Id: I8938e842d8587ec1c986542385ed50c19dc1c76d
2024-12-02Generate fsv meta only when PRODUCT_FSVERITY_GENERATE_METADATA is true Spandan Das
This matches the fsv meta generation logic in kati built system.img and system_ext.img Test: sdk_phone64_x86_64-trunk_staging-userdebug Test: Ran the diff test tool on soong system image Change-Id: I308d4312bccfaa80712a355043c13f97b21d719c
2024-11-27Merge "Specify options_file in vendor_ramdisk prebuilt_kernel module" into ↵ Jihoon Kang
main am: 09245f9105 am: cdda931f93 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3377151 Change-Id: I3304c67679982375eb0d379d8aab08e4a105f49a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-27Merge "Create prebuilt kernel module for vendor_ramdisk partition" into main ↵ Treehugger Robot
am: 9138df77ce am: aedc895394 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3375799 Change-Id: I81309de7f74086592b46195e11084cfe894fc5a7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-27Specify options_file in vendor_ramdisk prebuilt_kernel module Jihoon Kang
To install module.options file to the vendor_ramdisk partition Test: m soong_generated_vendor_ramdisk_filesystem_test Bug: 381104942 Change-Id: I872a2100ce72171394731e6295fa4d1a611a3f4f
2024-11-26Create prebuilt kernel module for vendor_ramdisk partition Jihoon Kang
To correctly install *.ko files to the vendor_ramdisk partition. Test: m soong_generated_vendor_ramdisk_filesystem_test Bug: 381104942 Change-Id: Ib058a0f6893eaa273dfd609749a6417982cf057e
2024-11-26Merge "Specify bootconfig property in vendor_boot.img" into main am: ↵ Treehugger Robot
60c23299f0 am: 94e271336f Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3367784 Change-Id: I679dfa4b1019be0b5b2121fb2eb1abf2844d872b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-26Specify bootconfig property in vendor_boot.img Jihoon Kang
bootconfig is a path to the text file, created based on `INTERNAL_BOOTCONFIG` and `INTERNAL_BOOTCONFIG_FILE`. This is done by auto generating a newly introduced bootconfig module. The output file of the genrule module is passed as a property to the vendor_boot.img module. Test: Inspect the content of the generated vendor-bootconfig.img file Test: Inspect the ninja command of the autogen vendor_boot.img Bug: 379945468 Change-Id: I9c693de681e6dad7399f80df05825cce9b0c1c22
2024-11-21Merge "Specify cmdline property in autogen (vendor_)boot.img" into main am: ↵ Treehugger Robot
90998ebc5c am: 305f5c8235 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3367999 Change-Id: Ibde048a2f4c934ef62cdcaab3daf2b2bb979bb42 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-21Merge "Specify dtb_prebuilt property in the autogen vendor_boot.img" into ↵ Jihoon Kang
main am: 3269a7fe9e am: db6f18c94a Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3367544 Change-Id: I530871c10a8b47d2a7c500968470017e755a1405 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-21Specify cmdline property in autogen (vendor_)boot.img Jihoon Kang
Value of the `--(vendor_)cmdline` is `INTERNAL_KERNEL_CMDLINE` in make. This is passed as an argument to mkbootimg invocation of boot.img when vendor_boot.img is not created, and always passed as an argument to vendor_boot.img. Test: inspect autogen vendor_boot.img ninja command Bug: 379945468 Change-Id: Id25d33b970e028c2fe66c73d66c2091a91f56666
2024-11-21Specify dtb_prebuilt property in the autogen vendor_boot.img Jihoon Kang
prebuilt_etc_modules_gen currently elides entries that are not installed within partition directories but are installed in the product root. However, dtb.img is copied from source via PRODUCT_COPY_FILES and installed in the product root and then used for vendor_boot.img generation. This change creates the filegroup module from the PRODUCT_COPY_FILES for the source dtb.img to utilize it in the vendor_boot.img generation, but not actually install the file. We may consider installing this file if this is essential in runtime. Test: inspect the ninja command of the vendor_boot.img Bug: 379945468 Change-Id: I760b8eb9c15b74b124828ea041ca106f8355efd4
2024-11-20Merge "Avb sign boot images" into main am: e00f2462ca am: 42a402e517 Cole Faust
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3365714 Change-Id: Ie09cd5f0222c8fd07f7a2d008b35302dd6a2b88e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-20Avb sign boot images Cole Faust
The bootimg module had a very different implementation of avb signing than what was in make. Add an alternate implemenation that is used when avb_private_key is not set. Bug: 377562951 Test: m nothing --no-skip-soong-tests Change-Id: I253bcc8135f3d294eb6e09f39429c84c7c0fc037
2024-11-19Merge "Use PRODUCT variable for default payload fs type" into main am: ↵ Jooyung Han
876264b4cd am: e4ebb27c5a Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3355918 Change-Id: I477eea309a06ec5c0c9436af7b749107c76b0695 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-19Merge "Specify dirs property in generated ramdisk filesystem module" into ↵ Treehugger Robot
main am: bebc8b41eb am: ef8d26fc14 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3363546 Change-Id: I23cfd2086d0b753d1c042d11f6621523eb8dfbf3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-19Merge "Auto-generate vendor ramdisk and boot image" into main am: 311c45a1be ↵ Cole Faust
am: ee756319aa Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3362309 Change-Id: I4b5d48a0baa19b43dec202fec59a6d54b93d08d9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-19Merge "Use PRODUCT variable for default payload fs type" into main Jooyung Han
2024-11-19Use PRODUCT variable for default payload fs type Jooyung Han
ext4 was hard-coded, but now it can be configured with {OVERRIDE_}PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE variables. Previously, it was hard-coded as 'ext4', which makes it difficult to use a different filesystem for apex payload: for example, erofs. Using erofs for apex payload can help to make apexes smaller on read-only partitions. (When testing with the cuttlefish, it was ~40% smaller for all apexes) This is more important for those devices using erofs on their read-only partitions (like system) because it's recommend to use "not compress .apex files" for erofs partitions (to open apex files with Direct-IO enabled). Besides, we want to make erofs as a default filesystem for apex payload. (and hopefully deprecate .capex) However, we will need to support ext4 apexes for those older devices especially for mainline modules. Hence, we need a way to switch the default filesystem type for apex payload. Bug: 377388109 Test: OVERRIDE_PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE=erofs \ m com.android.runtime # The runtime APEX has erofs payload. Change-Id: Ia42ad913cdaeb52b5617f71017aca3b051a61508
2024-11-19Specify dirs property in generated ramdisk filesystem module Jihoon Kang
To match with that of the make generated ramdisk partition image. Test: unpackage ramdisk.img and inspect directories Bug: 379190521 Change-Id: If4b1b448e1559077198809dce29e3c3a89f9e653
2024-11-18Auto-generate vendor ramdisk and boot image Cole Faust
They both still have a number of deficiences vs the make-built ones, but this is a start. Bug: 377563622 Test: Presubmits Change-Id: If3329ae44633b00a8c2c2d15e3574087f74efe88
2024-11-16Merge "Build boot.img with soong" into main am: 984de3e496 am: c3546b5001 Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3355753 Change-Id: Iee83dceb8ac2bf950fa882d4c70a770a987ef058 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-15Build boot.img with soong Cole Faust
Bug: 377562951 Test: m nothing Change-Id: Icb0510eb457814fca0cfeece76e8e584a7c17350
2024-11-12Merge "Support generating prebuilt_* modules from 1:n mapping of ↵ Treehugger Robot
PRODUCT_COPY_FILES" into main am: 2577747759 am: a2aa6eac5b Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3344298 Change-Id: I67d3116551e518e05ba482bb741d8ba9b3d8aca6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-12Merge "Support generating prebuilt_* modules from 1:n mapping of ↵ Treehugger Robot
PRODUCT_COPY_FILES" into main
2024-11-12Merge "Build ramdisk with soong" into main am: 2c17b256ac am: cd1a6b3b93 Cole Faust
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3345486 Change-Id: Ifb0671f887da4bc2979539ff9813398c96b72776 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-12Support generating prebuilt_* modules from 1:n mapping of PRODUCT_COPY_FILES Jihoon Kang
The current implementation of prebuilt_* modules generation from PRODUCT_COPY_FILES relies on the assumption that its entries are 1:1 mapping. However, there are entries where the mapping is 1:n (i.e. a source file is installed multiple times with different names). Some of the cases are copying the same file multiple times in the same install directory with different file names. This cannot be supported with a single prebuilt_* module, and a multiple prebuilt_* modules need to be generated for a single source file to support this. Implementation details: - Import PRODUCT_COPY_FILES as a string list instead of map and process it - Reformat the generated prebuilt_* module name to end with an interger instead of file extension - Group source files to ensure that a source file cannot be duplicated in each generated prebuilt_* modules. Test: m soong_generated_vendor_filesystem_test && observe etc/ueventd.rc is not shown Bug: 375053752 Change-Id: Iac40ebfa4433a6589a5bc1ad31ce0cb7140bcfc4
2024-11-11Build ramdisk with soong Cole Faust
This is the first step to build the ramdisk, it still has some diffs with with the make-generated ramdisk though. Bug: 378146476 Test: m soong_generated_ramdisk_filesystem_test Change-Id: I767ea9d09e4d6413c2ec5af3120595e2001c9bb7
2024-11-11Merge "Autogenerate vendor_dlkm and odm_dlkm" into main am: 3f6305935f am: ↵ Spandan Das
d1395a1605 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3341241 Change-Id: If055a83406c5669b8661c018cbf44bdbc26973af Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-11Merge "Autogenerate vendor_dlkm and odm_dlkm" into main Spandan Das
2024-11-08Autogenerate vendor_dlkm and odm_dlkm Spandan Das
vendor_dlkm has a depdedency on system_dlkm, and its prebuilt kernel modules will be listed as deps. Bug: 377562851 Bug: 377563262 Test: m soong_generated_vendor_dlkm_filesystem_test NOTICE and /lib/modules/modules.blocklist missing Test: m soong_generated_odm_dlkm_filesystem_test NOTICE file missing Test: verified that modules.dep,modules.load are bit identical between kati and soong for AOSP CF Change-Id: If037430313cf10f661bc2bc7bdd468ca3707b2f3
2024-11-08Merge "Delete trim_against support" into main am: 85fced1744 am: 520a04180c Colin Cross
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3324229 Change-Id: Iecd55a7c97f2468cd5ccd5ed505929994c1f7074 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-08Merge "Delete trim_against support" into main Colin Cross
2024-11-08Merge "Auto generate userdata.img" into main am: 29520dbdff am: 7f81847cf8 Zi Wang
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3342023 Change-Id: Idf2cb2c132df56c10c4291996bc0d8785116c7e3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-08Merge "Build vbmeta partitions with soong" into main am: 3d2c75dc6a am: ↵ Treehugger Robot
771f90660a Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3341481 Change-Id: I73749a2ed67562520f0bb1204b28ab9c7ea5242a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-07Auto generate userdata.img mrziwang
Test: CI and unit tests Bug: 377563861 Change-Id: I42582db31377600412d2acf0dceab5ee9e15bc58
2024-11-07Build vbmeta partitions with soong Cole Faust
AVB is Android Verified Boot: https://source.android.com/docs/security/features/verifiedboot It works by signing all the partitions, but then also including an extra metadata paritition called vbmeta that depends on all the other signed partitions. This creates a requirement that you update all those partitions and the vbmeta partition together, so in order to relax that requirement products can set up "chained" vbmeta partitions, where a chained partition like vbmeta_system might contain the avb metadata for just a few products. In cuttlefish vbmeta_system contains metadata about product, system, and system_ext. Using chained partitions, that group of partitions can be updated independently from the other signed partitions. This is a resubmission with changes starting from line 134 of vbmeta_partitions.go to add default values for the key and algorithm, and allow unset rollback indexes. Bug: 377563298 Test: m nothing (the diff test currently fails, but this is a start) Change-Id: I431df464b3841bd75d119233e64b207bb27b81a4
2024-11-07Merge "Revert "Build vbmeta partitions with soong"" into main am: 81f663e478 ↵ Liana Kazanova
am: b91b194609 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3341477 Change-Id: I4cb702dd493103a6d14244ed7f333e540b9233ac Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>