Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I would like to format this drive as FAT. Is there a utility to format a QEMU virtual drive as FAT, or am I expected to hand-write the MBR, boot record, etc. myself?
You can use GNU parted to create the MBR and partition table ("parted drive.img").
Formatting it using native Linux tools will require attaching the image as block device using "kpartx" ("kpartx -a -v drive.img") and then doing something like "mkfs.vfat /dev/mapper/loop0p1". Since this requires root access, I'd suggest making a (possibly compressed) copy of the "empty" image at this point to use as a starting point in future (especially if you're "creating" the image as part of your build system, using root access as part of a build is a bad idea). mtools can be used to copy data to/from a FAT filesystem in a disk image without root access, but unfortunately can't be used to create one.