Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to unpack image created by spiffsgen #79

Open
AlexanderKokushkin opened this issue Feb 7, 2021 · 3 comments
Open

Unable to unpack image created by spiffsgen #79

AlexanderKokushkin opened this issue Feb 7, 2021 · 3 comments

Comments

@AlexanderKokushkin
Copy link

Hello,

I'm creating spiffs image this way:
spiffsgen.py 40960 --page-size 256 --block-size 4096 mypackdir image.bin
then unpacking with mkspiffs:
mkspiffs.exe -b 4096 -p 256 -s 40960 -u mydestdir image.bin
and getting random numbers in extracted files.

The same issue is with the images downloaded from the chip.
ESP-IDF version is 4.1.
mkspiffs.exe correctly unpacks images created by himself.
e.g. mkspiffs.exe -b 4096 -p 256 -s 40960 -c mypackdir image.bin
The resulting images created by mkspiffs and spiffsgen are different.
I tried several versions from /Releases with the same results.

Please help, maybe I missed some crucial parameter? Thanks.

@Skizy
Copy link

Skizy commented Feb 16, 2021

Hi
I had the same behaviour. But on my ubuntu linux mkspiffs just crushed without attempt to create any of files.
Recently I've upgraded ESP-IDF to 4.1.1 (as well as toolchain to esp-2020r3) and now mkspiffs unpacks files perfectly!
Tried to generated image and image got from esp-wroom32, all are fine.

@argilo
Copy link

argilo commented May 2, 2021

spiffsgen.py uses a file metadata length of 4 by default, so I think you would need to build mkspiffs with make dist CPPFLAGS="-DSPIFFS_OBJ_META_LEN=4" to read such files.

@Calebe94
Copy link

spiffsgen.py uses a file metadata length of 4 by default, so I think you would need to build mkspiffs with make dist CPPFLAGS="-DSPIFFS_OBJ_META_LEN=4" to read such files.

Thank you @argilo.
Building mkspiffs with DSPIFFS_OBJ_META_LEN=4 worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants