Dockerfile.xdp: add Dockerfile for xdp compiling
Typically a xdp program program is compiled with:
clang -O2 -target bpfeb -emit-llvm kern.c -o - | llc -march=bpfeb -filetype=obj -o kern.o
So we need clang and llvm.
Thanks, if I see this correct this is c&p of the Dockerfile I gave earlier as an example. There is a bit more work required. First of, as we support different architectures via Docker labels, that should be added. I did this here.
Secondly the docker-sdk.sh script should be extended to build another container and label it with xpd, so you end up using openwrt/sdk:19.07.7-ath79-generic-xdp.
If that's to confusing I'll look into that in a bit, if not please extend this PR and I'm happy to help with further questions!
@aparcar Sry, I'm currently a bit busy with other stuff. That is why I was not able to go on.
If that's to confusing I'll look into that in a bit, if not please extend this PR and I'm happy to help with further questions!
I'm still confused. xD How can I test all that build-scripts that they work?
There is a lot of things going on on current master. llvm+clang as host tools.
I'm thinking of moving this into the default images since kernel-bpf package would build llvm if not host installed. I'll think about it and update this
I'd close this @PolynomialDivision or is this still relevant to you?