feat(storage): Add generic partition BDL example

Add an example under examples/storage/generic_partition_bdl that
partitions a raw block device at run time using only the Block Device
Layer (BDL) interface.

The example obtains a whole-disk BDL (SPI flash data partition by
default, or an SD/eMMC card via menuconfig), writes an MBR partition
table onto it with the esp_ext_part_tables managed component (fetched
via idf_component.yml), then creates a generic-partition BDL for each
MBR entry with esp_blockdev_generic_partition_get() and mounts FATFS on
the FAT slice and LittleFS on the LittleFS slice.
This commit is contained in:
Adam Múdry
2026-07-02 14:13:22 +02:00
parent 9d8b1812fd
commit 98fee5a68a
17 changed files with 1182 additions and 0 deletions

View File

@@ -157,6 +157,11 @@
.. _blockdev-apis:
应用示例
--------
- :example:`storage/generic_partition_bdl` 演示了如何仅使用块设备层在运行时对裸块设备进行分区:将 MBR 分区表写入整盘 BDLSPI flash 数据分区或 SD/eMMC 卡),并在通用分区 BDL 切片上挂载 FATFS 和 LittleFS。
API 参考
--------