问题描述
我目前正在尝试为我的 Raspberry Pi 3 交叉编译 Qt 5.7.这是我的第一次交叉编译尝试,所以请多多关照.:)
I am currently trying to cross-compile Qt 5.7 for my Raspberry Pi 3. This is my first cross-compiling atempt, so please be kind. :)
在 Qt Wiki 上,我找到了 Raspberry Pi 2 的说明,我目前正在尝试对其进行调整.
On the Qt Wiki I found instructions for the Raspberry Pi 2, which I am currently trying to adapt.
RasPi 2 的编译行如下:
The compile line for RasPi 2 is as follows:
./configure -release -opengl es2 -device linux-rasp-pi2-g++ -device-option
CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-
-sysroot ~/raspi/sysroot -opensource -confirm-license -make libs
-prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v
我替换了选项
-device linux-rasp-pi2-g++
由
-device linux-rpi3-g++
正如我在 raspi-tools 文件夹中找到的那样.
as I found within the raspi-tools folder.
现在我被困在选项中
CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-
在 ~/raspi/tools/
文件夹中,我看不到任何明显与 raspi3 相关的条目.只有 arm-bcm2708/
文件夹.不应该有一些 bcm2837
条目吗?这是否意味着尚不支持 RasPi 3 还是我遗漏了什么?
as in the ~/raspi/tools/
folder I cannot see any obviously raspi3-related entry. There is only the arm-bcm2708/
folder. Shouldn't there be some bcm2837
entry? Does that mean there is no support for RasPi 3 yet or am I missing something?
感谢您的任何提示.
推荐答案
arm-bcm2708/
文件夹只是一个名称.它包含几个构建工具链.也可以使用系统安装的工具链.所以我在我的构建机器(Debian GNU/Linux)上安装了包 g++-arm-linux-gnueabihf
并使用了这个配置调用:
The arm-bcm2708/
folder is just a name. It contains several build tool chains. It's perfectly fine to use system-installed tool chains as well. So I installed the package g++-arm-linux-gnueabihf
on my build machine (Debian GNU/Linux) and used this configure call:
./configure -release -opengl es2 -device linux-rpi3-g++
-device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf-
-sysroot /home/fs/raspi/sysroot -opensource -confirm-license
-make libs -prefix /usr/local/qt5pi -extprefix /home/fs/raspi/qt5pi
-hostprefix /home/fs/raspi/qt5 -v
这篇关于如何为 RasPi3 交叉编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!