113 lines
2.2 KiB
Plaintext
113 lines
2.2 KiB
Plaintext
package {
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
rust_ffi_static {
|
|
name: "librialto",
|
|
crate_name: "rialto",
|
|
srcs: ["src/main.rs"],
|
|
edition: "2021",
|
|
defaults: ["vmbase_ffi_defaults"],
|
|
rustlibs: [
|
|
"libaarch64_paging",
|
|
"libbuddy_system_allocator",
|
|
"libhyp",
|
|
"liblog_rust_nostd",
|
|
"libvmbase",
|
|
],
|
|
apex_available: ["com.android.virt"],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "rialto_elf",
|
|
stem: "rialto",
|
|
defaults: ["vmbase_elf_defaults"],
|
|
srcs: [
|
|
"idmap.S",
|
|
],
|
|
static_libs: [
|
|
"librialto",
|
|
"libvmbase_entry",
|
|
],
|
|
linker_scripts: [
|
|
"image.ld",
|
|
":vmbase_sections",
|
|
],
|
|
apex_available: ["com.android.virt"],
|
|
}
|
|
|
|
raw_binary {
|
|
name: "rialto_unsigned",
|
|
src: ":rialto_elf",
|
|
enabled: false,
|
|
target: {
|
|
android_arm64: {
|
|
enabled: true,
|
|
},
|
|
},
|
|
}
|
|
|
|
// python -c "import hashlib; print(hashlib.sha256(b'rialto_salt').hexdigest())"
|
|
rialto_salt = "ea9d8c3ae1785396884d0c16c7652921874e2b8703f336ff23760f2049ee9e29"
|
|
|
|
filegroup {
|
|
name: "rialto_sign_key",
|
|
srcs: [":avb_testkey_rsa4096"],
|
|
}
|
|
|
|
avb_add_hash_footer {
|
|
name: "rialto_signed",
|
|
src: ":empty_file",
|
|
filename: "rialto",
|
|
partition_name: "boot",
|
|
private_key: ":rialto_sign_key",
|
|
salt: rialto_salt,
|
|
enabled: false,
|
|
arch: {
|
|
arm64: {
|
|
src: ":rialto_unsigned",
|
|
enabled: true,
|
|
},
|
|
},
|
|
}
|
|
|
|
prebuilt_etc {
|
|
name: "rialto_bin",
|
|
filename: "rialto.bin",
|
|
target: {
|
|
android_arm64: {
|
|
src: ":rialto_signed",
|
|
},
|
|
},
|
|
src: ":empty_file",
|
|
installable: false,
|
|
}
|
|
|
|
rust_test {
|
|
name: "rialto_test",
|
|
crate_name: "rialto_test",
|
|
srcs: ["tests/test.rs"],
|
|
prefer_rlib: true,
|
|
edition: "2021",
|
|
rustlibs: [
|
|
"android.system.virtualizationservice-rust",
|
|
"libandroid_logger",
|
|
"libanyhow",
|
|
"liblibc",
|
|
"liblog_rust",
|
|
"libnix",
|
|
"libvmclient",
|
|
],
|
|
data: [
|
|
":rialto_bin",
|
|
":rialto_unsigned",
|
|
],
|
|
test_suites: ["general-tests"],
|
|
enabled: false,
|
|
target: {
|
|
android_arm64: {
|
|
enabled: true,
|
|
},
|
|
},
|
|
}
|