-
Notifications
You must be signed in to change notification settings - Fork 121
feat: Add a component for parsing external partition tables (IEC-333) #529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add a component for parsing external partition tables (IEC-333) #529
Conversation
0d3df95 to
1589048
Compare
1589048 to
c13b7e6
Compare
c13b7e6 to
9a5f764
Compare
dbf974f to
2c836ab
Compare
|
@igrr @pacucha42 please take a look |
a3c2056 to
8572c6f
Compare
|
The code base looks good to me, however, I left few questions here and there. Thanks for you efforts @adokitkat ! Generally, it would be great to provide more explanations and in-code comments. |
6f26de1 to
99bc9c1
Compare
bb471c0 to
7fe043a
Compare
015da2f to
7796277
Compare
7796277 to
46469ef
Compare
46469ef to
bdd6b05
Compare
|
@adokitkat - all my comments seem addressed. LGTM, thanks. Please, also revisit your future updates/todos in this PR description and create appropriate trackers. |
pacucha42
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
|
Hey @adokitkat I've got a question about this MBR library. How can I specify a custom partition type? For example I've got a SD card, the first partition is a FAT32 partition for generic storage, and the second partition is my own SQLite3 running directly on raw SD card block sport (see https://github.com/huming2207/sqlite3-sdmmc). According to Wikipedia article about this https://en.wikipedia.org/wiki/Partition_type I might need to assign the second partition with type 0xDA. How can I achieve that? |
cf4f563 to
34f61e9
Compare
Hi @huming2207. Good question. I have added new function pointer arguments to both What do you think about it? |
a8413ed to
792cee6
Compare
792cee6 to
d92d5cd
Compare
Thanks @adokitkat I think that looks great. |
Checklist
urlfield definedDescription
This MR adds a component which can parse and generate external partition tables. Right now it only supports MBR. Adding support for another partition table like GPT is possible but not planned for now.
Parsing a partition table outputs
esp_ext_part_list_tstructure filled withesp_ext_part_list_item_titems.When generating MBR, user can decide on sector size (512B, 4KiB) and partition alignment (4KiB, 1MiB). The defaults are 512B sector size and 1MiB partition alignment.
Note: Generating MBR doesn't mean formatting any partition on given sector span, however helper function could be created which would combine this behavior - each partition type has it's own formatting function (FATFS formats differently than LittleFS, etc.).
These are recognized types:
Future TODOs and could haves:
ESP_EXT_PART_TYPE_FAT_ANYand a function which inspects a FAT partition and decides on a correct type? This would require BDL.