First character truncation for files under the flash partiti

I’ve been having this problem for a while but haven’t figured out the cause
of it. Maybe someone from this forum can help.

We are using two AMD 8MB flash parts interleaved to create a 16 MB flash
array on a PPC target. The EFS image for the combined array is built on a
win32 machine using QNX 6.1B SDK. We append the IFS (OS boot) image on top
of the EFS to produce a 16 MB flash image for our target. The booter writes
the writable flash image appropriately onto the flash, and upon booting the
OS and starting the flash driver, we can see all the files/directories in
the flash partitions.

If we then try to edit any file that was part of the image, the first
character in the file gets truncated. Its easier to notice this with text
files. A silly workaround was to put an extra space at the beginning of the
file we are editing so when the truncation happens, it doesn’t affect the
remaining line.

Later on, I discovered that by adding the -u 2 option to the startup of the
flash driver, I am able to significantly reduce the affect of this problem.
The -u2 updates the date on edited file and in most cases does not truncate
the first character. However, we still see this problem once in a while
albeit it is hard to reproduce. We saw it also on our previous version of
the board that used a different flash part ( which unlike our current multi
flash chip array, was just a single 2MB flash part).

Files that are not part of the original mkefs image are not affected by
this. For example, if after the OS boot, I copy a file from a remote host
(ftp/NFS) to the flash and edit that file, the first character in this file
does not get truncated.

  • Murtaza