cross compile of qt 4.8.5 for friendlyarm tiny 6410

sachin
hello, can anyone tell me how to cross compile of qt 4.8.5 for friendlyarm
tiny 6410??

Gautam
Try this from the official QT web site:

1. http://doc.qt.io/qt-4.8/qt-embedded-crosscompiling.html

Here are couple of links I found helpful. Although they are for the Qt
4.6.3 on mini2440, just make the relevant changes for the tiny 6410 using
the QT 4.8.5 sources.

2. https://suchakra.wordpress.com/2011/05/17/qt-on-mini2440/
3. https://suchakra.wordpress.com/tag/qt/
4. https://suchakra.wordpress.com/2011/05/30/developing-qt-apps/

Good luck,

Gautam

sachin
thanks @Gautam...

sachin
1. tslib compilation
$cd /usr/local
$git clone http://github.com/kergoth/tslib.git
$export PATH=/usr/local/arm/4.3.2/bin:$PATH
$export CROSS_COMPILE=arm-none-linux-gnueabi-
$export CC=${CROSS_COMPILE}gcc
$export CFLAGS=-march=armv4t
$export CXX=${CROSS_COMPILE}"g++"
$export AR=${CROSS_COMPILE}"ar"
$export AS=${CROSS_COMPILE}"as"
$export RANLIB=${CROSS_COMPILE}"ranlib"
$export LD=${CROSS_COMPILE}"ld"
$export STRIP=${CROSS_COMPILE}"strip"
$export ac_cv_func_malloc_0_nonnull=yes
$cd /usr/local/tslib
$./autogen-clean.sh
$./autogen.sh
$./configure --host=arm-linux --prefix=/home/tslib --enable-shared=yes
--enable-static=yes
$make
$make install




i followed this steps for first tslib installation but when i checked file
libts-1.0.so.0.0.0 in lib file then i got following output==>
libts-1.0.so.0.0.0: ELF 32-bit LSB shared object, "Intel 80386", version 1
(SYSV), dynamically linked,
BuildID[sha1]=0xd113e8e6a6562ca3bd32f286ed9611919adc9a44, not stripped

i want arm instead of that Intel 80386??

sachin
my all steps are executed properly but cross compiler not build

davef
On the command line:
  arm-linux-gcc -v

sachin
Using built-in specs.
COLLECT_GCC=arm-linux-gcc
COLLECT_LTO_WRAPPER=/home/sachin/Documents/ARM_CROSS_COMPILER/fsl-linaro-toolcha
in/bin/../libexec/gcc/arm-fsl-linux-gnueabi/4.6.2/lto-wrapper
Target: arm-fsl-linux-gnueabi
Configured with: /work/build/.build/src/gcc-linaro-4.6-2011.06-0/configure
--build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu
--target=arm-fsl-linux-gnueabi --prefix=/work/fsl-linaro-toolchain-2.13
--with-sysroot=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs
--enable-languages=c,c++ --with-pkgversion='Freescale MAD -- Linaro 2011.07
-- Built at 2011/08/10 09:20' --enable-__cxa_atexit --disable-libmudflap
--disable-libgomp --disable-libssp
--with-gmp=/work/build/.build/arm-fsl-linux-gnueabi/build/static
--with-mpfr=/work/build/.build/arm-fsl-linux-gnueabi/build/static
--with-mpc=/work/build/.build/arm-fsl-linux-gnueabi/build/static
--with-ppl=/work/build/.build/arm-fsl-linux-gnueabi/build/static
--with-cloog=/work/build/.build/arm-fsl-linux-gnueabi/build/static
--with-libelf=/work/build/.build/arm-fsl-linux-gnueabi/build/static
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm
-L/work/build/.build/arm-fsl-linux-gnueabi/build/static/lib -lpwl'
--enable-threads=posix --enable-target-optspace --enable-plugin
--enable-multilib
--with-local-prefix=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-
libs
--disable-nls --enable-c99 --enable-long-long --with-system-zlib
Thread model: posix
gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 --
Built at 2011/08/10 09:20)

sachin
i cant understand what is issue?

sachin
./configure --host=arm-linux --prefix=/home/tslib --enable-shared=yes
--enable-static=yes
i am executing this command and search for below so foolowing term not
change to arm

checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu

Gautam
Sachin,

What is the output of:

$arm-none-linux-gnueabi-gcc -v

(P.S. Your CROSS_COMPILE env variable is set to "arm-none-linux-gnueabi-"
not "arm-linux-")

Also check the generated Makefile for occurrences of "i686-pc-linux-gnu"
see if they seem appropriate.

sachin
output for arm-none-linux-gnueabi-gcc -v ===>>

Using built-in specs.
COLLECT_GCC=arm-linux-gcc
COLLECT_LTO_WRAPPER=/home/sachin/Documents/ARM_CROSS_COMPILER/fsl-linaro-toolcha

in/bin/../libexec/gcc/arm-fsl-linux-gnueabi/4.6.2/lto-wrapper
Target: arm-fsl-linux-gnueabi
Configured with: /work/build/.build/src/gcc-linaro-4.6-2011.06-0/configure
--build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu
--target=arm-fsl-linux-gnueabi --prefix=/work/fsl-linaro-toolchain-2.13
--with-sysroot=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs
--enable-languages=c,c++ --with-pkgversion='Freescale MAD -- Linaro 2011.07
-- Built at 2011/08/10 09:20' --enable-__cxa_atexit --disable-libmudflap
--disable-libgomp --disable-libssp
--with-gmp=/work/build/.build/arm-fsl-linux-gnueabi/build/static
--with-mpfr=/work/build/.build/arm-fsl-linux-gnueabi/build/static
--with-mpc=/work/build/.build/arm-fsl-linux-gnueabi/build/static
--with-ppl=/work/build/.build/arm-fsl-linux-gnueabi/build/static
--with-cloog=/work/build/.build/arm-fsl-linux-gnueabi/build/static
--with-libelf=/work/build/.build/arm-fsl-linux-gnueabi/build/static
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm
-L/work/build/.build/arm-fsl-linux-gnueabi/build/static/lib -lpwl'
--enable-threads=posix --enable-target-optspace --enable-plugin
--enable-multilib
--with-local-prefix=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-

libs
--disable-nls --enable-c99 --enable-long-long --with-system-zlib
Thread model: posix
gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 --
Built at 2011/08/10 09:20)

sachin
i am follow these steps==>

#!/bin/sh

#export
CROSS_COMPILE=/home/sachin/Documents/ARM_CROSS_COMPILER/fsl-linaro-toolchain/bin
/arm-fsl-linux-gnueabi-
export
CC=/home/sachin/Documents/ARM_CROSS_COMPILER/fsl-linaro-toolchain/bin/arm-fsl-li
nux-gnueabi-gcc
export CFLAGS=-march=armv4t
export
CXX=/home/sachin/Documents/ARM_CROSS_COMPILER/fsl-linaro-toolchain/bin/arm-fsl-l
inux-gnueabi-g++ 
export
AR=/home/sachin/Documents/ARM_CROSS_COMPILER/fsl-linaro-toolchain/bin/arm-fsl-li
nux-gnueabi-ar 
export
AS=/home/sachin/Documents/ARM_CROSS_COMPILER/fsl-linaro-toolchain/bin/arm-fsl-li
nux-gnueabi-as
export
RANLIB=/home/sachin/Documents/ARM_CROSS_COMPILER/fsl-linaro-toolchain/bin/arm-fs
l-linux-gnueabi-ranlib
export
LD=/home/sachin/Documents/ARM_CROSS_COMPILER/fsl-linaro-toolchain/bin/arm-fsl-li
nux-gnueabi-ld
export
STRIP=/home/sachin/Documents/ARM_CROSS_COMPILER/fsl-linaro-toolchain/bin/arm-fsl
-linux-gnueabi-strip
export ac_cv_func_malloc_0_nonnull=yes
sudo ./autogen-clean.sh
./autogen.sh
sudo ./configure --host=arm-fsl-linux-gnueabi --prefix=/home/tslib
--enable-shared=yes --enable-static=yes
sudo make
sudo make install

davef
It has been a few years since I did this stuff from scratch but do you need
either:

--build xyz or
--target xyz

on the ./configure command

sachin
ok i ll try by using these..

davef
--host=arm-linux-gnu --build-i386-linux-gnu

appears in most of my compile scripts.  I think this is for building on a
PC running Ubuntu.

sachin
hello i have try theses but not worked....

this is single script file for tslib compilation "tslib.sh" ==> 

export
CROSS_COMPILE=/home/sachin/opt/FriendlyARM/toolschain/4.5.1/bin/arm-fsl-linux-gn
ueabi-
export CC=${CROSS_COMPILE}"gcc"
export CFLAGS=-march=armv7-a
export CXX=${CROSS_COMPILE}"g++" 
export AR=${CROSS_COMPILE}"ar" 
export AS=${CROSS_COMPILE}"as"
export RANLIB=${CROSS_COMPILE}"ranlib"
export LD=${CROSS_COMPILE}"ld"
export STRIP=${CROSS_COMPILE}"strip"
export ac_cv_func_malloc_0_nonnull=yes
sudo ./autogen-clean.sh
sudo ./autogen.sh
sudo ./configure --host=arm-fsl-linux-gnueabi --build=i386-linux-gnu
--prefix=/home/tslib --enable-shared=yes --enable-static=yes
sudo make
sudo make install

davef
Are there any error messages?

I would comment out the last two lines and just run the ./configure line
and see if that is successful. Then sudo make and lastly sudo make install.

sachin
above ./configure command is executed succesfully without any error but
when i checked cd /home/tslib/lib in that libts file....and i run the
following command to check cross compiler is created or not...

file libts

it shows only "intel" and i want "arm" instead of these.

sachin
sachin@Atishay:~/Documents/tslib$ sudo ./configure
--host=arm-fsl-linux-gnueabi --prefix=/home/tslib --enable-shared=yes
--enable-static=yes
[sudo] password for sachin: 
configure: WARNING: if you wanted to set the --build type, don't use
--host.
    If a cross compiler is detected then cross compile mode will be used
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-fsl-linux-gnueabi-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for arm-fsl-linux-gnueabi-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking whether the C compiler supports -fvisibility=hidden... yes
checking whether to use -fvisibility=hidden... yes
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking build system type... i686-pc-linux-gnu
checking host system type... arm-fsl-linux-gnueabi
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... no
checking for arm-fsl-linux-gnueabi-dumpbin... no
checking for arm-fsl-linux-gnueabi-link... no
checking for dumpbin... no
checking for link... link -dump
checking the name lister (nm) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-linux-gnu file names to
arm-fsl-linux-gnueabi format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format...
func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for arm-fsl-linux-gnueabi-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for arm-fsl-linux-gnueabi-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for arm-fsl-linux-gnueabi-ar... no
checking for ar... ar
checking for archiver @FILE support... @
checking for arm-fsl-linux-gnueabi-strip... strip
checking for arm-fsl-linux-gnueabi-ranlib... no
checking for ranlib... ranlib
checking command to parse nm output from gcc object... ok
checking for sysroot... no
checking for arm-fsl-linux-gnueabi-mt... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries...
yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for dlopen in -ldl... (cached) yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking whether gcc needs -traditional... no
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking return type of signal handlers... void
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking for vprintf... yes
checking for _doprnt... no
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for munmap... yes
checking for select... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strtoul... yes
checking whether linear module is requested... yes
checking whether dejitter module is requested... yes
checking whether linear-h2200 module is requested... yes
checking whether variance module is requested... yes
checking whether pthres module is requested... yes
checking whether ucb1x00 module is requested... yes
checking whether cy8mrln-palmpre module is requested... no
checking whether corgi module is requested... yes
checking whether collie module is requested... yes
checking whether h3600 module is requested... yes
checking whether mk712 module is requested... yes
checking whether arctic2 module is requested... yes
checking whether tatung module is requested... yes
checking whether dmc module is requested... yes
checking whether input module is requested... yes
checking whether touchkit module is requested... yes
checking whether galax module is requested... yes
checking where to place modules... ${libdir}/ts
checking whether to enable debugging... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating etc/Makefile
config.status: creating plugins/Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating tslib.pc
config.status: creating tslib-1.0.pc
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands




ranlib,cc,gcc,ld etc value are not taking...i m confused with above output

davef
Have you read through this tutorial?
http://mini2440vietnam.blogspot.co.nz/2011/04/upgrade-qt462-in-mini2440....

Does 

   readelf -a <filename>

give the same "intel" result as file libts?

> If a cross compiler is detected then cross compile mode will be used
and
> checking for arm-fsl-linux-gnueabi-gcc... no

Seems to be suggesting that the correct toolchain is not found.

sachin
yes i have followed same site for tslib installation and for checking libts
file give the same result "intel"

do have any site for downloading proper toochain?

davef
I checked the downloads page under 6410 and don't see a toolchain.  Try the
Downloads Server.

Think they are having a problems on the site, at the moment

sachin
@davef
cant solved issue....how i install new toolchain for ARM for this cross
compiling rather than old one...i think toolchain is the issue here...

sachin
all issue get solved...

sachin
*********************************************
INSTALLATION PROCEDURE FOR tslib LIBRARY ==>
*********************************************

->first downloaded from the Internet tslib-1.0.tar.gz 
->Extract the tar xvzf tslib-1.0.tar.gz
->then follow the script tslib.sh and check the variable path and all
->uncomment the first line in tslib/etc/ts_conf file 
  # Uncomment if you wish to use the linux input layer event interface
   module_raw input

******************************************************
ERROR AND SOLUTION DURING INSTALLATION OF TSLIB ===>
******************************************************
1. ./autogen.sh: 4: ./autogen.sh: autoreconf: not found
sol : sudo apt-get install autoconf

2. autoreconf: failed to run libtoolize: No such file or directory
sol : sudo apt-get install build-essential libtool

3. undefined reference to `rpl_malloc '
sol :configure, add option ac_cv_func_malloc_0_nonnull = yes

2. Couldnt open tslib config file

sol :ts.conf path is not set correctly;

3. No raw modules loaded.ts_config: No such file or directory

sol :Enter the module directory is set correctly set ts directory Or the
tslib library does not edit the input module In the tslib library source
tslib / etc / ts.conf remove module_raw input before # and spaces removed,
and then run the compiled copy operation;

4. / Usr/include/bits/fcntl2.h: 51:24: error: call to '__open_missing_mode'
declared with attribute error: open with O_CREAT in second argument needs 3
arguments
 In function 'open',
     inlined from 'main' at ts_calibrate.c: 229:11:
 / Usr/include/bits/fcntl2.h: 51:24: error: call to '__open_missing_mode'
declared with attri 

sol :
  / / source file / / if ((calfile = the getenv (TSLIB_CALIBFILE "))! =
NULL) {/ / cal_fd = open (calfile, O_CREAT | O_RDWR); / /}   else {/ /
cal_fd = open ( "/ etc / pointercal", O_CREAT | O_RDWR); / /} 

  / / need to change the following form 
  if ((calfile = getenv ("TSLIB_CALIBFILE"))! = NULL) {cal_fd = open
(calfile, O_CREAT | O_RDWR, 0777 );} else {cal_fd = open ("/   etc
/pointercal", O_CREAT | O_RDWR, 0777);} 

5. Can't exec "libtoolize": No such file or directory at / usr / bin /
autoreconf line 190.Use of uninitialized value $ libtoolize in pattern
match (m / /) at / usr / bin / autoreconf line

Sol : installed in Ubuntu libtool.deb or update with the command: apt-get
install libtool

6 Can't exec "aclocal": No such file or directory at /
usr/share/autoconf/Autom4te/FileUtils.pm line 290

Sol : apt-get install automake

tslib.sh file ==>
#!/bin/sh

export
CROSS_COMPILE=/home/surekha/Cross_compiler/fsl-linaro-toolchain/bin/arm-fsl-linu
x-gnueabi-
export CC=${CROSS_COMPILE}"gcc"
export CFLAGS=-march=armv7-a
export CXX=${CROSS_COMPILE}"g++" 
export AR=${CROSS_COMPILE}"ar" 
export AS=${CROSS_COMPILE}"as"
export
RANLIB=/home/surekha/Cross_compiler/fsl-linaro-toolchain/bin/arm-fsl-linux-gnuea
bi-ranlib
export LD=${CROSS_COMPILE}"ld"
export STRIP=${CROSS_COMPILE}"strip"
export ac_cv_func_malloc_0_nonnull=yes
sudo ./autogen-clean.sh
./autogen.sh
sudo ./configure
CC=/home/surekha/Cross_compiler/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g
cc
--host=arm-unknown-linux --build=i386-linux --prefix=/usr/local/tslib
ac_cv_func_malloc_0_nonnull=yes
sudo make
sudo make install

i have followed above all steps for tslib-1.0 compilation and succeed.