mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
multiboot: Refactor boot data validation, add version numbers
Instead of verifying the CRC before every access of the boot data, verify the CRC once at startup and set a flag to indicate the boot data is valid. Also add a framework to support multiple boot protocol versions. Firmware declares the maximum supported protocol version using a version byte in the boot data header. The bootloader chooses the highest version supported by it and the firmware when deciding what boot protocol to use. Change-Id: I810194625dc0833f026d2a23b8d64ed467fa6aca
This commit is contained in:
parent
af644e02a1
commit
6ffd42548b
11 changed files with 150 additions and 59 deletions
|
@ -77,6 +77,7 @@
|
|||
#include "statusbar-skinned.h"
|
||||
#include "bootchart.h"
|
||||
#include "logdiskf.h"
|
||||
#include "bootdata.h"
|
||||
#if (CONFIG_PLATFORM & PLATFORM_ANDROID)
|
||||
#include "notification.h"
|
||||
#endif
|
||||
|
@ -445,6 +446,10 @@ static void init(void)
|
|||
core_allocator_init();
|
||||
kernel_init();
|
||||
|
||||
#if defined(HAVE_BOOTDATA) && !defined(BOOTLOADER)
|
||||
verify_boot_data();
|
||||
#endif
|
||||
|
||||
/* early early early! */
|
||||
filesystem_init();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue