From e29613b050ad9b35f9305cc23f4cadcce4606f39 Mon Sep 17 00:00:00 2001 From: Cyril Bur Date: Fri, 17 Mar 2017 16:13:06 +1100 Subject: libffs: Understand how to create FFS partition TOCs and entries. Signed-off-by: Cyril Bur Signed-off-by: Stewart Smith --- libflash/ffs.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'libflash/ffs.h') diff --git a/libflash/ffs.h b/libflash/ffs.h index 64e5e6a1..6ba77136 100644 --- a/libflash/ffs.h +++ b/libflash/ffs.h @@ -54,6 +54,29 @@ enum ffs_type { FFS_TYPE_PARTITION = 3, }; +/* + * Flag bit definitions + */ +#define FFS_FLAGS_PROTECTED 0x0001 +#define FFS_FLAGS_U_BOOT_ENV 0x0002 + +/* Data integrity flags */ +#define FFS_ENRY_INTEG_ECC 0x8000 + +/* + * User verCheck definitions + */ +#define FFS_VERCHECK_SHA512V 0x80 +#define FFS_VERCHECK_SHA512EC 0x40 + +/* + * User miscFlags + */ +#define FFS_MISCFLAGS_PRESERVED 0x80 +#define FFS_MISCFLAGS_READONLY 0x40 +#define FFS_MISCFLAGS_BACKUP 0x20 +#define FFS_MISCFLAGS_REPROVISION 0x10 + /** * struct __ffs_entry_user - On flash user data entries * @@ -186,9 +209,12 @@ struct __ffs_hdr { */ struct ffs_hdr { uint32_t version; + uint32_t base; uint32_t size; uint32_t block_size; uint32_t block_count; + struct ffs_entry *backup; + struct ffs_hdr *side; struct list_head entries; }; -- cgit v1.2.1