From 718f074efbba9130fe8622b85313c75d777abe11 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 13 Sep 2022 11:25:15 +0800 Subject: [PATCH] add some more... --- README.md | 10 ++++++---- markdown/README_zh.md | 29 +++++++++++++++++++++++++++++ markdown/native_compile_qt.md | 27 +++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 markdown/README_zh.md diff --git a/README.md b/README.md index 3e24dd1..b9429fc 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,15 @@ This repo holds precompiled qt sources for aarch64-linux (armv8), mostly used by Embeded Linux Devices. -# General Usage +[中文文档](./markdown/README_zh.md) + +## General Usage There are currently two sorts of releases, the cross compiled and native compiled. + The previous was compiled and mainly used in **x86_64**. When you setup the enviroment and the corss compiler correctly, you may build the binary file for target system. If you want to run it, send it to the target system and execute it. + The later one was used in native **aarch64** enviroment, just setup the enviroment, then you can build and run your applications natively. -## Cross Compile: +## Cross Compile Before you setup the qt, you'll need to get a cross compiler. See [set_cross_compiler](./markdown/set_cross_compiler.md) for more details. @@ -16,6 +18,6 @@ Follow the [cross_compile_qt](./markdown/cross_compile_qt.md) for more instructi -## Native Comile: +## Native Comile -See [native_compile_qt](./markdown/native_compile_qt.md). for more details. \ No newline at end of file +See [native_compile_qt](./markdown/native_compile_qt.md) for more details. \ No newline at end of file diff --git a/markdown/README_zh.md b/markdown/README_zh.md new file mode 100644 index 0000000..8dd9b29 --- /dev/null +++ b/markdown/README_zh.md @@ -0,0 +1,29 @@ +# qt-aarch64 + +由于部分国产主机采用的是armv8架构CPU,在编译部分qt程序时会遇见版本较低的情况。软件包管理中也无法安装更新版本。于是专门编译aarch64架构下的qt,可直接下载后设置环境变量使用。 + +## 通用方式 + +目前编译好的文件分为两种形式: + +1. 交叉编译版本:此版能在x86_64上的Linux系统进行编译,前提需要一个交叉编译器,此处采用的是[gcc-Linaro](http://releases.linaro.org/components/toolchain/binaries/),只需下载合适版本的编译器,便可以交叉编译aarch64可执行文件。将可执行文件和库文件复制到aarch64主机上便可以运行。 + + +目前对应的情况如下: + +|Ubuntu 版本|主机GCC版本|交叉编译器GCC版本| +|----|----|----| +|16.04|gcc-5|gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu| +|18.04|gcc-7|gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu| + +更多等待添加... + + +2. 本地编译版本:直接在aarch64架构主机上编译的qt,此版本设置好环境变量后直接可以使用,使用原生编译器即可。 + +所有的编译尽量降低了平台无关性,也可以尝试使用更高版本编译器进行编译,(让我知道哪些能用更好)。 + + +3. 与qtcreator结合使用: 需要在qtcreator的kits中设置qmake和编译器。可以参考[看图就知道设置什么](./cross_compile_qt.md#intergrated-with-qtcreator) + +有能力还是别用qtcreator... 自己动手写(QtWidgets, qml)吧。我都不知道放个库上来会不会违反LGPL协议。 \ No newline at end of file diff --git a/markdown/native_compile_qt.md b/markdown/native_compile_qt.md index e69de29..2bbf5e6 100644 --- a/markdown/native_compile_qt.md +++ b/markdown/native_compile_qt.md @@ -0,0 +1,27 @@ +# Native Compiled Qt Setup Guide + ++ Download the prebuild release. Extract the file to `/opt` + +```SHELL +sudo tar xvf qt-5.12.12-aarch64.tar.gz -C /opt +``` + ++ Setup enviroment + +```SHELL +echo "export PATH=/opt/qt-5.12.12/bin:$PATH" >> ~/.bashrc +source ~/.bashrc +``` + ++ Try qmake. + +```SHELL +qmake --version +``` + +# Intergrated with qtcreator + +See [Intergrated_Guide](./cross_compile_qt.md#intergrated-with-qtcreator). + + +**Note:** In native compile, both your binaries and libraires are aarch64 object, so feel free to use the qtcreator for building or executing. \ No newline at end of file