2016-07-26 00:59:02 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
#
|
|
|
|
|
# Copyright (C) 2016 Google, Inc
|
|
|
|
|
# Written by Simon Glass <sjg@chromium.org>
|
|
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
|
|
|
|
#
|
|
|
|
|
|
2017-05-27 13:38:28 +00:00
|
|
|
# Bring in the normal fdt library (which relies on libfdt)
|
|
|
|
|
import fdt
|
2016-09-25 21:52:19 +00:00
|
|
|
|
2017-05-27 13:38:26 +00:00
|
|
|
def FdtScan(fname):
|
2016-07-26 00:59:02 +00:00
|
|
|
"""Returns a new Fdt object from the implementation we are using"""
|
2017-05-27 13:38:28 +00:00
|
|
|
dtb = fdt.Fdt(fname)
|
2016-07-26 00:59:02 +00:00
|
|
|
dtb.Scan()
|
|
|
|
|
return dtb
|