Snap for 16208812 from 5aee6c08c1228b33aaad2b2eaf64199b6175009c to 26Q4-release Change-Id: I5fc07f99b5d75279002efaa73b8252f7e0d19895
This directory contains Makefiles used to define SDV 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 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.
sdv_cf contains Cuttlefish-specific functionality specific to SDV Core-derived targets. Note that it's not used by sdv_ivi_cf.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.
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.
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
To create a custom partition image:
sdv_core_base/oem_ab/oem_ab.mk and sdv_core_base/oem_ab/Android.bp for defining a custom partition.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.
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.