Foboot is a failsafe bootloader for Fomu. It exposes a DFU interface to the host. Foboot comes in two halves: A Software half and a Hardware half. These two halves are integrated into a single "bitstream" that is directly loaded onto an ICE40UP5k board, such as Fomu.
Subproject hardware dependencies will be taken care of with `lxbuildenv`.
To build the software, you need:
* RISC-V toolchain
## Building the project
The hardware half will take care of building the software half, if it is run with `--boot-source bios` (which is the default). Therefore, to build Foboot, enter the `hw/` directory and run:
```
$ python3 foboot-bitstream.py --revision hacker
```
This will verify you have the correct dependencies installed, compile the Foboot software, then synthesize the Foboot bitstream. The resulting output will be in `build/gateware/`. You should write `build/gateware/top-multiboot.bin` to your Fomu device in order to get basic bootloader support.