Soon I'm going to start production on the PolyPulse.
There is a webserver running which the end user can use to upload/download his projects/samples and can also upload firmware zips. The zip is extracted and the firmware version (aka what executable is running) is changed by pointing a symlink to the selected executable and restarting the executable. This works reliably and thus far seems a good process for my beta testers.
The image I'm using is a stock bela image in which I run a script that modifies some stuff:
- add and recompile a few .dts overlays, add them to uEnv.txt
- create a few folders
- add run.sh
- add webserver executable and enable its .service
To save time I thought of making a new image by booting from a 4GB SD with a fresh bela image, running the script and then doing this to store the created image.
In situations where the OS / image somehow finds itself in a broken state I would like the user to be able to flash a clean image without screwing open the PolyPulse: the SD slot is internal and I've exposed a boot from SD button. I plan to add a 32 SDHC card with a valid image + extra storage space for samples. Then if the eMMC image breaks the user can hold the SD boot button to boot a valid image, and copy the SD image to the eMMC using /opt/Bela/bela_flash_emmc.sh
.
Now if I were to use balena etcher to flash a bela image on a 32GB card it would only allow you to access 4 GB right? I were to resize the filesystem on the sd card I would not be able to run /opt/Bela/bela_flash_emmc.sh
anymore right? If not I thought perhaps adding a partition for storage could work:
eMMC: modified bela image
SD partition 1 (4GB): modified bela image (backup)
SD partition 2 (28GB): extra sample storage
I also wonder how Bela flashes their SDs/eMMCs in production, do you have a fancy automatic SD card copier, perhaps a script that runs dd
or do you buy your SD cards pre-flashed from the factory?