Skip to content

RFC FWU: Add FWU Multi Bank Update for DeveloerBox

Masami Hiramatsu u-boot 3 versions – In review

Get series with b4
b4 am 164511067605.43219.15508992404634142079.stgit@localhost

Versions newest first · linked by author and title

  1. v2 RFC Latest posting 2/28 patches 1 replyIn review
  2. v2 posting 1/25 patches 7 repliesSuperseded
  3. v1 RFC14 patches 8 repliesSuperseded

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8FWU: Calculate CRC32 in fwu_update_mdata()drivers/fwu-mdata/fwu-mdata-uclass.c+10 -230 replies
2/8FWU: Free metadata copy if gpt_get_mdata() faileddrivers/fwu-mdata/fwu-mdata-uclass.c drivers/fwu-mdata/fwu_mdata_gpt_blk.c+36 -370 replies
3/8synquacer: Update for TBBR based new FIP layoutarch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi configs/synquacer_developerbox_defconfig include/configs/synquacer.h+22 -130 replies
4/8dt/bindings: firmware: Add FWU metadata on SPI flash bindingdoc/device-tree-bindings/firmware/fwu-mdata-sf.yaml+38 -00 replies
5/8FWU: Add FWU metadata access driver for SPI flashdrivers/fwu-mdata/Kconfig drivers/fwu-mdata/Makefile drivers/fwu-mdata/fwu_mdata_sf.c +1 more+306 -00 replies
6/8FWU: synquacer: Add FWU Multi bank update support for DeveloperBoxarch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi board/socionext/developerbox/Kconfig board/socionext/developerbox/Makefile +2 more+207 -10 replies
7/8FWU: synquacer: Initialize broken metadataboard/socionext/developerbox/Kconfig board/socionext/developerbox/fwu_plat.c+72 -01 reply
8/8configs: synquacer: Add FWU support for DeveloperBoxconfigs/synquacer_developerbox_defconfig+7 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 0/8] FWU: Add FWU Multi Bank Update for DeveloerBox

Hi,

Here is the 2nd version of RFC series of patches for the FWU Multi Bank Update support for the DeveloperBox platform.
This series depends on Sughosh's Multi Bank Update v4 [1].

[1] https://lore.kernel.org/all/[email protected]/T/#u

Unlike the STM32MP board, DeveloperBox (SynQuacer) loads the firmware from SPI NOR flash. Thus it doesn't use GPT partitions to store the firmware banks and the FWU metadata. Instead, it stores those data at fixed address areas on SPI NOR flash. I carefully chose the areas which doesn't overlap the previous firmware and EDK2.

This adds FWU metadata SF driver for this FWU multi bank support on SPI flash without GPT. This is identified by "u-boot,fwu-mdata-sf". The last patch adds the DT bindings in YAML.

Since there is no GPT, the location GUID for images and the image GUID for banks are Null GUID. I will fix this with uuid property for fixed-partition devicetree afterwards.

And the SynQuacer also does not have any non-volatile register. Thus this allocates the platform defined boot index on the SPI flash too.

NOTE: To use this series, you also need to update SCP firmware[2] and TF-A[3] on the DeveloperBox. Those are under cleaning up.

[2] https://git.linaro.org/people/masami.hiramatsu/SCP-firmware.git/
[3] https://git.linaro.org/people/masami.hiramatsu/arm-trusted-firmware.git/

Thank you,

---

Masami Hiramatsu (8):
FWU: Calculate CRC32 in fwu_update_mdata()
FWU: Free metadata copy if gpt_get_mdata() failed
synquacer: Update for TBBR based new FIP layout dt/bindings: firmware: Add FWU metadata on SPI flash binding
FWU: Add FWU metadata access driver for SPI flash
FWU: synquacer: Add FWU Multi bank update support for DeveloperBox
FWU: synquacer: Initialize broken metadata
configs: synquacer: Add FWU support for DeveloperBox

 .../dts/synquacer-sc2a11-developerbox-u-boot.dtsi  |   33 ++
 board/socionext/developerbox/Kconfig               |   24 ++
 board/socionext/developerbox/Makefile              |    1 
 board/socionext/developerbox/fwu_plat.c            |  238 ++++++++++++++++
 configs/synquacer_developerbox_defconfig           |   12 +
 .../firmware/fwu-mdata-sf.yaml                     |   38 +++
 drivers/fwu-mdata/Kconfig                          |    9 +
 drivers/fwu-mdata/Makefile                         |    1 
 drivers/fwu-mdata/fwu-mdata-uclass.c               |   57 +---
 drivers/fwu-mdata/fwu_mdata_gpt_blk.c              |   49 ++-
 drivers/fwu-mdata/fwu_mdata_sf.c                   |  294 ++++++++++++++++++++
 include/configs/synquacer.h                        |   14 +
 include/fwu.h                                      |    2 
 13 files changed, 698 insertions(+), 74 deletions(-)
 create mode 100644 board/socionext/developerbox/fwu_plat.c
 create mode 100644 doc/device-tree-bindings/firmware/fwu-mdata-sf.yaml
 create mode 100644 drivers/fwu-mdata/fwu_mdata_sf.c

--
Masami Hiramatsu <[email protected]>