Snap for 16208812 from 5aee6c08c1228b33aaad2b2eaf64199b6175009c to 26Q4-release

Change-Id: I5fc07f99b5d75279002efaa73b8252f7e0d19895
tree: 0dcc41ae15106478f12364dfd8a083d3dd70dc19
  1. .prebuilt_info/
  2. aosp_cf_arm64_sdv_core/
  3. aosp_cf_arm64_sdv_media/
  4. aosp_cf_x86_64_sdv_core/
  5. aosp_cf_x86_64_sdv_core_perf/
  6. aosp_cf_x86_64_sdv_core_tiny/
  7. aosp_cf_x86_64_sdv_media/
  8. cuttlefish_multi_tenancy/
  9. doc/
  10. owners/
  11. prebuilts/
  12. sdv_arm64/
  13. sdv_base/
  14. sdv_cf/
  15. sdv_core_base/
  16. sdv_ivi/
  17. sdv_ivi_arm64/
  18. sdv_ivi_cf/
  19. sdv_ivi_cf_ds/
  20. sdv_media_base/
  21. vvmtruststore_preprovisioned/
  22. AndroidProducts.mk
  23. aosp_cf_arm64_auto_sdv.mk
  24. aosp_cf_x86_64_auto_sdv.mk
  25. METADATA
  26. modules.blocklist
  27. OWNERS
  28. PREUPLOAD.cfg
  29. README.md
  30. TEST_MAPPING
README.md

SDV lunch targets

This directory contains Makefiles used to define SDV lunch targets.

Hierarchy

SDV makefiles diagram

Inheritable lunch targets

OEM-defined targets are intended to derive from those base targets as needed. OEM targets are intended to directly inherit from one SDV “base” target, and a “vendor” target.

SDV “base” targets

  • sdv_base is the base for lunch targets that need to communicate with the SDV system using SDV communications stack.

  • sdv_core_base is the base for lunch targets that need the full set of SDV Core services.

  • sdv_media_base is the base for lunch targets that, aside from SDV Core services, also require media API support.

  • sdv_ivi is the base for AAOS IVI lunch targets capable of communicating with SDV services on other VMs.

Vendor targets

  • sdv_cf contains Cuttlefish-specific functionality specific to SDV Core-derived targets. Note that it's not used by sdv_ivi_cf.

Sample targets

aosp_cf_x86_64_sdv_core, aosp_cf_x86_64_sdv_media and sdv_ivi_cf are examples of the complete SDV targets derived from the ones above.

Configuration overrides

Downstream lunch targets can provide their own configuration for some SDV components defined by SDV “base” targets.

See aosp_cf_x86_64_sdv_core/aosp_cf_x86_64_sdv_core.mk for an example of injecting custom target-specific configuration.

Custom OEM partitions

To build a sample OEM partition and run SDV with it mounted on /oem_ab:

source build/envsetup.sh
lunch aosp_cf_x86_64_sdv_core-trunk_staging-userdebug
m
cvd create --custom_partition_path=$OUT/oem_ab_a.img

Configuration

To create a custom partition image:

  • See sdv_core_base/oem_ab/oem_ab.mk and sdv_core_base/oem_ab/Android.bp for defining a custom partition.
  • The custom disk image is automatically built when running m.

To mount the custom partition with Cuttlefish:

  • In BoardConfig.mk, add the partition mount point to BOARD_ROOT_EXTRA_FOLDERS to ensure it exists in the root filesystem.

    See aosp_cf_x86_64_sdv_core/BoardConfig.mk for an example of setting up the /oem_ab directory.

  • Add an fstab entry for the partition. The custom partition will be visible to the VM as /dev/block/by-name/custom.

    See aosp_cf_x86_64_sdv_core/fstab.sdv for an example of mounting the oem_ab_metadata partition to the /oem_ab_metadata path on the device.

  • Set up SELinux policy rules for the new partition contents, and allow init to mount it. See sdv_core_base/oem_ab/sepolicy/oem_ab/private/oem_ab.te and sdv_core_base/oem_ab/sepolicy/oem_ab/private/file_contexts.

  • Build aosp_cf_x86_64_sdv_core target with lunch aosp_cf_x86_64_sdv_core-trunk_staging-userdebug && m.

  • Run Cuttlefish and pass the custom partition image when starting.

    cvd create --custom_partition_path=$OUT/oem_ab_a.img
    

The VM will boot and expose the OEM partition contents under /oem_ab path.

Updates

Including sdv_core_base/oem_ab/oem_ab_update.mk for a target allows using the OEM A/B partition update sample implementation. When launching a Cuttlefish VM, the OEM A, B, and metadata partitions need to be passed:

cvd create --custom_partition_path="$OUT/oem_ab_a.img;$OUT/oem_ab_b.img;$OUT/oem_ab_metadata.img"

See system/software_defined_vehicle/samples/oem_partition_update_client/README.md for more details on the sample implementation.