diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/binman/cmdline.py | 2 | ||||
-rw-r--r-- | tools/binman/control.py | 6 | ||||
-rw-r--r-- | tools/binman/test/blob_syms.c | 2 | ||||
-rw-r--r-- | tools/binman/test/u_boot_binman_syms.c | 2 | ||||
-rw-r--r-- | tools/binman/test/u_boot_binman_syms_size.c | 2 | ||||
-rw-r--r-- | tools/buildman/builderthread.py | 1 | ||||
-rw-r--r-- | tools/buildman/control.py | 6 | ||||
-rwxr-xr-x | tools/dtoc/test_fdt.py | 4 | ||||
-rw-r--r-- | tools/env/README | 2 | ||||
-rwxr-xr-x | tools/patman/__main__.py | 6 | ||||
-rw-r--r-- | tools/patman/func_test.py | 4 |
11 files changed, 22 insertions, 15 deletions
diff --git a/tools/binman/cmdline.py b/tools/binman/cmdline.py index 4b875a9dcda..9632ec115e5 100644 --- a/tools/binman/cmdline.py +++ b/tools/binman/cmdline.py @@ -95,7 +95,7 @@ controlled by a description in the board device tree.''' parser.add_argument('-H', '--full-help', action='store_true', default=False, help='Display the README file') parser.add_argument('--tooldir', type=str, - default=os.path.join(os.getenv('HOME'), '.binman-tools'), + default=os.path.join(os.path.expanduser('~/.binman-tools')), help='Set the directory to store tools') parser.add_argument('--toolpath', type=str, action='append', help='Add a path to the list of directories containing tools') diff --git a/tools/binman/control.py b/tools/binman/control.py index 0febcb79a60..68597c4e779 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -7,7 +7,11 @@ from collections import OrderedDict import glob -import importlib.resources +try: + import importlib.resources +except ImportError: + # for Python 3.6 + import importlib_resources import os import pkg_resources import re diff --git a/tools/binman/test/blob_syms.c b/tools/binman/test/blob_syms.c index d652c79aa98..1df8d64353f 100644 --- a/tools/binman/test/blob_syms.c +++ b/tools/binman/test/blob_syms.c @@ -5,8 +5,6 @@ * Simple program to create some binman symbols. This is used by binman tests. */ -typedef unsigned long ulong; - #include <linux/kconfig.h> #include <binman_sym.h> diff --git a/tools/binman/test/u_boot_binman_syms.c b/tools/binman/test/u_boot_binman_syms.c index ed761246aec..147c90230f8 100644 --- a/tools/binman/test/u_boot_binman_syms.c +++ b/tools/binman/test/u_boot_binman_syms.c @@ -5,8 +5,6 @@ * Simple program to create some binman symbols. This is used by binman tests. */ -typedef unsigned long ulong; - #include <linux/kconfig.h> #include <binman_sym.h> diff --git a/tools/binman/test/u_boot_binman_syms_size.c b/tools/binman/test/u_boot_binman_syms_size.c index fa41b3d9a33..f686892a4da 100644 --- a/tools/binman/test/u_boot_binman_syms_size.c +++ b/tools/binman/test/u_boot_binman_syms_size.c @@ -5,8 +5,6 @@ * Simple program to create some binman symbols. This is used by binman tests. */ -typedef unsigned long ulong; - #include <linux/kconfig.h> #include <binman_sym.h> diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index 879ff138ad7..635865c21c8 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -253,6 +253,7 @@ class BuilderThread(threading.Thread): args.extend(['-j', str(self.builder.num_jobs)]) if self.builder.warnings_as_errors: args.append('KCFLAGS=-Werror') + args.append('HOSTCFLAGS=-Werror') if self.builder.allow_missing: args.append('BINMAN_ALLOW_MISSING=1') if self.builder.no_lto: diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 35f44c0cf3d..09a11f25b3f 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -3,7 +3,11 @@ # import multiprocessing -import importlib.resources +try: + import importlib.resources +except ImportError: + # for Python 3.6 + import importlib_resources import os import shutil import subprocess diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py index 32fa69cbb01..4fe8d12c403 100755 --- a/tools/dtoc/test_fdt.py +++ b/tools/dtoc/test_fdt.py @@ -784,8 +784,8 @@ class TestFdtUtil(unittest.TestCase): def test_ensure_compiled_tmpdir(self): """Test providing a temporary directory""" + old_outdir = tools.outdir try: - old_outdir = tools.outdir tools.outdir= None tmpdir = tempfile.mkdtemp(prefix='test_fdt.') dtb = fdt_util.EnsureCompiled(find_dtb_file('dtoc_test_simple.dts'), @@ -793,7 +793,7 @@ class TestFdtUtil(unittest.TestCase): self.assertEqual(tmpdir, os.path.dirname(dtb)) shutil.rmtree(tmpdir) finally: - tools.outdir= old_outdir + tools.outdir = old_outdir def test_get_phandle_name_offset(self): val = fdt_util.GetPhandleNameOffset(self.node, 'missing') diff --git a/tools/env/README b/tools/env/README index 709251383c6..480a893202f 100644 --- a/tools/env/README +++ b/tools/env/README @@ -59,5 +59,5 @@ this environment instance. On NAND this is used to limit the range within which bad blocks are skipped, on NOR it is not used. To prevent losing changes to the environment and to prevent confusing the MTD -drivers, a lock file at /var/lock/fw_printenv.lock is used to serialize access +drivers, a lock file at /run/fw_printenv.lock is used to serialize access to the environment. diff --git a/tools/patman/__main__.py b/tools/patman/__main__.py index 48ffbc8eadf..8eba5d34864 100755 --- a/tools/patman/__main__.py +++ b/tools/patman/__main__.py @@ -7,7 +7,11 @@ """See README for more information""" from argparse import ArgumentParser -import importlib.resources +try: + import importlib.resources +except ImportError: + # for Python 3.6 + import importlib_resources import os import re import sys diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py index 42ac4ed77b7..e3918497cf4 100644 --- a/tools/patman/func_test.py +++ b/tools/patman/func_test.py @@ -489,8 +489,8 @@ complicated as possible''') # pylint: disable=E1101 self.repo.checkout(target, strategy=pygit2.GIT_CHECKOUT_FORCE) control.setup() + orig_dir = os.getcwd() try: - orig_dir = os.getcwd() os.chdir(self.gitdir) # Check that it can detect the current branch @@ -679,8 +679,8 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c self.repo.checkout(target, strategy=pygit2.GIT_CHECKOUT_FORCE) # Check that it can detect the current branch + orig_dir = os.getcwd() try: - orig_dir = os.getcwd() os.chdir(self.gitdir) with self.assertRaises(ValueError) as exc: gitutil.count_commits_to_branch(None) |