Skip to content
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

Support dropping named partitions in hardware configs #2934

Merged
merged 4 commits into from
Jan 13, 2025

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Jan 7, 2025

This PR adds the ability to 'drop' a previously defined partition from a hardware configuration by setting "size": 0 in an inherited config. This is silently ignored if the partition is undefined.

Issue #2933 highlighted the need to be able to eliminate the factory partition and use OTA partitions instead.

A couple of sample applications contained redundant subtype overrides since these are already defined in spiffs-two-roms, so this has been tidied.

Note: Typically the Esp32 spiffs-two-roms configuration is used as a base for OTA updates. This retains the factory partition so if not required this can be dropped to liberate the 1M allocation.

Copy link

what-the-diff bot commented Jan 7, 2025

PR Summary

  • Change in Factory Partition Size
    The size of the 'factory' partition in spiffs-two-roms.hw has been lowered to 0, effectively removing it.

  • Documentation Update in README.rst
    The README.rst has been updated to clarify that if the 'factory' partition size is set to 0, it will be ignored if no such partition exists.

  • Update in partition.py Logic
    The partition.py script now has new logic to automatically remove a partition if its size is set to 0.

  • Simplified Validation Process in partition.py
    The verification method in partition.py has been adjusted to avoid error messages if the size is 0, making validation easier and simpler.

  • Configuration Switch in component.mk
    The HWCONFIG in component.mk has been switched from ota to spiffs-two-roms, adopting the updated configuration.

  • Removal of Deprecated OTA Settings
    The ota.hw file, which carried obsolete OTA configuration settings, has been deleted.

  • Clean-up in Basic_Ota Sample File
    The ota.hw file in the Basic_Ota sample has been cleaned up, removing redundant OTA partition definitions for 'rom0' and 'rom1'.

@mikee47 mikee47 force-pushed the feature/dropping-partitions branch from 207969b to 29f1162 Compare January 7, 2025 12:38
@slaff slaff added this to the 6.1.0 milestone Jan 7, 2025
@slaff
Copy link
Contributor

slaff commented Jan 13, 2025

@mikee47 ready with this one?

@mikee47
Copy link
Contributor Author

mikee47 commented Jan 13, 2025

@slaff Yes, all done thanks.

@slaff slaff merged commit 8a2addf into SmingHub:develop Jan 13, 2025
35 checks passed
pljakobs pushed a commit to pljakobs/Sming that referenced this pull request Jan 24, 2025
This PR adds the ability to 'drop' a previously defined partition from a hardware configuration by setting `"size": 0` in an inherited config. This is silently ignored if the partition is undefined.

Issue SmingHub#2933 highlighted the need to be able to eliminate the `factory` partition and use OTA partitions instead. 

A couple of sample applications contained redundant `subtype` overrides since these are already defined in `spiffs-two-roms`, so this has been tidied.

Note: Typically the Esp32 `spiffs-two-roms` configuration is used as a base for OTA updates. This retains the `factory` partition so if not required this can be dropped to liberate the 1M allocation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants