This series adds a fastboot flash backend for UFS devices. UFS (Universal Flash Storage) devices in U-Boot are accessed through the SCSI subsystem, with each UFS LUN exposed as a separate SCSI block device. Unlike eMMC (single device) or NVMe (single namespace in most cases), UFS can have multiple LUNs that each hold their own partition table.
The key feature of this backend is multi-LUN partition addressing using the "<scsi_dev>#<partition_name>" syntax (e.g. "0#system", "1#boot_a"). Unqualified names fall back to a configurable default SCSI device number (CONFIG_FASTBOOT_FLASH_UFS_DEV). The I/O layer reuses the existing fb_block helpers; fb_ufs.c adds only UFS-specific partition lookup and GPT-per-LUN handling. Tested on a platform with 2 UFS LUNs (LUN 0 for firmware, LUN 1 for OS partitions), flashing raw images, sparse images, and GPT partition tables via USB fastboot. Ruitong Su (2): fastboot: Add UFS flash backend fastboot: Wire UFS backend into command and getvar dispatch MAINTAINERS | 1 + drivers/fastboot/Kconfig | 30 ++++++- drivers/fastboot/Makefile | 1 + drivers/fastboot/fb_command.c | 8 ++ drivers/fastboot/fb_getvar.c | 6 ++ drivers/fastboot/fb_ufs.c | 164 ++++++++++++++++++++++++++++++++++ include/fb_ufs.h | 49 ++++++++++ 7 files changed, 257 insertions(+), 2 deletions(-) create mode 100644 drivers/fastboot/fb_ufs.c create mode 100644 include/fb_ufs.h -- 2.50.1 声明:这封邮件只允许文件接收者阅读,有很高的机密性要求。禁止其他人使用、打开、复制或转发里面的任何内容。如果本邮件错误地发给了你,请联系邮件发出者并删除这个文件。机密及法律的特权并不因为误发邮件而放弃或丧失。任何提出的观点或意见只属于作者的个人见解,并不一定代表本公司。 Disclaimer: This email is intended to be read only by the designated recipient of the document and has high confidentiality requirements. Anyone else is prohibited from using, opening, copying or forwarding any of the contents inside. If this email was sent to you by mistake, please contact the sender of the email and delete this file immediately. Confidentiality and legal privileges are not waived or lost by misdirected emails. Any views or opinions expressed in the email are those of the author and do not necessarily represent those of the Company.

