Installing Linux on the Lyrtech SFFSDR

WARNING: No instructions exist for restoring the software provided with the SFFSDR board. I can not answer any questions about the restore process, proceed at your own risk.

There is a listserv for Linux on the SFF SDR. To subscribe to the list send an email to listserv@listserv.vt.edu with the following in the body of the email. The subject line doesn't matter.

subscribe sffsdr Firstname Lastname

List archives are at http://listserv.vt.edu/archives/sffsdr.html

Basic procedure:

  • Download required software
  • Erase flash
  • Install u-boot into flash with DV Flasher
  • Write Linux kernel into flash with u-boot
  • Create NFS server that exports the SFF SDR root file system
  • Boot SFF SDR and run Linux

This document assumes you are skilled with Linux and you can work out the bits I forgot to explain. Especially finding dependencies I forget to mention, like mono, and you can set up a NFS server. You should be able to operate a serial port. You will also need to do kermit downloads, at least until we get u-boot working with the ethernet.

Before starting, attach a serial port and your favorite terminal software (that can do kermit, I use kermit) and set the speed to 115200n81.

If you get stuck and need some quick answers, look for me (Crofton) in #davinci on irc.freenode.net.

Download required software

DVFlasher is at http://trac.geekisp.com/opensdr/browser/HW_tools/sff_sdr/serial_loader/t.... U-boot is built from git with a patch I need to create.

Erase Flash

  • Set dip switches to serial load. Switch block marked S2. Switches 1 and 2, off; 3 and 4 on.
  • Reset the board (with the reset switch or cycle power)
  • WARNING: This step erases the existing software on the SFF SDR! Run:
    $ sudo mono DVFlasher_1_14.exe -enand
    
  • When the erase finishes, press return to exit.

Install U-boot

  • Leave the dip switches in the serial load position.
  • Reset the board.
  • Run:
    $ sudo mono DVFlasher_1_14.exe -s 84000000 -l 84000000-fnandbin u-boot-davinci-sffsdr.bin
    
  • Press return to exit when the load finishes.

Loading the kernel into flash

  • Move the dip switches to boot from NAND. All switches off.
  • Start your serial interface program.
  • Reset the board. You should get to the u-boot prompt.
  • Now erase flash, load the kernel, write to flash (After the mass erase, you can skip the erase step. I include it here for use when reflashing the kernel without erasing the entire flash.)
  • Set up a tftp server and put the kernel file uImage-davinci-sffsdr.bin in the tftp server directory.
    > nand erase 0x20A0000 0x160000
    > tftpboot 0x85000000 uImage-davinci-sffsdr.bin
    > nand write 0x85000000 0x20A0000 0x160000
    

    Now set up the u-boot environment (You should only need to do this once)

    > setenv bootcmd 'nboot 80700000 0 20a0000; bootm'
    > setenv bootargs console=ttyS0,115200n8 root=/dev/nfs rw noinitrd ip=dhcp \
    nfsroot=192.168.1.101:/nfsroot/sffsdr eth=${ethaddr}
    > saveenv
    
  • Now use the > boot command to boot the kernel. It should run until it fails to mount root. (Since the NFS server is not setup)

Setup the NFS server with the root file system

  • Setup the NFS server software for your particular distro. Be sure to pay attention to firewall configuration (I turn mine off ...)
  • In /etc/exports add the line /nfsroot/sffsdr92.168.1.0/255.255.255.0(rw,no_root_squash,no_all_squash
  • Create the directory /nfsroot/sffsdr. (Or whatever you prefer)
  • cd into /nfsroot/sffsdr and run tar xzvf console-image-davinci-sffsdr.tar.gz
  • Edit the line in etc/network/interfaces from
    # Wired or wireless interfaces
    auto eth0
    iface eth0 inet dhcp
    iface eth1 inet dhcp
    

    to:

    # Wired or wireless interfaces
    #auto eth0
    iface eth0 inet dhcp
    iface eth1 inet dhcp
    

    If you don't the boot will hang.

  • Reboot the board again, this time you should mount root. It is normal to take a very long time to synthesize the hotplug events.
  • Login as root, hit return for the password.

Notes

  • Last address is 0x7fe0000 (well, likely address of last block)
  • If you wipe the boot loader, the RBL defaults to serial loader, so you can reflash u-boot without setting the switches to serial.