Browse Source

fdt: Correct handling of alias regions

At present the last four bytes of the alias region are dropped in
the case where the last alias is included. This results in a corrupted
device tree. Fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
scm-imx_v2016.03_4.1.15_2.0.0_ga
Simon Glass 5 years ago
committed by Michal Simek
parent
commit
9d8ac956af
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/libfdt/fdt_region.c

+ 1
- 1
lib/libfdt/fdt_region.c View File

@ -101,7 +101,7 @@ int fdt_add_alias_regions(const void *fdt, struct fdt_region *region, int count,
continue;
next = fdt_next_property_offset(fdt, offset);
if (next < 0)
next = node_end - sizeof(fdt32_t);
next = node_end;
if (!did_alias_header) {
fdt_add_region(info, base + node, 12);


Loading…
Cancel
Save