Sunday, April 11, 2010

x86-qtopia and arm-qtopia build scripts

To hopefully address some of the issues people have had with the x86qtopia build, I'm posting the build scripts that I've used.

For each file, you may need to chmod and possibly chown the files. For example:
/opt/FriendlyARM/mini2440/arm-qtopia$ sudo chmod +x build*
/opt/FriendlyARM/mini2440/arm-qtopia$ sudo chown [youruser]:[yourgroup] build*
and
/opt/FriendlyARM/mini2440/x86-qtopia$ sudo chmod +x build*
/opt/FriendlyARM/mini2440/x86-qtopia$ sudo chown [youruser]:[yourgroup] build*

x86qtopia

/opt/FriendlyARM/mini2440/x86-qtopia/build:
#!/bin/bash

#rm -fr qtopia-2.2.0-FriendlyARM
#tar xfvz qtopia-2.2.0.tar.gz

cd qtopia-2.2.0-FriendlyARM

echo yes | ./configure -qte '-embedded -no-xft -qconfig qpe -depths 16,32 -system-jpeg -gif' -qpe '-edition pda -displaysize 240x320 -fontfamilies "helvetica fixed micro smallsmooth smoothtimes"' -qt2 '-no-opengl -no-xft' -dqt '-no-xft -thread'

make
make install
cd ..

/bin/rm qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/lib/fonts/helvetica_*
#tar xfvz fonts.tar.gz -C qtopia-2.2.0-FriendlyARM/qtopia/image

/opt/FriendlyARM/mini2440/x86-qtopia/build-all:
#!/bin/bash

./build
./build-konq


/opt/FriendlyARM/mini2440/x86-qtopia/build-konq:
#!/bin/bash


#tar xfvz konq.tar.gz

cd konq
source /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/setQpeEnv
CC=arm-linux-gcc CXX=arm-linux-g++ LDFLAGS=-ldl CROSS_COMPILE=1 ./configure --enable-embedded --enable-qt-embedded --enable-qpe --disable-debug --enable-static --disable-shared --disable-mt --without-ssl --with-qt-dir=$QTDIR --with-qt-includes=$QTDIR/include --with-qt-libraries=$QPEDIR/lib --with-qtopia-dir=$QPEDIR --with-gui=qpe --host=arm-linux --target=arm-linux

./configure --enable-embedded --enable-qt-embedded --enable-qpe --disable-debug --enable-static --disable-shared --disable-mt --without-ssl --with-qt-dir=$QTDIR --with-qt-includes=$QTDIR/include --with-qt-libraries=$QPEDIR/lib --with-qtopia-dir=$QPEDIR --with-gui=qpe
make
strip --strip-all konq-embed/src/konqueror

cd ..

cp konq/konq-embed/src/konqueror qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/bin/
mkdir -p qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/pics/konqueror
cp konq/konq-embed/src/konqueror.png qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/pics/konqueror

mkdir -p qtopia-2.2.0-FriendlyARM/qtopia/image/opt/kde/share/apps/khtml/css
mkdir -p qtopia-2.2.0-FriendlyARM/qtopia/image/opt/kde/share/config
cp konq/konq-embed/kdesrc/khtml/css/html4.css qtopia-2.2.0-FriendlyARM/qtopia/image/opt/kde/share/apps/khtml/css
cp konq/konq-embed/kdesrc/kdecore/charsets qtopia-2.2.0-FriendlyARM/qtopia/image/opt/kde/share/config

cp konq/konq-embed/src/konqueror.desktop qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/apps/Applications


ARM

/opt/FriendlyARM/mini2440/arm-qtopia/build:
#!/bin/bash

#rm -fr qtopia-2.2.0-FriendlyARM
#tar xfvz qtopia-2.2.0.tar.gz

cd qtopia-2.2.0-FriendlyARM
echo yes | ./configure -qte '-embedded -no-xft -qconfig qpe -depths 16,32 -system-jpeg -qt-zlib -qt-libpng -gif -no-g++-exceptions -no-qvfb -xplatform linux-arm-g++ -tslib' -qpe 'edition pda -displaysize 240x320 -fontfamilies "helvetica fixed micro smallsmooth smoothtimes unifont" -xplatform linux-arm-g++ -luuid' -qt2 '-no-opengl -no-xft' -dqt '-no-xft -thread'

make && make install

/opt/FriendlyARM/mini2440/arm-qtopia/build-all:
#!/bin/bash

./build
./build-konq
./mktarget


/opt/FriendlyARM/mini2440/arm-qtopia/build-konq:
#!/bin/bash

#rm -fr konq

#tar xfvz konq.tar.gz

cd konq
source /opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/setQpeEnv
CC=arm-linux-gcc CXX=arm-linux-g++ LDFLAGS=-ldl CROSS_COMPILE=1 ./configure --enable-embedded --enable-qt-embedded --enable-qpe --disable-debug --enable-static --disable-shared --disable-mt --without-ssl --with-qt-dir=$QTDIR --with-qt-includes=$QTDIR/include --with-qt-libraries=$QPEDIR/lib --with-qtopia-dir=$QPEDIR --with-gui=qpe --host=arm-linux --target=arm-linux

make
arm-linux-strip --strip-all konq-embed/src/konqueror

17 comments:

  1. I missed the line where I was supposed to comment out: #tar xfvz fonts.tar.gz -C qtopia-2.2.0-FriendlyARM/qtopia/image so my fonts obviously got overwritten. Is there a way to fix this without doing a rebuild?
    jrh

    ReplyDelete
  2. In the beginning of your tutorial you gave the instructions:
    mkdir qtopia-2.2.0-FriendlyARM/qtopia/image
    sudo tar xfvz fonts.tar.gz -C qtopia-2.2.0-FriendlyARM/qtopia/image.
    This does exactly the same same as the build script. However, the script removes the helvetica fonts from the same path with the line:
    /bin/rm qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/lib/fonts/helvetica_*. It then proceeds to tar the fonts file to put the same files back where they just got removed. If this is true, then the only thing I need to do (since I did not comment out this line) is manually remove the helvetica fonts. Is this correct? Why are these fonts a problem in the first place?
    jrh

    ReplyDelete
  3. Hi jrh,

    I'm not sure about the fonts. I think you only have to extract and move them once and I dont think that you need to rebuild. I'd try to extract them and see if things can run.

    Good luck.

    ReplyDelete
  4. Thanks, impossible

    As it turns out, the only file I have in my qtopia/image/opt/Qtopia/lib/fonts directory is fontdir. However, on my mini2440 board my directory /opt/Qtopia/lib/fonts has many font files, including helvetica. My board came with Qtopia already loaded. Would I be correct to guess that if I rebuild my Qtopia version, that I will lose the other fonts? In other words, I don't think I will ever need this directory unless I plan on doing a custom build of Qtopia. Is this correct?

    jrh

    ReplyDelete
  5. I have followed all the steps and so on, but it still doesn't compile at me, it gives me this error all the time:

    x86:

    make[5]: *** [.obj/release-shared/vobject.o] Error 1
    make[5]: Leaving directory `/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/src/libraries/qtopia'
    make[4]: *** [all] Error 2
    make[4]: Leaving directory `/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/src/libraries/qtopia'
    make[3]: *** [sub-libraries-qtopia] Error 2
    make[3]: Leaving directory `/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/src'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/src'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia'

    ReplyDelete
  6. There is one more line to be removed from "/opt/FriendlyARM/mini2440/x86-qtopia/build"

    This one (it's an "rm" too):
    /bin/rm qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/lib/fonts/helvetica_*

    I think that's why some guys have no fonts after build it. ;)

    ReplyDelete
  7. all steps are important to install arm­ Qtopia 2.2.0

    ReplyDelete
  8. Hi,

    I am getting error as per below, When compiling arm-qtopia.
    please help me to solve this issue.
    I have also verify that arm-linux-gcc is properly installed with using command arm-linux-gcc -v.
    gcc version is 4.4.3 (ctng-1.6.1).



    make[1]: Entering directory `/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2/src'
    echo '#include "kernel/qt.h"' >allmoc.cpp
    arm-linux-g++ -E -DQT_MOC_CPP -I/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2/include -pipe -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W -DNO_DEBUG -fPIC -DQT_NO_QWS_SNAP -DQT_NO_QWS_VOODOO3 -DQT_NO_QWS_MACH64 -DQT_NO_QWS_MATROX -DQT_NO_QWS_VNC -DQT_NO_QWS_VGA_16 -DQT_NO_QWS_DEPTH_4 -DQT_NO_QWS_DEPTH_8 -DQT_NO_QWS_DEPTH_18 -DQT_NO_QWS_DEPTH_24 -DQT_NO_QWS_VFB -DQT_BUILTIN_GIF_READER=1 -DQT_NO_IMAGEIO_MNG -DQT_NO_SM_SUPPORT -DQT_NO_XKB -DQT_QWS_TSLIB -fno-exceptions -I/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2/src/3rdparty/zlib -I/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2/src/3rdparty/libpng -I/usr/X11R6/include -I3rdparty/kernel -I3rdparty/tools >allmoc.h allmoc.cpp
    /bin/sh: 1: arm-linux-g++: not found
    make[1]: *** [allmoc.cpp] Error 127
    make[1]: Leaving directory `/opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2/src'

    ReplyDelete