[avb][pvmfw] Verify payload with only kernel and no initrd
This is only the first part of this verification. The check about
number of hash descriptors == 1 will be added later when
multiple hash descriptors in footer will be supported
(aosp/2375848).
Test: atest libpvmfw_avb.test && m pvmfw_img
Bug: 256148034
Change-Id: Idbaf9f5986237c57e60cd9d9eec8b4c6f174f7c0
diff --git a/pvmfw/avb/Android.bp b/pvmfw/avb/Android.bp
index 3026d20..cbec235 100644
--- a/pvmfw/avb/Android.bp
+++ b/pvmfw/avb/Android.bp
@@ -32,6 +32,8 @@
":avb_testkey_rsa2048_pub_bin",
":avb_testkey_rsa4096_pub_bin",
":microdroid_kernel_signed",
+ ":microdroid_initrd_normal",
+ ":test_image_with_one_hashdesc",
":unsigned_test_image",
],
rustlibs: [
@@ -56,3 +58,11 @@
out: ["unsigned_test.img"],
cmd: "$(location avbtool) generate_test_image --image_size 16384 --output $(out)",
}
+
+avb_add_hash_footer {
+ name: "test_image_with_one_hashdesc",
+ src: ":unsigned_test_image",
+ partition_name: "bootloader",
+ private_key: ":pvmfw_sign_key",
+ salt: "1111",
+}