Hi,
This consult is related with a previous consult: https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/p/887381/3281785#3281785
I'd like to add some more questions:
According to my understanding the bootloader will check for any new image on the serial flash, this is detected using SHA-1 Hash which was stored in "/sys/mcuflashimghash.bin". any change in the content of the serial flash the Hash will mismatch. That indicates either a new image or tamper attempt. In case of tamper attempt the On-Chip flash is mass erased. If it detects the new image it will copy the image to On-Chip flash
Now the question is how does boot loader differentiate between tamper attempt and new code, does it verify the signature before copying to the on-chip flash? After copying to on-chip flash it will verify the 20 bytes hash, but before copying any checks are performed?. after copying the image if 20 bytes hash does not match the internal flash binary is there a chance to roll back to the previous version ?.
what if the 20 bytes Hash is also tampered to match ?