2014-09-04 14:54:48 -07:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2014 Brian Swetland
|
|
|
|
|
*
|
2019-07-05 17:22:23 -07:00
|
|
|
* Use of this source code is governed by a MIT-style
|
|
|
|
|
* license that can be found in the LICENSE file or at
|
|
|
|
|
* https://opensource.org/licenses/MIT
|
2014-09-04 14:54:48 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2014-11-05 16:49:38 -08:00
|
|
|
#include <lib/bootimage_struct.h>
|
2014-09-04 14:54:48 -07:00
|
|
|
|
|
|
|
|
typedef struct bootimage bootimage;
|
|
|
|
|
|
|
|
|
|
bootimage *bootimage_init(void);
|
|
|
|
|
|
|
|
|
|
bootentry_data *bootimage_add_string(
|
2016-02-14 12:24:01 -08:00
|
|
|
bootimage *img, unsigned kind, const char *s);
|
2014-09-04 14:54:48 -07:00
|
|
|
|
|
|
|
|
bootentry_file *bootimage_add_filedata(
|
2016-02-14 12:24:01 -08:00
|
|
|
bootimage *img, unsigned type, void *data, unsigned len);
|
2014-09-04 14:54:48 -07:00
|
|
|
|
|
|
|
|
bootentry_file *bootimage_add_file(
|
2016-02-14 12:24:01 -08:00
|
|
|
bootimage *img, unsigned type, const char *fn);
|
2014-09-04 14:54:48 -07:00
|
|
|
|
|
|
|
|
void bootimage_done(bootimage *img);
|
|
|
|
|
|
|
|
|
|
int bootimage_write(bootimage *img, int fd);
|