odroid android 联想,ODROID-XU3

2023-05-16

En

Ar

Bg

De

El

Es

Fa

Fi

Fr

Hi

Hu

It

Ja

Kn

Ko

Ms

Nl

Pl

Pt

Ru

Sq

Th

Tr

Uk

Zh

The ODROID-XU3 is an ARM development board created by HardKernel

HardKernel provides both Android and Ubuntu Linux images for use with the ODROID-XU3. Both environments can be used to run and develop Qt 5 applicaitons.

Qt for Android

To use Android as a development platform, you need to obtain an Android image from HardKernel and flash it to either the eMMC or MicroSD media.

Once the device boots into Android, you treat it like any other Android Mobile/Table and deploy to it using the Qt for Android ARMv7 kit.

Qt for Embedded Linux

To use Linux as a develpment platform, you need to obtain a Ubuntu image from HardKernel and flash it to either the eMMC or MicroSD media.

There are no pre-built versions of Qt for ODROID-XU3 so you need to build Qt for source. It is possible to build Qt on the ODROID-XU3 but it can be impractical because of long build times and limited file system space. Regardless of where you build Qt, the ODORID-XU3 will need to install the development dependencies.

Before you build you will need to setup the toolchain and sysroot. For the toolchain you will need to obtain a ARM cross compile toolchain configured for gnueabihf. I used the Raspberry Pi toolchain which I copied into the folder ~/Code/Odroid/toolchain

To provide the sysroot, you need to use the system image installed on the ODROID-XU3. This is the reason for installing the extra Qt development dependencies on the ODROID-XU3 itself.

There are a couple of ways to do this. One is to mount the ODROID-XU3's SD Card or eMMC on your development machine and either make a copy or a link to ~/Code/Odroid/sysroot

Another method is to mount the live system image over ssh using sshfs. To use this method install sshfs on your development machine, an make sure that you have pushed your ssh keys to the ODROID-XU3:

#assuming Ubuntu/debian

sudo apt-get install sshfs

ssh-copy-id odroid@

ssh-copy-id root@

mkdir -p ~/Code/Odroid/sysroot

sshfs root@:/ ~/Code/Odroid/sysroot

Just bear in mind that you use this method you will need to maintain a network connection to the device while building anything. If however you use the SD card you will not be able to run the system while building software, or if you make a copy, you will need to update the copy each time you install new development libs on the device. Each method has its own compromises. I choose to use the sshfs method because then I'm easily able to deploy software to the live device and sysroot at the same time with just make install.

However you choose to map your system image as a sysroot, a bit of preparation is still required before it can be used. Any links in the system image's library folders need to be converted from absolute paths to relative ones. This can be done by using this script.

cd ~/Code/Odroid/

wget https://gist.githubusercontent.com/nezticle/affaee3d3905489c95f7/raw/3190bcb3ac6e9173fcfd4f305a551dc767eb1666/fixQualifiedLibraryPaths.sh

chmod a+x fixQualifiedLibraryPaths.sh

./fixQualifiedLibraryPaths.sh ./sysroot arm-linux-gnueabihf

Now the sysroot can be used for cross-compiling.

Building Qt

First you will need the Qt source code from at least Qt 5.5 (which at this point is only available from git). Assuming you have your Qt 5 source code in ~/Code/qt5, here is how you would configure and build qt:

mkdir ~/Code/Odroid/qt5-build

cd ~/Code/Odroid/qt5-build

#configure Qt

~/Code/qt5/configure -commercial -confirm-license -debug -developer-build -prefix /usr/local -hostprefix ~/Code/Odroid/qt5-build \

-extprefix ~/Code/Odroid/sysroot/usr/local -device odroid-xu3 -device-option CROSS_COMPILE=~/Code/Odroid/toolchain/bin/arm-linux-gnueabihf- \

-sysroot ~/Code/Odroid/sysroot -nomake tests -no-pch -skip qtwebkit -opengl es2 -xcb -eglfs -qpa xcb

#build Qt

make -j10

#install Qt

make install

Now if you were using the sshfs method for getting a sysroot, when you ran make install the Qt library should already by available for use on the device in /usr/local. If not then you will need to copy Qt libraries and plugins manually to your device from your local sysroot.

The Qt development files/tools will be located in ~/Code/Odroid/qt5-build

Testing out Examples

If you use the configure line I provided above unmodified, then the qt examples should have been built and deployed to the device. You can test them out from the device by running them in /usr/local/examples. By default they will use the XCB platform plugin and run in X11.

Qt Creator

Doing Qt application development for ODROID-XU3 from Qt Creator is as simple as creating a new kit for ODROID-XU3 and filling in the details of where the toolchain and new qmake binaries are located. All of these things should be in the ~/Code/Odroid/ folder we created and populated above. Once this is done and a new "device" target is defined, it should be possible to build and deploy applications to your Odroid.

X11 vs fbdev

By default Qt will be built for the ODROID-XU3 to run in the X11 environment provided by Ubuntu. You may however wish to run directly to the framebuffer device via EGL rather than through X11. The Ubuntu image provided by HardKernel does not provide the necessary Mali GPU drivers needed to use OpenGL through "fbdev". It is however possible to install them through the following process:

#Download fbdev mali drivers

wget http://malideveloper.arm.com/downloads/drivers/binary/r4p0-02rel0/mali-t62x_r4p0-02rel0_linux_1+fbdev.tar.gz

#extract and install in /usr/lib/arm-linux-gnueabihf/fbdev-egl

tar -xzf mali-t62x_r4p0-02rel0_linux_1+fbdev.tar.gz

sudo mv fbdev /usr/lib/arm-linux-gnueabihf/fbdev-egl

sudo chown -R root:root /usr/lib/arm-linux-gnueabihf/fbdev-egl

#install an ld.so.conf

echo "/usr/lib/arm-linux-gnueabihf/fbdev-egl" | sudo tee /usr/lib/arm-linux-gnueabihf/fbdev-egl/ld.so.conf > /dev/null

sudo chmod 644 /usr/lib/arm-linux-gnueabihf/fbdev-egl/*

#include links for libEGL.so.1 and libGLESv2.so.2

sudo ln -s /usr/lib/arm-linux-gnueabihf/fbdev-egl/libEGL.so /usr/lib/arm-linux-gnueabihf/fbdev-egl/libEGL.so.1

sudo ln -s /usr/lib/arm-linux-gnueabihf/fbdev-egl/libGLESv2.so /usr/lib/arm-linux-gnueabihf/fbdev-egl/libGLESv2.so.2

#Update-alternatives

sudo update-alternatives --install /etc/ld.so.conf.d/arm-linux-gnueabihf_EGL.conf arm-linux-gnueabihf_egl_conf /usr/lib/arm-linux-gnueabihf/fbdev-egl/ld.so.conf 550

#To switch between mali-egl and fbdev-egl:

sudo update-alternatives --config arm-linux-gnueabihf_egl_conf

#select the EGL provider then update the links

sudo ldconfig

Now to start a Qt Application with EGLFS instead of XCB you just need to pass the argument "-platform eglfs" when you start your application, or set the environment variable QT_QPA_PLATFORM=eglfs

Performance and issues with OpenGL

Qt 5.5 will have a number of fixes and workarounds that attempt to correct some of the issues with the drivers. This is tracked under https://bugreports.qt.io/browse/QTBUG-45106

The current drivers, especially the fbdev one, are known to be _slow_. This is likely caused by some missing integration work at the end of the pipeline. See http://community.arm.com/thread/7440

OpenCL

The board supports OpenCL 1.1, with CL-GL interop. This has been tested with the fbdev drivers.

To get it up and running, get the standard OpenCL 1.1 headers from Khronos (or from some other vendor's SDK) as they do not seem to be present in the sysroot by default.

You will then have to symlink /usr/lib/arm-linux-gnueabihf/fbdev-egl/libmali.so (note: _not_ libOpenCL.so which seems to be some empty shim) to /usr/lib/libOpenCL.so.

Once this is done, you should be able to build CL apps.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

odroid android 联想,ODROID-XU3 的相关文章

随机推荐

  • PX4的workqueue

    Workqueue相当于是中断子程序 xff0c 然后在queue的cycle里面要注意 xff0c 不能在cycle函数里面用printf打印 xff0c 在cycle里面printf函数是打印不出来的 也不能在cycle里面用while
  • windows10安装Python环境

    下载Python交互解释器 xff08 俗称 环境 xff09 登录python官网 xff1a www python org 进 入 官 网 首 页 xff0c 选 择 Downlaods 下 面 对 应 的 系 统 版 本 xff08
  • gvim背景配色

    背景 xff08 feihua 重新安装了gvim7 4后 xff08 发现gvim7 3有显示字符的bug便升级了 xff0c 忽然想改一下windows下gvim的外观 xff0c 在看了几个博客 xff0c 却发现无法设置 xff0c
  • Vue路由(vue-router)详细讲解指南

    中文文档 xff1a https router vuejs org zh Vue Router 是 Vue js 官方的路由管理器 它和 Vue js 的核心深度集成 xff0c 让构建单页面应用变得易如反掌 路由实际上就是可以理解为指向
  • Eclipse在点击运行后不能自动保存的解决

    今天在eclipse上写程序调试时 xff0c 发现当我点击运行按键之后 xff0c 并不能在运行前帮我自动保存 xff0c 也就是说每次修改代码之后 xff0c 运行的还是前一次运行之前的代码 xff0c 并不是修改之后的代码 xff0c
  • 自旋锁的原理实现

    import java util concurrent atomic AtomicReference boolean compareAndSet V expect V update 如果当前值 61 61 预期值 xff0c 则以原子方式将
  • 到底哪种滤波算法好?互补滤波和卡尔曼滤波结果比较(转)

    看到有人说互补滤波跟卡尔曼滤波效果差不多 xff0c 我是不相信的 不过单我自己说不行 xff0c 要有结果 xff0c 后来我就用下面的代码进行测试 xff0c 结果如下图 lt ignore js op gt 结果 xff1a 果然两滤
  • C语言RL78 serial bootloader和C#语言bootloader PC端串口通信程序

    C语言RL78 serial bootloader和C 语言bootloader PC端串口通信程序 了解更多关于bootloader 的C语言实现 xff0c 请加我QQ 1273623966 xff08 验证信息请填 bootloade
  • 几个C++ online test 网站

    http www mycppquiz com list php http www codelect net TestDetails Cplusplus Senior Level Test http careerride com c 43 4
  • CMakeLists 中file GLOB的陷阱:undefined symbol错误

    例子 xff1a 为了规范代码写了如下CMakeLists Files include file GLOB source files c h 本意是在工程中添加 h c会
  • 第五周课程总结&试验报告(三)

    第五周课程总结 amp 试验报告 xff08 三 xff09 实验三 String类的应用 实验目的 掌握类String类的使用 xff1b 学会使用JDK帮助文档 xff1b 实验内容 1 已知字符串 xff1a 34 this is a
  • vue-cli中开发生产css注入形式不同导致bug

    开发环境和生产环境不同导致的差异 主要是css层级有变动 xff1b 开发环境只是单纯的使用了style loader进行style标签插入 xff0c 不进行额外的处理 xff0c 比如说资源合并和添加md5后缀等 xff0c 这样做是为
  • 【微信原生支付】服务商模式-小微商户专属接口:小微商户新增对应APPID关联API...

    文档地址 xff1a https pay weixin qq com wiki doc api xiaowei php chapter 61 20 3 amp index 61 3 这个接口比较特殊不需要nonce str和sign typ
  • 什么是OA系统?OA系统是什么?OA是什么意思?

    什么是oa xff1f oa是 xff1a 办公自动化 xff08 Office Automation 简称OA xff09 是将现代化办公和计算机网络功能结合起来的一种新型的办公方式 办公自动化没有统一的定义 xff0c 凡是在传统的办公
  • 黑群晖DSM 6.1网卡支持列表

    黑群晖DSM 6 1网卡支持列表 Network Drivers 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61
  • m3u8文件什么合成便于播放的MP4的方法

    先大家要知道M3U8文件不是一个视频文件 xff0c 里面全是一些路径 xff0c 说白了就是一个目录而已 xff0c 所以要看视频 xff0c 要找到对应存放视频的文件夹 如果不知道怎么找 xff0c 可以使用文本格式打开M3U8文件 x
  • ClamAV

    http www clamav net download html 转载于 https www cnblogs com diyunpeng p 5610209 html
  • C语言变量为何先定义后使用

    C语言中 xff0c 对变量的使用 xff0c 首先要先定义 说明其数据类型 原因可能如下 xff1a 1不同类型的变量 xff0c 其编码表示方式可能不同 2不同类型的变量 xff0c 其占有的空间大小不同 不事先说明无法在内存中开辟空间
  • 自定义控件sizechange问题

    自定义一个控件的时候 xff0c 放在容器里面 xff0c 显示后 xff0c 容器大小怎么改变没有异常 xff0c 但是如果把一个自定义控件放到另一个自定义控件的时候 xff0c 就有这样的问题 xff0c 就是自定义控件2成为了自定义控
  • odroid android 联想,ODROID-XU3

    En Ar Bg De El Es Fa Fi Fr Hi Hu It Ja Kn Ko Ms Nl Pl Pt Ru Sq Th Tr Uk Zh The ODROID XU3 is an ARM development board cr