Allow override of the trusty system vm packages
This will be overridden by desktop emulator configs to switch out the
trusty vm thas is loaded.
Due to the nature of lazy expansion in Make, the `+=` does *not*
immediately expand the `?=`. This can be observed by running `make test`
with the following Makefile:
```
p = a b
x ?= x y z
p += $(x)
x := c d
test:
@echo $(p)
```
Bug: 398934069
Test: launch_cvd unaffected
Change-Id: I631b6da2e8db2b4b5c66ecff37d0bfedf07fc1aa
diff --git a/guest/trusty/security_vm/security_vm.mk b/guest/trusty/security_vm/security_vm.mk
index 89c9cdc..8717399 100644
--- a/guest/trusty/security_vm/security_vm.mk
+++ b/guest/trusty/security_vm/security_vm.mk
@@ -14,10 +14,14 @@
ifeq ($(findstring enabled, $(TRUSTY_SYSTEM_VM)),enabled)
-PRODUCT_PACKAGES += \
- trusty_security_vm.elf \
+
+# This is the default set of packages to load the trusty system vm.
+# It can be overridden by device-specific configuration.
+TRUSTY_SYSTEM_VM_PRODUCT_PACKAGES ?= trusty_security_vm.elf \
trusty_security_vm_launcher \
trusty_security_vm_launcher.rc \
early_vms.xml \
+PRODUCT_PACKAGES += $(TRUSTY_SYSTEM_VM_PRODUCT_PACKAGES)
+
endif