I also modified the espfs.c file
EspFsFile ICACHE_FLASH_ATTR *espFsOpen(char *fileName) {
#ifdef __ets__
char *p=(char *)(ESPFS_POS+0x40200000);
EspFsHeader j;
os_memcpy(&j, p, sizeof(EspFsHeader));
if (j.magic!=0x73665345) {
char *p=(char *)(ESPFS_POS2+0x40200000);
os_memcpy(&j, p, sizeof(EspFsHeader));
if (j.magic!=0x73665345) {
os_printf("Unable to locate EspFS. EspFS image broken.\n");
return NULL;
}
}
#else
char *p=espFsData;
#endif
and the include/httpdconfig.h
#ifndef ESPFS_POS
#define ESPFS_POS 0x41000
#define ESPFS_POS2 0x01000
#endif
The next step is to check on boot for the boot "partition" and try to verify the espfs exists. If not, I would like it to try to dl and flash it. Secondarily, I would like to have a static page builtin that instead of erroring out would present a form to allow you to upload an espfs file for flashing.