9
0
Fork 0

bootm: Add a define for the additional devicetree size

The fixed devicetree may need more space than the original one.
We used to use 0x8000 here. Add a define for it to have the
space defined at a single place.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2012-10-31 15:04:37 +01:00
parent c83623d010
commit da7d19b9d8
1 changed files with 9 additions and 2 deletions

View File

@ -49,6 +49,11 @@
static LIST_HEAD(handler_list);
/*
* Additional oftree size for the fixed tree
*/
#define OFTREE_SIZE_INCREASE 0x8000
int register_image_handler(struct image_handler *handler)
{
list_add_tail(&handler->list, &handler_list);
@ -184,12 +189,14 @@ static int bootm_open_oftree(struct image_data *data, const char *oftree, int nu
file_type_to_string(ft));
}
fixfdt = xmemalign(4096, size + 0x8000);
fixfdt = xmemalign(4096, size + OFTREE_SIZE_INCREASE);
memcpy(fixfdt, fdt, size);
ret = fdt_open_into(fdt, fixfdt, size + OFTREE_SIZE_INCREASE);
free(fdt);
ret = fdt_open_into(fixfdt, fixfdt, size + 0x8000);
if (ret) {
printf("unable to parse %s\n", oftree);
return -ENODEV;