]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwbimage: Add support for SATA images with non-512 byte block size
authorPali Rohár <pali@kernel.org>
Wed, 29 Mar 2023 19:25:56 +0000 (21:25 +0200)
committerStefan Roese <sr@denx.de>
Thu, 13 Apr 2023 09:34:47 +0000 (11:34 +0200)
commitf3dfee2635691cba919c95c8d9ff6e78e655af20
treed91b27ffaa57bef205cd241d77883a3b96b391c0
parent22e83b5e3cee1419dc959e6c4f6de0992979e5ef
tools: kwbimage: Add support for SATA images with non-512 byte block size

SATA kwbimage contains offsets in block size unit, not in bytes.

Until now kwbimage expected that SATA disk always have block size of 512
bytes. But there are 4K Native SATA disks with block size of 4096 bytes.

New SATA_BLKSZ command allows to specify different block size than 512
bytes and therefore allows to generate kwbimage for disks with different
block sizes.

This change add support for generating SATA images with different block
size. Also it add support for verifying and dumping such images.

Because block size itself is not stored in SATA kwbimage, image
verification is done by checking every possible block size (it is any
power of two value between 512 and 32 kB).

Signed-off-by: Pali Rohár <pali@kernel.org>
tools/kwbimage.c