mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-16 14:08:45 +00:00
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>
This commit is contained in:
parent
e65ea147e2
commit
a6661a0ea2
1 changed files with 6 additions and 0 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue