aboutsummaryrefslogtreecommitdiff
path: root/pylibfdt
diff options
context:
space:
mode:
authorFabrice Gasnier <fabrice.gasnier@st.com>2018-10-03 09:55:02 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2019-06-30 15:48:40 +1000
commitad57e4574a379e8f383058f730e4e8e1939b4fc7 (patch)
tree2ffbf0117c53571ab6fdbd3234b36c514b3cf7bd /pylibfdt
parentbbe3b36f542bb2c274f5fd030456ea840cc31d94 (diff)
downloaddtc-ad57e4574a379e8f383058f730e4e8e1939b4fc7.zip
dtc-ad57e4574a379e8f383058f730e4e8e1939b4fc7.tar.gz
dtc-ad57e4574a379e8f383058f730e4e8e1939b4fc7.tar.bz2
tests: Add a failed test case for 'fdtoverlay' with long target path
This adds a test case to demonstrate some issue seen when applying overlays using 'fdtoverlay'. It fails with FDT_ERR_NOSPACE: - with long target path - symbols in order to use these nodes in possible subsequent overlay. This is seen with this patch, by running: $ make check # Reports a failed test $ ./fdtoverlay -i tests/overlay_base.test.dtb -o out.dtb \ tests/overlay_overlay_long_path.fdoverlay.test.dtb Failed to apply tests/overlay_overlay_long_path.fdoverlay.test.dtb (-3) This overlay fails to apply, because dtb size is close to modulo 1024 bytes chunk: utilfdt_read() -> utilfdt_read_err() -> bufsize = 1024. As there is not much extra space in the blob to resolve symbols (long target path), it fails with FDT_ERR_NOSPACE. In fdtoverlay, size is : /* grow the blob to worst case */ blob_len = fdt_totalsize(blob) + total_len; I can see assumption is made that result should be lower than: - base fdt size + overlay size. Is there a simple way to find to know what the final size is? I'm not sure what the correct fix might be, for such (worst) case? Similar issue is also seen in u-boot/common/image-fit.c that implements similar approach (e.g. base fdt size + overlay size). Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Message-Id: <1538553302-1353-1-git-send-email-fabrice.gasnier@st.com> [dwg: To avoid breaking bisection, I committed this after a fix, so the "failed" description is no longer accurate] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'pylibfdt')
0 files changed, 0 insertions, 0 deletions