When BK7231 MCUs load the SPI flash contents into memory, they do not simply copy the bytes; every 32 bytes are followed by 2 bytes of CRC, which the bootloader supposedly checks and removes. In addition, the flash contents can optionally be encrypted with a key stored in eFuse, so the bootloader would also decrypt them before copying to memory.
In the other direction, both of these tasks are performed by the encrypt
tool in the SDK: this takes the built code, inserts CRC bytes and (optionally) encrypts with the eFuse key.
This image is almost but not quite ready to flash: some spots of the image must then be overwritten with bootloader (RBL) and partition table (FAL) markers;
these are stored in plaintext so they can be interpreted before decryption has taken place. These markers respect the 2-byte CRCs,
so they are discontinuous in the flash memory if they're bigger than 1 block, and cause the CRC numbers to be updated.