My goal is: To integrate fstab image file into the fw.zip
2. My actions are:I configured my esp32 (4mb flash size) according to this link. I generated an image file named ‘mnt.img’ successfully.
3. The result I see is: I am getting an error while building the code after making changes in mos.yml file regarding the image file. “FileNotFoundError: [Errno 2] No such file or directory: ‘./src/mnt.img’”. My Build Log Contains:
FS stats : space total=233681, used=118723, free=114958
GEN /data/fwbuild-volumes/latest/apps/test/esp32/build_contexts/build_ctx_560592761/build/objs/fw_temp/manifest.json
Traceback (most recent call last):
File “/data/fwbuild-volumes/latest/apps/test/esp32/build_contexts/build_ctx_560592761/deps/modules/mongoose-os/tools/mgos_fw_meta.py”, line 543, in
handlersargs.cmd
File “/data/fwbuild-volumes/latest/apps/test/esp32/build_contexts/build_ctx_560592761/deps/modules/mongoose-os/tools/mgos_fw_meta.py”, line 366, in cmd_create_manifest
for fname in os.listdir(src):
FileNotFoundError: [Errno 2] No such file or directory: ‘./src/mnt.img’
/data/fwbuild-volumes/latest/apps/test/esp32/build_contexts/build_ctx_560592761/deps/modules/mongoose-os/tools/mk/mgos_fw_meta.mk:23: recipe for target ‘/data/fwbuild-volumes/latest/apps/test/esp32/build_contexts/build_ctx_560592761/build/objs/fw_temp/manifest.json’ failed
make: *** [/data/fwbuild-volumes/latest/apps/test/esp32/build_contexts/build_ctx_560592761/build/objs/fw_temp/manifest.json] Error 1
make: Leaving directory ‘/app’
Error: exit status 2
/go/src/github.com/mongoose-os/mos/mos/build_local.go:679:
/go/src/github.com/mongoose-os/mos/mos/build_local.go:666:
/go/src/github.com/mongoose-os/mos/mos/build_local.go:431:
/go/src/github.com/mongoose-os/mos/mos/build.go:223:
/go/src/github.com/mongoose-os/mos/mos/build.go:166:
/go/src/github.com/mongoose-os/mos/mos/main.go:194: build failed
My expectation & question is: I think I am not putting the build variables properly in my mos.yml file. mos.yml:
author: mongoose-os
description: A JS-enabled demo Mongoose OS firmware
You specified APP_EXTRA_FW_PARTS: fs_data:type=fs,src=src/mnt.img,ptn=fs_ext
If it isn’t in src, modify that line to point to the right place or move the file in src.
@nliviu Thank you , I figured out that I have to store the image file into fs folder. Now that error is no longer there. However I am getting a different error while preparing a file system partition with 52k alloted to it
Earlier I was able to create SPIFFS with 256k of allocated memory using the old method.
Can you tell me what is the maximum space available for creating a fstab file system?
All the files residing in the fs will go in the root filesystem. You don’t want to put your image in the that filesystem.
Your image file is intended to be mounted as a filesystem itself. The settings in mos.yml instructs mos to do that. Do what I told you in my previous post and it should work as expected.
Oh, right! My bad. I edited the path in my mos.yml as
APP_EXTRA_FW_PARTS : fs_data:type=fs,src=/mnt.img,ptn=fs_ext
and placed the image file in the E:/New/test as it is the root of the current app as can be seen in the pic.
Still getting the ‘No such file or directory : ./mnt.img’ error while doing ‘mos build’ command. I don’t get it I have placed the mnt.img file in the app directory and still it is not been detected in ‘./mnt.img’. I also tried making a new folder src and placed the image file inside the ‘./src/mnt.img’ with my previous attempt with mos.yml as seen in my older post. Was unsuccessful in making fstab image to get into the fw.zip
@nliviu I changed the path to APP_EXTRA_FW_PARTS: fs_data:type=fs,src=mnt.img,ptn=fs_ext while keeping the file in the root directory relative to mos.yml file. Still getting No such file or directory: './mnt.img'. Is it because I am working in Windows Environment where the file directories are defined with different symbols?
@Sumedh_Burbure Could you please share your most recent mos.yml file
I suppose you do not have the sources section there.
According to the guide mos.yml - to upload additional files to the cloud for build purpose and to make them available for mos build flow you should put them into folders listed by mos.yml sources section:
# List of files / directories with C sources. No slashes at the end of dir names.
sources:
- src
Add above code to your mos.yml file
Create src folder at the same level where you do have mos.yml file