From aebefa8046bb01b9a4f0f86e2c34bec2847a287a Mon Sep 17 00:00:00 2001 From: Ji Luo Date: Sun, 26 Aug 2018 10:09:14 +0800 Subject: [iot] Support command 'oem at-disable-unlock-vboot' Device will be locked permanently after disabling the unlcok vboot, store the disable unlock vboot status into fuse. Since the fuse write operation is irreversible so config 'CONFIG_AVB_FUSE' is disabled by default, user need to add this config manually and run this command again. Test: Disable unlock vboot bit is set after enabling "CONFIG_AVB_FUSE", device was locked permanently after running this command. This is verified on both imx7d_pico and AIY. Change-Id: Iad8991a238763b1d662e33cba65f0b9eb44e97ef Signed-off-by: Ji Luo --- include/configs/imx8mq_evk_androidthings.h | 11 ++++++++--- include/configs/pico-imx7dandroidthings.h | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'include/configs') diff --git a/include/configs/imx8mq_evk_androidthings.h b/include/configs/imx8mq_evk_androidthings.h index 184a9ed4b3e..de00f44c2e9 100644 --- a/include/configs/imx8mq_evk_androidthings.h +++ b/include/configs/imx8mq_evk_androidthings.h @@ -12,12 +12,17 @@ #define CONFIG_ANDROID_AB_SUPPORT #define CONFIG_SUPPORT_EMMC_RPMB #define CONFIG_SYSTEM_RAMDISK_SUPPORT -#define CONFIG_AVB_FUSE_BANK_SIZEW 0 -#define CONFIG_AVB_FUSE_BANK_START 0 -#define CONFIG_AVB_FUSE_BANK_END 0 +#define CONFIG_AVB_FUSE_BANK_SIZEW 4 +#define CONFIG_AVB_FUSE_BANK_START 14 +#define CONFIG_AVB_FUSE_BANK_END 14 #define CONFIG_FASTBOOT_LOCK #define FSL_FASTBOOT_FB_DEV "mmc" +#ifdef CONFIG_AVB_ATX +#define UNLOCK_VBOOT_STATUS_OFFSET_IN_WORD 0 +#define UNLOCK_VBOOT_STATUS_OFFSET_IN_BIT 0 +#endif + #define CONFIG_ENABLE_LOCKSTATUS_SUPPORT #ifdef CONFIG_SYS_MALLOC_LEN diff --git a/include/configs/pico-imx7dandroidthings.h b/include/configs/pico-imx7dandroidthings.h index f878f8f05cc..d06e0c13059 100644 --- a/include/configs/pico-imx7dandroidthings.h +++ b/include/configs/pico-imx7dandroidthings.h @@ -19,6 +19,8 @@ #ifdef CONFIG_AVB_ATX #define PERMANENT_ATTRIBUTE_HASH_OFFSET 0 +#define UNLOCK_VBOOT_STATUS_OFFSET_IN_WORD 3 +#define UNLOCK_VBOOT_STATUS_OFFSET_IN_BIT 16 #endif #define AVB_RPMB -- cgit v1.2.3