esp-iot-solution icon indicating copy to clipboard operation
esp-iot-solution copied to clipboard

bootloader-support-plus using LittleFS instead of storage partition (AEGHB-441)

Open kohait00 opened this issue 1 year ago • 2 comments

Just a general RFC..

I want to get rid of spiffs and tbh from the additional ota partitions by trying to implement Filesystem access to the bootloader. The benefit is:

  • only one dedicated OTA partition for the real fw, one bootloader

  • update is not only OTA but a simple access to the fs, no matter OTA, via HTTPd UI or whatever..

  • less overhead for the separate partitions everywhere

  • revert of update up until reset is possible (deleting file)

  • uniformity for update, other partitions can be updated in bootloader or application, too

  • BL size < 0xC000 will be a challenge, but probably worth a shot

So just let me hear your thought

kohait00 avatar Oct 31 '23 12:10 kohait00

This does bring some benefits, making the entire system look more 'Linux'. However, to my knowledge, free flash access operations cannot be implemented in bootloader, making it more difficult to implement a file system. This requires IDF to provide the prerequisites for implementing this solution.

WangYuxin-esp avatar Nov 03 '23 06:11 WangYuxin-esp

doesnt the normal bootloader component already have flash access when performing the factory erase (you can specify the partitions to erase in sdkconfig). The biggest challenge I currently see is the size. How much does littleFs weigh in typically?

The other issue is: the 'one system fs' would need to leave space for a compressed fw update file, and this cant be guaranteed. so maybe a dedicated storage isnt that bad after all.. :)

kohait00 avatar Nov 03 '23 07:11 kohait00