bootimage: Document and add C wrapper