Open
Conversation
Update parse_partitons() to print the partition table as parsed, which may differ from that in the file under some circumstances, and also to print a warning if there are too few tokens (which causes a "partition" to be ignored). This in aid of adding a way for the env[] to specify exactly which partition the uploadfs action should write to, and making it clear in the logs which has been selected. Aside: The issue of writing to the wrong fs partition, with no obvious markers as to why, has caused me no end of pain, hence bothering to create & submit this patch. Background: I have a partition scheme with 2 app partitions (factory, ota_0), two filesystem partitions (factory_fs, ota_0_fs), and a user filesystem (user_fs), the logic being that the first 4 of those were writable on FCS or by an OTA update and the last was for user data and so not updatable. You can't share factory_fs and ota_0_fs because then the code may break if you do "factory reset". So if you need filesystem with your app, you need different ones for both factory and ota. For me, right now, I don't need user_fs but it's there in case I do. As you will know, the existing logic in fetch_fs_size caused "user_fs" to be selected for any uploadfs action, which was definitely not what I wanted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In preparation, update parse_partitons() to print the partition table as parsed, which may differ from that in the file under some circumstances, and also to print a warning if there are too few tokens (which causes a "partition" to be ignored).
This in aid of making it possible for platformio.ini to specify exactly which partition the uploadfs action should write to, and making it clear in the logs which has been selected.
The board_build flags (esp the one I add here: fs_label) should be documented somwehere but I can't see where to put it?
Aside: The issue of writing to the wrong fs partition, with no obvious markers as to why, has caused me no end of pain, hence bothering to create & submit this patch.
Background: I have a partition scheme with 2 app partitions (factory, ota_0), two filesystem partitions (factory_fs, ota_0_fs), and a user filesystem (user_fs), the logic being that the first 4 of those were writable on FCS or by an OTA update and the last was for user data and so not updatable. You can't share factory_fs and ota_0_fs because then the code may break if you do "factory reset". So if you need filesystem with your app, you need different ones for both factory and ota. For me, right now, I don't need user_fs but it's there in case I do. As you will know, the existing logic in fetch_fs_size caused "user_fs" to be selected for any uploadfs action, which was definitely not what I wanted!