Skip to content

Refactor generic fastboot_set_reboot_flag implementation

Roman Kovalivskyi u-boot 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 0 repliesNew
  2. v1 posting 2/27 patches 0 repliesSuperseded
  3. v1 posting 1/27 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7cmd: bcb: Extract '__bcb_load' from 'do_bcb_load' for internal needscmd/bcb.c+23 -80 replies
2/7cmd: bcb: Extract '__bcb_set' from 'do_bcb_set' for internal needscmd/bcb.c+11 -60 replies
3/7cmd: bcb: Extract '__bcb_store' from 'do_bcb_store' for internal needscmd/bcb.c+7 -20 replies
4/7cmd: bcb: Expose 'bcb_write_reboot_reason' to external callerscmd/bcb.c include/bcb.h+42 -00 replies
5/7cmd: bcb: Add support for processing const string literals in bcb_set()cmd/bcb.c include/bcb.h+14 -70 replies
6/7Revert "fastboot: Add default fastboot_set_reboot_flag implementation"drivers/fastboot/Kconfig drivers/fastboot/Makefile drivers/fastboot/fb_bcb_impl.c +1 more+0 -650 replies
7/7fastboot: Implement generic fastboot_set_reboot_flagdrivers/fastboot/fb_common.c+15 -10 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/7] Refactor generic fastboot_set_reboot_flag implementation

Current generic implementation of fastboot_set_reboot_flag is somewhat messy and requires some additional configuration option to be enabled besides CMD_BCB, so it reverts that implementtion in order to bring a new cleaner one.

New function called bcb_set_reboot_reason should be exposed by BCB commands, so that all of the details could be put there instead of dealing with it in fastboot implementation directly. After that, fastboot_set_reboot_flag could simply pass correct reboot reason string to the BCB implementation. If CMD_BCB is disabled then the whole operation would return error code, which is no different behaviour than the current implementation.

Changes since v1[1]
* Fixed compilation issue for sandbox platform caused by undefined FASTBOOT_FLASH_MMC_DEV Kconfig option.
* Fixed compilation issue in bcb.h caused by missing common.h header for sandbox platform

[1]: https://patchwork.ozlabs.org/project/uboot/cover/cover.1603442753.git.roman.kovalivskyi at globallogic.com/

Eugeniu Rosca (5):
cmd: bcb: Extract '__bcb_load' from 'do_bcb_load' for internal needs
cmd: bcb: Extract '__bcb_set' from 'do_bcb_set' for internal needs
cmd: bcb: Extract '__bcb_store' from 'do_bcb_store' for internal needs
cmd: bcb: Expose 'bcb_write_reboot_reason' to external callers
cmd: bcb: Add support for processing const string literals in

    bcb_set()

Roman Kovalivskyi (2):
Revert "fastboot: Add default fastboot_set_reboot_flag implementation"
fastboot: Implement generic fastboot_set_reboot_flag

 cmd/bcb.c                      | 88 +++++++++++++++++++++++++++-------
 drivers/fastboot/Kconfig       | 12 -----
 drivers/fastboot/Makefile      |  1 -
 drivers/fastboot/fb_bcb_impl.c | 43 -----------------
 drivers/fastboot/fb_common.c   | 16 ++++++-
 include/bcb.h                  | 22 +++++++++
 include/fastboot.h             |  9 ----
 7 files changed, 107 insertions(+), 84 deletions(-)
 delete mode 100644 drivers/fastboot/fb_bcb_impl.c
 create mode 100644 include/bcb.h
Signature · 1 line
2.17.1