packages prepared before compile: qt-everywhere-opensource-src-4.7.0.tar.gz freescale SDK 1、install compile enviroment, run the instruction as follows:(my vm machine os is ubuntu) sudo apt-get install patch g++ rpm zlib1g-dev m4 bison libncurses5-dev libglib2.0-dev gettext build-essential tcl intltool libxml2-dev liborbit2-dev libx11-dev ccache flex uuid-dev liblzo2-dev x11proto-core-dev libdbus-glib-1-dev libgtk2.0-dev libdbus-glib-1-dev 2、extract qt-everywhere-opensource-src-4.6.2.tar.gz tar zxvf qt-everywhere-opensource-src-4.6.2.tar.gz 3、install freescale SDK, my sdk is if install succeed, you can get ltib in path /home/user/LTIB, get cross-compile enviroment and package(for compile linux kernel) in path /opt/freescale 4、compile linux kernel to get libs needed by compileing QT cd /home/user/LTIB ./ltib -m comfig you had to select these packages [x] amd-gpu-bin-mx51(get opengl libs and head files) [x] freetype [x] glib2 [x] gstreamer [x] gstreamer-plugins-base [x] gstreamer-plugins-good [x] gstreamer-plugins-ugly [x] libxml2 [x] tslib [x] zlib and remember select x11 package then run sudo ./ltib to build the kernel 5、compile QT cd qt-everywhere-opensource-src-4.7.0 modify file /mkspecs/qws/linux-arm-g++/qmake.conf, relace the file as follows: # # qmake configuration for building with arm-none-linux-gnueabi-g++ # QMAKE_CC = arm-none-linux-gnueabi-gcc QMAKE_CFLAGS += -pipe QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += -Wall -W QMAKE_CFLAGS_WARN_OFF += -w QMAKE_CFLAGS_RELEASE += -O2 QMAKE_CFLAGS_DEBUG += -g QMAKE_CFLAGS_SHLIB += -fPIC QMAKE_CFLAGS_STATIC_LIB += -fPIC QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} QMAKE_CXX = arm-none-linux-gnueabi-g++ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE QMAKE_LINK = arm-none-linux-gnueabi-g++ QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++ QMAKE_LINK_C = arm-none-linux-gnueabi-gcc QMAKE_LINK_C_SHLIB = arm-none-linux-gnueabi-gcc QMAKE_LFLAGS += QMAKE_LFLAGS_RELEASE += -Wl,-O1 QMAKE_LFLAGS_DEBUG += QMAKE_LFLAGS_APP += QMAKE_LFLAGS_SHLIB += -shared QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_SONAME += -Wl,-soname, QMAKE_LFLAGS_THREAD += QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined QMAKE_LFLAGS_RPATH = -Wl,-rpath, QMAKE_PCH_OUTPUT_EXT = .gch # -Bsymbolic-functions (ld) support QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, QMAKE_CFLAGS_THREAD += -D_REENTRANT QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD QMAKE_INCDIR = /home/user/LTIB/rootfs/usr/include QMAKE_LIBDIR = /home/user/LTIB/rootfs/usr/lib QMAKE_INCDIR_X11 = QMAKE_LIBDIR_X11 = QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] QMAKE_INCDIR_OPENGL = /home/user/LTIB/rootfs/usr/include/GLES2 QMAKE_LIBDIR_OPENGL = /home/user/LTIB/rootfs/usr/lib QMAKE_INCDIR_POWERVR = /home/user/LTIB/rootfs/usr/include QMAKE_INCDIR_OPENGL_ES1 = /home/user/LTIB/rootfs/usr/include/GLES QMAKE_LIBDIR_OPENGL_ES1 = /home/user/LTIB/rootfs/usr/lib QMAKE_INCDIR_OPENGL_ES1CL = /home/user/LTIB/rootfs/usr/include/GLES QMAKE_LIBDIR_OPENGL_ES1CL = /home/user/LTIB/rootfs/usr/lib QMAKE_INCDIR_OPENGL_ES2 = /home/user/LTIB/rootfs/usr/include/GLES2 QMAKE_LIBDIR_OPENGL_ES2 = /home/user/LTIB/rootfs/usr/lib QMAKE_INCDIR_EGL = /home/user/LTIB/rootfs/usr/include/EGL QMAKE_LIBDIR_EGL = /home/user/LTIB/rootfs/usr/lib QMAKE_INCDIR_OPENVG = QMAKE_LIBDIR_OPENVG = QMAKE_LIBS = -lglib-2.0 -lgthread-2.0 -lgstreamer-0.10 -lxml2 -lz -lgmodule-2.0 -lgobject-2.0 -lts -lasound -lgsl -lpanel2 -lEGL -lX11 -lXrender -lXext -lxcb-xlib -lXau -lxcb QMAKE_LIBS_DYNLOAD = -ldl QMAKE_LIBS_X11 = QMAKE_LIBS_X11SM = QMAKE_LIBS_NIS = -lnsl QMAKE_LIBS_EGL = -lEGL QMAKE_LIBS_OPENGL = -lGLESv2 QMAKE_LIBS_OPENGL_QT = -lGL QMAKE_LIBS_OPENGL_ES1 = -lGLESv1_CM QMAKE_LIBS_OPENGL_ES1CL = -lGLES_CL QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 QMAKE_LIBS_OPENVG = -lOpenVG QMAKE_LIBS_THREAD = -lpthread QMAKE_LIBS_EGL = -lEGL QMAKE_MOC = $$[QT_INSTALL_BINS]/moc QMAKE_UIC = $$[QT_INSTALL_BINS]/uic QMAKE_AR = arm-none-linux-gnueabi-ar cqs QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy QMAKE_RANLIB = arm-none-linux-gnueabi-ranlib QMAKE_TAR = tar -cf QMAKE_GZIP = gzip -9f QMAKE_COPY = cp -f QMAKE_COPY_FILE = $(COPY) QMAKE_COPY_DIR = $(COPY) -r QMAKE_MOVE = mv -f QMAKE_DEL_FILE = rm -f QMAKE_DEL_DIR = rmdir QMAKE_STRIP = arm-none-linux-gnueabi-strip QMAKE_STRIPFLAGS_LIB += --strip-unneeded QMAKE_CHK_DIR_EXISTS = test -d QMAKE_MKDIR = mkdir -p QMAKE_INSTALL_FILE = install -m 644 -p QMAKE_INSTALL_PROGRAM = install -m 755 -p MAKEFILE_GENERATOR = UNIX TEMPLATE = app CONFIG += qt warn_on release incremental link_prl QT += core gui network QMAKE_INCREMENTAL_STYLE = sublib load(qt_config) input instrcution: ./configure -opensource -confirm-license -release -shared -embedded arm -xplatform qws/linux-arm-g++ -depths 16,18,24 -fast -optimized-qmake -pch -qt-sql-sqlite -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -opengl es2 -nomake examples -nomake demo -nomake docs -fast make make install GAME OVER |
|