Merge pull request #1434 from tpwrules/fix-bare-metal-demo

demo: fix minor build issues
This commit is contained in:
enjoy-digital 2022-09-29 17:20:12 +02:00 committed by GitHub
commit 1fb1cf19e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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()