TS-7800: Difference between revisions

From embeddedTS Manuals
(Created page with "{{Infobox |title = TS-7800 |image = 200px |titlestyle = |headerstyle = background:#ccf; |labelstyle = width:33% |datastyle = |data1 ...")
 
No edit summary
Line 26: Line 26:


{{:Console from Workstation}}
{{:Console from Workstation}}
== Initrd / Busybox / Fastboot ==
After the TS-7800 is first booted you will be at this shell:
  >> TS-BOOTROM - built May 11 2011
  >> Copyright (c) 2008, Technologic Systems
  >> Booting from onboard NAND flash...
  .
  .
  .
  .
  Finished booting in 0.69 seconds
  Type 'tshelp' for help
  / #
This is a busybox shell which presents you with a very minimalistic system.  This filesystem is loaded into memory, so none of the changes will be saved unless you type 'save', or mount a filesystem as read write.  This can also provide a simple mechanism for running your application in an entirely read only environment.  The linuxrc script will be the first thing executed as soon as the kernel is loaded.  This sets the default IP address, starts the userspace ctl applications, and more.  Read the linuxrc for more information.
While busybox itself doesn't contain much functionality, it does mount the [[Debian]] partition under /mnt/root/.  It will also add common paths and load libraries from the [[Debian]] system.  Many of the [[Debian]] applications will work by default.  If an application relies on certain paths being in certain places, or running services, you should instead boot to [[Debian]] to run them.
This shell when started on the COM port is what is blocking a [[Debian]] boot.  If you close it by typing 'exit', the boot process will continue.  If you are connected through telnet, this will instead open up its own instance of the shell so typing 'exit' will only end that session.  You would have to relink the linuxrc script to always boot to a specific partition from telnet.
The small default initrd is only 2Mbyte but there is space for approximately 800 Kbyte of additional user applications. The binaries on the initrd are dynamically linked against embedded Linux's "uclibc" library instead of the more common Linux C library "glibc". "uclibc" is a smaller version of the standard C library optimized for embedded systems and requires a different set of GCC compiler tools which are available [ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/cross-toolchains/ here].
The compiled instance of busybox includes several internal commands listed below:
<source lang=bash>
/ # /bin/busybox --help
BusyBox v1.7.1 (2008-07-16 14:59:19 MST) multi-call binary
Copyright (C) 1998-2006  Erik Andersen, Rob Landley, and others.
Licensed under GPLv2.  See source distribution for full notice.
Usage: busybox [function] [arguments]...
  or: [function] [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable.  Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as!
Currently defined functions:
[, [[, ash, basename, cal, catv, chgrp, chmod, chown,
chroot, cksum, clear, comm, cp, cttyhack, cut, date, dd,
df, dirname, dmesg, du, echo, egrep, env, eptime, expr,
false, fdisk, fgrep, find, free, ftpget, ftpput, getopt,
grep, gunzip, halt, head, hexdump, hostname, ifconfig,
insmod, kill, killall, ln, ls, lsmod, md5sum, mdev, mkdir,
mkfifo, mknod, modprobe, more, mount, mtdcp, mv, mvtime,
netstat, nice, nohup, nslookup, peekpoke, ping, ping6,
pivot_root, poweroff, printenv, printf, ps, pscan, pwd,
reboot, rm, rmdir, rmmod, route, rx, sed, setconsole,
setlogcons, sh, sha1sum, sleep, split, stat, stty, sum,
sync, tail, tar, tee, telnetd, test, tftp, time, top,
tr, traceroute, true, tty, udhcpc, umount, uname, unzip,
uptime, usleep, uudecode, uuencode, vi, wget, which, xargs,
zcat
</source>
 
We also provide the ts7800.subr which provides the following functions:
  bit_set()
  bit_clr()
  bit_get()
  led0()
  pc104on()
  pc104off()
  tshelp()
  sdmount()
  mtdmount()
  help()
== Changing Boot device ==
The MBR, kernel, and initrd can be loaded from MicroSD, SD, or the onboard flash.  Once this is loaded you can boot to any other storage (SATA drive, USB, NFS, etc).  JP1 will allow you to pick between booting between the SD card sockets and the onboard flash, but if both SD and MicroSD are populated preference will be given to MicroSD. 
Once you are booted to the initrd, you can change the linuxrc script to boot into the full linux installation on any device.  We provide several scripts that you can relink to linuxrc:
{| class="wikitable"
|-
! Script
! Function
|-
| linuxrc-fastboot (default)
| Boots to a shell.  Once the shell is closed (type exit) it will boot to Debian on the full sized SD card.
|-
| linuxrc-mtdroot
| Boots directly to Debian on the onboard flash.
|-
| linuxrc-nfsroot
| Attempts to NFS root to 192.168.0.1:/tsarm-nfsroot.  You can edit this script to use your own server host and path.
|-
| linuxrc-sdroot
| Boots directly to Debian on the full sized SD card.
|}
To change the boot device to MicroSD card in these scripts, you can run a sed script on the linuxrc-fastboot or linuxrc-sdroot scripts:
<source lang=bash>
sed --in-place 's/tssdcardb4/tssdcarda4/g' /linuxrc-sdroot
</source>
If you want to boot to USB or SATA you may want to modify the linuxrc-sdroot or linuxrc-fastboot to mount your storage device at /mnt/root/.


== Jumper Configuration ==
== Jumper Configuration ==
Line 88: Line 185:
Initrd
Initrd
<source lang=bash>
<source lang=bash>
dd if=/initrd bs=32k of=/dev/mmcblk0p3
dd if=/path/to/initrd bs=32k of=/dev/mmcblk0p3
</source>
</source>



Revision as of 11:45, 2 September 2011

TS-7800
TS-7800.jpg
Product Page
Documentation
Schematic
Mechanical Drawing
FTP Path

Overview

The TS-7800 is a RoHS compliant Single Board Computer (SBC) based on a Marvell MV88F5182 500MHz ARM9 CPU. An internal 32-bit PCI bus provides a standard set of high-end on-board peripherals such as 10/100/1000 ethernet, dual SATA and dual High-Speed host/slave USB 2.0. The TS-7800 features 128MB of DDR-RAM and 512MB of high-speed NAND flash.

Getting Started

A Linux PC is recommended for development. For developers who use Windows, virtualized Linux using VMWare or similar are recommended in order to make the full power of Linux available. The developer will need to be comfortable with Linux anyway in order to work with embedded Linux on the target platform. The main reasons that Linux is useful are:

  • Linux filesystems on the microSD card can be accessed on the PC.
  • More ARM cross-compilers are available.
  • If recovery is needed, a bootable medium can be written.
  • A network filesystem can be served.
  • Builds such as Linux kernel, buildroot, yocto, distro-seed will not work from WSL1/2 on a case insensitive filesystem.
WARNING: Be sure to take appropriate Electrostatic Discharge (ESD) precautions. Disconnect the power source before moving, cabling, or performing any set up procedures. Inappropriate handling may cause damage to the board.

The TS-7800 receives power through the +5VDC power connector with a 1A minimum supply. If you have OP-SWITCHREG there will be a socket connector that will accept 8-30VDC.

Get a Console

The boot messages, by default, are all displayed on COM1 at 115200 baud. The TS-7800 board has Linux installed by default on onboard flash. Upon bootup, The board will boot within 1.1 seconds to a Linux prompt on UART #0 (/dev/ttyS0).

Use a null modem cable to connect the ARM system to your workstation. If you do not have a COM port on your system (as many newer systems do not), you can find a USB serial adapter that will bring out RS232.

Console from Linux

There are many serial clients for Linux, but 3 simple ones would be picocom, screen, and minicom. These examples assume that your COM device is /dev/ttyUSB0 (common for USB adapters), but replace them with the COM device on your workstation.

Linux has a few applications capable of connecting to the board over serial. You can use any of these clients that may be installed or available in your workstation's package manager:

Picocom is a very small and simple client.

picocom -b 115200 /dev/ttyUSB0

Screen is a terminal multiplexer which happens to have serial support.

screen /dev/ttyUSB0 115200

Or a very commonly used client is minicom which is quite powerful:

minicom -s
  • Navigate to 'serial port setup'
  • Type "a" and change location of serial device to '/dev/ttyUSB0' then hit "enter"
  • If needed, modify the settings to match this and hit "esc" when done:
     E - Bps/Par/Bits          : 115200 8N1
     F - Hardware Flow Control : No
     G - Software Flow Control : No
  • Navigate to 'Save setup as dfl', hit "enter", and then "esc"

Console from Windows

Putty is a small simple client available for download here. Open up Device Manager to determine your console port. See the putty configuration image for more details.

Device Manager Putty Configuration

Initrd / Busybox / Fastboot

After the TS-7800 is first booted you will be at this shell:

 >> TS-BOOTROM - built May 11 2011
 >> Copyright (c) 2008, Technologic Systems
 >> Booting from onboard NAND flash...
 .
 .
 .
 .
 Finished booting in 0.69 seconds
 Type 'tshelp' for help
 / #

This is a busybox shell which presents you with a very minimalistic system. This filesystem is loaded into memory, so none of the changes will be saved unless you type 'save', or mount a filesystem as read write. This can also provide a simple mechanism for running your application in an entirely read only environment. The linuxrc script will be the first thing executed as soon as the kernel is loaded. This sets the default IP address, starts the userspace ctl applications, and more. Read the linuxrc for more information.

While busybox itself doesn't contain much functionality, it does mount the Debian partition under /mnt/root/. It will also add common paths and load libraries from the Debian system. Many of the Debian applications will work by default. If an application relies on certain paths being in certain places, or running services, you should instead boot to Debian to run them.

This shell when started on the COM port is what is blocking a Debian boot. If you close it by typing 'exit', the boot process will continue. If you are connected through telnet, this will instead open up its own instance of the shell so typing 'exit' will only end that session. You would have to relink the linuxrc script to always boot to a specific partition from telnet.

The small default initrd is only 2Mbyte but there is space for approximately 800 Kbyte of additional user applications. The binaries on the initrd are dynamically linked against embedded Linux's "uclibc" library instead of the more common Linux C library "glibc". "uclibc" is a smaller version of the standard C library optimized for embedded systems and requires a different set of GCC compiler tools which are available here.

The compiled instance of busybox includes several internal commands listed below:

/ # /bin/busybox --help
BusyBox v1.7.1 (2008-07-16 14:59:19 MST) multi-call binary
Copyright (C) 1998-2006  Erik Andersen, Rob Landley, and others.
Licensed under GPLv2.  See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: [function] [arguments]...

	BusyBox is a multi-call binary that combines many common Unix
	utilities into a single executable.  Most people will create a
	link to busybox for each function they wish to use and BusyBox
	will act like whatever it was invoked as!

Currently defined functions:
	[, [[, ash, basename, cal, catv, chgrp, chmod, chown,
	chroot, cksum, clear, comm, cp, cttyhack, cut, date, dd,
	df, dirname, dmesg, du, echo, egrep, env, eptime, expr,
	false, fdisk, fgrep, find, free, ftpget, ftpput, getopt,
	grep, gunzip, halt, head, hexdump, hostname, ifconfig,
	insmod, kill, killall, ln, ls, lsmod, md5sum, mdev, mkdir,
	mkfifo, mknod, modprobe, more, mount, mtdcp, mv, mvtime,
	netstat, nice, nohup, nslookup, peekpoke, ping, ping6,
	pivot_root, poweroff, printenv, printf, ps, pscan, pwd,
	reboot, rm, rmdir, rmmod, route, rx, sed, setconsole,
	setlogcons, sh, sha1sum, sleep, split, stat, stty, sum,
	sync, tail, tar, tee, telnetd, test, tftp, time, top,
	tr, traceroute, true, tty, udhcpc, umount, uname, unzip,
	uptime, usleep, uudecode, uuencode, vi, wget, which, xargs,
	zcat

We also provide the ts7800.subr which provides the following functions:

 bit_set()
 bit_clr()
 bit_get()
 led0()
 pc104on()
 pc104off()
 tshelp()
 sdmount()
 mtdmount()
 help()

Changing Boot device

The MBR, kernel, and initrd can be loaded from MicroSD, SD, or the onboard flash. Once this is loaded you can boot to any other storage (SATA drive, USB, NFS, etc). JP1 will allow you to pick between booting between the SD card sockets and the onboard flash, but if both SD and MicroSD are populated preference will be given to MicroSD.

Once you are booted to the initrd, you can change the linuxrc script to boot into the full linux installation on any device. We provide several scripts that you can relink to linuxrc:

Script Function
linuxrc-fastboot (default) Boots to a shell. Once the shell is closed (type exit) it will boot to Debian on the full sized SD card.
linuxrc-mtdroot Boots directly to Debian on the onboard flash.
linuxrc-nfsroot Attempts to NFS root to 192.168.0.1:/tsarm-nfsroot. You can edit this script to use your own server host and path.
linuxrc-sdroot Boots directly to Debian on the full sized SD card.

To change the boot device to MicroSD card in these scripts, you can run a sed script on the linuxrc-fastboot or linuxrc-sdroot scripts:

sed --in-place 's/tssdcardb4/tssdcarda4/g' /linuxrc-sdroot

If you want to boot to USB or SATA you may want to modify the linuxrc-sdroot or linuxrc-fastboot to mount your storage device at /mnt/root/.

Jumper Configuration

Jumper Function
JP1 Boot to SD (Otherwise nand)
JP2 User Configurable
JP3 Lowers CPU clock
Note: See the FPGA Register Map for reading the states of the jumpers in software
Note: While JP3 does lower the clock speed, it does not lower power consumption

Backup / Restore

SD Card

If backing up on a separate workstation, keep in mind windows does not have direct block device support needed to write these images. You will also need to determine the SD card device. You can usually find this in the output of 'dmesg' after inserting the SD card and you will typically see something like '/dev/sdb' as the block device and '/dev/sdb1' for the first partition. On some newer kernels you will see '/dev/mmcblk0' as the block device and '/dev/mmcblkop1' for the first partition. For these examples I will use the '/dev/mmcblk0' format. Both of the sd cards will use the same commands, except when backing up or restoring on the TS-7800 you would replace /dev/tssdcarda (MicroSD) or /dev/tssdcardb (SD) depending on which device you want to use. These examples will use /dev/tssdcarda.

If you are backing up directly on the board you will likely need to use some kind of offboard storage like a thumbdrive or external hard drive.


From Workstation


Backup

Entire SD card

dd if=/dev/mmcblk0 of=/path/to/backup.dd bs=32k

Kernel

dd if=/dev/mmcblk0p2 of=/path/to/zImage bs=32k

Initrd

dd if=/dev/mmcblk0p3 of=/path/to/initrd bs=32k

Restore

Entire SD card

dd if=/path/to/backup.dd of=/dev/mmcblk0 bs=32k

Kernel

dd if=/path/to/zImage bs=32k of=/dev/mmcblk0p2

Initrd

dd if=/path/to/initrd bs=32k of=/dev/mmcblk0p3

From TS-7800


Backup

Entire card

dd if=/dev/tssdcarda of=/path/to/backup.dd bs=512

Kernel

dd if=/dev/tssdcarda2 of=/path/to/zImage bs=512

Initrd

dd if=/dev/tssdcarda3 of=/path/to/initrd bs=512

Restore

The entire card from SBC

dd if=/path/to/sdimage.dd of=/dev/tssdcarda conv=sync bs=512

Kernel

dd if=/path/to/zImage of=/dev/tssdcarda2 conv=sync bs=512

Initrd

dd if=/path/to/zImage of=/dev/tssdcarda3 conv=sync bs=512

Onboard Flash

Product Notes

FCC Advisory

This equipment generates, uses, and can radiate radio frequency energy and if not installed and used properly (that is, in strict accordance with the manufacturer's instructions), may cause interference to radio and television reception. It has been type tested and found to comply with the limits for a Class A digital device in accordance with the specifications in Part 15 of FCC Rules, which are designed to provide reasonable protection against such interference when operated in a commercial environment. Operation of this equipment in a residential area is likely to cause interference, in which case the owner will be required to correct the interference at his own expense.

If this equipment does cause interference, which can be determined by turning the unit on and off, the user is encouraged to try the following measures to correct the interference:

Reorient the receiving antenna. Relocate the unit with respect to the receiver. Plug the unit into a different outlet so that the unit and receiver are on different branch circuits. Ensure that mounting screws and connector attachment screws are tightly secured. Ensure that good quality, shielded, and grounded cables are used for all data communications. If necessary, the user should consult the dealer or an experienced radio/television technician for additional suggestions. The following booklets prepared by the Federal Communications Commission (FCC) may also prove helpful:

How to Identify and Resolve Radio-TV Interference Problems (Stock No. 004-000-000345-4) Interface Handbook (Stock No. 004-000-004505-7) These booklets may be purchased from the Superintendent of Documents, U.S. Government Printing Office, Washington, DC 20402.

Limited Warranty

See our Terms and Conditions for more details.