[PATCH] libertas: add sysfs hooks to update boot2 and persistent firmware

Dan Williams dcbw at redhat.com
Tue Jun 3 14:12:02 EDT 2008


On Tue, 2008-06-03 at 13:09 -0400, Michail Bletsas wrote:
> Dan Williams <dcbw at redhat.com> wrote on 06/03/2008 12:09:11 PM:
> 
> > On Tue, 2008-06-03 at 11:30 -0400, Michail Bletsas wrote:
> > > libertas-dev-bounces at lists.infradead.org wrote on 06/03/2008 11:20:51 
> AM:
> > > 
> > > 
> > > > > 
> > > > > A necessary rectification:
> > > > > Firmware updates from the driver are the only method that works
> > > > > currently. If we want to name one method a "disaster", we would 
> have
> > > > > to choose the userspace tool, since it will brick many of your 
> active
> > > > > antennae.
> > > > 
> > > > It worked up until boot2 3109; and then apparently nobody at OLPC 
> cared
> > > > enough to fix the tool after that, and nobody at Marvell cared 
> enough to
> > > > tell anyone what changed so that somebody _could_ fix the tool.
> > > > 
> > > Dan,
> > > 
> > > The required functionality is a superset of what the userspace tool 
> was 
> > > originally developed to do (update the boot2 code).
> > > We now have a much bigger firmware blob to write to the EEPROM 
> (besides 
> > > the boot2 code) and Marvell always felt that it is better for the ARM 
> > > processor on the wireless module to handle that task. 
> > 
> > That's fine, since there is no real difference in the flashing procedure
> > between boot2 and normal firmware AFAICT, the tool should work with that
> > firmware just fine.
> > 
> > And a slight correction, but "better for the ARM processor" is wrong,
> > because it's _always_ been the ARM updating the normal (ie non-boot2)
> > firmware in this scenario, even if the userspace tool was doing it.
> > 
> 
> There has to be a real difference since the flashing code is in the 
> firmware which the userspace tool doesn't load, relying on whatever 
> support was originally in the boot2 code. 

There is support for flashing using either the MFG firmware images (.img
files), or the chunked firmware files (.bin files).  The MFG images are
flashed by the runtime firmware, while the chunked format is flashed by
the boot2 firmware.

To flash Boot2 with an MFG firmware (which first loads the runtime
firmware), you use the -m command to the flash tool like so:

./libertas-flash.py -m <mfg image> <runtime firmware>

The current code appears to assume that an MFG flash will only flash
boot2 firmware, and only supports runtime firmware update when the
flashing is performed by boot2.  It looks pretty easy to add support for
MFG flashing of the runtime firmware, by the runtime firmware, since the
support is already there for boot2 update by runtime firmware.

Which brings us to Feb.  I didn't understand exactly how the active
antennas were supposed to get flashed, which (from your comments) looks
to be a runtime firmware flash from the runtime firmware
using BOOT_CMD_UPDATE_FW.  I didn't have any active antennas at the
time to test with nor firmware that would go on them.

I also didn't have any details about exactly how the active antennas
differed from the XO usb8388.  Re-reading the comments in #7170 show Wad
was trying to do a runtime-firmware update of the Boot2 code only, not a
runtime firmware update of the runtime firmware.  That had always worked
on XOs, leading me to suspect some difference in hardware behavior
between XO and active antenna.

Dan

> Because of the uniqueness of the active antenna's hardware, Marvell moved 
> the code that was specific to the active antenna  flashing into the 
> firmware. If I remember correctly, the trend for the boot2 code is to make 
> it as small as possible and burn it into the device's ROM in the newer 
> devices.
> 
> 
> M.




More information about the libertas-dev mailing list