I configured one of my ZipIts to be a serial terminal for the beagleboard. Like the ZipIt, the beagleboard has Uboot installed. The flexibility of Uboot allows many different ways to get an image into RAM. The methods available for the beagleboard require a serial connection. Both methods outlined will require minicom to be installed on the ZipIt in order to communicate with the beagleboard. The lrzsz package is also needed, it can sometimes be included in the minicom package, but double check in case it’s not.
z2sid-rc3:~#: apt-get install minicom
z2sid-rc3:~#: apt-get install lrzsz
I first connected the beagleboard to the ZipIt the same way I was connecting it to my laptop. This setup requires a USB to serial converter, the usb-serial driver and minicom. Lots of cables, but that’s how the beagleboard is configured by default, out of the box. First of all, before plugging anything into the ZipIt’s USB, load the usb-serial driver.
z2sid-rc3:~#: modprobe usbserial
The USB hub can now be connected to the ZipIt. Give the USB devices a second to register, a /dev/ttyUSB0 node will be created. Attach a minicom session with the following command.
z2sid-rc3:~$: minicom -D /dev/ttyUSB0
A little investigating and I was able to eliminate most of the wires and the USB hub by using USB serial over the beagle’s OTG port (in the prior setup, the OTG cable was only providing power). This setup requires a different driver to be running on the ZipIt and the beagleboard’s Uboot environment variables need to be modified. Start with changing the Uboot enviroment variables. Enter Uboot and issue the following commands. Note: this will require the setup from Method 1 in order to get a Uboot prompt on the ZipIt.
OMAP3 beagleboard.org # setenv usbtty cdc_ac
OMAP3 beagleboard.org # saveenv
OMAP3 beagleboard.org # reset
OMAP3 beagleboard.org # setenv stdout usbtty; setenv stdin usbtty; setenv stderr usbtty; saveenv
At this point Method 1 will no longer work on the beagleboard, as we have changed the stdin and stdout.
1. Plug the ZipIt into AC power and boot z2sid-rc3.
2. Load the cdc_acm driver with the following command.
z2sid-rc3:~#: modprobe cdc-acm
3. Connect the beagleboard’s OTG cable to the ZipIt as shown in the picture for Method 2.
4. There should be a new /dev/tttyACM0 node present now, attach minicom to it.
z2sid-rc3:~$: minicom -D /dev/ttyACM0
The clonetty utility is needed for keeping minicom alive when plugging and unplugging the beagleboard. It places a pseudo tty in between the ttyACM0 node and minicom. The pseudo tty never goes down, and when the ttyACM0 node appears, clonetty takes care of setting up the link automatically. The utility consists of a single C file and can be compiled with this make file. I built mine right on z2sidx-rc3. It’s assumed you have everything setup for Method 2. These are the steps to set up clonetty and minicom.
1. Plug the ZipIt into AC power, boot Linux.
2. Connect the beagleboard’s OTG cable to the ZipIt as shown in the picture for Method 2.
3. Start minicom and configure the options to connect with the beagleboard (i.e. 115200 8N1), save as dfl and quit.
z2sid-rc3:~$: minicom -D /dev/ttyACM0 -o
4. Start clonetty in the background.
z2sid-rc3:~$: clonetty /dev/ttyACM0 &
3. Observe the output:
4. Attach minicom to the pty that clonetty just created.
z2sid-rc3:~$: minicom -p /dev/pts/3 -o
5. You should now be able to unplug/plug or reset the beagleboard and the minicom connection will stay up.
The omap-u-boot-utils package has source files needed for communicating with uboot and automating a serial transfer of an image into RAM. There isn’t much OMAP specific code, the routines should work with any uboot’ed target. This beagle_kermit.sh script uses the kermit method of serial transfer. Start clonetty as described above, minicom is not needed. Change to the directory with the omap-u-boot-utils and execute beagle_kermit.sh. Note: the ‘port’ variable at the head of the script may need adjustment, it should match the output from clonetty.