esp8266/modesp: Add check_fw() function to check integrity of the firmware.

Requires firmware generated by the latest makeimg.py (which stores size
and md5 of the firmware together with the firmware itself).
This commit is contained in:
Paul Sokolovsky
2016-08-04 00:29:19 +03:00
parent bf47b71b78
commit e33d2383d1
2 changed files with 26 additions and 0 deletions

View File

@@ -20,6 +20,13 @@ void ets_timer_arm_new(os_timer_t *tim, uint32_t millis, bool repeat, bool is_mi
void ets_timer_setfn(os_timer_t *tim, ETSTimerFunc callback, void *cb_data);
void ets_timer_disarm(os_timer_t *tim);
// Opaque structure
typedef char MD5_CTX[64];
void MD5Init(MD5_CTX *context);
void MD5Update(MD5_CTX *context, const void *data, unsigned int len);
void MD5Final(unsigned char digest[16], MD5_CTX *context);
// These prototypes are for recent SDKs with "malloc tracking"
void *pvPortMalloc(unsigned sz, const char *fname, int line);
void vPortFree(void *p, const char *fname, int line);