TreeBuilder uses templates full of commands (like ramdisk.ltmpl) to create the output tree and boot images. There are 4 arch-specific templates, plus a bonus EFI template which can handle EFI image creation for any arch that implements EFI.