| 134 | } |
| 135 | |
| 136 | static void config_node(struct device_tree_node *node) |
| 137 | { |
| 138 | struct fit_config_node *config = xzalloc(sizeof(*config)); |
| 139 | config->name = node->name; |
| 140 | |
| 141 | struct device_tree_property *prop; |
| 142 | list_for_each(prop, node->properties, list_node) { |
| 143 | if (!strcmp("kernel", prop->prop.name)) |
| 144 | config->kernel = find_image(prop->prop.data); |
| 145 | else if (!strcmp("fdt", prop->prop.name)) |
| 146 | config->fdt = find_image_with_overlays(prop->prop.data, |
| 147 | prop->prop.size, &config->overlays); |
| 148 | else if (!strcmp("ramdisk", prop->prop.name)) |
| 149 | config->ramdisk = find_image(prop->prop.data); |
| 150 | else if (!strcmp("compatible", prop->prop.name)) |
| 151 | config->compat = prop->prop; |
| 152 | } |
| 153 | |
| 154 | list_insert_after(&config->list_node, &config_nodes); |
| 155 | } |
| 156 | |
| 157 | static void fit_unpack(struct device_tree *tree, const char **default_config) |
| 158 | { |
no test coverage detected