Essentially a version of mknbi similar to mknbi-dos needs to be written for that OS and filesystem. For example, for ELKS, the setup code in first.S would do validity checks for a Minix filesystem and mknbi would create a Minix ramdisk.
mknbi-dos
first.S
Minix
mknbi