Copy multiple files to the same partition

Hello,

I have a custom image that I created for apalis imx6. Also I have some files that I want to add to rootfs during this image installation. I want to show these files in image.json.

I added these files to image.json using the filelist keyword found in this link, but it says that this keyword is supported in only config format 3. The current Tezi version (5.3.0+build.3) has some problems. It cannot complete the image installation. The stable Tezi version (1.8) does not support config format 3.

Config version 3 supports a tuple with three elements: srcfile:destdir:unpack. Configuration format 3 or newer is needed to use this format, or you shall use ‘srcfile’ only for older Configuration formats.

When i use these tuples and set config format to 3, installation is not completed. I have used 5.3.0+build.3 version of Tezi.

I just want to add multiple files to the rootfs with specify source and destination of files. How can i do this or is there a stable version of Tezi which supports config format 3?

Best regards

Hi @muratc98 ,

Thank you for using the Toradex community.

As you correctly identified, to use Configuration format 3 you would need the ToradexEasyInstaller in a version above 2.0b3.

Maybe there is a bug in the newest EasyInstaller version. Could you try to use the version 2.0b7? This version should also support the configuration format 3. You can find the download file here:

EasyInstaller 2.0b7

Let me know if it worked with this version.

Best Regards
Kevin

Hi @kevin.tx ,

As you mentioned, I tried to install the image with EasyInstaller 2.0b7. But I got an error while reading the image.json. It found value type error in filelist keyword. The image.json I created is as follows:

  {
    "partition_size_nominal": 512,
    "want_maximised": false,
    "content": {
      "uncompressed_size": 300,
      "filesystem_type": "ext4",
      "filename": "rootfs.tar.xz",
      "filelist": [
        {
          "srcfile": "path/to/app",
          "destdir": "/path",
          "unpack": false
        },
        {
          "srcfile": "path/to/file",
          "destdir": "/path",
          "unpack": false
        }
      ],
      "mkfs_options": "-E nodiscard",
      "label": "RFS"
    }
  }

I think I wrote the json correctly. What could be the cause of the error?

Best regards

Hi @muratc98 ,

as you already mentioned in your first message, you need to create a tuple with three elements.

The syntax you currently use is not quite correct. Instead try this:

"filelist": [
"srcfile1:destdir1:unpack",
"srcfile2:destdir2:unpack",
"srcfile3:destdir3:unpack"
]

Could you try this and let me know about the progress.

Best Regards
Kevin

Hi @kevin.tx ,

Sorry for the late reply. I made the mistake. When I edited the json as you said, I had no problems with the installation.

The problem occurred only in the locations where the files were to be copied. I give the source and the destination directory. But during installation it takes two directories for the destination. In other words, when I write as in the example below, it tries to search the destination directory as path/to/path.

"filelist": [
  "path/to/file:/path:false"
]

So I just typed “/” in the destination directory to avoid this. I made the source directory same as the destination. There is no problem after that.

"filelist": [
  "path/to/file:/:false"
]

The problem is solved. Thank you for your help.

Best regards

Hi @muratc98,

Glad to hear that its solved.
Thanks for letting us know.

Feel free to reach out to the Toradex Community again.

Best Regards
Kevin