|
发表于 2022-2-22 15:10:17
只看该作者
6#
执行了无数次了 结果一样 是不是源的问题
还有个问题就是 我要编译qt 是要把下面的全部操作一遍吗
还是 只用在板子上操作完了 把项目复制到板子上 然后通过终端进入项目目录 输入 qmake&&make 编译就可以了吗
# Qt 5.12.2 arm64 ubuntu18.04 Cross Compile
Firefly Qt5.12.2 ,Work Environment
* Host(x86 PC) : ubuntu 18.04 x86_64
* Target(RK3399, RK3328, PX30): ubuntu 18.04 arm64
## Host Deployment
```shell
$ apt install -y crossbuild-essential-arm64
$ cd firfly_arm64_qt5.12.2_18.04
$ mkdir -p /opt
$ cp -rfd host/opt/* /opt/
$ cp host/host_qtEnv.sh /etc/profile.d/
reboot
```
## Target Deployment
```shell
$ cd firfly_arm64_qt5.12.2_18.04
$ mkdir -p /opt
$ cp -rfd host/opt/firefly_qt5.12.2_arm64_18.04/ext /opt/firefly_qt5.12.2
$ cp target/target_qtEnv.sh /etc/profile.d/
$ cp target/qt.conf /etc/ld.so.conf.d
$ ldconfig
$ reboot
$ [ -e /usr/lib/aarch64-linux-gnu/libGLESv2.so.2.0.0 ] || apt install -y libgles2
# Install base library
$ apt install -y \
libmtdev1 \
libinput10 \
libxkbcommon0 \
libdouble-conversion1 \
libicu60 \
libharfbuzz0b \
libwebpdemux2 \
libwebpmux3
#Qt QPA Backends
# linuxfb
$ export QT_QPA_PLATFORM=LINUXFB
$ export QT_QPA_FB_DRM=1
$ demo/analogclock
#eglfs
$ export QT_QPA_PLATFORM=EGLFS
$ export QT_QPA_EGLFS_INTEGRATION=EGLFS_KMS #in minimal ubuntu, use eglfs_kms.
$ export QT_QPA_EGLFS_KMS_ATOMIC=1 #use drm atomic api or legacy api(two different)
$ export QT_QPA_EGLFS_HIDECURSOR=1 #hide cursor
$ demo/openglwindow
#xcb (Ubuntu Desktop)
$ apt install -y \
libxcb-icccm4 \
libxcb-image0 \
libxcb-shm0 \
libxcb-keysyms1 \
libxcb-render0 \
libxcb-render-util0 \
libxcb-shape0 \
libxcb-sync1 \
libxcb-xfixes0 \
libxcb-xinerama0 \
libxcb-xkb1 \
libxcb-randr0 \
libsm6 \
libice6 \
libxkbcommon-x11-0
$ export QT_QPA_PLATFORM=xcb
$ export QT_QPA_EGLFS_INTEGRATION=XCB_EGL
```
## Cross Compile on Host
```shell
$ cd example/
$ qmake
$ make
```
|
|