vmbase_example: Add support for kernel mode & test
Support linking vmbase_example as a payload compatible with crosvm's
"kernel" (default) mode.
Extend vmbase_example.integration_test to replicate the BIOS mode tests
in kernel mode, with the respective corresponding vmbase_example builds.
Bug: 359659124
Test: atest vmbase_example.integration_test
Change-Id: Ib125d46d703b62b2d65a3d4a6691d046720f1343
diff --git a/guest/vmbase_example/image.ld.S b/guest/vmbase_example/image.ld.S
index 3bfab9c..a5cd965 100644
--- a/guest/vmbase_example/image.ld.S
+++ b/guest/vmbase_example/image.ld.S
@@ -19,6 +19,9 @@
#if defined(VMBASE_EXAMPLE_IS_BIOS)
image : ORIGIN = 0x80200000, LENGTH = 2M
writable_data : ORIGIN = 0x80400000, LENGTH = 2M
+#elif defined(VMBASE_EXAMPLE_IS_KERNEL)
+ image : ORIGIN = 0x80000000, LENGTH = 2M
+ writable_data : ORIGIN = 0x80200000, LENGTH = 2M
#else
#error "Unexpected vmbase_example mode: failed to generate image layout"
#endif