From 2a7e431947e69471eb2ffba6f915df1589c5b0b6 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Sat, 6 Apr 2019 09:42:29 +0800 Subject: [PATCH] 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 --- hw/foboot-bitstream.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/foboot-bitstream.py b/hw/foboot-bitstream.py index 5f6b247..14feae7 100755 --- a/hw/foboot-bitstream.py +++ b/hw/foboot-bitstream.py @@ -33,6 +33,7 @@ from valentyusb.usbcore.endpoint import EndpointType from lxsocsupport import up5kspram, spi_flash import argparse +import os _io_evt = [ ("serial", 0, @@ -705,11 +706,16 @@ def main(): cpu_variant = "debug" debug = True + os.environ["LITEX"] = "1" # Give our Makefile something to look for platform = Platform(revision=args.revision) soc = BaseSoC(platform, cpu_type="vexriscv", cpu_variant=cpu_variant, debug=debug, boot_source=args.boot_source, bios_file=args.bios, use_pll=args.no_pll) 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() soc.do_exit(vns)