Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Slip a FileSystem into the firmware package.

mamuespmamuesp Germany/Northern coast
edited July 3 in Mongoose OS

Well, again some tricky question ...

Since I now have an extended file system on my ESP32, which unfortunately is not automatically packed into the firmware by the MOS tools, I wanted to do this myself manually and put something under the hood of the file "FW.ZIP". I need a solution, because it is about a professional use and I also want to flash the devices via OTA, everything has to be in one package, I may not manually setup and fill the additional file system.

What has happened so far:

  • I manually created the file system and copied the files into it.
  • Using "esptool.py", I saved the data as a binary file with the correct start address and the correct length in analogy to the display at boot time.
  • Then I unpacked the file FW.ZIP, added my binary file and put the following entry in "manifest.json" as last entry after "pt" and re-zipped the folder.
    "mnt": {
      "addr": 3735552, 
      "cs_sha1": "7cf488138540b798642deef807cecc2be9e02b85", 
      "fs_block_size": 4096, 
      "fs_erase_size": 4096, 
      "fs_page_size": 256, 
      "fs_size": 12582912, 
      "ptn": "fs_ext", 
      "size": 12582912, 
      "src": "mnt.img", 
      "type": "fs"
    }
  • The attempt to flash the firmware also seemed to work until this message came at the end (after or while verifying):
Error: mnt: failed to compute digest 12582912 @ 0x390000: error reading response packet: error reading: EOF

So I'm desperate to know how to fix this, because I need a solution for a "complete package" including all needed file(system)s in the FW.ZIP

Addendum: That's strange - the flashing works (kind of)! For testing I flashed the ESP32 with some big Arduino example and re-flashed it with my manipulated firmware file. Even after the error occurs, the system night be reset and boots and works fine ... but I'm nevertheless concerned abut this error ...

Sign In or Register to comment.