demo: fix minor build issues

This commit is contained in:
Thomas Watson 2022-09-17 19:05:45 -05:00
parent c24bbedb68
commit d7837f8751

View file

@ -7,6 +7,7 @@
# SPDX-License-Identifier: BSD-2-Clause
import os
import sys
import argparse
from litex.build.tools import replace_in_file
@ -23,6 +24,7 @@ def main():
# Copy contents to demo directory
os.system(f"cp {os.path.abspath(os.path.dirname(__file__))}/* demo")
os.system("chmod -R u+w demo")
# Update memory region.
replace_in_file("demo/linker.ld", "main_ram", args.mem)
@ -35,7 +37,7 @@ def main():
os.system("cp demo/demo.bin ./")
# Prepare flash boot image.
os.system("python3 -m litex.soc.software.crcfbigen demo.bin -o demo.fbi --fbi --little") # FIXME: Endianness.
os.system(f"{sys.executable or 'python3'} -m litex.soc.software.crcfbigen demo.bin -o demo.fbi --fbi --little") # FIXME: Endianness.
if __name__ == "__main__":
main()