[BUG] gen_rom.py doesn't seem to work
Created by: eyssartk
Is there an existing CVA6 bug for this?
-
I have searched the existing bug issues
Bug Description
I want to modify the device tree in the bootrom. The bootrom_64.sv generation process does not seems to work properly :
cva6/corev-apu/fpga/src/bootrom/ $ make all
dtc -I dts cv64a6.dts -O dtb -o cv64a6.dtb
cv64a6.dts:91.22-120.7: Warning (spi_bus_bridge): /soc/xps-spi@20000000: node name for SPI buses should be 'spi'
cv64a6.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge'
CC <= src/main.c
CC <= src/uart.c
CC <= src/spi.c
CC <= src/sd.c
CC <= src/gpt.c
CC <= startup.S
riscv64-unknown-elf-gcc -Os -ggdb -march=rv64imac -mabi=lp64 -Wall -mcmodel=medany -mexplicit-relocs -ffreestanding -nostdlib -nodefaultlibs -nostartfiles -I./ -I./src -Tlinker.lds startup.o src/main.o src/uart.o src/spi.o src/sd.o src/gpt.o -o bootrom_64.elf
LD >= bootrom_64.elf
riscv64-unknown-elf-objcopy -O binary bootrom_64.elf bootrom_64.bin
dd if=bootrom_64.bin of=bootrom_64.img bs=128
53+1 records in
53+1 records out
6897 bytes (6,9 kB, 6,7 KiB) copied, 0,000173967 s, 39,6 MB/s
python ./gen_rom.py bootrom_64.img
Traceback (most recent call last):
File "./gen_rom.py", line 95, in <module>
rom = read_bin()
File "./gen_rom.py", line 88, in read_bin
align = (int((len(rom) + 7) / 8 )) * 8;
TypeError: object of type 'map' has no len()
make: *** [Makefile:53: bootrom_64.sv] Error 1
I use Ubuntu 20.04 and Python 3.8.10. Thank you