Next: Kluges required for rev.
Up: Using the hardware
Previous: If you encounter problems
  Contents
Nothing could be easier than downloading new firmware into a board.
Actually, many things could be easier. I thought only board parents would ever
have to do this, so I didn't make it user-friendly at all.
- Find a Linux machine on which you can be root; be root.
- Place the following line in your
/etc/fstab
file:
none /proc/bus/usb usbfs devmode=0660,devgid=600 0 0
but change devgid=600
to your group ID.
- Say
mount /proc/bus/usb/
; if mount complains (which is
unlikely on modern systems) you will have to go to step
4 and rebuild your kernel; otherwise, go to
step 5.
- If you need to recompile your kernel because you determined in
step 3 that your kernel does not have usbfs support, make sure you have a recent 2.4-series kernel
(2.4.26 works on our SURFing machine at LBL); then look for
the section of the .config file that contains the
CONFIG_USB
flags and add the flag
CONFIG_USB_DEVICEFS=y
; recompile your kernel and repeat
step 3.
- Build and load the EZ-USB firmware download module from http://ezusb2131.sourceforge.net.
- Remove the jumper on the i2c SDA line (J4) on the SURF board
to prevent the EZ-USB from loading the current EEPROM contents.
- Powercycle the SURF board. Note the power should be on at the
end of this step.
- Replace the SDA jumper; place a jumper on the EEPROM WP line
(JP2) to disable EEPROM write protection.
- In the jboard/firm directory type cat i2c_firm.ihx >
/proc/ezusb/dev0; at this point the DEBUG LED on the
SURF board should be flashing.
- Get libusb from
http://libusb.sourceforge.net
,
release 0.1.8 or later.
- Get the Perl interface to
libusb
from
http://www.linuxhelp.com.au/people/anthony/perl-libusb/
.
- Either follow the instructions in steps 13
through 14 (to build your own firmware) or skip to step 15 (if someone
built the firmware for you).
- Get the Small Device C Compiler
(
http://sdcc.sourceforge.net/
), release 2.4 or later.
- In the
jboard/firm
directory say make SN=
board
serial number; this will produce a file called firm.ee
.
You can ignore compiler complaints about missing 8051.h
.
Remember that the board serial number needs to be in the format
yyyymmxxxnnn (year, month, birthplace, three-digit
number).
- In the same directory type
./eeprom.pl -d /proc/bus/usb/xxx/yyy -w -i firm.ee; xxx is the bus on which the board is attached (001, 002), and yyy is the device number. When a device is
attached to the USB, it is given a device number between 1 and
127; to figure out the device number of the 8051 on the SURF board, plug the board in and check which device in
/proc/bus/usb/xxx/
is the
most recent. Note that the number will change every time you
power cycle the SURF board (same effect as unplugging the cable).
- Remove the WP jumper and powercycle the SURF board; then check
with
surf_print_boards()
from an AMBUSH that the board
has the intended serial number and firmware revision.
Next: Kluges required for rev.
Up: Using the hardware
Previous: If you encounter problems
  Contents
Johannes Muelmenstaedt
2004-10-07