Skip navigation.
Home
The QNX Community Portal

View topic - binaries disappearing from filesystem

binaries disappearing from filesystem

Discussion about the QNX6 OS.

binaries disappearing from filesystem

Postby tselmeci » Thu May 19, 2011 6:26 am

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,









tselmeci
Active Member
 
Posts: 10
Joined: Sat Nov 27, 2004 4:45 pm
Location: Hungary

RE: binaries disappearing from filesystem

Postby Thunderblade » Thu May 19, 2011 7:42 am

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.
Thunderblade
Senior Member
 
Posts: 487
Joined: Thu Apr 07, 2005 11:52 am

RE: binaries disappearing from filesystem

Postby tselmeci » Thu May 19, 2011 7:58 am

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.
tselmeci
Active Member
 
Posts: 10
Joined: Sat Nov 27, 2004 4:45 pm
Location: Hungary

RE: binaries disappearing from filesystem

Postby tselmeci » Thu May 19, 2011 6:37 pm

That's it, works perfectly :)

Thanks again.
tselmeci
Active Member
 
Posts: 10
Joined: Sat Nov 27, 2004 4:45 pm
Location: Hungary


Return to QNX6 - OS

Who is online

Users browsing this forum: No registered users and 3 guests