summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-04-28 19:00:01 -0400
committerTom Rini <[email protected]>2023-04-28 19:00:01 -0400
commit076f13308c6f06e2c4feb8b408e997bc732586e1 (patch)
tree412d95d550e2e03214f48c89db608c57886e0995 /tools
parentc9c2c95d4cd27fe0cd41fe13a863899d268f973c (diff)
parentf43fc16812487289e98389f0f643d20c444f9c9c (diff)
Merge tag 'dm-pull-28apr23' of https://source.denx.de/u-boot/custodians/u-boot-dm
sandbox and fdt bug fixes / tweaks various other minor fixes
Diffstat (limited to 'tools')
-rw-r--r--tools/binman/cmdline.py2
-rw-r--r--tools/binman/control.py6
-rw-r--r--tools/binman/test/blob_syms.c2
-rw-r--r--tools/binman/test/u_boot_binman_syms.c2
-rw-r--r--tools/binman/test/u_boot_binman_syms_size.c2
-rw-r--r--tools/buildman/control.py6
-rwxr-xr-xtools/patman/__main__.py6
-rw-r--r--tools/patman/func_test.py4
8 files changed, 18 insertions, 12 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/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/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)