Skip to content

Commit e9bf006

Browse files
committed
Remove srecord and use objcopy instead.
Now that objcopy have support for `--verilog-data-width`, we don't need srecord anymore. Signed-off-by: Canberk <[email protected]>
1 parent f60d03b commit e9bf006

File tree

5 files changed

+4
-14
lines changed

5 files changed

+4
-14
lines changed

ci/install-build-deps.sh

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ case "$ID-$VERSION_ID" in
3838
python3-wheel \
3939
python3-yaml \
4040
python3-dev \
41-
srecord \
4241
zlib1g-dev \
4342
git \
4443
make \

dv/riscv_compliance/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ How to run RISC-V Compliance on Ibex
1818
have the following tools installed:
1919
- Verilator
2020
- fusesoc
21-
- srecord (for `srec_cat`)
2221
- A RV32 compiler
2322

2423
On Ubuntu/Debian, install the required tools like this:
2524

2625
```sh
27-
sudo apt-get install srecord python3-pip
26+
sudo apt-get install python3-pip
2827
pip3 install --user -U fusesoc
2928
```
3029

examples/simple_system/README.md

-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ run stand-alone binaries. It contains:
2121
<https://github.com/lowRISC/lowrisc-toolchains/releases>
2222
* libelf and its development libraries.
2323
On Debian/Ubuntu, install it by running `apt-get install libelf-dev`.
24-
* srecord.
25-
On Debian/Ubuntu, install it by running `apt-get install srecord`.
26-
(Optional, needed for generating a vmem file)
2724

2825
## Building Simulation
2926

examples/sw/benchmarks/coremark/ibex/core_portme.mak

+1-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ $(OPATH)$(PORT_DIR)/%$(OEXT) : %.s
9292
port_postbuild:
9393
riscv32-unknown-elf-objdump -SD $(OPATH)coremark.elf > $(OPATH)coremark.dis
9494
riscv32-unknown-elf-objcopy -O binary $(OPATH)coremark.elf $(OPATH)coremark.bin
95-
srec_cat $(OPATH)coremark.bin -binary -offset 0x0000 -byte-swap 4 -o $(OPATH)coremark.vmem -vmem
96-
95+
riscv32-unknown-elf-objcopy --strip-all --verilog-data-width=4 --reverse-bytes=4 -O verilog -I binary $(OPATH)coremark.bin $(OPATH)coremark.vmem
9796

9897
# FLAG : OPATH
9998
# Path to the output folder. Default - current folder.

examples/sw/simple_system/common/common.mk

+2-6
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ OBJS := ${C_SRCS:.c=.o} ${ASM_SRCS:.S=.o} ${CRT:.S=.o}
3434
DEPS = $(OBJS:%.o=%.d)
3535

3636
ifdef PROGRAM
37-
OUTFILES := $(PROGRAM).elf $(PROGRAM).vmem $(PROGRAM).bin
37+
OUTFILES := $(PROGRAM).elf $(PROGRAM).dis $(PROGRAM).vmem $(PROGRAM).bin
3838
else
3939
OUTFILES := $(OBJS)
4040
endif
@@ -52,12 +52,8 @@ endif
5252
%.dis: %.elf
5353
$(OBJDUMP) -fhSD $^ > $@
5454

55-
# Note: this target requires the srecord package to be installed.
56-
# XXX: This could be replaced by objcopy once
57-
# https://sourceware.org/bugzilla/show_bug.cgi?id=19921
58-
# is widely available.
5955
%.vmem: %.bin
60-
srec_cat $^ -binary -offset 0x0000 -byte-swap 4 -o $@ -vmem
56+
$(OBJCOPY) -S --verilog-data-width=4 --reverse-bytes=4 -O verilog -I binary $^ $@
6157

6258
%.bin: %.elf
6359
$(OBJCOPY) -O binary $^ $@

0 commit comments

Comments
 (0)