[pvmfw] Extract a library to support various hypervisor backends
This cl extracts a library libhyp from pvmfw to support
various hypervisor backends including kvm.
Bug: 272226230
Test: m pvmfw_img
Change-Id: I5307cb5d6cccc7a01af6bc9c46ae7111c0d51e93
diff --git a/libs/hyp/Android.bp b/libs/hyp/Android.bp
new file mode 100644
index 0000000..bc66190
--- /dev/null
+++ b/libs/hyp/Android.bp
@@ -0,0 +1,18 @@
+package {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+rust_library_rlib {
+ name: "libhyp",
+ crate_name: "hyp",
+ srcs: ["src/lib.rs"],
+ prefer_rlib: true,
+ rustlibs: [
+ "libsmccc",
+ ],
+ no_stdlibs: true,
+ stdlibs: [
+ "libcore.rust_sysroot",
+ ],
+ apex_available: ["com.android.virt"],
+}