Robot Blueprint & General Content copy to RW Partition
Currently we use script or manual copying files to SD card in Linux PC. Files are index.html and other UI files to create Robotface. We have decided to get rid of script or manual step. There are at least two ways to solve this. Which one you prefer or is option 1 possible.
Solution 1:
- Create content to read write /run/mount/appdata/robotFace during build time. NOTE solutions 2 and 3 do this at bootup time. Is this possible?
Solution 2:
- In robot-face meson.build we define that files are copied to /etc/robot-face
- In robot face service we give this path as a parameter so that robot-face service loads index.html from etc/robot-face
- PROS: No additional scripts. Simple solution
- CONS: /etc/robot-face is readonly partition. No possible to change files without re-flashing. One way is to make disk writable but is that better than solution 2?
Solution 3:
- In robot-face meson.build we define that files are copied to /etc/robot-face
- robot-face recipe also contains robot-face.sh. robot-face.service start this script instead of robot-face executable
- robot-face.sh copies files from /etc/robot-face to /run/mount/appdata/RobotFace if RobotFace directory is still empty. This means that copying is done at first boot. robot-face.sh script then calls robot-face executable by pointing index.html to this new appdata/RobotFace folder. PROS: User can use SSH or Vi editor to modify html, css files and UI development is easy. CONS: One additional script file and copying takes some milliseconds in boot. In final product it would be safer to have UI files in read only partition. Of course in final product developer can remove this script and let HTML be only in /etc/robot-face