Hello everyone,
I have a dragonboard 410C with debian os. I still figuring out this board, and I want to code the GPU with cross compilation, how to do that?
thank you in advance.
Hello everyone,
I have a dragonboard 410C with debian os. I still figuring out this board, and I want to code the GPU with cross compilation, how to do that?
thank you in advance.
It doesn’t really matter what you want to cross-compile (OpenGL programs or audio ones) the techniques are the same. Basically when you are cross building complex packages you need to make sure the cross compiler can find the headers.
The most generic approach is to use the headers installed in the DB410C root filesystem:
http://www.fabriziodini.eu/posts/cross_compile_tutorial/
Alternatively, if you are running the same verison of Debian on the PC and on the target device then Debian has more specialist infrastructure (so no need to keep adding -dev packages to the sysroot and trying again):
https://wiki.debian.org/CrossCompiling
Thank you danielt, I have ubuntu on my pc and I use eclipse + linaro toolchain for cross compilation,I tried some simple codes and they work good on CPU, but the problem is that I don’t know how to set my program to run on GPU not CPU.
If you mean you want to do general purpose computing on the GPU (GPGPU)?
OpenCL is not supported by the freedreno graphics driver used on Debian/DB410C. The driver does support compute shaders but this will require you to rewrite your code in shader language and it can be harder to find examples for this. If you want to explore this option then take a look at:
http://wili.cc/blog/opengl-cs.html
I really appreciate you help, Thank you.