Closed turbinenreiter closed 2 years ago
Hi @turbinenreiter! Which OS are you running podman on?
I've tried programming boards on Fedora, using either docker-ce or podman (with the docker compatibility package). I can confirm it's possible. On Windows, USB/IP is required. That is also an option on GNU/Linux.
However, I don't use openocd for programming bitstreams. I find openFPGALoader (trabucayre.github.io/openFPGALoader: Programming a development board) much easier to use. For instance:
docker run \
--rm \
--privileged \
-itv $(pwd):/wrk -w /wrk \
gcr.io/hdl-containers/openfpgaloader \
openFPGALoader -b arty_a7_35t mybitstream.bit
Is your board supported by openFPGALoader? Can you give it a try?
For context, are you using make download
from https://f4pga-examples.readthedocs.io/en/latest/building-examples.html ?
Which OS are you running podman on?
Fedora 36
docker run \ --rm \ --privileged \ -itv $(pwd):/wrk -w /wrk \ gcr.io/hdl-containers/openfpgaloader \ openFPGALoader -b arty_a7_35t mybitstream.bit
This worked! Thanks a lot!
For context, are you using
make download
from https://f4pga-examples.readthedocs.io/en/latest/building-examples.html ?
It's a custom project by a colleague, but the Makefiles are taken from that example, yes.
Nice! At least we know it's possible on your setup. Now, you might want to try finding a set of permissions which allows sharing the device you want only (instead of "everything" through privileged
). I suggest to have a look at https://github.com/mviereck/x11docker/#security.
It's a custom project by a colleague, but the Makefiles are taken from that example, yes.
We might want to update the docs and the makefiles in f4pga-examples to use openFPGALoader, as done in https://f4pga.readthedocs.io/projects/arch-defs/en/latest/getting-started.html#openfpgaloader. Do you want to create an issue there to track it?
Sure, but nor sure which repo this would be.
@turbinenreiter see chipsalliance/f4pga-examples#328.
I'm closing this issue, since https://github.com/chipsalliance/f4pga-examples/issues/328 is done (see https://github.com/chipsalliance/f4pga-examples/pull/329). Feel free to open another issue for tracking usage of openocd.
Thank you very much for the help and fixes, much appreciated.
I'm using the command
podman run --rm -it -v /$(pwd)://wrk --security-opt label=disable -w //wrk gcr.io/hdl-containers/conda/f4pga/xc7
and was able to build without issues. However, flashing/downloading using openocd fails with this error message:
I tried mapping in the device using
--device=/dev/ttyUSB1
but got the same error message.First of all, I'm not sure how to correctly map the device into the container -> the docs don't contain information about this and I think it would help a lot of people if it was added. Second, I'm not entirely sure if the error is a bug or a user problem, as a result of the incorrect device mapping.