mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-17 07:21:36 +01:00
libfdt: Detected out-of-space with fdt_finish()
At present the Python sequential-write interface can produce an error when it calls fdt_finish(), since this needs to add a terminating tag to the end of the struct section. Fix this by automatically expanding the buffer if needed. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e9d336d866
commit
211cfa503f
@ -786,7 +786,8 @@ class FdtSw(FdtRo):
|
|||||||
Fdt object allowing access to the newly created device tree
|
Fdt object allowing access to the newly created device tree
|
||||||
"""
|
"""
|
||||||
fdtsw = bytearray(self._fdt)
|
fdtsw = bytearray(self._fdt)
|
||||||
check_err(fdt_finish(fdtsw))
|
while self.check_space(fdt_finish(fdtsw)):
|
||||||
|
fdtsw = bytearray(self._fdt)
|
||||||
return Fdt(fdtsw)
|
return Fdt(fdtsw)
|
||||||
|
|
||||||
def check_space(self, val):
|
def check_space(self, val):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user