test_libfdt.py 293 B

1234567891011121314
  1. #!/usr/bin/python
  2. import os
  3. import sys
  4. our_path = os.path.dirname(os.path.realpath(__file__))
  5. sys.path.append(os.path.join(our_path, '../../b/sandbox_spl/tools'))
  6. import libfdt
  7. with open('b/sandbox_spl/u-boot.dtb') as fd:
  8. fdt = fd.read()
  9. print libfdt.fdt_path_offset(fdt, "/aliases")