summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile11
-rw-r--r--tools/bin2header.c41
-rw-r--r--tools/binman/etype/u_boot_spl_with_ucode_ptr.py2
-rw-r--r--tools/binman/etype/u_boot_ucode.py6
-rw-r--r--tools/buildman/README2
-rw-r--r--tools/buildman/board.py10
-rw-r--r--tools/buildman/control.py19
-rwxr-xr-xtools/dtoc/dtoc.py1
-rw-r--r--tools/patman/checkpatch.py5
-rw-r--r--tools/patman/series.py3
10 files changed, 31 insertions, 69 deletions
diff --git a/tools/Makefile b/tools/Makefile
index eca8ecc..5000f4d 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -32,7 +32,6 @@ CONFIG_BUILD_ENVCRC ?= $(ENVCRC-y)
hostprogs-$(CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER) += atmel_pmecc_params
-hostprogs-$(CONFIG_CMD_LICENSE) += bin2header
hostprogs-$(CONFIG_LCD_LOGO) += bmp_logo
hostprogs-$(CONFIG_VIDEO_LOGO) += bmp_logo
HOSTCFLAGS_bmp_logo.o := -pedantic
@@ -238,10 +237,6 @@ endif
endif # !LOGO_BMP
-# Generated gziped GPL-2.0 license text
-LICENSE_H = $(objtree)/include/license.h
-LICENSE-$(CONFIG_CMD_LICENSE) += $(LICENSE_H)
-
#
# Use native tools and options
# Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
@@ -256,7 +251,7 @@ HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
-D__KERNEL_STRICT_NAMES \
-D_GNU_SOURCE
-__build: $(LOGO-y) $(LICENSE-y)
+__build: $(LOGO-y)
$(LOGO_H): $(obj)/bmp_logo $(LOGO_BMP)
$(obj)/bmp_logo --gen-info $(LOGO_BMP) > $@
@@ -264,10 +259,6 @@ $(LOGO_H): $(obj)/bmp_logo $(LOGO_BMP)
$(LOGO_DATA_H): $(obj)/bmp_logo $(LOGO_BMP)
$(obj)/bmp_logo --gen-data $(LOGO_BMP) > $@
-$(LICENSE_H): $(obj)/bin2header $(srctree)/Licenses/gpl-2.0.txt
- cat $(srctree)/Licenses/gpl-2.0.txt | gzip -9 -c | \
- $(obj)/bin2header license_gzip > $(LICENSE_H)
-
# Let clean descend into subdirs
subdir- += env
diff --git a/tools/bin2header.c b/tools/bin2header.c
deleted file mode 100644
index 6c2c23f..0000000
--- a/tools/bin2header.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* bin2header.c - program to convert binary file into a C structure
- * definition to be included in a header file.
- *
- * (C) Copyright 2008 by Harald Welte <laforge@openmoko.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-
-int main(int argc, char **argv)
-{
- if (argc < 2) {
- fprintf(stderr, "%s needs one argument: the structure name\n",
- argv[0]);
- exit(1);
- }
-
- printf("/* bin2header output - automatically generated */\n");
- printf("unsigned char %s[] = {\n", argv[1]);
-
- while (1) {
- int i, nread;
- unsigned char buf[10];
- nread = read(0, buf, sizeof(buf));
- if (nread <= 0)
- break;
-
- printf("\t");
- for (i = 0; i < nread - 1; i++)
- printf("0x%02x, ", buf[i]);
-
- printf("0x%02x,\n", buf[nread-1]);
- }
-
- printf("};\n");
-
- exit(0);
-}
diff --git a/tools/binman/etype/u_boot_spl_with_ucode_ptr.py b/tools/binman/etype/u_boot_spl_with_ucode_ptr.py
index 764c282..1c6706d 100644
--- a/tools/binman/etype/u_boot_spl_with_ucode_ptr.py
+++ b/tools/binman/etype/u_boot_spl_with_ucode_ptr.py
@@ -21,7 +21,7 @@ class Entry_u_boot_spl_with_ucode_ptr(Entry_u_boot_with_ucode_ptr):
process.
"""
def __init__(self, image, etype, node):
- Entry_blob.__init__(self, image, etype, node)
+ Entry_u_boot_with_ucode_ptr.__init__(self, image, etype, node)
self.elf_fname = 'spl/u-boot-spl'
def GetDefaultFilename(self):
diff --git a/tools/binman/etype/u_boot_ucode.py b/tools/binman/etype/u_boot_ucode.py
index 8fe27ac..8e51e99 100644
--- a/tools/binman/etype/u_boot_ucode.py
+++ b/tools/binman/etype/u_boot_ucode.py
@@ -62,6 +62,12 @@ class Entry_u_boot_ucode(Entry_blob):
self.data = ''
return True
+ # Handle microcode in SPL image as well
+ ucode_dest_entry = self.image.FindEntryType('u-boot-spl-with-ucode-ptr')
+ if ucode_dest_entry and not ucode_dest_entry.target_pos:
+ self.data = ''
+ return True
+
# Get the microcode from the device tree entry
fdt_entry = self.image.FindEntryType('u-boot-dtb-with-ucode')
if not fdt_entry or not fdt_entry.ucode_data:
diff --git a/tools/buildman/README b/tools/buildman/README
index ccea13f..f665276 100644
--- a/tools/buildman/README
+++ b/tools/buildman/README
@@ -141,7 +141,7 @@ means to build all arm boards except nvidia, freescale and anything ending
with 'ball'.
It is convenient to use the -n option to see what will be built based on
-the subset given.
+the subset given. Use -v as well to get an actual list of boards.
Buildman does not store intermediate object files. It optionally copies
the binary output into a directory when a build is successful. Size
diff --git a/tools/buildman/board.py b/tools/buildman/board.py
index ae0e0b8..f842d3a 100644
--- a/tools/buildman/board.py
+++ b/tools/buildman/board.py
@@ -249,15 +249,15 @@ class Boards:
exclude: List of boards to exclude, regardless of 'args'
Returns:
- Dictionary which holds the number of boards which were selected
+ Dictionary which holds the list of boards which were selected
due to each argument, arranged by argument.
"""
result = {}
terms = self._BuildTerms(args)
- result['all'] = 0
+ result['all'] = []
for term in terms:
- result[str(term)] = 0
+ result[str(term)] = []
exclude_list = []
for expr in exclude:
@@ -285,7 +285,7 @@ class Boards:
if build_it:
board.build_it = True
if matching_term:
- result[matching_term] += 1
- result['all'] += 1
+ result[matching_term].append(board.target)
+ result['all'].append(board.target)
return result
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index 545c2cb..73b1a14 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -48,9 +48,9 @@ def ShowActions(series, why_selected, boards_selected, builder, options):
Args:
series: Series object
why_selected: Dictionary where each key is a buildman argument
- provided by the user, and the value is the boards brought
- in by that argument. For example, 'arm' might bring in
- 400 boards, so in this case the key would be 'arm' and
+ provided by the user, and the value is the list of boards
+ brought in by that argument. For example, 'arm' might bring
+ in 400 boards, so in this case the key would be 'arm' and
the value would be a list of board names.
boards_selected: Dict of selected boards, key is target name,
value is Board object
@@ -75,9 +75,11 @@ def ShowActions(series, why_selected, boards_selected, builder, options):
print
for arg in why_selected:
if arg != 'all':
- print arg, ': %d boards' % why_selected[arg]
+ print arg, ': %d boards' % len(why_selected[arg])
+ if options.verbose:
+ print ' %s' % ' '.join(why_selected[arg])
print ('Total boards to build for each commit: %d\n' %
- why_selected['all'])
+ len(why_selected['all']))
def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
clean_dir=False):
@@ -221,9 +223,10 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
options.git_dir, count, series=None, allow_overwrite=True)
else:
series = None
- options.verbose = True
- if not options.summary:
- options.show_errors = True
+ if not options.dry_run:
+ options.verbose = True
+ if not options.summary:
+ options.show_errors = True
# By default we have one thread per CPU. But if there are not enough jobs
# we can have fewer threads and use a high '-j' value for make.
diff --git a/tools/dtoc/dtoc.py b/tools/dtoc/dtoc.py
index 11050b6..6df7b0d 100755
--- a/tools/dtoc/dtoc.py
+++ b/tools/dtoc/dtoc.py
@@ -54,6 +54,7 @@ def Conv_name_to_c(name):
str = name.replace('@', '_at_')
str = str.replace('-', '_')
str = str.replace(',', '_')
+ str = str.replace('.', '_')
str = str.replace('/', '__')
return str
diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py
index be78fc5..2915d97 100644
--- a/tools/patman/checkpatch.py
+++ b/tools/patman/checkpatch.py
@@ -138,7 +138,7 @@ def GetWarningMsg(col, msg_type, fname, line, msg):
msg_type = col.Color(col.RED, msg_type)
elif msg_type == 'check':
msg_type = col.Color(col.MAGENTA, msg_type)
- return '%s: %s,%d: %s' % (msg_type, fname, line, msg)
+ return '%s:%d: %s: %s\n' % (fname, line, msg_type, msg)
def CheckPatches(verbose, args):
'''Run the checkpatch.pl script on each patch'''
@@ -157,7 +157,8 @@ def CheckPatches(verbose, args):
result.checks):
print("Internal error: some problems lost")
for item in result.problems:
- print(GetWarningMsg(col, item.get('type', '<unknown>'),
+ sys.stderr.write(
+ GetWarningMsg(col, item.get('type', '<unknown>'),
item.get('file', '<unknown>'),
item.get('line', 0), item.get('msg', 'message')))
print
diff --git a/tools/patman/series.py b/tools/patman/series.py
index 38a452e..c1b8652 100644
--- a/tools/patman/series.py
+++ b/tools/patman/series.py
@@ -235,7 +235,8 @@ class Series(dict):
if cover_fname:
cover_cc = gitutil.BuildEmailList(self.get('cover_cc', ''))
- print(cover_fname, ', '.join(set(cover_cc + all_ccs)), file=fd)
+ cc_list = ', '.join([x.decode('utf-8') for x in set(cover_cc + all_ccs)])
+ print(cover_fname, cc_list.encode('utf-8'), file=fd)
fd.close()
return fname