Binary signed

Hi everyone,

I would like to sign my binaries before flashing them. The purpose is to check integrity before my bootloader jump into.

So i would like to call a script which adds a hash in a specific structure in my binary and i would like to call this script before flashing. But the target “make flash” depends on “all” and recompile all my files before the flash, so it will erase my hash.

Is there a way to do this without modifying the RIOT makefile. I saw that there is a “preflash” target that isnt used.

If you have any idea, feel free to share :slight_smile:

Regards,

Hi Aurelien,

Take a look at the Seeeduino Arch Pro board with the LPC1768 CPU. It requires the binary to be signed as well [1].

Kind regards, Bas

[1] https://github.com/RIOT-OS/RIOT/blob/master/boards/seeeduino_arch-pro/Makefile.include

Thank you very much, That’s exactly what i was looking for. I just need to exort PRE_FLASH_CHECK_SCRIPT and write my own script and all should be ok.

Thank you again :wink:

Best regards,

Aurélien

Optionally, you may want to take a look to #7396 [1]

Cheers!