
On Thu, 30 Mar 2023 at 01:12, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Am 27. März 2023 23:16:10 MESZ schrieb jassisinghbrar@gmail.com:
From: Masami Hiramatsu masami.hiramatsu@linaro.org
Add 'mkfwumdata' tool to generate FWU metadata image for the meta-data partition to be used in A/B Update imeplementation.
Signed-off-by: Masami Hiramatsu masami.hiramatsu@linaro.org Signed-off-by: Sughosh Ganu sughosh.ganu@linaro.org Signed-off-by: Jassi Brar jaswinder.singh@linaro.org
tools/Kconfig | 9 ++ tools/Makefile | 4 + tools/mkfwumdata.c | 334 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 347 insertions(+) create mode 100644 tools/mkfwumdata.c
For each command line tool there should be a man-page.
ok
.....
+/* 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
+typedef uint8_t u8; +typedef int16_t s16; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64;
+#include <fwu_mdata.h>
+/* TODO: Endianness conversion may be required for some arch. */
Does the update work without UEFI? UEFI requires low endianness.
Not sure what you mean. This only creates a meta-data image that goes into some offset in mtd.
+static void print_usage(void) +{
fprintf(stderr, "Usage: mkfwumdata [options] <UUIDs list> <output file>\n");
fprintf(stderr, "Options:\n"
"\t-i, --images <num> Number of images\n"
"\t-b, --banks <num> Number of banks\n"
"\t-a, --active-bank <num> Active bank\n"
"\t-p, --previous-bank <num> Previous active bank\n"
"\t-g, --guid Use GUID instead of UUID\n"
I would not know what this means.
Why can't you supply that single GUID in the position of the UUIDs parameter?
I guess the original authors wanted to have one explicitly specify what's going on, rather than 'hacking' around (?)
thanks