rboot-ota: Always put a checksum in rboot config

Means bootloader will still work if configured to verify the checksum
This commit is contained in:
Angus Gratton 2016-03-24 15:35:23 +11:00
parent 53b2b50241
commit 1f1881a452
3 changed files with 14 additions and 16 deletions

View file

@ -1,14 +0,0 @@
#ifndef _RBOOT_CONFIG_H
/* rboot configuration parameters.
Must match the config in the compiler bootloader rboot.h. Values below are the rboot.h defaults.
Override rboot parameters by editing this file, or (much better
alternative) copy rboot-config.h to your program directory or
program/include/ directory, then edit it to override these values.
*/
#define RBOOT_MAX_ROMS 4
//#define RBOOT_CONFIG_CHECKSUM
#endif

View file

@ -28,4 +28,11 @@
#define RBOOT_DEBUG(f_, ...) #define RBOOT_DEBUG(f_, ...)
#endif #endif
/* Enable checksumming when writing out the config,
so if the bootloader is built with checksumming then
it will still work.
*/
#define BOOT_CONFIG_CHKSUM
#endif // __RBOOT_INTEGRATION_H__ #endif // __RBOOT_INTEGRATION_H__

View file

@ -18,8 +18,13 @@ extern "C" {
// if you aren't using gcc you may need to do this // if you aren't using gcc you may need to do this
//#define BOOT_NO_ASM //#define BOOT_NO_ASM
// uncomment to have a checksum on the boot config // Note: enabling RBOOT_CONFIG_CHECKSUM here means the config sector
//#define BOOT_CONFIG_CHKSUM // is always written by esp-open-rtos with a checksum.
//
// This means it will work whether the bootloader has config
// checksumming enabled or not.
#define BOOT_CONFIG_CHKSUM
// uncomment to enable big flash support (>1MB) // uncomment to enable big flash support (>1MB)
#define BOOT_BIG_FLASH #define BOOT_BIG_FLASH