2010-12-27

Build Qt 4.7 for armsys-6410

=======================
Install the crossing toolchain
=======================
refer to chapter 4 安装交叉编译器

交叉编译工具链的安装文件为“ARMSYS6410-B基础配置光盘资料\Linux相关\linux2.6标准版\交叉编译器”目录下的 cross-4.2.2-eabi.tar.bz2.

>tar xjvf cross-4.2.2-eabi.tar.bz2 –C /usr/local/arm
>export PATH=$PATH:/opt/toolchains/arm920t-eabi/bin

=======================
Build tslib (touch screen)
=======================

Install necessary tools
> apt-get install autoconf automake libtool

Download souce of tslib from http://tslib.berlios.de/


Build tslib
> tar xzvf tslib-1.4.gz
> cd tslib
>./autogen.sh
>./configure -host=arm-linux -prefix=/usr/local/tslib -enable-input=no (wrong???)
tslib will be install at /usr/local/tslib. If get error, you may comment out the line " '#define malloc rpl_malloc" in config.h
>make
>make install
Reference: http://blog.chinaunix.net/u2/75270/showart_1793535.html

=======================
Build Qt 4.7.1
=======================

Download qt-4.7.1
>wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.1.tar.gz
>tar xfzv qt-everywhere-opensource-src-4.7.tar

Configure the Qt Embedded.
>./configure -prefix /usr/local/qt-4.7.1-armsys-6410 -embedded arm -xplatform qws/linux-arm-g++ -depths 16 -qt-mouse-tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib -R /usr/local/tslib/lib -xmlpatterns -exceptions

Build Qt
>make
>make install
Reference: http://doc.qt.nokia.com/main-snapshot/qt-embedded-crosscompiling.html

2010-12-20

A walkaround: assign a static IP to eth0 for nfs remotely start system

I tried to boot the target board "armsys6410" by remotely loading a root file system through nfs. According to the given user manual, the argument of u-boot is

setenv bootargs "root=/dev/nfs nfsroot=192.168.253.2:/hom/localhost/armsys6410/root/ ip=192.168.253.12:192.168.253.2:192.168.253.2:255.255.255.0:armsys.hzlitai.com:eth0:off console=ttySAC0,115200"
Here /home/localhost/armsys6410/root is the file system located at my host machine. 192.168.253.12 is the static ip of board, while 192.168.253.2 should be static ip of host machine.

The problem of mine is I cannot fix a static IP to eth0, when I use at the same time wlan0. I didn't find a ultimate solution for the problem. Here is just walkaround:

Precondition: minicom has been correctly configured, serial port and cross-over cable have been correctly connected between host and target.

1) reset the board
2) press any key to suspend the booting (I use u-boot here)
3) >sudo ifconfig eth0 192.168.253.2 netmask 255.255.255.0 up
4) in minicom, input "reset"


Then the board can start with given root file system

Setup minicom for mini2440


For windows, it is recommended to use Hyperterminal for serial port communication. In order to develop under linux via nfs, a terminal software 'Minicom' is installed and applied instead of Hyperterminal. The USB to serial adapter is used for my laptop. The following items are related for Minicom.
  • Install minicom package
  • Check if there is active serial ports:
>dmesg | grey tty
[    0.004000] console [tty0] enabled
[    1.174860] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 2237.927394] usb 3-1: pl2303 converter now attached to ttyUSB0

  • Check read/write permissions on /dev/ttyUSB0 file:
>ls -la /dev | grep ttyUSB0
crw-rw----  1 root dialout 188,   0 2009-10-10 13:59 ttyUSB0

  • If the permissions are not set as above, it can be configured as below:
>chown root /dev/ttyUSB0
>chgrp dialout /dev/ttyUSB0
>chmod 660 /dev/ttyUSB0

  • Add debian user in the dialout group (for me the user is 'lp')
>adduser lp dialout

  • To see which users are members of the dialout group, open the /etc/group file and look for th eline beginning with dialout
>cat /etc/group | grep dialout

  • Start and configure minicom under superuser mode
>minicom -s
>Select 'Select port setup'
>Change Serial Device from '/dev/ttyS1' to '/dev/ttyUSB0'
>Set Hardware Flow Control from 'Yes' to 'No'
>'Save setup as ...' mini2440_config'

  • Start minicom using 'mini2440_config'
>minicom mini2440_config

  • Leave minicom
>Ctrl A->X

IMPORTANT NOTES:
If you use a linux system in vmware, this configuration may not work. You need to
  1. check if your vmware is a bridged network
  2. disable your firewall in your host machine.
  3. read this tutorial.