Skip to content

Commit

Permalink
litex_json2renode: add option for elf bios
Browse files Browse the repository at this point in the history
add option for elf bios file.

Signed-off-by: Fin Maaß <[email protected]>
  • Loading branch information
maass-hamburg committed Jun 11, 2024
1 parent 23e654d commit e3f8a2d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions litex/tools/litex_json2renode.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,12 @@ def generate_resc(csr, number_of_cores, args, flash_binaries={}, tftp_binaries={
for cpu_id in range(0, number_of_cores):
result += f"cpu{cpu_id} PC {hex(rom_base)}\n"

if args.bios_elf:
# load LiteX BIOS to ROM base
result += """
sysbus LoadELF @{}
""".format(args.bios_elf)

if args.tftp_ip:
result += """
Expand Down Expand Up @@ -1057,6 +1063,8 @@ def parse_args():
bios_group = parser.add_mutually_exclusive_group()
bios_group.add_argument('--bios-binary', action='store',
help='Path to the BIOS binary')
bios_group.add_argument('--bios-elf', action='store',
help='Path to the BIOS ELF file')
bios_group.add_argument('--opensbi-binary', action='store',
help='Path to the OpenSBI binary')

Expand Down

0 comments on commit e3f8a2d

Please sign in to comment.