Cross compile with linaro
Hello, I have an embedded linux device that is too small to have a compiler installed so we cross compile everything in windows using linaro compiler.
system: Linux buildroot 4.9.28-pic6-geed43d1050 #12 PREEMPT Tue Sep 11 14:17:49 EDT 2018 armv7l GNU/Linux compiler: https://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/arm-linux-gnueabihf/ (gcc-linaro-6.2.1-2016.11-i686-mingw32_arm-linux-gnueabihf)
Do you have any instructions or recommendations for cross compiling orbit?
We unfortunately don't have any specific instructions. But I can quickly outline how it should work:
- The build workflow is based on the Conan package manager which supports cross compilation. Details are here: https://docs.conan.io/en/latest/systems_cross_building/cross_building.html#using-a-profile
- The linked section describes how to create a conan profile for cross compilation. You have to put this profile into your
~/.conan/profilesdirectory. - I assume you only want to cross-compile the service. So you have to add the following to your profile:
[options]
OrbitProfiler:with_gui=False
- Then you can call
./build.sh <your_profile_name>from the Orbit repo root. This will create a build directory namedbuild_<your_profile_name>and start the build. You should be able to find the compiled binary inbuild_<your_profile_name>/bin/OrbitService.
Cheers,
Henning
I do have conan already set up to cross compile conan packages with the compiler (not the easiest to set up... lol), Ill give it a go.
when running as a service on linux, is there a way to connect a gui from windows so that we can use that super nice interface you guys have?
Yes, but it's not super straight forward. You need an SSH tunnel to your embedded device that is forwarding port 44765. On the command line it's something like this: ssh -L 44765:localhost:44765 <hostname>.
Then you can start the UI with the option --local. In Windows .\Orbit.exe --local which makes it try to connect to localhost:44765.
If SSH is not an option you could also change the source code such that the --local option connects directly to an arbitrary hostname and such that the service listens on all interfaces. Currently both is hardcoded to localhost. If that's interesting to you I can look up the correct places in code.