mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02:00
binman: Update state when replacing device-tree entries
Since the state module holds references to all the device trees used by binman, it must be updated when the device trees are updated. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -108,6 +108,22 @@ def GetFdtContents(etype='u-boot-dtb'):
|
||||
data = tools.ReadFile(pathname)
|
||||
return pathname, data
|
||||
|
||||
def UpdateFdtContents(etype, data):
|
||||
"""Update the contents of a particular device tree
|
||||
|
||||
The device tree is updated and written back to its file. This affects what
|
||||
is returned from future called to GetFdtContents(), etc.
|
||||
|
||||
Args:
|
||||
etype: Entry type (e.g. 'u-boot-dtb')
|
||||
data: Data to replace the DTB with
|
||||
"""
|
||||
dtb, fname, entry = output_fdt_info[etype]
|
||||
dtb_fname = dtb.GetFilename()
|
||||
tools.WriteFile(dtb_fname, data)
|
||||
dtb = fdt.FdtScan(dtb_fname)
|
||||
output_fdt_info[etype] = [dtb, fname, entry]
|
||||
|
||||
def SetEntryArgs(args):
|
||||
"""Set the value of the entry args
|
||||
|
||||
|
Reference in New Issue
Block a user