- Thu Apr 16, 2015 2:27 am
#14681
Okay, I'm reading up on the bootloader thing now. I'm concentrating on the 1.0.x SDK at the moment, would be good to get that working first. As far as I have tried, the gen_appimage.py is used to make the two monolithic flash images for the two different UI locations. The weird thing is: the flash images always seem to be 255'ish K with me, leaving no room for the espfs in my 512K flash. Is that a standard feature of the thing?
I'm also thinking of another approach that lets us update everything from flash but still leaves more room for the espfs. This all assumes we can modify the boot.bin into submission and/or write our own.
My idea would be to make a stripped-down version of esphttpd for user1 that can only serve up a page requesting a flash file and flash that. No more, no less: no espfs, no template engine, just two CGIs. The bootloader would be told to normally boot into user2, the real application program. In the user2 program, there's a function (maybe password-protected if you so wish) that basically lets the thing go to firmware update mode, which is actually just a reboot into the user1 program. The user1 program can then safely update user2 and the espfs.
The advantage here is that we don't need to keep two copies of the program itself in flash, allowing us to make the program bigger.
What would you think about this idea?