hw: foboot-bitstream: support building bios

Now that the failsafe bios has stabilized, support building it as part
of the ROM.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-04-06 09:42:29 +08:00
parent a9a5f0cc0d
commit 2a7e431947

View File

@ -33,6 +33,7 @@ from valentyusb.usbcore.endpoint import EndpointType
from lxsocsupport import up5kspram, spi_flash from lxsocsupport import up5kspram, spi_flash
import argparse import argparse
import os
_io_evt = [ _io_evt = [
("serial", 0, ("serial", 0,
@ -705,11 +706,16 @@ def main():
cpu_variant = "debug" cpu_variant = "debug"
debug = True debug = True
os.environ["LITEX"] = "1" # Give our Makefile something to look for
platform = Platform(revision=args.revision) platform = Platform(revision=args.revision)
soc = BaseSoC(platform, cpu_type="vexriscv", cpu_variant=cpu_variant, soc = BaseSoC(platform, cpu_type="vexriscv", cpu_variant=cpu_variant,
debug=debug, boot_source=args.boot_source, debug=debug, boot_source=args.boot_source,
bios_file=args.bios, use_pll=args.no_pll) bios_file=args.bios, use_pll=args.no_pll)
builder = Builder(soc, output_dir="build", csr_csv="test/csr.csv", compile_software=compile_software) builder = Builder(soc, output_dir="build", csr_csv="test/csr.csv", compile_software=compile_software)
if compile_software:
builder.software_packages = [
("bios", os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "sw")))
]
vns = builder.build() vns = builder.build()
soc.do_exit(vns) soc.do_exit(vns)