op-flasher changes

Joel Stanley joel at jms.id.au
Thu Nov 3 13:39:53 AEDT 2016


Hello All,

We recently switched op-flasher, the component of our system that
touches the SPI flash devices at update time, to use the kernel MTD
interface. Previously it was doing this via MMIO: directly programming
the FMC and SMC flash controllers through /dev/mem.

The current state of master has broken flash access as there were some
subtlities in the way flasher was implmeented. I have a series of
patches that should get us back into a working state:

 https://gerrit.openbmc-project.xyz/983 flasher: Remove unsued
blocklevel_get_info
 https://gerrit.openbmc-project.xyz/984 flasher: remove unused ffs_index
 https://gerrit.openbmc-project.xyz/985 flasher: Remove relocking of flash
 https://gerrit.openbmc-project.xyz/986 flasher: unify cleanup commands
 https://gerrit.openbmc-project.xyz/987 flasher: Use BMC_MTD to represent bmc
 https://gerrit.openbmc-project.xyz/988 flasher: Unify flash setup functions
 https://gerrit.openbmc-project.xyz/989 flasher: Remove flash tuned message
 https://gerrit.openbmc-project.xyz/990 flasher: BMC partition
addresses are relative to start of flash

Some of these changes are cleanups that make it easier to move to the
new libflash API, which we must do in order to update pflash to use
the mtd interface. That API change patch is here:

  https://gerrit.openbmc-project.xyz/991 flasher: Move to new libflash API

I propose we merge the first series of patches to ensure we have not
regressed, and then merge the second one along with the move to the
new libflash version, which would be this patch:

 https://gerrit.openbmc-project.xyz/#/c/907/

This requires some testing. I have a tree that updates the version of
skeleton we use to include the first set of patches here:

  https://github.com/shenki/openbmc/tree/flasher-cleanups

If you could test booting and performing updates to this on your
platform of choice that would be appreciated.

Once we have a few test results we can merge the changes, and repeat
the process with the API change.

Cheers,

Joel


More information about the openbmc mailing list