mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
binman: Obtain the list of device trees from the config
We always have a device tree for U-Boot proper. But we may also have one for SPL and TPL. Add a new Entry method to find out what DTs an entry has, and use that list when updating DTs. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
f46621d255
commit
539aece516
5 changed files with 46 additions and 3 deletions
|
@ -18,6 +18,7 @@ except:
|
|||
have_importlib = False
|
||||
|
||||
import os
|
||||
from sets import Set
|
||||
import sys
|
||||
|
||||
import fdt_util
|
||||
|
@ -164,6 +165,20 @@ class Entry(object):
|
|||
def GetDefaultFilename(self):
|
||||
return None
|
||||
|
||||
def GetFdtSet(self):
|
||||
"""Get the set of device trees used by this entry
|
||||
|
||||
Returns:
|
||||
Set containing the filename from this entry, if it is a .dtb, else
|
||||
an empty set
|
||||
"""
|
||||
fname = self.GetDefaultFilename()
|
||||
# It would be better to use isinstance(self, Entry_blob_dtb) here but
|
||||
# we cannot access Entry_blob_dtb
|
||||
if fname and fname.endswith('.dtb'):
|
||||
return Set([fname])
|
||||
return Set()
|
||||
|
||||
def AddMissingProperties(self):
|
||||
"""Add new properties to the device tree as needed for this entry"""
|
||||
for prop in ['offset', 'size', 'image-pos']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue