« NAS-4220 explorations - What is inside? »

Redboot TFTP

9 March 2008

Lets see if we can get the TFTP upload working. On start up the boot loader will present you this menu.

                              Boot Menu
==============================================================================
0: Reboot                                   1: Start the Kernel Code
2: List Image                               3: Delete Image
4: Create New Image                         5: Enter Command Line Interface
6: Set IP Address                           7: Set MAC Address
8: Show Configuration                       F: Create Default FIS
X: Upgrade Boot                             Y: Upgrade Kernel
Z: Upgrade Firmware                         A: Upgrade Application
R: Upgrade RAM Disk

We select "2" so can have a peek where we should to load the linux kernel.

=> Select: 2

Name              FLASH addr           Mem addr    Datalen     Entry point
BOOT              0x30000000-3001FFFF  0x00000000  0x00020000  0x00000000
FIS directory     0x30FE0000-30FFFFFF  0x30FE0000  0x00001400  0x00000000
Kern              0x30020000-3031FFFF  0x01600000  0x00300000  0x01600000
Ramdisk           0x30320000-3091FFFF  0x00800000  0x00600000  0x00800000
Application       0x30920000-30F1FFFF  0x00000000  0x00600000  0x00000000
CurConf           0x30F40000-30FDFFFF  0x00000000  0x000A0000  0x00000000
VCTL              0x30F20000-30F3FFFF  0x00000000  0x00020000  0x00000000

                              Boot Menu
==============================================================================
0: Reboot                                   1: Start the Kernel Code
2: List Image                               3: Delete Image
4: Create New Image                         5: Enter Command Line Interface
6: Set IP Address                           7: Set MAC Address
8: Show Configuration                       F: Create Default FIS
X: Upgrade Boot                             Y: Upgrade Kernel
Z: Upgrade Firmware                         A: Upgrade Application
R: Upgrade RAM Disk

No we press "5" to get the command line.

=> Select: 5

sl-boot>load -m tftp -b 0x01600000
TFTP Server IP Address: 192.168.0.201
Image Path and name(e.g. /images/zImage): /srv/tftp/vmlinux
TFTP Download /srv/tftp/vmlinux from 192.168.0.201 ...

Failed for TFTP! (-3) timeout

Hmm, thats not good. I can ping the server but tftp isn’t working. Well lets fire up wireshark and try it again. The packet log shows that the box is actually sending tftp packets but that they aren’t handled by the server. TFTP is started using the inetd. A quick check shows that it isn’t running. Hmm, why doesn’t Ubuntu start the inetd when i just installed a server that is managed through it?

frank@dexter:~$ sudo /etc/init.d/openbsd-inetd start
[sudo] password for frank:
 * Starting internet superserver inetd                                                   [ OK ]

Lets try it again.

sl-boot>load -m tftp -b 0x01600000
TFTP Server IP Address: 192.168.0.201
Image Path and name(e.g. /images/zImage): /srv/tftp/vmlinux
TFTP Download /srv/tftp/vmlinux from 192.168.0.201 ....................................
.......................................................................................
..................

Successful to download by TFTP! Size=8388608

OK, this was fast. The upload took only a few seconds (compared to over half on hour using XModem). Having TFTP will make developing a ew image some much more fun!


Leave a reply