Upgrading the firmware for HP NC550SFP SFP+ network card on Linux

In a hurry and not interested in the lead-up? Abbreviated list of commands to upgrade the firmware can be found at the end here.

Evaluating the goods

A few years back I happened upon a pile of used enterprise networking goods: a few fiber Ethernet cards, SFP+ modules and some OM4 cables - all the good stuff to introduce 10 Gbit speed into your local network and generate the iperf3 results that will make your friends green with envy. Any actual utility is left as an exercise to the reader.

I slapped one of the cards in the pile into my machine, booted it up and was faced with this avalanche of scary errors in the kernel logs:

be2net 0000:0e:00.2: Unable to change power state from D3cold to D0, device inaccessible
be2net 0000:0e:00.2: Error in mapping PCI BARs
be2net 0000:0e:00.2: Emulex OneConnect initialization failed
be2net 0000:0e:00.2: probe with driver be2net failed with error -12
be2net 0000:0e:00.3: Unable to change power state from D3cold to D0, device inaccessible
be2net 0000:0e:00.3: Error in mapping PCI BARs
be2net 0000:0e:00.3: Emulex OneConnect initialization failed
be2net 0000:0e:00.3: probe with driver be2net failed with error -12
be2net 0000:0e:00.4: Unable to change power state from D3cold to D0, device inaccessible
be2net 0000:0e:00.4: Error in mapping PCI BARs
be2net 0000:0e:00.4: Emulex OneConnect initialization failed
be2net 0000:0e:00.4: probe with driver be2net failed with error -12
be2net 0000:0e:00.5: Unable to change power state from D3cold to D0, device inaccessible
be2net 0000:0e:00.5: Error in mapping PCI BARs
be2net 0000:0e:00.5: Emulex OneConnect initialization failed
be2net 0000:0e:00.5: probe with driver be2net failed with error -12
be2net 0000:0e:00.6: Unable to change power state from D3cold to D0, device inaccessible
be2net 0000:0e:00.6: Error in mapping PCI BARs
be2net 0000:0e:00.6: Emulex OneConnect initialization failed
be2net 0000:0e:00.6: probe with driver be2net failed with error -12
be2net 0000:0e:00.7: Unable to change power state from D3cold to D0, device inaccessible
be2net 0000:0e:00.7: Error in mapping PCI BARs
be2net 0000:0e:00.7: Emulex OneConnect initialization failed
be2net 0000:0e:00.7: probe with driver be2net failed with error -12

Oh no! Looks pretty bad! But it seems like a firmware upgrade might fix it all:

be2net 0000:0e:00.0: Upgrade to F/W ver 2.102.235.0 or newer to avoid conflicting priorities between NIC and FCoE traffic
...
be2net 0000:0e:00.1: Firmware on card is old(2.101.374.0), IRQs may not work
be2net 0000:0e:00.1: Please upgrade firmware to version >= 4.0

Mind you, I hadn’t even plugged in any modules or cables at this point. I mean, it looked pretty hopeless; actually testing it would’ve been wasted effort at this point, right?

Extracting the firmware

The cards are old, but not so old that the firmware update tools would have been lost to time. The bootable firmware update image can be found at HPE’s site:

https://support.hpe.com/km/software/MTX-d6512bec9eb74cf3

Well, “bootable” in quotation marks. I couldn’t get the thing to actually boot, which I chalked up to my AMD AM5 hardware being a tad too new for the RHEL6 era tooling. But I was not ready to give up just yet, so I extracted the ISO contents and took a closer peek:

$ bsdtar -xf OneConnect-Flash-4.1.402.20.iso
$ find
.
./initrd
./isolinux
./isolinux/linux
./isolinux/isolinux.bin
./isolinux/boot.cat
./isolinux/isolinux.cfg
./OneConnect-Flash-4.1.402.20.iso
./UFI
./UFI/oc11-4.1.402.20.ufi
./UFI/oc10-4.1.402.20.ufi

We’ve got a minimal Linux system and a few firmware images. The system will presumably pair each firmware image with the correct card. So, how does it do that?

To dig deeper in our investigation we can use binwalk - a kind of Swiss Army knife for firmware image exploration. Hand it an obtuse firmware image you found somewhere and it will try to figure out how it is composed and extract all the enclosed goodies. In our case, the treasure is inside the Linux RAM disk initrd. binwalk makes short work of it:

$ binwalk -e initrd
                    /home/matoking/Stuff/oneconnect/extractions/initrd
--------------------------------------------------------------------------------------------
DECIMAL                            HEXADECIMAL                        DESCRIPTION
--------------------------------------------------------------------------------------------
0                                  0x0                                EXT filesystem for
                                                                      Linux, inodes: 2000,
                                                                      block size: 1024,
                                                                      block count: 4573,
                                                                      free blocks: 400,
                                                                      reserved blocks:
                                                                      8000, total size:
                                                                      8192000 bytes
8192000                            0x7D0000                           CPIO ASCII archive,
                                                                      file count: 1
--------------------------------------------------------------------------------------------
[+] Extraction of ext data at offset 0x0 completed successfully
[+] Extraction of cpio data at offset 0x7D0000 completed successfully
--------------------------------------------------------------------------------------------

Analyzed 1 file for 85 file signatures (187 magic patterns) in 11.0 milliseconds

There’s an EXT root filesystem inside, which binwalk extracted for us with the -e flag.

Tangent: binwalk is really cool

binwalk is a really handy tool if you have a firmware image and are interested to know what it contains. Often it will pinpoint interesting sections: compressed sections of data, cryptographic certificates. And sometimes it will strike gold and extract an entire Linux root filesystem: that’s also how I found out my LG soundbar runs Linux.

Sub-tangent: LG is really not cool

Why was I investigating my LG soundbar? Because it had a really useful “feature” - one that their online support confirmed was intentional for convenience(!) - everyone is free to connect to your soundbar over Bluetooth and you can’t disable it. No “press button during pairing”, no “enter matching PIN on connecting device”, just select the publicly advertised Bluetooth device and it will auto-connect. Fantastic.

The solution was to open the damn thing and remove the Bluetooth module which was connected separately using a ribbon cable. Maybe one of their engineers realized what a terrible idea this was and made it easy for enterprising users to disable this “convenience”.

I haven’t touched an LG product since.

And since we’re interested in what the system would do upon boot, there are a few candidates for the startup script. The interesting file turns out to be /etc/init.d/rcS:

$ cd extractions/initrd.extracted/0/rootfs/
$ ls
bin/  dev/  etc/  linuxrc  modules/  sbin/  usr/
$ cat etc/init.d/rcS
#!/bin/sh

# Omitted for brevity...

if [ -z $cd_located ]; then
        echo "Error: CD was not located. The flash utility will not function correctly. Supported CD-ROM drives are IDE, SCSI and USB."
else
        mount -t sysfs sysfs /sys
        /bin/insmod /modules/seeprogdrv.ko
        if [ -f  /cdrom/UFI/oc11-*.ufi ] && [ -f /cdrom/UFI/oc10-*.ufi ];then
                /bin/flash -x -f /cdrom/UFI/oc11-*.ufi /cdrom/UFI/oc10-*.ufi
        else
                /bin/flash -x -f /cdrom/UFI/oc11-*-embedded.ufi
        fi
fi
#/sbin/udevd
/bin/sh

The script does a bunch of work to mount a CD ROM with an UFI firmware image within, and flash it using a special executable. We already have the former and needed the latter: /bin/flash is it.

Flashing the firmware

The flash binary is a 32-bit executable.

$ file bin/flash
bin/flash: ELF 32-bit LSB executable, Intel i386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.9, not stripped

In my experience the shelf life of Linux executables is kinda spotty. Keep an executable you manually compiled around for a year or two and it will fail to launch after going out of sync with the linked libraries in the rest of the system. To keep it fresh for longer than that you’re gonna need a package manager, a container runtime or some other compatibility tooling. A binary circa 2012 still working in 2026? Doubt it…

But then again, this one’s a statically linked executable, so the odds are a bit better. For laughs, let’s give it a shot on a NixOS machine running the 7.2.14 kernel; surely it won’t even print the help?

$ chmod +x bin/flash
$ ./bin/flash --help

Emulex OneConnect Firmware Update Utility v4.1.402.20
Copyright 2011 Emulex Corporation

Usage: ./bin/flash [options]

...

Wait.

What?

OK, that’s just the help.

But we might as well try going through with the flashing process. Pretty sure we’d need to unload any related kernel modules to avoid interference. I’m being a bit reckless but not that reckless.

$ sudo rmmod be2net
$ sudo rmmod ocrdma  # This might also be needed

And the moment of truth. Give it the firmware image and let it run:

$ sudo ./bin/flash -x -c -f UFI/oc10-4.1.402.20.ufi

Emulex OneConnect Firmware Update Utility v4.1.402.20
Copyright 2011 Emulex Corporation

OC10102 controller #1 Base 0xd16c0000 at PCI Domain:0000 Bus:01 Dev:00
Firmware on Flash - v2.102.517.7

All OC10102 controllers will be updated to firmware version 4.1.402.20

Do you want to continue (y/n)? y

Update firmware on OC10102 #1 (y/n)? y
Firmware image length = 8388608

Verify CRC: PASSED
Warning: NCSI image is not updated. 

sudo shutdown now and a boot later we can see that the kernel logs are now devoid of any “please update firmware” messages. Success!

My system is not booting anymore!

I gave a friend one of the cards who performed the same procedure as described here. Everything went without a hitch except for the very last part: the system would no longer POST.

The problem turned out to be related to the boot method: performing the flash on an UEFI system will prevent the boot. The fix is to temporarily enable BIOS boot so that the Option ROM in the card is given the chance to run; I reckon this performs some post-update initialization that is required for the card to work?

The punchline

Remember the scary power state errors? They’re still there.

The kicker is that those didn’t need any fixing and the card would have worked just fine if I had bothered connecting two ends together. The easiest option is to connect the two ports together into one silly “loopback” interface and checking the result using ip link; something like this indicates things are working:

$ ip link
5: enp43s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 6d:89:68:f8:ef:ab brd ff:ff:ff:ff:ff:ff
    altname enx6d8968f8efab

But hey, this was a fun little excursion. No idea a binary from 2012 could work on NixOS - a distro known for jettisoning many Linux compatibility conventions in the name of functional purity.

Summary

In short, if you happened upon a NC550SFP Ethernet network card (or something similar) and need to upgrade the firmware, here are the steps briefly.

Please check the download page first to ensure your network card is supported!

# Install the required utilities (bsdtar, binwalk and wget)
# OR create a temporary shell and grab 'em from nixpkgs
$ nix shell nixpkgs#libarchive nixpkgs#binwalk nixpkgs#wget

# Download the ISO AFTER ENSURING IT IS SUPPORTED
$ wget https://downloads.hpe.com/pub/softlib/software12/COL35717/co-106538-1/OneConnect-Flash-4.1.402.20.iso

# Extract the ISO and the relevant contents
$ bsdtar -xf OneConnect-Flash-4.1.402.20.iso
$ binwalk -e initrd

# Unload any relevant kernel modules
$ sudo rmmod ocrdma  # Not always needed?
$ sudo rmmod be2net

# Run the flash utility
$ chmod +x extractions/initrd.extracted/0/rootfs/bin/flash
$ sudo ./extractions/initrd.extracted/0/rootfs/bin/flash -x -c -f UFI/oc10-4.1.402.20.ufi

# Power cycle the system, just in case
$ sudo shutdown now

Works on NixOS, too, which was a surprise. I also performed the operation on Arch Linux without any issues.

Shoutout to @jukuisma for introducing me to binwalk, testing the upgrade procedure on an UEFI platform and figuring out the resulting boot problem.