I'm writing a program which is meant to be loaded and run exclusively from a FAT32 SD card. I need to create an SD card image for distribution as well as for testing the storage and retrieval of files through this program (also exclusively on the SD card).
I want to use a BASH script to automate the creation of this IMG file which contains the binaries of my program. What command line program can I use to achieve this and how do I use it?