| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#ifndef __LIB_FIT_H__ |
| 5 |
#define __LIB_FIT_H__ |
| 6 |
|
| 7 |
#include <commonlib/device_tree.h> |
| 8 |
#include <commonlib/list.h> |
| 9 |
#include <program_loading.h> |
| 10 |
#include <stddef.h> |
| 11 |
#include <stdint.h> |
| 12 |
|
| 13 |
struct fit_image_node { |
| 14 |
const char *name; |
| 15 |
void *data; |
| 16 |
uint32_t size; |
| 17 |
int compression; |
| 18 |
|
| 19 |
struct list_node list_node; |
| 20 |
}; |
| 21 |
|
| 22 |
struct fit_config_node { |
| 23 |
const char *name; |
| 24 |
struct fit_image_node *kernel; |
| 25 |
struct fit_image_node *fdt; |
| 26 |
struct list_node overlays; |
| 27 |
struct fit_image_node *ramdisk; |
| 28 |
struct fdt_property compat; |
| 29 |
int compat_rank; |
| 30 |
int compat_pos; |
| 31 |
const char *compat_string; |
| 32 |
|
| 33 |
struct list_node list_node; |
| 34 |
}; |
| 35 |
|
| 36 |
struct fit_overlay_chain { |
| 37 |
struct fit_image_node *overlay; |
| 38 |
struct list_node list_node; |
| 39 |
}; |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
void fit_update_chosen(struct device_tree *tree, const char *cmd_line); |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
void fit_add_compat_string(const char *str); |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
void fit_update_memory(struct device_tree *tree); |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
bool fit_payload_arch(struct prog *payload, struct fit_config_node *config, |
| 72 |
struct region *kernel, |
| 73 |
struct region *fdt, |
| 74 |
struct region *initrd); |
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
struct fit_config_node *fit_load(void *fit); |
| 82 |
|
| 83 |
void fit_add_ramdisk(struct device_tree *tree, void *ramdisk_addr, |
| 84 |
size_t ramdisk_size); |
| 85 |
|
| 86 |
#endif |