Binman currently supports updating the main device tree with things like the position of each entry. Extend this support to SPL and TPL as well, since they may need (a subset of) this information. Also adjust DTB output files to have a .out extension since this seems clearer than having a .dtb extension with 'out' in the name somwhere. Also add a few missing comments and update the DT setup code to use ReadFile and WriteFile(). Signed-off-by: Simon Glass <sjg@chromium.org>lime2-spi
parent
93d174135a
commit
6ed45ba0a8
@ -0,0 +1,33 @@ |
||||
# SPDX-License-Identifier: GPL-2.0+ |
||||
# Copyright (c) 2018 Google, Inc |
||||
# Written by Simon Glass <sjg@chromium.org> |
||||
# |
||||
# Entry-type module for U-Boot device tree files |
||||
# |
||||
|
||||
import state |
||||
|
||||
from entry import Entry |
||||
from blob import Entry_blob |
||||
|
||||
class Entry_blob_dtb(Entry_blob): |
||||
"""A blob that holds a device tree |
||||
|
||||
This is a blob containing a device tree. The contents of the blob are |
||||
obtained from the list of available device-tree files, managed by the |
||||
'state' module. |
||||
""" |
||||
def __init__(self, section, etype, node): |
||||
Entry_blob.__init__(self, section, etype, node) |
||||
|
||||
def ObtainContents(self): |
||||
"""Get the device-tree from the list held by the 'state' module""" |
||||
self._filename = self.GetDefaultFilename() |
||||
self._pathname, data = state.GetFdtContents(self._filename) |
||||
self.SetContents(data) |
||||
return True |
||||
|
||||
def ProcessContents(self): |
||||
"""Re-read the DTB contents so that we get any calculated properties""" |
||||
_, data = state.GetFdtContents(self._filename) |
||||
self.SetContents(data) |
@ -0,0 +1,18 @@ |
||||
// SPDX-License-Identifier: GPL-2.0+ |
||||
/dts-v1/; |
||||
|
||||
/ { |
||||
#address-cells = <1>; |
||||
#size-cells = <1>; |
||||
|
||||
binman { |
||||
section { |
||||
u-boot-dtb { |
||||
}; |
||||
}; |
||||
u-boot-spl-dtb { |
||||
}; |
||||
u-boot-tpl-dtb { |
||||
}; |
||||
}; |
||||
}; |
Loading…
Reference in new issue