mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
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.
467 B
467 B
| 1 | # Name, Type, SubType, Offset, Size, Flags |
|---|---|
| 2 | # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap |
| 3 | nvs, data, nvs, 0x9000, 0x6000, |
| 4 | phy_init, data, phy, 0xf000, 0x1000, |
| 5 | factory, app, factory, 0x10000, 1M, |
| 6 | # Whole-disk data partition. The example writes an MBR onto it at run time and |
| 7 | # splits it into a FAT and a LittleFS sub-partition using generic-partition BDLs. |
| 8 | storage, data, fat, , 2M, |