Date: 2011-09-25
T U X R A I L - D E B I A N G N U / L I N U X A R M E L P O R T O N A R M 9
/////////////////////////////////////////////////////////////////////////////
FFFFFF II RRRRRR SSSSS TTTTTTTT SSSSS TTTTTTT EEEEEE PPPPPP SSSSS
FF II RR RR SS TT SS TT EE PP PP SS
FF II RR RR SS TT SS TT EE PP PP SS
FFFFFF II RRRRRR SS TT SS TT EEEEEE PPPPPP SS
FF II RR RR SS TT SS TT EE PP SS
FF II RR RR SS TT SS TT EE PP SS
FF II RR RR SS TT SS TT EE PP SS
FF II RR RR SSSS TT SSSS TT EEEEEE PP SSSS
//////////////////////////////////////////////////////////////////////////////
ABOUT THIS GUIDE
This guide covers the first steps of starting to use the board at
generic level. It does not try to give detailed steps for everything,
but enough information so that you could get connected into the device
within just hours, not days.
Application development is out-of-scope for this document, except
for this: for C#/.NET developer it might be easiest to write first
application in C#/.NET 2.0 for example with MonoDevelop or SharpDevelop
and install the mono-runtime package to this board. Then just "mono yourapp.exe"
and that's it.
This guide has been written from Windows or novice to Linux user's perspective
who is not extremely familiar with the hardware details but has some
knowledge of hardware also.
BASED ON TUXRAIL v1.4 BOARD AND USING THE BOARD FROM A WINDOWS PC
_______________________________________________________________________________________
CONTENT
1. GENERAL INFORMATION
2. MAKING A BACKUP
3. CONNECTING POWER
4. ESTABLISHING COMMUNICATION
4.1 RS-232
4.2 IP over Ethernet / SSH
4.3 WinSCP
5. SETTING THE TIME
6. POTENTIALLY INTERESTING APPLICATIONS
_______________________________________________________________________________________
1. GENERAL INFORMATION
TuxRail's Linux is based on ARMEL (ARM-EABI) architecture port of Debian
Linux. The current version of Debian is "Squeeze".
That means you have access to vast number of precompiled packages
that can be downloaded into the device by using easy to use
apt-get package manager. For example, adding support for Mono
runtime support (to run Mono-based applications)
is not more difficult than executing the following commands:
apt-get update
apt-get install mono-runtime
There are some generally interesting applications listed in chapter 6
but you can find hundreds if not thousands of more by Googling
+armel +yourapplicationame
or by going to http://packages.debian.org/stable/
The processor on board is FreeScale's I.MX233 running at 454 MHz.
It has ARM9, ARM926EJ-S core, Power Management Unit (PMU),
3*UART and external memory interface. The TuxRail board equips
the processor with external 64MB RAM.
A lot more can be found from here:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX233
The details about the TuxRail circuit board can be found from here:
http://busware.de/tiki-index.php?page=TuxRail
_______________________________________________________________________________________
2. MAKING A BACKUP
If you are not into building the Linux for TuxRail from sources
you better back up the delivery uSD-card media first.
The example 4GB uSD-card has the following content:
--------+-----+-----------------+------------+----------------
SIZE | TYPE| PART.TYPE | USAGE | DEVICE
--------+-----+-----------------+------------+-----------------
4.1MB - Unknown(0x53) - (/dev/sde1)
10 MB EXT3 Linux (0x83) Filesystem (/dev/sde2)
128 MB - Linux swap(0x82) Swap Space (/dev/sde4)
3.9 GB EXT3 Linux(0x83) Filesystem (/dev/sde3)
The compressed size of all content at the time of delivery is about 174MB.
The uSD content is not recognized by default Windows 7 or older
installation as its using Linux EXT3 filesystem.
Therefore you need to access it from a Linux computer.
Due to virtualization technologies, this Linux machine can be
a virtual machine running a desktop operating system such as Ubuntu.
This example is for Virtualbox (freeware).
You will very probably need to install the "Extension Pack" for the
Virtualbox in order to have compliant drivers to read
the uSD card using a USB(2.0) card-reader.
In september 2011 this download was found from here:
http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html
In author's system and one other system regardless of the Extension Pack
installation it still did not start working by just plugging
in the card reader, activating it in the Virtual box running the
target Linux (Ubuntu 11.04 in author's case), but after a couple of
Linux-box restarts and disconnect-reconnect reader -cases the
card reader device was finally recognized by virtual Linux.
Then, when you plugged in the uSD-card, it was also detected by Linux.
The easiest way to make a copy of the whole card is
to read and copy the physical disk file, which Linux fully supports.
In the author's case this device (raw disk file) mapped to "/dev/sde".
Then the copy-command is mostly just as simple as this (open terminal):
sudo cp /dev/sde TuxRailuSDbackup.img
This command would be executed in the destination directory where
you want the backup file to be created.
Note: the partitions inside the disk were mapped (in the above case)
to sde1, sde2, sde3 and sde4, while the whole card was sde.
LIMITATIONS: This example is limited to returning backup to the
media of same size.
In case of emergency, you can restore the backup in the similar way.
Just copy (cp) the image file to the uSD card.
_______________________________________________________________________________________
3. CONNECTING POWER
You can use a special USB A-A male-male cable to power the board
(just make sure there is no power supply from both directions as
this can permanently damage either or both ends of the cable), but just to
make sure, it's better to cut the data-signal wires.
One other option is to cut one standard cable with a USB A male
connector and solder the +5VDC from this cables (now cut open wires)
directly to the backside (board side) pins of the USB host connector
on TuxRail board.
USB A-A has 4 pins and the outermost of these are the power pins.
On TuxRail v1.4 board the - pin (GND) is the one nearest to the RESET-button
and the + (5V DC) pin is the farthest from the RESET-button.
PLEASE VERIFY THE USB PINOUTS FROM SOME RELIABLE SOURCE
BEFORE CONNECTING ANY WIRES TO AVOID DAMAGE TO THE BOARD
AND ALSO VERIFY THE WIRING BY USING SOME GENERIC OHM/CONDUCTIVITY METER.
IN A CERTAIN CUT-OPEN CABLE USED THE RED WIRE DELIVERED THE +5V WHILE
THE BLACK WIRE WAS THE GND - THE OTHER END OF CABLE HAD THE USB A MALE CONNECTOR.
_______________________________________________________________________________________
4. ESTABLISHING COMMUNICATION
If you have skills or the hardware ready, you may want to
try communicating with it. You have at least two options:
4.1 RS-232
Connect the TuxRail's RS-232 Debug port to your PC. For this
you need a 3-wire 3.3V to RS-232 converter.
The wire endpoints on TuxRail are very well marked
so this should be easy. The settings (speed etc) needed or
the content received from this port is not covered by this
document.
4.2 IP over Ethernet / SSH
Speed: 10MBit/s
IP-Address: DHCP client
The Ethernet-PHY on the board supports 10MB Ethernet.
You need to have a standard Ethernet-cable between the TuxRail
and your active device (router or switch).
In some cases this speed may not be autodetected by your
active device. If you have a managed router/switch, you might
want to set the port connected to the TuxRail to have
a fixed speed.
The author has found, that at least these Ethernet port settings
(in this case, at a D-Link's managed switch DGS-1210-10-P)
seem to work most often:
- Speed: "10M Half" (giving link status "10 C Half")
- MDI/MDIX: MDIX (depends on your Ehternet cable and your active device!)
- Flow control: Disabled
Once you connect the board power and the Ethernet cable
from the TuxRail to your active device, check that the
link state -LED indicates connection too. Without the
LED signal the link is not alive. The green "link active" LED
is on the lower left side of the Ethernet connector
when facing the board so that both the top-side of the board
is visible and the board's Ethernet connector is in front
of you. The communication activity light is then on the
right side of the connector.
If you are connecting from a Windows pc, you may want
to download putty.exe and open a SSH (secure shell)
communication link with the board. Before you can
do this, you must have the TuxRail board powered,
Ethernet cable connected and the link alive LED lit.
You also need to find out the IP-address that your DHCP
server has given to the board. You may experiment with
addresses near what your computer typically gets
or you may use the capabilities of your active device,
such as checking the ARP table or the DHCP table.
Note that in the DHCP-table the host name for the TuxRail is empty
or generated by the DHCP (such as "unknown").
Now just start the putty.exe and give it the IP-address
you have found and allow it to use the default SSH port (22).
You should soon see the login-prompt.
Username and password are by default: root busware
WARNING: as a "root" user you can do harm to the installation
so be careful
If you login successfully, you should see something like this below:
-------->
login as: root
root@192.168.x.xxx's password:
Linux tuxrail 2.6.31-626-g602af1c #112 PREEMPT Sun Dec 12 17:43:51 CET 2010 armv5tejl
W@@iiW@W ,mWs gW
~*f V*~ ~~` ]@____ _. ,_ ,___.i. g. g _mm_g. g_gi ,_ms_
]@f`~Y@. @[ ]@[-@K ~~'@. iPW dP W` '@[ @P` iA` VW
]@. i@[ @[ ]@[ '~VNs !W,A !biA !@ @[ @[ ]@~~~~~ __.
!**=z*f V*ez*f '*em*f V@` YA` VNsgZM[ M! VNsgz* **f
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Sep 25 17:00:07 2011 from 192.168.0.78
root@tuxrail:~#