Multiplatform AMD64/ARM64 Support
Building a multiplatform docker image for linux/amd64 and linux/arm64 using:
docker build --platform linux/amd64,linux/arm64 .
currently fails in the linux/arm64 portion for at least two reasons:
-
lib32gcc-9-devseems to be unavailable -
openocdfails to recognize the system -
spikefails to build (which may be an issue we can't solve easily)
I am not sure how involved fixing all this is but I expect we need to support ARM64 sooner or later and therefore may not get around the issue.
I think for OpenOCD it's probably the best choice to kick it out of the docker image since the GDB+QEMU combo works really well and since OpenOCD is only needed when one wants to debug the bare-metal setup on actual hardware. Regarding Spike it would be interesting to see the reason why it fails to build. Could you paste the relevant output here?
#44 123.3 g++: fatal error: Killed signal terminated program cc1plus #44 123.3 compilation terminated. #44 123.3 make: *** [Makefile:349: disasm.o] Error 1 #44 123.3 make: *** Waiting for unfinished jobs....
Dockerfile:68
67 | # build spike ISA simulator
68 | >>> RUN mkdir -p $RISCV
69 | >>> && mkdir -p riscv-isa-sim/build
70 | >>> && cd riscv-isa-sim/build
71 | >>> && ../configure --prefix=$RISCV
72 | >>> && make
73 | >>> && make install
74 |
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c mkdir -p $RISCV && mkdir -p riscv-isa-sim/build && cd riscv-isa-sim/build && ../configure --prefix=$RISCV && make && make install]: exit code: 2