Integrate the scalable service-oriented middleware over IP (SOME/IP) with software defined vehicle (SDV) by deploying and configuring several components. Each broker instance requires a corresponding local stack implementation. This page describes how to:
- Configure a single broker deployment
- Deploy the SOME/IP broker as a single or as multiple instances
- Deploy the vehicle services interface definition language (VSIDL) agent
- Generate runtime SOME/IP configurations with
vsidlcorvsidl_rc_generator
Example configuration
The SDV reference targets for Cuttlefish virtual Android devices and ARM64
(aosp_cf_x86_64_sdv_core and aosp_cf_arm64_sdv_core on Android
17 QPR2 and higher, or sdv_core_cf and
sdv_core_arm64 on Android 17) demonstrate a
flexible deployment schema.
Android 17 QPR2 and higher
The boot parameter androidboot.sdv.someip.enable is deprecated and can be used
only for testing purposes.
The broker and stack agents are orchestrated separately:
- The broker agent is built into the image only when the Make variable
SDV_SOMEIP_ENABLEis set totrue, which automatically setsro.sdv.someip.enabletotrue. Ininit.rcfiles, usero.sdv.someip.enableto start the broker agent instead of the deprecated boot parameterro.boot.sdv.someip.enable. - The stack agent is built into the image and started when it is configured
as the value of the Make variable
SDV_SOMEIP_AGENT_MODULES.
The broker agent runs from /system/bin (user system_ext_sdv_someip) and is
declared in init.aosp_cf_x86_64_sdv_core.rc (or
init.aosp_cf_arm64_sdv_core.rc on ARM64).
# device/google/sdv/aosp_cf_x86_64_sdv_core/init.aosp_cf_x86_64_sdv_core.rc
# Declare and start the SDV SOME/IP broker agent.
service sdv_someip_broker_agent /system/bin/sdv_someip_broker_agent_comms
class core
disabled
oneshot
user system_ext_sdv_someip
group system
on property:ro.sdv.orchestrator.state.ready=true && property:ro.sdv.someip.enable=true
start sdv_someip_broker_agent
The stack agent runs from /vendor/bin (user system), and is declared in
its own sdv_someip_stack_agent.rc file, which is bound to the agent module.
The per-module init rc file is imported in init.aosp_cf_x86_64_sdv_core.rc
using import /vendor/etc/init/sdv_someip_stack_agent.rc.
# device/google/sdv/aosp_cf_x86_64_sdv_core/init.aosp_cf_x86_64_sdv_core.rc
import /vendor/etc/init/sdv_someip_stack_agent.rc
# system/software_defined_vehicle/some_ip/vsomeip_stack/sdv_someip_stack_agent.rc
# Declare and start the sample SDV SOME/IP stack agent.
service sdv_someip_stack_agent /vendor/bin/sdv_someip_stack_agent
class core
disabled
user system
group system
setenv VSOMEIP_CONFIGURATION /vendor/etc/someip/vsomeip_config.json
setenv VSOMEIP_BASE_PATH /data/vendor/vsomeip/
oneshot
on property:dev.bootcomplete=1
start sdv_someip_stack_agent
Android 17
The broker agent runs from /system_ext/bin (user system_ext_sdv_someip), and
both agents are declared in device/google/sdv/sdv_core_cf/init.sdv_core_cf.rc
with their start orchestrated by the boot parameter ro.boot.sdv.someip.enable.
You can configure a single-broker deployment by setting
androidboot.sdv.someip.enable=true on only one of the SDV instances running on
the system.
# device/google/sdv/sdv_core_cf/init.sdv_core_cf.rc
service sdv_someip_broker_agent /system_ext/bin/sdv_someip_broker_agent_comms
class core
disabled
oneshot
user system_ext_sdv_someip
group system
on property:ro.sdv.orchestrator.state.ready=true && property:ro.boot.sdv.someip.enable=true
start sdv_someip_broker_agent
service sdv_someip_stack_agent /vendor/bin/sdv_someip_stack_agent
class core
disabled
oneshot
user system
group system
setenv VSOMEIP_CONFIGURATION /vendor/etc/someip/vsomeip_config.json
setenv VSOMEIP_BASE_PATH /data/vendor/vsomeip/
on property:dev.bootcomplete=1 && property:ro.boot.sdv.someip.enable=true
start sdv_someip_stack_agent
Broker deployment
You can deploy the SOME/IP broker as a single or as multiple instances in SDV. You can split SOME/IP domains (or subnets) into different independent instances. You can do this to balance load or to improve isolation for security purposes.
Each instance must process a disjointed set of SOME/IP and SDV endpoints. You can't use special routing or cross-agent synchronization. An improper configuration can lead to duplicate publications or inconsistent service discovery results.
Vehicle services interface definition language provider
SOME/IP gets metadata required for translations from the VSIDL agent. You must deploy the VSIDL agent to the same VM as the SOME/IP broker.
- On Android 17 QPR2 and higher:
vsidlcintegratesvsidl_rc_generatordirectly. When your VSIDL catalog definesapex(service_bundle_manifest) orhostblocks (or when you passvsidlc --apex),vsidlcautomatically generatesetc/<BundleName>/someip-config.binpbandetc/<BundleName>/vsidl-config.binpbinside each service bundle's Android Pony EXpress (APEX) package. For more information, see Define the system graph. - On Android 17 (or for global VM prebuilt
configurations): SDV supports a global VM data location for the schemas
and mappings used by SOME/IP brokers rather than reading from other VMs or
APEX packages. When run with
--variant runtime-config-prebuilts,vsidl_rc_generatorgenerates anAndroid.bpfile containing prebuilt rules that deploy the runtime configuration into the VM image.
Soong
On Android 17 QPR2 and higher, prefer vsidlc with
system graph apex blocks (or vsidlc --apex) to generate and package
someip-config.binpb and vsidl-config.binpb automatically. On Android
17, or when generating standalone VM-wide prebuilt
rules manually, run vsidl_rc_generator:
vsidl_rc_generator [OPTIONS] --catalog-path <CATALOG_PATH> --output-path <OUTPUT_PATH>
You must supply these arguments:
--catalog-path <CATALOG_PATH>--output-path <OUTPUT_PATH>
You can also provide these optional arguments:
Optional:
--vsidl-path <VSIDL_PATH>Specifies the path to a VSIDL file when targeting a specific file within the catalog.
Optional:
--dependency-catalog-path <DEPENDENCY_CATALOG_PATH>...Specifies the directories of the dependent protos outside the
catalog_path. To generate the Rust API for the dependent protos, each directory must contain anAndroid.bpfile. This file must include arust_protobufbuild target.Optional:
--variant <VARIANT>Defaults to
runtime-config(RuntimeConfig) and specifies the mode in which the runtime config generator runs.runtime-configgenerates runtime config files for SOME/IP and diagnostics.runtime-config-prebuilts(RuntimeConfigPrebuilts) generates build files. These files contain prebuilt modules. You can use these modules to include files generated by theruntime-configvariant in other modules or in the VM image.Optional:
--service-bundle-name <SERVICE_BUNDLE_NAME>Argument to specify the service bundle on which to apply the runtime config generator.
Optional:
--package-name <PACKAGE_NAME>In addition to the service bundle name argument, use this argument to specify the service bundle package name on which to apply the runtime config generator.
Optional:
--filegroup <FILEGROUP>Must be defined when using
--variant runtime-config-prebuilts.