Closed jasaw closed 2 years ago
Thanks! We could probably optimise it to be a single grep -v -w -e 0x0 -e 0x24
but this will do.
Hey guys, wasn't aware that we have such a feature. Would it be complicated to port it to the esp8266 branch?
Oh gosh, I haven't looked at ESP8266 stuff in a couple of years now! I expect it would be doable, but a bit of work. On the ESP32 side we're depending on the IDF's ability to embed random data into the firmware, which would need to be replicated. The LFS support code inside Lua should hopefully port straight over.
Embedding an LFS image is a two-step process:
For the 8266 we could probably get away without doing a full re-link and instead just write the LFS image into the correct address in the binary (on the esp32 the app is checksummed, so not an option there).
I'm happy to answer questions, but I don't have any surplus time/energy myself right now.
Asking questions was what I was hoping for. So the embedded LFS can be overwritten on chip? Or will there be a second LFS region available? Or is it just fixed at buildtime and there will be no further updating possible?
This is fixed at build time. It's a way of combining C firmware and Lua firmware into a single binary for easy OTA upgrades. No support for replacing the embedded LFS at runtime (again, on the ESP32 that's not doable since the firmware is checksum and possibly also signed). To upgrade, you upgrade the full firmware. On the ESP32 you get A/B firmware upgrades with rollback support out of the box/IDF. At $work on the 8266 we're using a dedicated boot loader to do A/B firmware slots with rollback support. A long time ago I raised a PR about whether there was any interest in mainlining that, but there didn't seem to be. There was also talk about using raburton's rBoot, but again, insufficient interest in the end.
I know Terry was thinking about the possibility of supporting multiple LFS volumes, but I don't think it went beyond the thinking phase.
esp32c3 map file contains
.riscv.attributes
that causesembed_lfs.sh
to fail.This PR fixes that.
@jmattsson Please review.