make.py: avoid some actions in make all (do not flash if load-bitstream is specified or if bios is in blockram)
This commit is contained in:
parent
77a6f580e2
commit
e4de5a0c9d
41
make.py
41
make.py
|
@ -119,8 +119,10 @@ CPU type: {}
|
||||||
actions["clean"] = True
|
actions["clean"] = True
|
||||||
actions["build-bitstream"] = True
|
actions["build-bitstream"] = True
|
||||||
actions["build-bios"] = True
|
actions["build-bios"] = True
|
||||||
actions["flash-bitstream"] = True
|
if not actions["load-bitstream"]:
|
||||||
actions["flash-bios"] = True
|
actions["flash-bitstream"] = True
|
||||||
|
if not hasattr(soc, "init_bios_memory"):
|
||||||
|
actions["flash-bios"] = True
|
||||||
if actions["build-bitstream"] and hasattr(soc, "init_bios_memory"):
|
if actions["build-bitstream"] and hasattr(soc, "init_bios_memory"):
|
||||||
actions["build-bios"] = True
|
actions["build-bios"] = True
|
||||||
if actions["build-bios"]:
|
if actions["build-bios"]:
|
||||||
|
@ -188,20 +190,23 @@ CPU type: {}
|
||||||
vns = platform.build(soc, build_name=build_name, **build_kwargs)
|
vns = platform.build(soc, build_name=build_name, **build_kwargs)
|
||||||
soc.do_exit(vns)
|
soc.do_exit(vns)
|
||||||
|
|
||||||
if actions["load-bitstream"] or actions["flash-bitstream"] or actions["flash-bios"]:
|
if actions["load-bitstream"]:
|
||||||
prog = platform.create_programmer()
|
prog = platform.create_programmer()
|
||||||
if actions["load-bitstream"]:
|
prog.load_bitstream("build/" + build_name + platform.bitstream_ext)
|
||||||
prog.load_bitstream("build/" + build_name + platform.bitstream_ext)
|
|
||||||
if actions["flash-bitstream"]:
|
if actions["flash-bitstream"]:
|
||||||
prog.set_flash_proxy_dir(args.flash_proxy_dir)
|
prog = platform.create_programmer()
|
||||||
if prog.needs_bitreverse:
|
prog.set_flash_proxy_dir(args.flash_proxy_dir)
|
||||||
flashbit = "build/" + build_name + ".fpg"
|
if prog.needs_bitreverse:
|
||||||
subprocess.call(["tools/byteswap",
|
flashbit = "build/" + build_name + ".fpg"
|
||||||
"build/" + build_name + ".bin",
|
subprocess.call(["tools/byteswap",
|
||||||
flashbit])
|
"build/" + build_name + ".bin",
|
||||||
else:
|
flashbit])
|
||||||
flashbit = "build/" + build_name + ".bin"
|
else:
|
||||||
prog.flash(0, flashbit)
|
flashbit = "build/" + build_name + ".bin"
|
||||||
if actions["flash-bios"]:
|
prog.flash(0, flashbit)
|
||||||
prog.set_flash_proxy_dir(args.flash_proxy_dir)
|
|
||||||
prog.flash(soc.cpu_reset_address, "software/bios/bios.bin")
|
if actions["flash-bios"]:
|
||||||
|
prog = platform.create_programmer()
|
||||||
|
prog.set_flash_proxy_dir(args.flash_proxy_dir)
|
||||||
|
prog.flash(soc.cpu_reset_address, "software/bios/bios.bin")
|
||||||
|
|
Loading…
Reference in New Issue