abhiTronix / raspberry-pi-cross-compilers

Latest GCC Cross Compiler & Native (ARM & ARM64) CI generated precompiled standalone toolchains for all Raspberry Pis. 🍇
https://sourceforge.net/projects/raspberry-pi-cross-compilers
GNU General Public License v3.0
594 stars 104 forks source link

Deploy compiled code #97

Closed EntnyJill closed 2 years ago

EntnyJill commented 2 years ago

Hello. I've followed instructions about cross-compilation and successfully got compiled files. But how can I deploy it to Raspberry? What about deploy scripts for it? And another questions related with it: 1) how can I build and deploy projects with libraries like OpenCV? 2) how can I remotely debug such cross-compiled projects?

abhiTronix commented 2 years ago

@EntnyJill you'll need to take ideas from QT instructions https://github.com/abhiTronix/raspberry-pi-cross-compilers/blob/master/QT_build_instructions.md#11-deploy-qt-to-raspberry-pi, they're not different for opencv but you need to add the deployed folder to your system path. Once done, call sudo ldconfig <path of lib directory in deployed folder you just rsynced> and you're done. Or if that didn't worked then you need to rsync all built files to respective folder on raspberry pi. But make sure you don't have any hard coded path in your configure command when building opencv. And always use same GCC version as installed on your pi for cross-compiling.