xref: /openbmc/u-boot/lib/libfdt/test_libfdt.py (revision c98b171e)
1*76bce10dSSimon Glass#!/usr/bin/python
2*76bce10dSSimon Glass
3*76bce10dSSimon Glassimport os
4*76bce10dSSimon Glassimport sys
5*76bce10dSSimon Glass
6*76bce10dSSimon Glassour_path = os.path.dirname(os.path.realpath(__file__))
7*76bce10dSSimon Glasssys.path.append(os.path.join(our_path, '../../b/sandbox_spl/tools'))
8*76bce10dSSimon Glass
9*76bce10dSSimon Glassimport libfdt
10*76bce10dSSimon Glass
11*76bce10dSSimon Glasswith open('b/sandbox_spl/u-boot.dtb') as fd:
12*76bce10dSSimon Glass    fdt = fd.read()
13*76bce10dSSimon Glass
14*76bce10dSSimon Glassprint libfdt.fdt_path_offset(fdt, "/aliases")
15