Commit Graph

25 Commits

Author SHA1 Message Date
Sean Cross
acdccf5f98 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>
2019-11-28 16:36:45 +08:00
Sean Cross
c21b6ff7ff booster: remove obsolete usb-epfifo.c
This file isn't used anymore since we don't support epfifo.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 16:34:54 +08:00
Sean Cross
b087089960 booster: don't connect usb unless in an error condition
Booster is so fast now that we probably don't need USB support.  If
there's an error condition, however, start up USB so we can hook up the
debugger.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-28 16:33:05 +08:00
Sean Cross
e7ec80a592 Merge remote-tracking branch 'xobs/master'
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-25 15:15:06 +08:00
Sean Cross
4d9680ed25 booster: blink error pattern on failure
Set the LED to red, and blink a continuous pattern to inform the user
what failed.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-24 20:32:32 +08:00
Sean Cross
6a147238aa booster: build with -O2
Earlier we were building with -O0, which is useful for debugging, but
is not particularly fast.  Build with -O2 now for speeeeed.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-24 20:11:51 +08:00
Sean Cross
0b61bfcdc7 booster: get booster working with foboot-2
This fixes the spi driver so that it works with foboot-2.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-24 20:10:12 +08:00
Sean Cross
4d6746d584 booster: make-booster: print hash on output
Next time I need to debug the hash, this will come in handy.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-24 20:09:14 +08:00
Sean Cross
fb08d194ca foboot: spi: fix spiId and remove dead code
Remove code that doesn't get called.

Also, remove the `spi_id` global.  It conflicted with one from
the linker, which was causing contention.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-24 20:08:24 +08:00
Sean Cross
5a587c5752 booster: README: document how to make and use make-booster
Previously we missed some crucial information about how to use it.
Document that information here now.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-24 20:06:21 +08:00
Sean Cross
ea04c290eb booster: foboot-2 compatibility
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-24 15:14:07 +08:00
Sean Cross
80056860b6 booster: allow alternate spi id
If the alternate spi id is detected, force it to the original spi id.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 19:04:32 +08:00
Sean Cross
bb8079711b booster: document alternate SPI id
Some boards have this alternate SPI id.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 19:03:16 +08:00
Sean Cross
b920660d71 booster: compile with -O2
Maybe that's why it was running slowly...

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 12:34:59 +08:00
Sean Cross
449f408cfe booster: finish documenting flash sequence
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-22 12:34:41 +08:00
Sean Cross
c7ee25b3d1 booster: erase itself when there is an error
If a user installs the wrong version of Booster, it is very important
that it erase itself so that it doesn't keep getting booted.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-08-28 11:49:31 +08:00
Sean Cross
0a7b193f96 booster: get functional build working
This has successfully updated a PVT unit to v1.9.1.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-08-28 11:30:03 +08:00
Sean Cross
e13755fff0 booster: ld: align bss to 4-byte boundary
We need to ensure the bss ends on a 4-byte boundary, otherwise
we may hit an alignment issue.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-08-28 09:56:27 +08:00
Sean Cross
a4f8276c48 booster: don't wait for debugger
Just go when the program starts up.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-08-28 09:54:54 +08:00
Sean Cross
b1aadbcd9d booster: do one last final image verification
Before we erase the bootloader, verify the image is good.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-08-28 09:54:49 +08:00
Sean Cross
decddb6383 booster: add usb support to booster
This will make debugging easier.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-08-28 09:54:43 +08:00
Sean Cross
a9f0945822 booster: don't wait for debugger
Just go when the program starts up.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-26 10:30:00 +08:00
Sean Cross
3a39368cd6 booster: do one last final image verification
Before we erase the bootloader, verify the image is good.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-26 10:29:21 +08:00
Sean Cross
a80dc72399 booster: add usb support to booster
This will make debugging easier.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-25 23:03:55 +08:00
Sean Cross
da52534fe3 booster: WIP: use new bitstream as part of the updater
Rework Booster so that it uses the bitstream that it is installing
in order to validate that the new image will actually work.

This removes any sort of binary ABI compatibility issues, and
prevents us from installing an image onto a device that it doesn't
support.

Additionally, this installer should be resistant to bricking, though
that has yet to be tested.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-07-24 20:52:44 +08:00