diff options
author | Pali Rohár <pali@kernel.org> | 2022-02-17 10:43:38 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2022-02-17 14:17:07 +0100 |
commit | a6661a0ea26c6747e7b4639ec5950a5fff370711 (patch) | |
tree | bbacbb36b168b1457e7f8a6ac6caaa9a360dabf0 /tools | |
parent | e65ea147e2e0c90eeca325710d6b6704bac71c04 (diff) |
tools: kwbimage: Add support for NAND_BLKSZ and NAND_BADBLK_LOCATION for v0 images
These two commands are currently not processed when generating v0 images.
Signed-off-by: Pali Rohár <pali@kernel.org>
Tested-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/kwbimage.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/kwbimage.c b/tools/kwbimage.c index 73788d8d89..bf8ab0f192 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c @@ -998,9 +998,15 @@ static void *image_create_v0(size_t *imagesz, struct image_tool_params *params, e = image_find_option(IMAGE_CFG_NAND_ECC_MODE); if (e) main_hdr->nandeccmode = e->nandeccmode; + e = image_find_option(IMAGE_CFG_NAND_BLKSZ); + if (e) + main_hdr->nandblocksize = e->nandblksz / (64 * 1024); e = image_find_option(IMAGE_CFG_NAND_PAGESZ); if (e) main_hdr->nandpagesize = cpu_to_le16(e->nandpagesz); + e = image_find_option(IMAGE_CFG_NAND_BADBLK_LOCATION); + if (e) + main_hdr->nandbadblklocation = e->nandbadblklocation; main_hdr->checksum = image_checksum8(image, sizeof(struct main_hdr_v0)); |