igrr / mkspiffs

Tool to build and unpack SPIFFS images
MIT License
186 stars 91 forks source link

Corrupt/unusable image created without "-b" option #61

Open GarryG opened 5 years ago

GarryG commented 5 years ago

I tried to get mkspiffs to work on my Linux system, based off of the 0.2.2 / 0.3.7 release of the code. While images were created, I tried to use the options that the Arduino plugin used for creation of the spiffs image:

mkspiffs -c testdir -p 256 -b 8192 -s 1028096 spiffs.img

(default settings for a Wemos D1 R1 w/ 1M spiffs)

While the 0.2.0 version of mkspiffs creates an image without complaining when using these options, and the image is perfectly fine on the device itself, 0.2.2 complains about the -b option:

error: Image size should be a multiple of block size

Problem is, not using the option causes the image to be corrupt or at least unusable on the ESP, only a small part of the files are readable.

Not sure if either the "error" or the "should" is correct on that message, but at least there is some problem here that needs to be further analyzed ...

bertrandlo commented 5 years ago

@GarryG confirm the same situation. -p 256 -b 8192 -s 1028096 stop to work.

--version output mkspiffs ver. 0.2.3-6-g983970e Build configuration name: generic SPIFFS ver. 0.3.7-5-gf5e26c4 Extra build flags: (none) SPIFFS configuration: SPIFFS_OBJ_NAME_LEN: 32 SPIFFS_OBJ_META_LEN: 0 SPIFFS_USE_MAGIC: 1 SPIFFS_USE_MAGIC_LENGTH: 1 SPIFFS_ALIGNED_OBJECT_INDEX_TABLES: 0