mirror of
https://github.com/im-tomu/foboot.git
synced 2024-09-19 18:30:17 +00:00
booster: change magic number for booster
Since the USB and flash communication layers are different, change the magic number for booster. This will prevent previous versions of foboot from trying to launch our updater with the wrong version. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
5b5b98c6d4
commit
acdccf5f98
@ -56,7 +56,7 @@ The SPI flash image looks something like this:
|
||||
| 0x05a01c | 368668 | SPI ID of the target device |
|
||||
| 0x1FFFFF | 20097151 | End of flash |
|
||||
|
||||
The "Booster Signature" is `0x4260fa37` -- if it contains this value, then
|
||||
The "Booster Signature" is `0xfaa999b1` -- if it contains this value, then
|
||||
this might be a Booster program.
|
||||
|
||||
The "Booster Checksum" is the result of summing together `[Booster length]`
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "xxhash.h"
|
||||
|
||||
#define BOOSTER_SEED 0xc38b9e66L
|
||||
#define BOOSTER_SIGNATURE 0x4260fa37
|
||||
#define BOOSTER_SIGNATURE 0xfaa999b1
|
||||
|
||||
struct booster_data
|
||||
{
|
||||
|
@ -14,7 +14,7 @@
|
||||
_start:
|
||||
j crt_init
|
||||
booster_signature:
|
||||
.word 0x4260fa37
|
||||
.word 0xfaa999b1
|
||||
booster_length:
|
||||
.word 0
|
||||
booster_checksum:
|
||||
|
@ -109,7 +109,7 @@ void maybe_boot_updater(void) {
|
||||
extern uint32_t spi_id;
|
||||
|
||||
uint32_t booster_base = SPIFLASH_BASE + 0x5a000;
|
||||
if (csr_readl(booster_base + 4) != 0x4260fa37)
|
||||
if (csr_readl(booster_base + 4) != 0xfaa999b1)
|
||||
return;
|
||||
if (csr_readl(booster_base + 28) != spi_id)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user