mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02: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:
@@ -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']:
|
||||
|
Reference in New Issue
Block a user