diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-10-31 15:04:37 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-11-01 16:27:17 +0100 |
commit | da7d19b9d8cce610b329ca84eb44e5a215537363 (patch) | |
tree | 37a5b66079f5155d47ba57590dc6f0e61ebdecbf /commands/bootm.c | |
parent | c83623d010ec7587474c450e51710a657999d0de (diff) | |
download | barebox-da7d19b9d8cce610b329ca84eb44e5a215537363.tar.gz barebox-da7d19b9d8cce610b329ca84eb44e5a215537363.tar.xz |
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>
Diffstat (limited to 'commands/bootm.c')
-rw-r--r-- | commands/bootm.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/commands/bootm.c b/commands/bootm.c index 20b49f0cd1..d14ec2ba51 100644 --- a/commands/bootm.c +++ b/commands/bootm.c @@ -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; |