How to compile for Arm/Raspberry
-
I've spent over an hour looking for a simple guide to compile for Raspbian (arm) from Linux (x86_64). I assumed that all I needed to do was setup a kit (gcc options etc) but every guide seems to go in a different direction.
Most guides want me to install Qt Creator or compilation tools on the raspberry. Not what I want. I should point out that there is a Github project which compiles various versions of the Qt libraries for Raspbian. My plan was to load the needed libraries that way.
Is there something wrong with my expectations? Shouldn't this be simple matter of creating the right kit? Is there such a guide?
-
@ocgltd It's been a little while since I haven't run any linux ...
Basically rapbian is just yet another linux distro built for ARM. Obviously it is possible to build to linux ARM from a linux x86_64 (and also reversely). I think it should be possible to build from x86_64 linux to raspbian and this is what I'd go for either.
The question however, is how do you install on the raspberry pi the packages you built on your desktop linux. This might be the reason why your guides would build on pi rather than desktop.
What I'd strongly suggest in this case is choosing for the desktop machine another debian based distro (like ubuntu, or Kubuntu for example) so you could build your .deb packages on your debian based desktop and easily install them on the pi.
That's just my opinion and it's just theoretical opinion of course as I never tried it.
-
@ankou29666 I am fine copying the executable from my Linux PC to my Rasberry (scp). The confusing part is setting up the kit/compilation settings.
I don't want to compile ON a rasberry, I want to cross-compile
-
@ocgltd Hi,
Maybe have a look at this? https://www.ics.com/blog/configuring-qt-creator-raspberry-pi
-
@realtime_embedded Sadly it's 7 years old and severly out of date....