diff options
author | Igor Opaniuk <igor.opaniuk@linaro.org> | 2018-06-03 21:56:41 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-06-18 14:01:21 -0400 |
commit | e883ffe00b6db807544c70e743cf7832d5d56d40 (patch) | |
tree | 16c2fd50162b38b30b5a98b7b29e228bf0fb24d2 /include/environment/ti/boot.h | |
parent | 5d4fd8777337134dc1a1270f27569a9ccaece193 (diff) |
am57xx_hs: avb2.0: add support of AVB 2.0
1. Add vbmeta partition info to android partition layout for TI
platforms.
2. Add support of AVB 2.0 (including avb subset of commands) for am57xx HS
Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
[trini: Move to include/environment/ti/boot.h, reword commit slightly]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/environment/ti/boot.h')
-rw-r--r-- | include/environment/ti/boot.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h index a43b211df5..2893cd4287 100644 --- a/include/environment/ti/boot.h +++ b/include/environment/ti/boot.h @@ -13,6 +13,16 @@ #define CONSOLEDEV "ttyO2" #endif +#define VBMETA_PART_SIZE (64 * 1024) + +#if defined(CONFIG_LIBAVB) +#define VBMETA_PART \ + "name=vbmeta,size=" __stringify(VBMETA_PART_SIZE) \ + ",uuid=${uuid_gpt_vbmeta};" +#else +#define VBMETA_PART "" +#endif + #ifndef PARTS_DEFAULT /* Define the default GPT table for eMMC */ #define PARTS_DEFAULT \ @@ -37,9 +47,23 @@ "name=cache,size=256M,uuid=${uuid_gpt_cache};" \ "name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \ "name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \ + VBMETA_PART \ "name=userdata,size=-,uuid=${uuid_gpt_userdata}" #endif /* PARTS_DEFAULT */ +#if defined(CONFIG_CMD_AVB) +#define AVB_VERIFY_CHECK "if run avb_verify; then " \ + "echo AVB verification OK.;" \ + "set bootargs $bootargs $avb_bootargs;" \ + "else " \ + "echo AVB verification failed.;" \ + "exit; fi;" +#define AVB_VERIFY_CMD "avb_verify=avb init 1; avb verify;\0" +#else +#define AVB_VERIFY_CHECK "" +#define AVB_VERIFY_CMD "" +#endif + #define DEFAULT_COMMON_BOOT_TI_ARGS \ "console=" CONSOLEDEV ",115200n8\0" \ "fdtfile=undefined\0" \ @@ -48,6 +72,7 @@ "bootfile=zImage\0" \ "usbtty=cdc_acm\0" \ "vram=16M\0" \ + AVB_VERIFY_CMD \ "partitions=" PARTS_DEFAULT "\0" \ "optargs=\0" \ "dofastboot=0\0" \ @@ -66,6 +91,7 @@ "setenv machid fe6; " \ "mmc dev $mmcdev; " \ "mmc rescan; " \ + AVB_VERIFY_CHECK \ "part start mmc ${mmcdev} environment fdt_start; " \ "part size mmc ${mmcdev} environment fdt_size; " \ "part start mmc ${mmcdev} boot boot_start; " \ |