Upgrading Firmware
2 Comments

The firmware is all the code running on the Qwerk, including the Linux operating system and the TeRK application which enables you to control your Qwerk using the TeRK desktop software. As we fix bugs and introduce new features, we periodically release new versions of the firmware.

We will do our best to ensure that the desktop applications remain backward-compatible with older firmware releases, but if you want the new features and fixes, you will need to update your Qwerk's firmware.

This document explains how to upgrade your firmware to the latest version (3.1.138). Please see the release notes for a list of all changes included in this version.

Network Setup

You will first need to network your Qwerk so it can download the latest firmware from our server. The setup required will vary slightly, depending on the type of equipment you have and your current network setup. The two most common home network setups are shown in figures 1 and 2 below.

Figure 1: Network without a router

The first, shown in figure 1, consists of a cable/DSL modem and a computer connected to it with an Ethernet cable.

Figure 2: Network with a router

The second, shown in figure 2, consists of a cable/DSL modem connected to a router. The computer is then connected to the router either with an Ethernet cable or wirelessly (if both the computer and router support wireless networking).

Figure 3: Qwerk networked without a router

If your network has no router (figure 1), and your cable/DSL modem has only a single Ethernet port (which is currently used to connect to your computer), then you should network your Qwerk as shown in figure 3. Remove the Ethernet cable from your computer and plug it into the Qwerk. Then, connect the Qwerk and your computer using the serial cable and adapter supplied with your Qwerk (this is represented in figure 3 by the dashed line). Plug the serial cable into the UART1 port on the Qwerk. If your computer does not have a serial port, you will need to use a USB-Serial adapter, available from most computer stores.

Figure 4: Qwerk networked without a (separate) router

If your network has no router (figure 1), but your cable/DSL modem has multiple Ethernet ports (because it also functions as a router), then you should network your Qwerk as shown in figure 4. Use an ethernet cable to connect the modem to the Qwerk. Then, connect the Qwerk and your computer using the serial cable and adapter supplied with your Qwerk (this is represented in figure 4 by the dashed line). Plug the serial cable into the UART1 port on the Qwerk. If your computer does not have a serial port, you will need to use a USB-Serial adapter, available from most computer stores.

Figure 5: Qwerk networked with a router

Finally, if your network has a router (figure 2), then you should network your Qwerk as shown in figure 5. Use an ethernet cable to connect the router to the Qwerk. Then, connect the Qwerk and your computer using the serial cable and adapter supplied with your Qwerk (this is represented in figure 5 by the dashed line). Plug the serial cable into the UART1 port on the Qwerk. If your computer does not have a serial port, you will need to use a USB-Serial adapter, available from most computer stores.

Qwerk Power Supply

We strongly suggest using AC power instead of a battery to power your Qwerk while upgrading the firmware. If you use a battery and the battery dies while installing the new firmware, your Qwerk could be left in an inoperable state.

However you choose to power your Qwerk, keep it turned off until these instructions tell you to turn it on.

Terminal Software Configuration

You will use special software called a terminal emulator to communicate with the Qwerk over the serial cable. Under MacOS X or Linux, you can use the Terminal application and the "screen" command (or "minicom", if available). Under Windows, you can use HyperTerminal.

In the instructions below, blocks with a dashed border and a grey background represent what you'll see in the terminal emulator. Bold, red text within those blocks is text you enter.

Terminal Software Configuration: MacOS X or Linux

First, power on your Qwerk. Then launch the Terminal application on your computer. You should see a command prompt. At the prompt, enter the following (NOTE: these instructions assume that /dev/ttyS0 corresponds to your serial port; if not, enter the correct device name for your system's serial port.):

$ screen -U /dev/ttyS0 57600

The screen command should clear the window, leaving you with an empty Terminal window. Type ENTER, and then you should see the following (don't worry if the date in parenthesis differs):

BusyBox v1.00 (2006.07.19-15:00+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ #

You're now at the Qwerk Linux command prompt. However, we want the Qwerk's RedBoot command prompt to install the firmware, so power-cycle the Qwerk (i.e. turn it off and then back on), but then type CTRL-C within one second of doing so. If you did it quickly enough, you should see something like the following, ending with a RedBoot> prompt:

~ # +Ethernet eth0: MAC address 00:dc:6c:5c:d7:25
IP: 192.168.1.120/255.255.255.0, Gateway: 192.168.1.1
Default server: 192.168.1.103, DNS server IP: 192.168.1.1

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version v2_0 - built 11:01:50, Jan  2 2007

Platform: Cirrus Logic EDB9302 Board (ARM920T) Rev A
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x02000000, 0x00041fa8-0x01fdd000 available
FLASH: 0x60000000 - 0x60800000, 64 blocks of 0x00020000 bytes each.
== Executing boot script in 1.000 seconds - enter ^C to abort
^C
RedBoot>

If you didn't type CTRL-C within 1 second of powering on the Qwerk, you'll see output from the Linux Kernel booting up. That's OK, just keep trying to power-cycle it and type CTRL-C so you can get to the RedBoot> prompt.

Now that you have a RedBoot prompt, you're ready to download and install the new firmware images. You may now skip to Configuring the Qwerk's Network Settings.

Terminal Software Configuration: Windows

Figure 6: HyperTerminal's New Connection window

Launch HyperTerminal (Start --> Programs --> Accessories --> Communications --> HyperTerminal). You should see a New Connection window (figure 6). Enter a name for this connection (e.g. "Qwerk"), select an icon if you want, and click the OK button.

Figure 7: HyperTerminal's Connect To window

You should now see the "Connect To" window (figure 7). Choose your serial port (probably COM1), and click the OK button.

Figure 8: HyperTerminal's Port Settings window

You should now see the "Port Settings" window (figure 8). Enter the various settings exactly as shown and then click the OK button.

HyperTerminal is now ready to communicate with Qwerks! You can save this connection configuration for future use, if you wish (File --> Save As...).

You're now ready to turn on the Qwerk. Once you do so, it'll spit out some system info and then pause for 1 second before executing its boot script. You don't want it to execute the boot script yet, so you're going to type CTRL-C to abort it.

Go ahead and turn on the Qwerk, but type CTRL-C immediately afterwards.

It should look something like this:

~ # +Ethernet eth0: MAC address 00:dc:6c:5c:d7:25
IP: 192.168.1.120/255.255.255.0, Gateway: 192.168.1.1
Default server: 192.168.1.103, DNS server IP: 192.168.1.1

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version v2_0 - built 11:01:50, Jan  2 2007

Platform: Cirrus Logic EDB9302 Board (ARM920T) Rev A
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x02000000, 0x00041fa8-0x01fdd000 available
FLASH: 0x60000000 - 0x60800000, 64 blocks of 0x00020000 bytes each.
== Executing boot script in 1.000 seconds - enter ^C to abort
^C
RedBoot>

If you didn't type CTRL-C within 1 second of powering on the Qwerk, you'll see output from the Linux Kernel booting up. That's OK, just keep trying to power-cycle it and type CTRL-C so you can get to the RedBoot> prompt.

Now that you have a RedBoot prompt, you're ready to download and install the new firmware images. You may now continue with Configuring the Qwerk's Network Settings.

Configuring the Qwerk's Network Settings

Pay attention to the IP and Gateway IP addresses shown on a line a few lines above the RedBoot prompt. The IP address should is the address of the Qwerk, the Gateway should be the IP address of your router (or modem). If you're sure that both IP addresses are correct, then you can skip down to the Installing the Firmware section. Otherwise, continue to follow these directions to set them for your network.

You can test whether the IP address settings are correct by entering the following:

RedBoot> ping -v -n 3 -h 128.2.179.203

If it's successful, you'll see something like the following:

RedBoot> ping -v -n 3 -h 128.2.179.203
Network PING - from 192.168.0.3 to 128.2.179.203
 seq: 1, time: 2 (ticks)
 seq: 2, time: 2 (ticks)
 seq: 3, time: 2 (ticks)
PING - received 3 of 3 expected
RedBoot>

If you don't see this, then one or both of the IP addresses is incorrect. Continue with these instructions to fix it.

If your network looks like figure 3 above, then the IP and Gateway addresses should be the same as whatever is in your computer's network settings (since we moved the Ethernet cable from your computer to your Qwerk). Check your computer's network settings and write down both its and its Gateway IP addresses--we'll use them in the next step.

Otherwise, if your network has a router (figures 4 or 5 above), then the Qwerk's IP address should be whatever address your router has assigned it. You can find out by checking your router's DHCP client table (consult your router's manual for instructions, if necessary). The Gateway IP address should simply be the router's IP address (e.g. 192.168.0.1). Record both the Qwerk's IP address and your router's IP address--we'll use them in the next step.

Execute the fconfig command to set the Local IP and Gateway IP addresses. Enter true for whether the script should run at boot, enter the script exactly as shown, and also enter the IP addresses you recorded above for the Qwerk and Gateway. Make sure you enter your values for the Gateway and Local IP addresses! The values 192.168.0.1 and 192.168.0.3 shown below are for example only. However, the value for Default server IP address must be 128.2.179.203 (it is the IP address of our server which hosts the firmware). Accept the default values for all the other options. Make sure to enter yes (y) when prompted whether to update the RedBoot non-volatile configuration.

RedBoot> fconfig
Run script at boot: true
Boot script:
.. fis load ramdisk
.. fis load zImage
.. exec -r 0x800000 -s 0x600000
Enter script, terminate with empty line
>> fis load ramdisk
>> fis load zImage
>> exec -r 0x800000 -s 0x600000
>>
Boot script timeout (1000ms resolution): 1
Use BOOTP for network configuration: false
Gateway IP address: 192.168.0.1
Local IP address: 192.168.0.3
Local IP address mask: 255.255.255.0
Default server IP address: 128.2.179.203
DNS server IP address: 192.168.1.1
Set eth0 network hardware address [MAC]: false
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
Update RedBoot non-volatile configuration - continue (y/n)? y
... Erase from 0x607c0000-0x607c1000: .
... Program from 0x01fde000-0x01fdf000 at 0x607c0000: .
RedBoot>

You should now either enter the reset command, or simply power-cycle the Qwerk. Either way, be sure to type CTRL-C within one second to re-enter the RedBoot prompt.

You can now test your changes using the ping command from above. This time, the pings should succeed:

RedBoot> ping -v -n 3 -h 128.2.179.203
Network PING - from 192.168.0.3 to 128.2.179.203
 seq: 1, time: 2 (ticks)
 seq: 2, time: 2 (ticks)
 seq: 3, time: 2 (ticks)
PING - received 3 of 3 expected
RedBoot>

If it still doesn't work, double check your network settings and re-enter the settings into fconfig. If you still can't get the ping to succeed, feel free to ask for help on our forums.

Installing the Firmware

First, we'll load three images from our server into the Qwerk's RAM.

Enter the following three load commands (the range of number displayed after "Raw file loaded" may be different):

RedBoot> load -r -v -b 0x1000000 -m http /firmware/3.1.138/optfs.out
|
Raw file loaded 0x01000000-0x01228b6f, assumed entry at 0x01000000
RedBoot> load -r -v -b 0x800000 -m http /firmware/3.1.138/ramdisk.gz
\
Raw file loaded 0x00800000-0x009cff0d, assumed entry at 0x00800000
RedBoot> load -r -v -b 0x80000 -m http /firmware/3.1.138/zImage
/
Raw file loaded 0x00080000-0x0019d137, assumed entry at 0x00080000
RedBoot>

Now we'll initialize the flash filesystem. Answer yes (y) when it asks if it's ok initialize. The output should look like this (don't worry if the numbers in the output differ):

RedBoot> fis init -f
About to initialize [format] FLASH image system - continue (y/n)? y
*** Initialize FLASH Image System
... Erase from 0x60040000-0x60fc0000: .........................
... Erase from 0x60fe0000-0x60fe0000:
... Erase from 0x61000000-0x61000000:
... Erase from 0x60fe0000-0x61000000: .
... Program from 0x01fdf000-0x01fff000 at 0x60fe0000: .
RedBoot>

Now we'll load the ramdisk and zImage images into flash (don't worry if the numbers in the output differ):

RedBoot> fis create -b 0x800000 -l 0x300000 ramdisk
... Erase from 0x60040000-0x60340000: ........................
... Program from 0x00800000-0x00b00000 at 0x60040000: ...............
... Erase from 0x60fe0000-0x61000000: .
... Program from 0x01fdf000-0x01fff000 at 0x60fe0000: .
RedBoot> fis create -b 0x80000 -l 0x180000 -e 0x80000 zImage
... Erase from 0x60340000-0x604c0000: ............
... Program from 0x00080000-0x00200000 at 0x60340000: ............
... Erase from 0x60fe0000-0x61000000: .
... Program from 0x01fdf000-0x01fff000 at 0x60fe0000: .
RedBoot>

Before loading the optfs image into flash, you need to first determine which version of the Qwerk hardware you have. The Qwerk hardware version number is printed on the Qwerk board to the left of the power switch between the blue analog inputs terminal block and the top part of the metal enclosure. See figure 9 for examples of what you should see.

 
Figure 9: Qwerk hardware version numbers

Determine whether you have a 1.1 Qwerk or a 1.2 Qwerk, and then use the appropriate command below to load the optfs image into flash.

If you have a version 1.1 Qwerk, use this command (don't worry if the numbers in the output differ):

RedBoot> fis create -b 0x1000000 -l 0x300000 optfs
... Erase from 0x603c0000-0x606c0000: ........................
... Program from 0x01000000-0x01300000 at 0x603c0000: ...............
... Erase from 0x607e0000-0x60800000: .
... Program from 0x01fdf000-0x01fff000 at 0x607e0000: .
RedBoot>

If you have a version 1.2 Qwerk, use this command (don't worry if the numbers in the output differ):

RedBoot> fis create -b 0x1000000 -l 0xb00000 optfs
... Erase from 0x604c0000-0x60fc0000: ........................
... Program from 0x01000000-0x01b00000 at 0x604c0000: ...............
... Erase from 0x60fe0000-0x61000000: .
... Program from 0x01fdf000-0x01fff000 at 0x60fe0000: .
RedBoot>

The difference in the two commands is simply the value for the -l argument, which specifies the length. Version 1.1 Qwerks have 8 megs of flash RAM, but version 1.2 Qwerks have 16 megs of flash RAM. Using a value of 0xb00000 for the revision 1.2 Qwerks enables the use of the extra 8 megs of RAM.

You're done with the firmware upgrade! Now we'll test to make sure everything worked OK.

Testing

Either enter the reset command, or simply power-cycle the Qwerk. This time, however, don't type CTRL-C after doing so, since we want the Qwerk to boot up into Linux. You should something similar to the following (it may take a minute or so):

RedBoot> reset
... Resetting.
+Ethernet eth0: MAC address 00:dc:6c:5c:d7:25
IP: 192.168.0.3/255.255.255.0, Gateway: 192.168.0.1
Default server: 128.2.179.203, DNS server IP: 192.168.1.1

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version v2_0 - built 11:01:50, Jan  2 2007

Platform: Cirrus Logic EDB9302 Board (ARM920T) Rev A
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x02000000, 0x00041fa8-0x01fdd000 available
FLASH: 0x60000000 - 0x61000000, 128 blocks of 0x00020000 bytes each.
== Executing boot script in 1.000 seconds - enter ^C to abort
RedBoot> fis load ramdisk
RedBoot> fis load zImage
RedBoot> exec -r 0x800000 -s 0x600000
Using base address 0x00080000 and length 0x00180000
Uncompressing Linux...................................................
.................. done, booting the kernel.

Wait a few seconds while the kernel boots. You should eventually see a message (shown below) that prompts you to type Enter to activate the Linux console. Do so, and you should see:

Please press Enter to activate this console.

BusyBox v1.00 (2007.01.02-16:54+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ #

Congratulations, your Qwerk is now running the latest firmware!

If you're using the screen command in the MacOS X or Linux Terminal application, type CTRL-A and then a CTRL-\ to exit screen (answer yes if it asks you whether you really want to quit). You may then quit the Terminal application.

If you're using HyperTerminal under Windows, you may quit the application (answer "Yes" if it asks you whether you are sure you want to disconnect).

2 COMMENTS

Displaying 1 through 2.  

Re: Installing firmware required extra switch
chris - 12:08pm May 3, 07

@tonyv...

You don't need the -h switch if you set the "Default server IP address" correctly in fconfig.

You might want to double-check the value next time around. If it *looks* ok, then you may have typed an arrow key or some other key that sends an invisible character, which will cause it to fail. Best thing to do is to delete it entirely and carefully re-type it. That should fix it.

Installing firmware required extra switch
tonyv - 04:03pm Apr 19, 07

Hi,
The redboot "load" commands listed above didn't work for me. I tried adding "-h 128.2.179.203", and then it worked fine. I don't see how it could possibly work without this switch, actually, unless you set up a local file server first.

Displaying 1 through 2.  

RECENT COMMENTS

Re: Installing firmware required extra switch
chris - 12:08pm May 3, 07

@tonyv...

You don't need the -h switch if you set the "Default server IP address" correctly in fconfig.

You might want to ...

Installing firmware required extra switch
tonyv - 04:03pm Apr 19, 07

Hi,
The redboot "load" commands listed above didn't work for me. I tried adding "-h 128.2.179.203", and then it worked fine. I ...