Hass SDK version: Hi3559AV100_SDK_V2.0.1.0
Compiler version: aarch64-himix100-linux-gcc 6.3.0 (this version is a little problem, need to clear before use locale)
$ export LANG=C
The compiler installed by default to the / opt / hisi-linux / x86-arm under / aarch64-himix100-linu directory.
First, the compiler do a bit of small change.
The / opt / hisi-linux / x86-arm / aarch64-himix100-linux / target / usr link to / opt / hisi-linux / x86-arm / aarch64-himix100-linux / usr down
# cd /opt/hisi-linux/x86-arm/aarch64-himix100-linux
# ln -s ./target/usr usr
The / opt / hisi-linux / x86-arm / aarch64-himix100-linux / aarch64-linux-gnu link to / opt / hisi-linux / x86-arm / aarch64-himix100-linux / usr / lib / aarch64-linux- under gnu
# cd usr/lib
# ln -s /opt/hisi-linux/x86-arm/aarch64-himix100-linux/aarch64-linux-gnu aarch64-linux-gnu
/ Lib and include directory under the directory under the SDK Hass mpp / component / gpu / release catalog copy opt / hisi-linux / x86-arm / aarch64-himix100-linux usr directory
Then install third-party software-dependent QT
包括 zlib、sqlite3、util-linux、openssl、nspr、nss、libpng、icu、freetype、fontconfig、expat、eudev、dbus
The latest version of the Release selected source code can be downloaded
zlib sqlite3 util-linux libpng freetype fontconfig expat eudev dbus compilation method:
$ export LANG=C
$ ./configure --host=aarch64-himix100-linux --prefix=/opt/hisi-linux/x86-arm/aarch64-himix100-linux/usr
$ make -j8
# export LANG=C
# source /etc/profile # make install
icu download icu4c
Establish icupc directory at the same level source directory
$ export LANG=C
$ mkdir icupc
$ cd icupc
$ ../icu/source/runConfigureICU Linux/gcc
$ make $ cd ../icu/source $ ./configure --host=aarch64-himix100-linux --prefix=/opt/hisi-linux/x86-arm/aarch64-himix100-linux/usr --with-cross-build=/home/user/build/icupc
$ make -j8 # export LANG=C # source /etc/profile # make install
openssl:
$ ./config no-asm shared --prefix=/opt/hisi-linux/x86-arm/aarch64-himix100-linux/usr --openssldir=/opt/hisi-linux/x86-arm/aarch64-himix100-linux/usr
Edit Makefile, modify CROSS_COMPILE = aarch64-himix100-linux-, delete two -m64
nspr:
$ sed -ri 's#^(RELEASE_BINS =).*#\1#' pr/src/misc/Makefile.in $ sed -i 's#$(LIBRARY) ##' config/rules.mk $ ./configure --prefix=/usr --with-mozilla --with-pthreads --enable-64bit $ make -j8
A copy of the conf directory, a directory named conf_x86_64
$ export LANG=C
$ cp -r conf conf_x86_64
$ make clean
$ ./configure --host=aarch64-himix100-linux --prefix=/opt/hisi-linux/x86-arm/aarch64-himix100-linux/usr --with-pthreads --enable-64bit $ cp config_x86_64/nsinstall config $ cp config_x86_64/nsinstall.o config $ make -j8
# export LANG=C # source /etc/profile # make install
nss:
The patch placed in the root directory of the source
$ patch -Np1 -i ./nss-3.44-standalone-1.patch
$ cd nss
$ make -j1 BUILD_OPT=1 NSPR_INCLUDE_DIR=/usr/include/nspr USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz NSS_ENABLE_WERROR=0 USE_64=1 NSS_USE_SYSTEM_SQLITE=1 $ make clean
$ export LANG=C
$ make -j1 BUILD_OPT=1 NSPR_INCLUDE_DIR=/opt/hisi-linux/x86-arm/aarch64-himix100-linux/usr/include/nspr USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz NSS_ENABLE_WERROR=0 NSS_USE_SYSTEM_SQLITE=1 CC=aarch64-himix100-linux-gcc CCC=aarch64-himix100-linux-g++ RANLIB=aarch64-himix100-linux-ranlib OS_TEST=aarch64 USE_64=1
After three files in error coreconf / nsinstall / Linux5.0_x86_64_cc_glibc_PTH_64_OPT.OBJ catalog copy to coreconf / nsinstall / Linux5.0_aarch64_aarch64-himix100- linux-gcc_glibc_PTH_64_OPT.OBJ replacement directory (the directory name and the Linux kernel version related), then the above make command continues
two files after a second given cmd / shlibsign / Linux5.0_x86_64_cc_glibc_PTH_64_OPT.OBJ catalog copy cmd / shlibsign / under Linux5.0_aarch64_aarch64-himix100-linux-gcc_glibc_PTH_64_OPT.OBJ replacement directory (directory Linux kernel version name and number about), then proceed to make the above command
Be careful not to multi-threaded compilation
installation:
$ cd ../dist/Linux5.0_aarch64_aarch64-himix100-linux-gcc_glibc_PTH_64_OPT.OBJ
# install -v -m755 lib/*.so /opt/hisi-linux/x86-arm/aarch64-himix100-linux/usr/lib
# install -v -m644 lib/{*.chk,libcrmf.a} /opt/hisi-linux/x86-arm/aarch64-himix100-linux/usr/lib
# install -v -m755 -d /opt/hisi-linux/x86-arm/aarch64-himix100-linux/usr/include/nss
# cp -v -RL ../{public,private}/nss/* /opt/hisi-linux/x86-arm/aarch64-himix100-linux/usr/include/nss
# chmod -v 644 /opt/hisi-linux/x86-arm/aarch64-himix100-linux/usr/include/nss/*
# install -v -m755 bin/{certutil,nss-config,pk12util} /opt/hisi-linux/x86-arm/aarch64-himix100-linux/usr/bin
# install -v -m644 lib/pkgconfig/nss.pc /opt/hisi-linux/x86-arm/aarch64-himix100-linux/usr/lib/pkgconfig
At this point, QT rely on third-party software installation is complete
The open / opt / hisi-linux / x86-arm / aarch64-himix100-linux / usr / lib / pkgconfig and / opt / hisi-linux / x86-arm / aarch64-himix100-linux / usr / share / pkgconfig catalog all .pc file, the path to which all the / opt / hisi-linux / x86-arm / aarch64-himix100-linux deleted.
Configure and compile QT:
QT into the source directory, enter qtbase / mkspecs directory, copy linux-aarch64-gnu-g ++ directory linux-aarch64-himix100 directory, enter linux-aarch64-himix100 directory, open qmake.conf file, modify the following
#
# qmake configuration for building with aarch64-linux-gnu-g++
#
#MACRO := -DEGL_EGLEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES \
# -DEGL_FBDEV -DEGL_API_FBDEV -DEGL_API_MIDGARD -DPLATFORM_MALI700
MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib include(../common/linux.conf) include(../common/gcc-base-unix.conf) include(../common/g++-unix.conf) QMAKE_LIBS_EGL += -lmali QMAKE_LIBS_OPENGL_ES2 += -lmali DEFINES += EGL_EGLEXT_PROTOTYPES GL_GLEXT_PROTOTYPES EGL_FBDEV EGL_API_FBDEV EGL_API_MIDGARD PLATFORM_MALI700 # modifications to g++.conf QMAKE_CC = aarch64-himix100-linux-gcc QMAKE_CXX = aarch64-himix100-linux-g++ QMAKE_LINK = aarch64-himix100-linux-g++ QMAKE_LINK_SHLIB = aarch64-himix100-linux-g++ # modifications to linux.conf QMAKE_AR = aarch64-himix100-linux-ar cqs QMAKE_OBJCOPY = aarch64-himix100-linux-objcopy QMAKE_NM = aarch64-himix100-linux-nm -P QMAKE_STRIP = aarch64-himix100-linux-strip load(qt_config)
New build_hisi.sh QT file in the root directory of the source, content
#!/bin/bash
./configure -v \
-extprefix /home/user/soft/QT5.12_hisi \
-recheck-all \
-opensource -confirm-license \
-release -shared \ -xplatform linux-aarch64-himix100 \ -sysroot /opt/hisi-linux/x86-arm/aarch64-himix100-linux/target \ -no-gcc-sysroot -pkg-config \ -nomake examples -nomake tests -make libs
Configuration:
$ export LANG=C $ chmod a+x build_hisi.sh $ ./build_hisi.sh
Installation can be compiled without error and the following configuration
Building on: linux-g++ (x86_64, CPU features: mmx sse sse2) Building for: linux-aarch64-himix100 (arm64, CPU features: neon) Target compiler: gcc 6.3.0 Configuration: cross_compile compile_examples enable_new_dtags largefile neon precompile_header shared rpath release c++11 c++14 concurrent dbus reduce_exports stl Build options: Mode ................................... release Optimize release build for size ........ no Building shared libraries .............. yes Using C standard ....................... C11 Using C++ standard ..................... C++14 Using ccache ........................... no Using gold linker ...................... no Using new DTAGS ........................ yes Using precompiled headers .............. yes Using LTCG ............................. no Target compiler supports: NEON ................................. yes Build parts ............................ libs Qt modules and options: Qt Concurrent .......................... yes Qt D-Bus ............................... yes Qt D-Bus directly linked to libdbus .... yes Qt Gui ................................. yes Qt Network ............................. yes Qt Sql ................................. yes Qt Testlib ............................. yes Qt Widgets ............................. yes Qt Xml ................................. yes Support enabled for: Using pkg-config ....................... yes udev ................................... yes Using system zlib ...................... yes Qt Core: DoubleConversion ....................... yes Using system DoubleConversion ........ no GLib ................................... no iconv .................................. no ICU .................................... yes Tracing backend ........................ <none> Logging backends: journald ............................. no syslog ............................... no slog2 ................................ no Using system PCRE2 ..................... no Qt Network: getifaddrs() ........................... yes IPv6 ifname ............................ yes libproxy ............................... no Linux AF_NETLINK ....................... yes OpenSSL ................................ yes Qt directly linked to OpenSSL ........ yes OpenSSL 1.1 ............................ yes DTLS ................................... yes SCTP ................................... no Use system proxies ..................... yes Qt Gui: Accessibility .......................... yes FreeType ............................... yes Using system FreeType ................ yes HarfBuzz ............................... yes Using system HarfBuzz ................ no Fontconfig ............................. yes Image formats: GIF .................................. yes ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... no PNG .................................. yes Using system libpng ................ yes EGL .................................... yes OpenVG ................................. no OpenGL: Desktop OpenGL ....................... no OpenGL ES 2.0 ........................ yes OpenGL ES 3.0 ........................ yes OpenGL ES 3.1 ........................ yes OpenGL ES 3.2 ........................ yes Vulkan ................................. no Session Management ..................... yes Features used by QPA backends: evdev .................................. yes libinput ............................... no INTEGRITY HID .......................... no mtdev .................................. no tslib .................................. no xkbcommon .............................. no X11 specific: XLib ................................. no XCB Xlib ............................. no EGL on X11 ........................... no QPA backends: DirectFB ............................... no EGLFS .................................. yes EGLFS details: EGLFS OpenWFD ........................ no EGLFS i.Mx6 .......................... no EGLFS i.Mx6 Wayland .................. no EGLFS RCAR ........................... no EGLFS EGLDevice ...................... no EGLFS GBM ............................ no EGLFS VSP2 ........................... no EGLFS Mali ........................... no EGLFS Raspberry Pi ................... no EGLFS X11 ............................ no LinuxFB ................................ yes VNC .................................... yes Mir client ............................. no Qt Sql: SQL item models ........................ yes Qt Widgets: GTK+ ................................... no Styles ................................. Fusion Windows Qt PrintSupport: CUPS ................................... no Qt Sql Drivers: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. no OCI (Oracle) ........................... no ODBC ................................... no PostgreSQL ............................. no SQLite2 ................................ no SQLite ................................. yes Using system provided SQLite ......... no TDS (Sybase) ........................... no Qt Testlib: Tester for item models ................. yes Qt SerialBus: Socket CAN ............................. yes Socket CAN FD .......................... yes Qt QML: QML network support .................... yes QML debugging and profiling support .... yes QML sequence object .................... yes QML list model ......................... yes QML XML http request ................... yes QML Locale ............................. yes QML delegate model ..................... yes Qt Quick: Direct3D 12 ............................ no AnimatedImage item ..................... yes Canvas item ............................ yes Support for Qt Quick Designer .......... yes Flipable item .......................... yes GridView item .......................... yes ListView item .......................... yes TableView item ......................... yes Path support ........................... yes PathView item .......................... yes Positioner items ....................... yes Repeater item .......................... yes ShaderEffect item ...................... yes Sprite item ............................ yes Qt Scxml: ECMAScript data model for QtScxml ...... yes Qt Gamepad: SDL2 ................................... no Qt 3D: Assimp ................................. yes System Assimp .......................... no Output Qt3D Job traces ................. no Output Qt3D GL traces .................. no Use SSE2 instructions .................. no Use AVX2 instructions .................. no Aspects: Render aspect ........................ yes Input aspect ......................... yes Logic aspect ......................... yes Animation aspect ..................... yes Extras aspect ........................ yes Qt 3D Renderers: OpenGL Renderer ........................ yes Qt 3D GeometryLoaders: Autodesk FBX ........................... no Qt Wayland Client ........................ no Qt Wayland Compositor .................... no Qt Bluetooth: BlueZ .................................. no BlueZ Low Energy ....................... no Linux Crypto API ....................... no WinRT Bluetooth API (desktop & UWP) .... no Qt Sensors: sensorfw ............................... no Qt Quick Controls 2: Styles ................................. Default Fusion Imagine Material Universal Qt Quick Templates 2: Hover support .......................... yes Multi-touch support .................... yes Qt Positioning: Gypsy GPS Daemon ....................... no WinRT Geolocation API .................. no Qt Location: Qt.labs.location experimental QML plugin . yes Geoservice plugins: OpenStreetMap ........................ yes HERE ................................. yes Esri ................................. yes Mapbox ............................... yes MapboxGL ............................. yes Itemsoverlay ......................... yes QtXmlPatterns: XML schema support ..................... yes Qt Multimedia: ALSA ................................... no GStreamer 1.0 .......................... no GStreamer 0.10 ......................... no Video for Linux ........................ yes OpenAL ................................. no PulseAudio ............................. no Resource Policy (libresourceqt5) ....... no Windows Audio Services ................. no DirectShow ............................. no Windows Media Foundation ............... no Qt Tools: QDoc ................................... yes Qt WebEngine: Embedded build ......................... yes Pepper Plugins ......................... no Printing and PDF ....................... no Proprietary Codecs ..................... no Spellchecker ........................... yes Native Spellchecker .................... no WebRTC ................................. no Use System Ninja ....................... no Geolocation ............................ yes WebChannel support ..................... yes Use v8 snapshot ........................ yes Kerberos Authentication ................ no Building v8 snapshot supported ......... yes Use ALSA ............................... no Use PulseAudio ......................... no Optional system libraries used: re2 .................................. no icu .................................. no libwebp, libwebpmux and libwebpdemux . no opus ................................. no ffmpeg ............................... no libvpx ............................... no snappy ............................... no glib ................................. no zlib ................................. yes minizip .............................. no libevent ............................. no jsoncpp .............................. no protobuf ............................. no libxml2 and libxslt .................. no lcms2 ................................ no png .................................. yes JPEG ................................. no harfbuzz ............................. no freetype ............................. yes x11 .................................. no Required system libraries: fontconfig ........................... yes dbus ................................. yes nss .................................. yes khr .................................. yes glibc ................................ yes Required system libraries for qpa-xcb: libdrm ............................... no xcomposite ........................... no xcursor .............................. no xi ................................... no xtst ................................. no
Compile and install:
$ make -j8 $ make install
Before the command indicates the average user $, # represents the root user, can be switched by the user to root sudo su