Soekris BIOS upgrade using MacOSx Snow Leopard
June 2017
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
About
This site is an effort to share some of the base knowledge I have gathered through all this years working with Linux, FreeBSD, OpenBSD, Python or Zope, among others. So, take a look around and I hope you will find the contents useful.
Recent Entries
Recent Comments
Recent Trackbacks
Categories
OpenBSD (9 items)
BSD (0 items)
FreeBSD (19 items)
Linux (3 items)
Security (3 items)
Python (22 items)
Zope (13 items)
Daily (144 items)
e-shell (9 items)
Hacks (14 items)
PostgreSQL (3 items)
OSX (8 items)
Nintendo DS (0 items)
enlightenment (0 items)
Apache (3 items)
Nintendo Wii (1 items)
Django (24 items)
Music (12 items)
Plone (7 items)
Varnish (0 items)
Lugo (2 items)
Sendmail (0 items)
europython (7 items)
Cherokee (1 items)
self (1 items)
Nature (1 items)
Hiking (0 items)
uwsgi (0 items)
nginx (0 items)
cycling (9 items)
Networking (1 items)
DNS (0 items)
Archives

Syndicate this site (XML)

RSS/RDF 0.91

30 diciembre
2010

Soekris BIOS upgrade using MacOSx Snow Leopard

How to upgrade your soekris' BIOS using a macbook and a usb-to-serial adapter

I've been working with soekris hardware for quite some time now, but I didn't need to upgrade the firmware/BIOS of any soekris box until today. Even if the process is well documented in the soekris wiki, I've found that it was a little bit tricky to do it using a MacBook running Snow Leopard. So let me explain how I managed to do it.

First let's do some inventory for this small tutorial. We will need:

1- A soekris box/board (I used a 5501 but probably this instructions will work with previous versions of soekris hardware like the 4801 or the 4501)

The soekris board itself

2- A macbook/macbookpro (as all the trouble I've found following the official docs for upgrading the soekris BIOS seems to be related to MacOSx)

The unibody aluminium MacBook

3- A usb-to-serial adapter (we need this, because the MacBook does not have a serial connector)

A usual usb-to-serial adapter, there are multiple types of devices like this one, with different shapes.

4- A RS-232 serial cable (to connect the MacBook to the soekris and get a serial console)

A RS-232 serial cable

5- The needed firmware/BIOS upgrade files for your soekris hardware, just check http://www.soekris.com/downloads.htm to see which files you will need.

6- Some utilities to send the firmware files to the soekris using the RS-232 link. The easiest way to install them is using MacPorts (so if you don't have MacPorts installed on your system go ahead and install them now):

sudo port -v install lrzsz

Ok, now that we've everything we need, let's go for it!

First we have to attach one end of the RS-232 cable to the soekris box (I don't have pictures of this but you can use google to see how to do it with some pictures) and then we have to attach the other end to the usb-to-serial adapter. Then we have to connect the usb adapter to the MacBook.

Now we have to open Terminal.app and see if a device called /dev/tty.PL2303-SOMETHING exists. Just use ls this way:

ls -l /dev/tty.PL2303-*

You should see something like /dev/tty.PL2303-00001004 (the number after the - will be probably different, as it changes depending on the OSx version and the usb-to-serial adapter itself). If the device does not exist, OSx does not recognize the hardware and you need to install some stuff before using it. Just get the needed drivers from here:

http://osx-pl2303.sourceforge.net

Install the needed stuff and repeat the process until you find the device in the correct place.

Once you find the device, it is time to establish a connection between the MacBook and the soekris box using a serial console. We've multiple options to do that. we can use screen:

screen /dev/tty.PL2303-00001004 19200

we can use cu:

sudo cu -l /dev/tty.PL2303-00001004 -s 19200

and there are even more options, like minicom and some others.

We are going to use cu because it will allow us to send the needed firmware files to the soekris using XMODEM (Yes!, like in the old times!). So, we run cu:

sudo cu -l /dev/tty.PL2303-00001004 -s 19200

and we plug the power cord in the soekris power socket. As soon as it boots up, we will see something like this in the screen where we are running cu:

POST: 012345689bcefghips1234ajklnopqr,,,tvwxy


comBIOS ver. 1.32  20070606  Copyright (C) 2000-2007 Soekris Engineering.

net5501

0256 Mbyte Memory                        CPU Geode LX 434 Mhz


Slot   Vend Dev  ClassRev Cmd  Stat CL LT HT  Base1    Base2   Int
-------------------------------------------------------------------
0:01:2 1022 2082 10100000 0006 0220 08 00 00 A0000000 00000000 10
0:06:0 1106 3053 02000096 0117 0210 08 40 00 0000E101 A0004000 11
0:07:0 1106 3053 02000096 0117 0210 08 40 00 0000E201 A0004100 05
0:08:0 1106 3053 02000096 0117 0210 08 40 00 0000E301 A0004200 09
0:09:0 1106 3053 02000096 0117 0210 08 40 00 0000E401 A0004300 12
0:17:0 1814 0301 02800000 0117 0410 08 40 00 A0008000 00000000 15
0:20:0 1022 2090 06010003 0009 02A0 08 40 80 00006001 00006101
0:20:2 1022 209A 01018001 0005 02A0 08 00 00 00000000 00000000
0:20:4 1022 2094 0C031002 0006 0230 08 00 00 A0010000 00000000 07
0:20:5 1022 2095 0C032002 0006 0230 08 00 00 A0011000 00000000 07

 3 Seconds to automatic boot.   Press Ctrl-P for entering Monitor.

Good, this is the usual information we will see when booting a soekris board. If we look carefully, we will see the version of the current firmware running in that board:

comBIOS ver. 1.32  20070606  Copyright (C) 2000-2007 Soekris Engineering.

This time it is version 1.32, a little bit outdated as latest version is 1.33c.

Ok, we have to press ctrl+p when the BIOS asked us to do it (otherwise the boot process will go on, trying to boot from an attached CompactFlash card, a hardrive or using PXE Boot). Once we've pressed the shortcut, we will see a command prompt where we can use some commands to interact with the soekris BIOS. There is even a small help containing a list of available commands:

comBIOS Monitor.   Press ? for help.

> ?
comBIOS Monitor Commands

boot [drive][:partition] INT19 Boot
reboot                   cold boot
download                 download a file using XMODEM/CRC
flashupdate              update flash BIOS with downloaded file
time [HH:MM:SS]          show or set time
date [YYYY/MM/DD]        show or set date
d[b|w|d] [adr]           dump memory bytes/words/dwords
e[b|w|d] adr value [...] enter bytes/words/dwords
i[b|w|d] port            input from 8/16/32-bit port
o[b|w|d] port value      output to 8/16/32-bit port
run adr                  execute code at adr
cmosread [adr]           read CMOS RAM data
cmoswrite adr byte [...] write CMOS RAM data
cmoschecksum             update CMOS RAM Checksum
set parameter=value      set system parameter to value
show [parameter]         show one or all system parameters
?/help                   show this help

>

For the purpose of upgrading the firmware/BIOS, we need two of those commands, download (to get a copy of the new firmware) and flashupdate (to perform the upgrade).

This is the tricky part. In the prompt, we run the following command:

> download -

We will see a message like this one:

Start sending file using XMODEM/CRC protocol.

And we will have some time to send the new firmware file using XMODEM. As we can read in the official docs, we are supposed to press ~+ and then write a command (lsz -X) that will send the firmware files to the soekris.

But, as I found out after so many tries, it doesn't work. I tried using so many key strokes and combinations and I wasn't able to do it, until I tried one hell of a dirty trick: I just wrote the whole command somewhere else (in another tab of Terminal.app for example):

~+sz -X b5501_133c.bin

I copied it (command+c) and I pasted it (command+v) in the Terminal.app tab where cu was running. and it worked!:

> download -

Start sending file using XMODEM/CRC protocol.
~+sz -X b5501_133c.bin
Sending b5501_133c.bin, 784 blocks: Give your local XMODEM receive command now.
Bytes Sent: 100352   BPS:961

Transfer complete

File downloaded succesfully, size 784 Blocks.

Two important things here:

  • I had the firmware file (b5501_133c.bin) in the directory from where I was running cu. If the firmware file is somewhere else in the filesystem, we've to use the full path to the file.

  • In OSx (at least Snow Leopard using MacPorts) the tool to send the file using XMODEM is not called lsz, but sz. You can find more information using MacPorts to see the contents of the lrzsz package:

    $ port contents lrzsz
    Port lrzsz contains:
      /opt/local/bin/rb
      /opt/local/bin/rx
      /opt/local/bin/rz
      /opt/local/bin/sb
      /opt/local/bin/sx
      /opt/local/bin/sz
      /opt/local/share/man/man1/rz.1.gz
      /opt/local/share/man/man1/sz.1.gz
    $
    

Fine, now that a copy of the new firmware file is in the soekris we only have to install it, using flashupdate:

> flashupdate
Updating BIOS Flash ,,,,,,,,,,,,,,,,,,,,,,,,,,,,..,,,,.... Done.

Once the BIOS has been updated, we just have to reboot the soekris box:

> reboot

And we will see the updated BIOS version on boot:

comBIOS ver. 1.33c 20080626  Copyright (C) 2000-2008 Soekris Engineering.

And et voilá, we've done the firmware upgrade. As I told you at the beginning of this small article, it was difficult at first, because I was getting on my nerves trying to reproduce the steps from the official docs one time and another. I still don't know what the problem is, and why it is not working just writing the command, but the copy&paste trick just worked fine.

I hope you will find this small tutorial useful some day.

Posted by wu at 00:11 | Comments (4)
<< Os pasos de peóns en Fontiñas, Lugo | Main | Clean up a dirty FreeBSD ports tree >>
Comments
Re: Soekris BIOS upgrade using MacOSx Snow Leopard

It worked beautifully, thanks a lot to share this piece of information.

Posted by: Daniel Kühl at junio 09,2013 03:55
Re: Soekris BIOS upgrade using MacOSx Snow Leopard

I use minicom, keyspan serial adapter, and Macbook air. Now flashing a net6501. I'm flashing now using uManager, which you can get to even if your BIOS doesn't post, which is my current problem.

Serial connect,
+++ (then wait a second)
? (to list commands)
download (prepares soekris to receive file)
ctrl-A Z S (select xmodem, quickly go to folder and select file)

Also in uManager, power off, power on. It doesn't seem to have fixed my problem, which I believe is hardware, but it looked like a successful flash update process.

Posted by: ED Fochler at febrero 12,2014 15:56
Re: Soekris BIOS upgrade using MacOSx Snow Leopard

Thanks for this! I blew an afternoon screwing around with official documentation. G-Man

Posted by: G-man at mayo 30,2016 00:58
Re: Soekris BIOS upgrade using MacOSx Snow Leopard

Thanks for this! I blew an afternoon screwing around with official documentation. G-Man

Posted by: G-man at mayo 30,2016 00:58
Post a comment