如何为RasPi3交叉编译 [英] How to cross-compile for RasPi3

查看:161
本文介绍了如何为RasPi3交叉编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试为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++

by

-device linux-rpi3-g++

我在 raspi-tools 文件夹。

现在我被困在t他的选择

Now I am stuck at the option

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交叉编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆