From 16287933a852bab2ac4985a770e08c9aa69d21b1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 17 Apr 2020 18:09:03 -0600 Subject: binman: Move to absolute imports At present binman sets the python path on startup so that it can access the libraries it needs. If we convert to use absolute imports this is not necessary. Move binman to use absolute imports. This enables removable of the path adjusting in Entry also. Signed-off-by: Simon Glass --- tools/binman/control.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools/binman/control.py') diff --git a/tools/binman/control.py b/tools/binman/control.py index 82bc90d802..d715b601b9 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -10,9 +10,9 @@ import os import sys import tools -import cbfs_util +from binman import cbfs_util +from binman import elf import command -import elf import tout # List of images we plan to create @@ -60,7 +60,7 @@ def WriteEntryDocs(modules, test_missing=None): to show as missing even if it is present. Should be set to None in normal use. """ - from entry import Entry + from binman.entry import Entry Entry.WriteDocs(modules, test_missing) @@ -334,8 +334,8 @@ def PrepareImagesAndDtbs(dtb_fname, select_images, update_fdt): """ # Import these here in case libfdt.py is not available, in which case # the above help option still works. - import fdt - import fdt_util + from dtoc import fdt + from dtoc import fdt_util global images # Get the device tree ready by compiling it and copying the compiled @@ -473,7 +473,7 @@ def Binman(args): # Put these here so that we can import this module without libfdt from image import Image - import state + from binman import state if args.cmd in ['ls', 'extract', 'replace']: try: -- cgit v1.2.3