Hi,
There is a rounding error in the uflash tool, file uflash.c.
/* Get UBL file size and round it to upper 512 byte boundary */
ubl_size = get_file_size(ubl_name);
...
ubl_size = (ubl_size + BLOCK_SIZE - 1) & ~BLOCK_SIZE;
/* Get U-boot file size and round it to upper 512 byte boundary */
uboot_size = get_file_size(uboot_name);
...
uboot_size = (uboot_size + BLOCK_SIZE - 1) & ~BLOCK_SIZE;
The correct rounding should be
ubl_size = (ubl_size + BLOCK_SIZE - 1) & ~(BLOCK_SIZE - 1);
...
uboot_size = (uboot_size + BLOCK_SIZE - 1) & ~(BLOCK_SIZE - 1);
Regards,
JP