Thursday, July 29, 2010

Install arm-qtopia-2.2.0_20100108 for Linux host PC

Hello Friends!!
Here i am posting the total steps for the installation of the arm-qtopia for the mini2440 , 3.5" Linux board


1. Extract the archive to /opt/FriendlyARM/mini2440/
tar xfz arm-qtopia-2.2.0_20100108.tgz -C /opt/FriendlyARM/mini2440/

2. Edit the build scripts to remove the tar and rm entries
sudo gedit build build-konq

3. Manually extract the archives:
cd /opt/FriendlyARM/mini2440/
chmod +x *.gz
tar xfz qtopia-2.2.0.tar.gz
sudo tar xfz konq.tar.gz
sudo tar xfz fonts.tar.gz

4. Edit the following source files as indicated.
gedit /opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/src/libraries/qtopia/qmemoryfile_unix.cpp line 141: --- f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY);
line 141: +++ f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY, (S_IRUSR|S_IWUSR));



gedit /opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2/src/tools/qmemoryfile_unix.cpp
line 143: --- f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY);
line 143: --- f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY, (S_IRUSR|S_IWUSR));



gedit /opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/src/libraries/qtopia/backend/vobject.cpp
line 419: ---char *dot = strrchr(g,'.');
line 419: +++char *dot = (char *) strrchr(g,'.');



gedit /opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/src/plugins/codecs/wavplugin/wavplugin.cpp
line 435: ---char *ext = strrchr( path.latin1(), '.' );
line 435: +++char *ext = (char *) strrchr( path.latin1(), '.' );


UPDATE: I've posted the build scripts I've referred here.

5. run the build...
./build-all



Building an example (arm)
Building the example for the embedded device is similar:

cd /opt/FriendlyARM/mini2440/arm-qtopia/hello
./build


So the compile output will give you the executable files which needs to be copied on mini2440 board/
the files needed are "hello and hello.desktop"

hello file is at the location /qtopia-2.2.0-FriendlyARM/qtopia/bin/hello
hello.desktop is at /qtopia-2.2.0-FriendlyARM/qtopia/hello/

To run this app on the 2440, first we have to move it there...
keep the hello file at the filesystem of the mini2440 at the location /opt/Qtopia/bin and make it executable by command chmod +x hello
and hello.desktop is at /opt/Qtopia/apps/Applications

Reboot the MINI2440

Hello2440 should now appear in the Applications menu, where you can run it.

Install x86-qtopia for Linux host PC

Hello Friends!!
Here i am posting the total steps for the installation of the x86-qtopia for the mini2440 , 3.5" Linux board
x86-qtopia provides tools and support for developing qt applications and running them on the host pc in a simulated embedded environment.


1. Extract the archive to: /opt/FriendlyARM/mini2440/
tar xfvz x86-qtopia-2.2.0_20100108.tgz -C /opt/FriendlyARM/mini2440

2. Extract the individual archives:
cd /opt/FriendlyARM/mini2440/x86-qtopia/
tar xfz qtopia-2.2.0.tar.gz
tar xfz konq.tar.gz
mkdir qtopia-2.2.0-FriendlyARM/qtopia/image
tar xfvz fonts.tar.gz -C qtopia-2.2.0-FriendlyARM/qtopia/image

Some of the source code needs to be adjusted slightly in order to compile.

3. Edit the four files below as noted:
3.1
gedit /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/src/libraries/qtopia/qmemoryfile_unix.cpp

remove this line
line 141: --- f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY);
add this line
line 141: +++ f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY, (S_IRUSR|S_IWUSR));

3.2
gedit /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/src/tools/qmemoryfile_unix.cpp

remove this line
line 143: --- f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY);
add this line
line 143: --- f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY, (S_IRUSR|S_IWUSR));

3.3
gedit /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/src/libraries/qtopia/backend/vobject.cpp

remove this line
line 419: --- char *dot = strrchr(g,'.');
add this line
line 419: +++ char *dot = (char *) strrchr(g,'.');

3.4
gedit /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/src/plugins/codecs/wavplugin/wavplugin.cpp

remove this line
line 435: char *ext = strrchr( path.latin1(), '.' );
add this line
line 435: char *ext = (char *) strrchr( path.latin1(), '.' );


I edited the build scripts to remove the initial archive removal and extractions. This will prevent the source code changes above from being deleted and overwritten (which the scripts will do). Alternatively, you can simply run the configure statement by hand, then run make, make install, etc..

UPDATE: I've posted the build scripts I've reffered here.

4. Finally you can run the build...
./build-all

So finally your Qtopia for x86 version is build and you can try with one example even.

install tools for Qtopia2.2.0 for mini2440

Hello Friends!!
Here i am posting the total steps for the installation of the tools for the mini2440 , 3.5" Linux board

The arm-linux-gcc-4.3.2 toolchain
Before directly starting with the Qtopia we need to install the GNU toolchain for the supported platform.

1.1 We'll need these archives from the DVD or website http://www.friendlyarm.net/downloads
arm-linux-gcc-4.3.2.tgz
1.2 Extract the compressed tar file by the command
tar xzvf arm-linux-gcc-4.3.2.tgz
it will create the directory at the /usr/local/arm/4.3.2 which consist of all binaries
1.3 Add the path for this binaries
edit the /etc/profile file to set the path for the installed binaries
PATH=/usr/local/arm/4.3.2/bin:$PATH
export PATH
1.4 And to activate this path type the command
source /etc/profile
1.5 Now to Varify whether the toolchain is installed or not, please type following command on the prompt
arm-linux-gcc --version
1.6 It will show the following output
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2008q3-72) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
So finally toolchain for the mini2440 linux board is installed now.