Our product has the following configuration, iMx6 processor, 2GB eMMC, 512 MB RAM, couple of Ethernet ports and USART ports. This is going to be a 24/7 365 days working device.
We are planning to build a minimal Linux image (Kernel + RFS) around 7 to 10 MB, keep our main application and a custom kernel driver in a separate squashfs partition of size 2 MB (since this is what we will be frequently updating in the field we want to keep this partition seperate and small).
Another ext4 read/write data partition to store our persistent data. Except for data partition we want all the others to be read only partition.
My queries are
Since we are having a smaller Linux OS image (kernel+RFS) can we have the whole RFS as initramfs?
Does having a RFS as initramfs have any implication? (RAM will be consumed more, I guess around 20 to 30 MB max, considering the amount of RAM we have I feel this should not be an issue)
Another solution is having the RFS as squashfs, this saves space. Does the above have any other advantage over initramfs?
If we have squashfs then we need to have union mount as well to mount both read only application partition and read/write data partition together.
If we go with initramfs then I guess we don’t have to implement union mount. Is this understanding right?
This is our first project in linux hence i would like to get feedback from experienced people who has used such RFS
@all we were able to achieve the solution without using unionfs or union mount. Though we used squashfs file system (Read only RFS) when we mount a ext4 partition under /run it allows us to read and write. Linux detected that the mounted partition is a R/W partition and allows us to do appropriate operation even though the RFS is a read only file system. I believe you have to go for unionFS or union mount only when you want to update parts of a readonly RFS contents itself.