binaries disappearing from filesystem

Hello all!

I’ve a custom mkifs filesystem. The .build script has the basic files listed, but additionally I need to add my files and directory structure to the fs image too. Since I don’t like enumerating all the files by name, my project has a skeleton filesystem with my custom applications, data etc. and this skeleton is also included by the .build script as a link, somehow this way:

/=/home/user/project/skeleton

And /home/user/project/skeleton contains:

  • usr/{bin,sbin,share}
  • etc
  • and so on

So the point is that mkifs “merges” my skeleton dir with the files being explicitly listed in the .build file and creates the output image. And the result is perfect, contains everything I want.

I copy this image to an MMC, and boot my BeagleBoard C4 up with it (QNX-6.5.0). I can use “ls” and any other common tool some many times I just wish. But there’s a problem: my own applications can only be executed one time, since as soon as they terminate, they simply disappear from the filesystem, which is read-only! And it’s a serious problem, since I want to use those programs more times. How can this be? Why do they disappear? I suspect this problem has something to do with the way I generate the filesystem image, but I’m not sure.

Have you ever seen anything like this? Any hints?

Thanks,

They are probably executed in-place including the data segment. To make sure that the data segment is copied from the IFS into normal system RAM, use [data=copy] in your buidfile, before the file/directory included.

Many thanks, I’ll check it in the evening. This is probably the problem, since the “persistent” binaries are beyond a [data=c] section, and my applications are before this statement.

That’s it, works perfectly :slight_smile:

Thanks again.