Design and Development Group Software Development Kit v4.0 NIMBUS http://www.ionicsplug.com
TABLE OF CONTENTS TABLE OF CONTENTS... 2 I. Introduction... 3 II. Development Disc Contents:... 3 III. Setting-up the Host Computers... 4 A. Preparing your Linux Host... 4 1. Installing the ARM Compiler... 4 2. Additional Tools Needed for Compiling... 4 3. Installing the USB-to-Serial Chip Driver for Linux... 5 4. Installing and configuring minicom... 6 5. Setting-up the Trivial File Transfer Protocol (TFTP) Server... 6 6. Setting-up the Network File System (NFS) Server... 7 B. Preparing your Windows Host... 8 1. Installing the USB serial driver for Windows... 8 2. Installing and configuring Tera Term... 10 IV. Additional Links... 11 2/11
I. Introduction IONICS have compiled this Software Development Kit in the hopes that it would provide significant help to the user as he/she tries to familiarize himself with the PlugComputer. The package contains source codes, config files, images, and relevant documentation that will help establish an environment for software customization. The PlugComputer comes preloaded with the following softwares: software version bootloader Marvell u-boot 3.4.26 kernel linux-2.6.31.8 filesystem Debian 5.0 Lenny After booting-up your PlugComputer, you can login using the following details. Login Password : root : root II. Development Disc Contents: DOCUMENTS HOST - CONSOLE - ESIA - TOOLS BOOTLOADER - IMAGES - SOURCES KERNEL - IMAGES - SOURCES FILESYSTEM - DEBIAN 3/11
III. Setting-up the Host Computers Outlined below are suggested ways to set-up your Linux and Windows hosts to be able to compile firmware, flash images, or communicate (via serial or network connection) with your IONICS PlugComputer. Experienced developers however, could implement any alternative method or software utilities that will suit their preference. A. Preparing your Linux Host Please be aware that most of the activities that shall be performed on the Linux host require root privileges. Though this could be easily done, the developer should take precaution since he/she may accidentally modify the system files which could lead to unwanted problems. 1. Installing the ARM Compiler This should be installed in your Linux host if you are planning to compile your own Linux kernel image. Included in this SDK package is CodeSourcery s ARM compiler. You may choose to copy the tarball from the disc or download it directly from their site their site to get an updated version. http://www.codesourcery.com/sgpp/lite/arm/portal/subscription3053 Copy arm-2010q1-188-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 from the disc (/HOST/TOOLS) and put it to the /home directory of your Linux host. Untar the package. # cd /home # tar xvjf arm-2010q1-188-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 2. Additional Tools Needed for Compiling Copy the mkimage binary from the disc package (/HOST/TOOLS) and put it in the /usr/bin directory of your Linux host. Some Linux distros don t have the curses.h header installed by default which is needed in making configuration menus. Install curses.h by typing the commands: # apt-get install libncurses5-dev 4/11
3. Installing the USB-to-Serial Chip Driver for Linux In order to communicate with your PlugComputer via the Serial/JTAG interface, you should install the driver for the FTDI chip (usb-to-serial device). Copy the ftdi_sio.tar.gz from the disc (/HOST/CONSOLE) and put it to you Linux host or copy the latest driver from the FTDI website: http://www.ftdichip.com/drivers/vcp.htm Decompress the file and build it: # tar xvzf ftdi_sio.tar.gz # cd ftdi_sio # make Connect the PlugComputer to the Linux host using the mini-usb cable. Power-up the PlugComputer and check whether the device is recognized. You should be able to see the following information after issuing the command below: # dmesg usb 5-2: new full speed USB device using uhci_hcd and address 4 usb 5-2: configuration #1 chosen from 1 choice ftdi_sio 5-2:1.0: FTDI USB Serial Device converter detected usb 5-2: Detected FT2232C usb 5-2: FTDI USB Serial Device converter now attached to ttyusb0 ftdi_sio 5-2:1.1: FTDI USB Serial Device converter detected usb 5-2: Detected FT2232C usb 5-2: FTDI USB Serial Device converter now attached to ttyusb1 If the information above were not shown in the terminal, add the USB device ID of the IONICS JTAG module (vendor=0x1c0c; product=0x0102) by typing the following in the command line: # modprobe ftdi_sio vendor=0x1c0c product=0x0102 Reconnect the usb cable of the JTAG to the Linux host and check whether the device is detected using the dmesg command. Make a shortcut for this method by creating a file named ftdi_sio at the /etc/modprobe.d/ directory: # vi /etc/modprobe.d/ftdi_sio 5/11
Write the following to the file: options ftdi_sio vendor=0x1c0c product=0x0102 Issue the command below after every host reboot: # modprobe ftdi_sio 4. Installing and configuring minicom After installing the FTDI chip driver (usb-to-serial device driver) you can now communicate with your PlugComputer via the mini usb cable. Minicom is a popular linux application for serial communication. One of the ways you could install minicom is through apt-get : # apt-get install minicom Configure minicom after installation: # minicom -s Select Serial Port setup from the menu and ensure that the following settings are loaded: Serial Device = /dev/ttyusb1 Bps/Par/Bits = 115200 8N1 HW Flow Ctrl = No SW Flow Ctrl = No Select Save setup as dfl and Exit, you should be able to see the serial console output after doing so. (Note: You may need to check your serial device location by typing dmesg to your command line upon connecting the JTAG. Replace the Serial Device value accordingly.) 5. Setting-up the Trivial File Transfer Protocol (TFTP) Server This should be installed if you are planning to boot the PlugComputer over the network. Install the xinetd, tftpd, and tftp packages through apt-get # apt-get install xinetd tftpd tftp 6/11
Create file /etc/xinetd.d/tftp and put the following: # vi /etc/xinetd.d/tftp service tftp { protocol = udp socket type = dgram wait = yes user = nobody server = /usr/sbin/in.tftpd server_args = /tftpboot disable = no } Make a directory named /tftpboot at your Linux host and change the permission and owner of the directory: # mkdir /tftpboot # chmod R 777 /tftpboot # chown R nobody /tftpboot You may start the tftpd through xinetd by issuing the command: # /etc/init.d/xinetd start 6. Setting-up the Network File System (NFS) Server This should be installed if you are planning to boot the PlugComputer over the network. Install the NFS through apt-get # apt-get install nfs-kernel-server nfs-common portmap Make a directory named /home/myfilesystem in your Linux host: # mkdir /home/myfilesystem Copy the rootfilesystem that will be used for the NFS boot (/FILESYSTEM/DEBIAN) and put it to the /home/myfilesystem directory of your Linux host. 7/11
Decompress the rootfilesystem. # tar xvzf NIMBUS-rootfs.tar.gz -directory= /home/myfilesystem Open the /etc/exports file. # vi /etc/exports Add the following lines to the exports file. /home/myfilesystem/ *(rw,no_root_squash) /tftpboot/ *(rw,no_root_squash) Activate the changes on /etc/exports by issuing the following commands: # /etc/init.d/nfs-kernel-server restart B. Preparing your Windows Host The following instructions will prepare your Window s host in order to establish a serial communication with the PlugComputer. 1. Installing the USB serial driver for Windows In order to communicate with your PlugComputer via the Serial/JTAG interface, you should install the driver for the FTDI chip (usb-to-serial device). Copy the IONICS_JTAG_USBdriver.zip from the disc (/HOST/CONSOLE) to your Windows host. Unzip the file. Connect the PlugComputer into the Windows host using the mini USB cable. Power-up the PlugComputer. Please refer to the instructions below on how to install the driver. 8/11
Install the new hardware by using the Hardware Wizard. Select Install from a list or specific location and click next. Browse your Windows host to locate the directory IONICS_JTAG_USBdriver and click OK. 9/11
Continue the installation when the prompt box appears. Repeat the installation procedure for USB Serial Converter A. Repeat the installation procedure for USB Serial Port. 2. Installing and configuring Tera Term TeraTerm is one of the serial communication applications for Windows which you can use to communicate with your PlugComputer after installing the required FTDI (usb-toserial) device driver. Copy the teraterm-4.60.exe from the disc (/HOST/CONSOLE) to your Windows host. Install TeraTerm. After installation, attach the PlugComputer to your Windows host and run TeraTerm. Configure the terminal by following the instructions below: 10/11
Open TeraTerm and select Serial connection. Select the USB Serial Port Go to Setup->Serial Port and configure the baud rate to 115200. Click OK and you should be able to see the logs generated by the plugcomputer. IV. Additional Links For the latest news and updates regarding the plugcomputer, please visit these links: http://www.openplug.org/ http://plugcomputer.org/plugwiki/index.php/main_page 11/11