1 /* 2 * Copyright (c) 2014 Brian Swetland 3 * 4 * Use of this source code is governed by a MIT-style 5 * license that can be found in the LICENSE file or at 6 * https://opensource.org/licenses/MIT 7 */ 8 9 #pragma once 10 11 #include <lib/bootimage_struct.h> 12 13 typedef struct bootimage bootimage; 14 15 bootimage *bootimage_init(void); 16 17 bootentry_data *bootimage_add_string( 18 bootimage *img, unsigned kind, const char *s); 19 20 bootentry_file *bootimage_add_filedata( 21 bootimage *img, unsigned type, void *data, unsigned len); 22 23 bootentry_file *bootimage_add_file( 24 bootimage *img, unsigned type, const char *fn); 25 26 void bootimage_done(bootimage *img); 27 28 int bootimage_write(bootimage *img, int fd); 29