tools: kwboot: Add support for parsing SATA images with non-512 block size
authorPali Rohár <pali@kernel.org>
Wed, 29 Mar 2023 19:25:57 +0000 (21:25 +0200)
committerStefan Roese <sr@denx.de>
Thu, 13 Apr 2023 09:34:47 +0000 (11:34 +0200)
commit5d8178563bc6f3d684f1835d79cb2cb0336409d5
tree3f4782310844fe827d91887ff5d9227d859f7dc1
parent11af96d7e66030e5dbdd5fffd22eead1f105ed70
tools: kwboot: Add support for parsing SATA images with non-512 block size

Currently kwboot expected that sector size for SATA image is always 512
bytes. If SATA image cannot be parsed with sector size of 512 bytes, try
larger sector sizes which are power of two and up to the 32 kB. Maximal
theoretical value is 32 kB because ATA IDENTIFY command returns sector size
as 16-bit number.

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