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-09-08 14:38:16 +02:00
parent 9d8b1812fd
commit 98fee5a68a
17 changed files with 1182 additions and 0 deletions
@@ -227,6 +227,11 @@ When an overlap or invalid range is detected, the build fails with a diagnostic
.. _blockdev-apis:
Application Examples
--------------------
- :example:`storage/generic_partition_bdl` demonstrates how to partition a raw block device at run time using only the Block Device Layer, by writing an MBR partition table onto a whole-disk BDL (a SPI flash data partition or an SD/eMMC card) and mounting FATFS and LittleFS on generic-partition BDL slices.
API Reference
-------------