Hi,

On 2/12/24 08:47, Sughosh Ganu wrote:
Migrate the metadata generation tool to generate the version 2
metadata.

Signed-off-by: Sughosh Ganu <sughosh.g...@linaro.org>
---

Changes since V1:
* Compute location of struct fwu_fw_store_desc using pointer
   arithmetic.

  tools/mkfwumdata.c | 45 ++++++++++++++++++++++++++++++++++-----------
  1 file changed, 34 insertions(+), 11 deletions(-)

diff --git a/tools/mkfwumdata.c b/tools/mkfwumdata.c
index 9732a8ddc5..fb847e3a78 100644
--- a/tools/mkfwumdata.c
+++ b/tools/mkfwumdata.c
@@ -14,12 +14,13 @@
  #include <unistd.h>
  #include <uuid/uuid.h>
-/* This will dynamically allocate the fwu_mdata */
-#define CONFIG_FWU_NUM_BANKS           0
-#define CONFIG_FWU_NUM_IMAGES_PER_BANK 0
-
  /* Since we can not include fwu.h, redefine version here. */
-#define FWU_MDATA_VERSION              1
+#define FWU_MDATA_VERSION              2
+
+#define MAX_BANKS                      4
+
+#define BANK_INVALID                   0xFF
+#define BANK_ACCEPTED                  0xFC

I think in previous version only active bank was accepted not others.
I don't think it is wrong behavior but please consider to select it too.
I was just surprised to see both banks in that state.

Thanks,
Michal

Reply via email to