8
votes
How to build My own OS for the raspberry or configure an existing one
to take advantages on the performance
This begs the question that the people who put "an existing OS" together were not concerned about performance, or that you understand it better than them (in ...
8
votes
Accepted
Cross compile for Raspberry Pi Zero from Ubuntu?
I think the issue is down to the differences in the processors. The Rasberry Pi 3B+ has a ARM Cortex-A53 and the Pi Zero has a ARM1176JZF-S processor. Both are ARM CPUs, but the 3B+'s CPU is a much ...
6
votes
Accepted
RPI2 Kernel module compilation (kernel 3.18.11+ vs 3.18.11-v7+)
What is the difference between kernel "3.18.11" and "3.18.11-v7+"?
The -v7+ is tacked on to indicate this isn't from a vanilla source tree, and that it was compiled specifically for the Pi 2.
I'm ...
6
votes
Accepted
Problem with QinHeng CH9200 driver - Pi 2 (4.1.7-v7+)
Important: Follow these instructions meticulously
Note: The OP is using Wheezy and the latest kernel version from raspberrypi-bootloader then is 4.1.7-v7+, while on jessie that version is 4.1.13-v7+...
6
votes
Accepted
Crosscompiling: exact archictecture for all models
I believe I figured it out after quite some fiddling.
What is the most specific parameter I can use to be compatible with all models?
Raspbian FAQ's contain the final answer:
-march=armv6
-mfpu=vfp
...
6
votes
Accepted
Where to get Bluetooth/Bluetooth.h for Raspberry Pi?
You can use Debian's (which is the distro Raspberry Pi OS is based on) search engine to locate any file:
Once you find the package containing the necessary files, you can install the same package on ...
5
votes
Cross-compile x86-64 code on Raspberry Pi 2
It is possible to compile x86_64 code on the Raspberry Pi, and i have just built a cross-compile toolchain on my Pi 2 (with more than 27 hrs of compilation and some hours of bug fixing).
You can ...
5
votes
Accepted
Armbian binary compatibility with Raspbian
In short, Yes, they will work. Both repositories use the same upstream code to build their packages.
That is, armhf binaries from armbian will run on an armhf raspbian.
Your problem won't binary ...
5
votes
Accepted
Cross compiling for RPi - error while loading shared libraries
Shared or dynamic libraries are needed at run time. So you need the library not only on the build system but in on the target system, in this case on the PI.
This is different from static libraries. ...
5
votes
Where to get Bluetooth/Bluetooth.h for Raspberry Pi?
Not a stupid question at all. I couldn't immediately find a good explanation of how to install packages from source. However, some trial-and-error yielded this solution:
$ apt-cache search bluez
...
4
votes
Are there any technical limitations when running hard-float binaries on a soft-float OS?
Theres several seperate but related issues here.
kernel support, the kernel must support vfp so it can correctly save the registers.
compiler FPU use, does the compiler use the FPU
procedure call ...
4
votes
Cross compiling from Fedora 27
Try installing:
sudo dnf install binutils-arm-linux-gnu gcc-arm-linux-gnu glibc-arm-linux-gnu
binutils-arm-linux-gnu contains the GNU binutils for the arm-linux-gnu target. gcc-arm-linux-gnu ...
4
votes
Is there a way to cross-compile for armv6 using gcc-7?
I ran into a similar issue trying to cross-compile code for the Raspberry PI Zero (armv6) using a newer GCC 8.
Current toolchains are often not built with the --with-arch=armv6 flag. This results in ...
4
votes
Accepted
Cannot find filesystem
The raspberrypi/tools toolchain you seem to be using contains an ancient version of GCC (4.9.3). If you want to use the <filesystem> header, you need GCC 8 or later.
You can use Crosstool-NG to ...
3
votes
Cross-compiling to Raspbian
There's a gotcha here created by the lack of specificity with ARM cross-compilers. ARM actually refers to a family or series of instruction sets which are not necessarily compatible with one another.
...
3
votes
Accepted
Cross Compiling Protobuf for Raspberry Pi
The problem was that protobuf installs protoc by default in the /usr/local/bin directory, as opposed to /usr/bin.
Therefore, when I called ./configure with the --with-protoc=/usr/bin parameter, the ...
3
votes
DHT11 module compilation error
I was able to build (make) the module on my Raspberry Pi itself instead of cross compiling it on another machine.
However, I needed to perform the steps listed at the end to avoid the following error:...
3
votes
Accepted
DHT11 module compilation error
Here are the steps required to build a kernel module on Raspbian.
Perform an sudo rpi-update
See https://github.com/Hexxeh/rpi-update for details on
rpi-update. You have to be on the latest firmware ...
3
votes
How do I build a GCC 4.7 toolchain for cross-compiling?
This guide may be helpful.
It helped me get mine going. I added some comments about tuning as well.
3
votes
How can I cross-compile to the Raspberry Pi using Clang/LLVM?
Just completed my article, Cross compilation for Raspberry from Sierra, about exactly this thing. Under Mac OS Sierra though. But for clang it matters a little.
In this article I have shared ...
3
votes
How do I build a GCC 4.7 toolchain for cross-compiling?
In case you are going to cross-compile from the OS X : here is the great article (and the only one working on the web I found).
The greatest thing is author provides a complete precompiled toolchain, ...
3
votes
Accepted
How to install a cross compiler for Raspi 2
You don't have to. The Pi 2 uses a much more common architecture and the ARM cross-compiler package in Ubuntu will work. See my comments here from yesterday for further explanation of that.
You ...
3
votes
How to build My own OS for the raspberry or configure an existing one
You could consider using the Raspbian NetInstaller to install a minimal system and build your system up from there.
3
votes
What's causing these crashes after cross-compiling?
The easiest way to a binary compatible cross-compilation is to install the toolchain used by Raspbian developers. It can be found here. It's essential to use this toolchain if you want to build the ...
3
votes
What's causing these crashes after cross-compiling?
I was getting a pure virtual method called exception when cross-compiling. @JeremyBarnes's answer did not quite work for me. Instead I used:
-U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 -...
3
votes
libstdc++ Error: `GLIBCXX_3.4.22' not found
It appears you used a g++ 6 cross-compiler (default install on Debian 9?) then attempted to run the resulting binary on Raspbian 8 Jessie. You can see gcc's symbol versioning guide here where g++ 4.9 ...
3
votes
Accepted
Is there a way to cross-compile for armv6 using gcc-7?
Using the compiler toolchain from https://sourceforge.net/projects/raspberry-pi-cross-compilers/
For pizero the cross-compiler is available from the link cross-gcc-9.1.0-pi_0-1.tar.gz
This compiler ...
3
votes
Is there a way to cross-compile for armv6 using gcc-7?
The problem is that command line architecture flags change the behavior of the compiler, but they don't change the precompiled runtime support code that is linked in to every executable.
So when you ...
3
votes
“apt-get: command not found” issue on raspberry pi os built using Buildroot
The apt command is the Debian solution to download packages from a repository, including their dependencies. If you want to use apt, you have to create a system that is based on these packages.
If ...
3
votes
How can I run a cross-compile binary on my RPi?
I haven't completely understood what you have done, but in respect to your own answer it is in general possible to run 32 bit programs on a RasPi running a 32 bit or a 64 bit kernel. You cannot run a ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
cross-compilation × 180raspbian × 33
kernel × 33
linux × 19
qt × 17
c++ × 16
ubuntu × 14
arm × 14
gcc × 12
pi-3 × 10
c × 10
pi-zero × 8
opencv × 8
software-compilation × 8
archlinux × 7
make × 7
toolchain × 7
pi-2 × 6
driver × 6
modules × 6
python × 5
pi-4 × 5
software-installation × 4
windows × 4
shared-libraries × 4