FileSystem for a Controls Program


I want to auto-run a Controls Program as soon as the PCA-6770 board gets powered on. For this purpose, I made a Flash Image usking mkifs & dinit.
I was wondering if someone could advise me how I should partition and place the controller program’s binaries in the Flash … like what partion etc etc. I also want to place the program in a read/write partition so as to be able to write data to files from the controller program.


Your reference to dinit implies that you have a flash device with an IDE interface (or at least there is a block driver for your flash). If this is true, it should simpy appear as a hard disk and there is nothing special to do. If , however, you do have a linear NOR flash device, the following might get you started.

Assuming you have the flash TDK, the most flexible way is to build a read/write embedded filesystem. This will allow you to update binaries in field, etc. You can create a read/write embedded file system using the mkefs utility. Once you have built a efs image, you can simply append it to the end of your already existing image (the one created with mkifs) and in your ifs image, start the flash driver appropriate for the hardware. You’ll want to make sure that the efs image ends up being on a sector boundry (i.e. you need to pad between the ifs and efs images to insure that the efs starts on a sector boundry).