Skip to content
  • This contributor prefers not to receive mails's avatar
    tools: kwbimage: Add support for SATA images with non-512 byte block size · 11af96d7
    This contributor prefers not to receive mails authored and Stefan Roese's avatar Stefan Roese committed
    
    
    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: default avatarPali Rohár <pali@kernel.org>
    11af96d7