Has anyone else noticed anything weird when generating compact flash images using Momentics with SP2 applied?
We used to build a comprehensive image (~8Mb) as an ifs and loaded onto one partition of a CF card (taking the obvious memory hit when the whole thing is loaded as a read-only RAM partition), but noticed that there were several strange behaviours when a “known good” image was generated using SP2.
Firstly, files which end up near the end of the image are occasionally corrupted (file sizes do not match, going up in some cases when it would be expected that the file stripping which occurs should at least keep the files the same size). THis seemed to include libraries getting damaged - resulting in much pain and suffering trying to find the cause of programs aborting before entering main(). We believe that this is because there is a fundamental limit to the size of an ifs system. The vague references available suggest that this is the case, but not what that particular limit is.
Secondly, even with smaller images (testing purposes) there seems to be nothing systematic in the way that the addition or removal of resources affects the operation of the system: I created an image from the “generic x86” project and added binaries one at a time until the bsh script was unable to execute the individual commands - say devb-eide at the start of the file (image was about 4.5Mb at this stage). Removing the single binary added (note that these were binaries not used in the bsh file) sometimes got it going again, but often it did not. Sometimes adding the binary back didn’t cause problems the second time around. Fiddling with the “page align image” option also changed the behaviour.
We are wondering if there is a page-alignment or similar issue with the mkifs utility, or a fundamental limit to the operational size of the ifs as a result of this…
The good news, however, is that we seem to have a good solution (which it turns out is probably more like the intention of the qnx creators of mkifs): create an ifs with the minimum set of objects to start the system and mount a secondary partition (devb-eide, devc-con, pci-bios, seedres, sh, waitfor, libc.so.2, libcam.so.2, libcpp.so.2, cam-disk.so, fs-dos.so, fs-qnx.so, io-blk.so, libcam.so->/proc/boot/libcam.so.2, libcpp.so->/proc/boot/libcpp.so.2) all in /proc/boot and mount a file system containing the rest of the things needed (/bin, /sbin, /usr/bin, /usr/sbin, /opt) and creating symlinks in the image to do this cleanly from the perspective of the resulting system (e.g. /sbin → /sbin)
There was one issue: the contents of /usr/lib needed to be included in the ifs file as the bsh script appears to require ldqnx.so.2 (symlink to libc.so.2) to be located in /usr/lib and does not work when it is in /proc/boot. This seems to be hardcoded somewhere…
If anyone else has had these types of problems, or knows why they may have occurred we’d be interested in hearing.