docker icon indicating copy to clipboard operation
docker copied to clipboard

Dockerfile.xdp: add Dockerfile for xdp compiling

Open PolynomialDivision opened this issue 4 years ago • 5 comments

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.

PolynomialDivision avatar Feb 25 '21 17:02 PolynomialDivision

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 avatar Feb 26 '21 22:02 aparcar

@aparcar Sry, I'm currently a bit busy with other stuff. That is why I was not able to go on.

PolynomialDivision avatar Mar 07 '21 08:03 PolynomialDivision

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?

PolynomialDivision avatar Apr 18 '21 11:04 PolynomialDivision

There is a lot of things going on on current master. llvm+clang as host tools.

PolynomialDivision avatar Nov 05 '21 14:11 PolynomialDivision

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

aparcar avatar Nov 05 '21 18:11 aparcar

I'd close this @PolynomialDivision or is this still relevant to you?

aparcar avatar Mar 20 '23 17:03 aparcar