summaryrefslogtreecommitdiff
path: root/include/avb_verify.h
diff options
context:
space:
mode:
authorIgor Opaniuk <igor.opaniuk@linaro.org>2018-06-03 21:56:40 +0300
committerTom Rini <trini@konsulko.com>2018-06-18 13:55:13 -0400
commit5d4fd8777337134dc1a1270f27569a9ccaece193 (patch)
treef63f6c725dbbe18633dfa60f679e6f307044b2e8 /include/avb_verify.h
parent60b2f9e7b97580b3a71d6fa119fc9c66491d963e (diff)
downloadu-boot-5d4fd8777337134dc1a1270f27569a9ccaece193.tar.gz
avb2.0: add boot states and dm-verity support
1. Add initial support of boot states mode (red, green, yellow) 2. Add functions for enforcing dm-verity configurations Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Diffstat (limited to 'include/avb_verify.h')
-rw-r--r--include/avb_verify.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/avb_verify.h b/include/avb_verify.h
index 428c69a2bc..eaa60f5393 100644
--- a/include/avb_verify.h
+++ b/include/avb_verify.h
@@ -11,11 +11,22 @@
#include <../lib/libavb/libavb.h>
#include <mmc.h>
-#define ALLOWED_BUF_ALIGN 8
+#define AVB_MAX_ARGS 1024
+#define VERITY_TABLE_OPT_RESTART "restart_on_corruption"
+#define VERITY_TABLE_OPT_LOGGING "ignore_corruption"
+#define ALLOWED_BUF_ALIGN 8
+
+enum avb_boot_state {
+ AVB_GREEN,
+ AVB_YELLOW,
+ AVB_ORANGE,
+ AVB_RED,
+};
struct AvbOpsData {
struct AvbOps ops;
int mmc_dev;
+ enum avb_boot_state boot_state;
};
struct mmc_part {
@@ -33,6 +44,12 @@ enum mmc_io_type {
AvbOps *avb_ops_alloc(int boot_device);
void avb_ops_free(AvbOps *ops);
+char *avb_set_state(AvbOps *ops, enum avb_boot_state boot_state);
+char *avb_set_enforce_verity(const char *cmdline);
+char *avb_set_ignore_corruption(const char *cmdline);
+
+char *append_cmd_line(char *cmdline_orig, char *cmdline_new);
+
/**
* ============================================================================
* I/O helper inline functions