交叉编译树莓派QT5.10

交叉编译树莓派QT5.10

环境准备

挂载镜像

挂载镜像更稳健系统到 /mnt

$ unzip 2017-11-29-raspbian-stretch.zip
Archive:  2017-11-29-raspbian-stretch.zip
  inflating: 2017-11-29-raspbian-stretch.img

$ sudo fdisk -l 2017-11-29-raspbian-stretch.img
[sudo] password for wind:

Disk 2017-11-29-raspbian-stretch.img: 4919 MB, 4919918592 bytes
255 heads, 63 sectors/track, 598 cylinders, total 9609216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x49783f5b

                          Device Boot      Start         End      Blocks   Id  System
2017-11-29-raspbian-stretch.img1            8192       93236       42522+   c  W95 FAT32 (LBA)
2017-11-29-raspbian-stretch.img2           94208     9609215     4757504   83  Linux

### offset = 94208 * 512 = 48234496
$ sudo mount -o loop,offset=48234496 2017-11-29-raspbian-stretch.img /mnt
$ cd /mnt
ROOTFS=/mnt
TOOLCHAIN=/path/to/gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-

配置

$ tar -xJvf qt-everywhere-src-5.10.0.tar.xz
$ cd qt-everywhere-src-5.10.0
$ ./configure -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=/home/wind/opt/raspi/tools/arm-bcm2708/gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5
### add -make tools -make examples options if need

此时出下面的错误

ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
ERROR: The OpenGL functionality tests failed! You might need to modify the include and library search paths
by editing QMAKE_INCDIR_OPENGL[_ES2], QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for yo
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值