summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile2
-rw-r--r--scripts/Makefile.autoconf2
-rw-r--r--scripts/Makefile.dts3
-rw-r--r--scripts/Makefile.lib8
-rwxr-xr-xscripts/checkpatch.pl145
-rw-r--r--scripts/config_whitelist.txt20
-rw-r--r--scripts/dtc/libfdt/fdt_ro.c8
-rw-r--r--scripts/pylint.base189
-rwxr-xr-xscripts/setlocalversion5
-rwxr-xr-xscripts/spdxcheck.py2
10 files changed, 214 insertions, 170 deletions
diff --git a/scripts/Makefile b/scripts/Makefile
index cfe9fef8044..8731e6cecd7 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -9,4 +9,4 @@ hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c
always := $(hostprogs-y)
# Let clean descend into subdirs
-subdir- += basic kconfig
+subdir- += basic kconfig dtc
diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf
index 5ed9abc8e14..0b3ffa08bfa 100644
--- a/scripts/Makefile.autoconf
+++ b/scripts/Makefile.autoconf
@@ -68,7 +68,7 @@ quiet_cmd_u_boot_cfg = CFG $@
cmd_u_boot_cfg = \
$(CPP) $(c_flags) $2 -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && { \
grep 'define CONFIG_' $@.tmp | \
- sed '/define CONFIG_IS_ENABLED(/d;/define CONFIG_VAL(/d;' > $@; \
+ sed '/define CONFIG_IS_ENABLED(/d;/define CONFIG_IF_ENABLED_INT(/d;/define CONFIG_VAL(/d;' > $@; \
rm $@.tmp; \
} || { \
rm $@.tmp; false; \
diff --git a/scripts/Makefile.dts b/scripts/Makefile.dts
new file mode 100644
index 00000000000..2561025da82
--- /dev/null
+++ b/scripts/Makefile.dts
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+dtb-y += $(patsubst %,%.dtb,$(subst ",,$(CONFIG_$(SPL_)OF_LIST)))
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 93cb09ac617..c14da10de78 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -456,8 +456,8 @@ CFLAGS_REMOVE_efi_freestanding.o := $(LTO_CFLAGS)
# which is pure ASL code. The Intel ASL (ACPI (Advanced Configuration and Power
# Interface) Source Language compiler (iasl) then converts this ASL code into a
# C file containing the hex data to build into U-Boot. This file is called
-# dsdt.hex (despite us setting the prefix to .../dsdt.asl.tmp) so must be
-# renamed to dsdt.c for consumption by the build system.
+# dsdt_generated.hex (despite us setting the prefix to .../dsdt_generated.asl.tmp)
+# so must be renamed to dsdt_generated.c for consumption by the build system.
ASL_TMP = $(patsubst %.c,%.asl.tmp,$@)
quiet_cmd_acpi_c_asl= ASL $<
@@ -468,9 +468,9 @@ cmd_acpi_c_asl= \
$(if $(KBUILD_VERBOSE:1=), >/dev/null) && \
mv $(patsubst %.c,%.hex,$@) $@
-$(obj)/dsdt.c: $(src)/dsdt.asl
+$(obj)/dsdt_generated.c: $(src)/dsdt.asl
$(call cmd,acpi_c_asl)
- $(Q)sed -i -e "s,dsdt_aml_code,AmlCode," $@
+ $(Q)sed -i -e "s,dsdt_generated_aml_code,AmlCode," $@
# Bzip2
# ---------------------------------------------------------------------------
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index cf59e2bb705..fe13e265a3f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -63,6 +63,7 @@ my $min_conf_desc_length = 4;
my $spelling_file = "$D/spelling.txt";
my $codespell = 0;
my $codespellfile = "/usr/share/codespell/dictionary.txt";
+my $user_codespellfile = "";
my $conststructsfile = "$D/const_structs.checkpatch";
my $u_boot = 0;
my $docsfile = "$D/../doc/develop/checkpatch.rst";
@@ -131,7 +132,7 @@ Options:
--ignore-perl-version override checking of perl version. expect
runtime errors.
--codespell Use the codespell dictionary for spelling/typos
- (default:/usr/share/codespell/dictionary.txt)
+ (default:$codespellfile)
--codespellfile Use this codespell dictionary
--typedefsfile Read additional types from this file
--color[=WHEN] Use colors 'always', 'never', or only when output
@@ -319,7 +320,7 @@ GetOptions(
'debug=s' => \%debug,
'test-only=s' => \$tst_only,
'codespell!' => \$codespell,
- 'codespellfile=s' => \$codespellfile,
+ 'codespellfile=s' => \$user_codespellfile,
'typedefsfile=s' => \$typedefsfile,
'u-boot' => \$u_boot,
'color=s' => \$color,
@@ -328,9 +329,32 @@ GetOptions(
'kconfig-prefix=s' => \${CONFIG_},
'h|help' => \$help,
'version' => \$help
-) or help(1);
+) or $help = 2;
+
+if ($user_codespellfile) {
+ # Use the user provided codespell file unconditionally
+ $codespellfile = $user_codespellfile;
+} elsif (!(-f $codespellfile)) {
+ # If /usr/share/codespell/dictionary.txt is not present, try to find it
+ # under codespell's install directory: <codespell_root>/data/dictionary.txt
+ if (($codespell || $help) && which("codespell") ne "" && which("python") ne "") {
+ my $python_codespell_dict = << "EOF";
+
+import os.path as op
+import codespell_lib
+codespell_dir = op.dirname(codespell_lib.__file__)
+codespell_file = op.join(codespell_dir, 'data', 'dictionary.txt')
+print(codespell_file, end='')
+EOF
+
+ my $codespell_dict = `python -c "$python_codespell_dict" 2> /dev/null`;
+ $codespellfile = $codespell_dict if (-f $codespell_dict);
+ }
+}
-help(0) if ($help);
+# $help is 1 if either -h, --help or --version is passed as option - exitcode: 0
+# $help is 2 if invalid option is passed - exitcode: 1
+help($help - 1) if ($help);
die "$P: --git cannot be used with --file or --fix\n" if ($git && ($file || $fix));
die "$P: --verbose cannot be used with --terse\n" if ($verbose && $terse);
@@ -492,7 +516,8 @@ our $Attribute = qr{
____cacheline_aligned|
____cacheline_aligned_in_smp|
____cacheline_internodealigned_in_smp|
- __weak
+ __weak|
+ __alloc_size\s*\(\s*\d+\s*(?:,\s*\d+\s*)?\)
}x;
our $Modifier;
our $Inline = qr{inline|__always_inline|noinline|__inline|__inline__};
@@ -504,7 +529,7 @@ our $Binary = qr{(?i)0b[01]+$Int_type?};
our $Hex = qr{(?i)0x[0-9a-f]+$Int_type?};
our $Int = qr{[0-9]+$Int_type?};
our $Octal = qr{0[0-7]+$Int_type?};
-our $String = qr{"[X\t]*"};
+our $String = qr{(?:\b[Lu])?"[X\t]*"};
our $Float_hex = qr{(?i)0x[0-9a-f]+p-?[0-9]+[fl]?};
our $Float_dec = qr{(?i)(?:[0-9]+\.[0-9]*|[0-9]*\.[0-9]+)(?:e-?[0-9]+)?[fl]?};
our $Float_int = qr{(?i)[0-9]+e-?[0-9]+[fl]?};
@@ -1089,10 +1114,10 @@ sub is_maintained_obsolete {
sub is_SPDX_License_valid {
my ($license) = @_;
- return 1 if (!$tree || which("python") eq "" || !(-e "$root/scripts/spdxcheck.py") || !(-e "$gitroot"));
+ return 1 if (!$tree || which("python3") eq "" || !(-x "$root/scripts/spdxcheck.py") || !(-e "$gitroot"));
my $root_path = abs_path($root);
- my $status = `cd "$root_path"; echo "$license" | python scripts/spdxcheck.py -`;
+ my $status = `cd "$root_path"; echo "$license" | scripts/spdxcheck.py -`;
return 0 if ($status ne "");
return 1;
}
@@ -1186,7 +1211,8 @@ sub git_commit_info {
# git log --format='%H %s' -1 $line |
# echo "commit $(cut -c 1-12,41-)"
# done
- } elsif ($lines[0] =~ /^fatal: ambiguous argument '$commit': unknown revision or path not in the working tree\./) {
+ } elsif ($lines[0] =~ /^fatal: ambiguous argument '$commit': unknown revision or path not in the working tree\./ ||
+ $lines[0] =~ /^fatal: bad object $commit/) {
$id = undef;
} else {
$id = substr($lines[0], 0, 12);
@@ -2697,6 +2723,8 @@ sub process {
my $reported_maintainer_file = 0;
my $non_utf8_charset = 0;
+ my $last_git_commit_id_linenr = -1;
+
my $last_blank_line = 0;
my $last_coalesced_string_linenr = -1;
@@ -3019,10 +3047,10 @@ sub process {
my ($email_name, $email_comment, $email_address, $comment1) = parse_email($ctx);
my ($author_name, $author_comment, $author_address, $comment2) = parse_email($author);
- if ($email_address eq $author_address && $email_name eq $author_name) {
+ if (lc $email_address eq lc $author_address && $email_name eq $author_name) {
$author_sob = $ctx;
$authorsignoff = 2;
- } elsif ($email_address eq $author_address) {
+ } elsif (lc $email_address eq lc $author_address) {
$author_sob = $ctx;
$authorsignoff = 3;
} elsif ($email_name eq $author_name) {
@@ -3280,10 +3308,20 @@ sub process {
}
# Check for git id commit length and improperly formed commit descriptions
- if ($in_commit_log && !$commit_log_possible_stack_dump &&
+# A correctly formed commit description is:
+# commit <SHA-1 hash length 12+ chars> ("Complete commit subject")
+# with the commit subject '("' prefix and '")' suffix
+# This is a fairly compilicated block as it tests for what appears to be
+# bare SHA-1 hash with minimum length of 5. It also avoids several types of
+# possible SHA-1 matches.
+# A commit match can span multiple lines so this block attempts to find a
+# complete typical commit on a maximum of 3 lines
+ if ($perl_version_ok &&
+ $in_commit_log && !$commit_log_possible_stack_dump &&
$line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i &&
$line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
- ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
+ (($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
+ ($line =~ /\bcommit\s*$/i && defined($rawlines[$linenr]) && $rawlines[$linenr] =~ /^\s*[0-9a-f]{5,}\b/i)) ||
($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
$line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
$line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
@@ -3293,49 +3331,56 @@ sub process {
my $long = 0;
my $case = 1;
my $space = 1;
- my $hasdesc = 0;
- my $hasparens = 0;
my $id = '0123456789ab';
my $orig_desc = "commit description";
my $description = "";
+ my $herectx = $herecurr;
+ my $has_parens = 0;
+ my $has_quotes = 0;
+
+ my $input = $line;
+ if ($line =~ /(?:\bcommit\s+[0-9a-f]{5,}|\bcommit\s*$)/i) {
+ for (my $n = 0; $n < 2; $n++) {
+ if ($input =~ /\bcommit\s+[0-9a-f]{5,}\s*($balanced_parens)/i) {
+ $orig_desc = $1;
+ $has_parens = 1;
+ # Always strip leading/trailing parens then double quotes if existing
+ $orig_desc = substr($orig_desc, 1, -1);
+ if ($orig_desc =~ /^".*"$/) {
+ $orig_desc = substr($orig_desc, 1, -1);
+ $has_quotes = 1;
+ }
+ last;
+ }
+ last if ($#lines < $linenr + $n);
+ $input .= " " . trim($rawlines[$linenr + $n]);
+ $herectx .= "$rawlines[$linenr + $n]\n";
+ }
+ $herectx = $herecurr if (!$has_parens);
+ }
- if ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
+ if ($input =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
$init_char = $1;
$orig_commit = lc($2);
- } elsif ($line =~ /\b([0-9a-f]{12,40})\b/i) {
+ $short = 0 if ($input =~ /\bcommit\s+[0-9a-f]{12,40}/i);
+ $long = 1 if ($input =~ /\bcommit\s+[0-9a-f]{41,}/i);
+ $space = 0 if ($input =~ /\bcommit [0-9a-f]/i);
+ $case = 0 if ($input =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/);
+ } elsif ($input =~ /\b([0-9a-f]{12,40})\b/i) {
$orig_commit = lc($1);
}
- $short = 0 if ($line =~ /\bcommit\s+[0-9a-f]{12,40}/i);
- $long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i);
- $space = 0 if ($line =~ /\bcommit [0-9a-f]/i);
- $case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/);
- if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
- $orig_desc = $1;
- $hasparens = 1;
- } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i &&
- defined $rawlines[$linenr] &&
- $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) {
- $orig_desc = $1;
- $hasparens = 1;
- } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
- defined $rawlines[$linenr] &&
- $rawlines[$linenr] =~ /^\s*[^"]+"\)/) {
- $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
- $orig_desc = $1;
- $rawlines[$linenr] =~ /^\s*([^"]+)"\)/;
- $orig_desc .= " " . $1;
- $hasparens = 1;
- }
-
($id, $description) = git_commit_info($orig_commit,
$id, $orig_desc);
if (defined($id) &&
- ($short || $long || $space || $case || ($orig_desc ne $description) || !$hasparens)) {
+ ($short || $long || $space || $case || ($orig_desc ne $description) || !$has_quotes) &&
+ $last_git_commit_id_linenr != $linenr - 1) {
ERROR("GIT_COMMIT_ID",
- "Please use git commit description style 'commit <12+ chars of sha1> (\"<title line>\")' - ie: '${init_char}ommit $id (\"$description\")'\n" . $herecurr);
+ "Please use git commit description style 'commit <12+ chars of sha1> (\"<title line>\")' - ie: '${init_char}ommit $id (\"$description\")'\n" . $herectx);
}
+ #don't report the next line if this line ends in commit and the sha1 hash is the next line
+ $last_git_commit_id_linenr = $linenr if ($line =~ /\bcommit\s*$/i);
}
# Check for added, moved or deleted files
@@ -4542,6 +4587,7 @@ sub process {
# XXX(foo);
# EXPORT_SYMBOL(something_foo);
my $name = $1;
+ $name =~ s/^\s*($Ident).*/$1/;
if ($stat =~ /^(?:.\s*}\s*\n)?.([A-Z_]+)\s*\(\s*($Ident)/ &&
$name =~ /^${Ident}_$2/) {
#print "FOO C name<$name>\n";
@@ -5475,9 +5521,13 @@ sub process {
}
}
-#goto labels aren't indented, allow a single space however
- if ($line=~/^.\s+[A-Za-z\d_]+:(?![0-9]+)/ and
- !($line=~/^. [A-Za-z\d_]+:/) and !($line=~/^.\s+default:/)) {
+# check that goto labels aren't indented (allow a single space indentation)
+# and ignore bitfield definitions like foo:1
+# Strictly, labels can have whitespace after the identifier and before the :
+# but this is not allowed here as many ?: uses would appear to be labels
+ if ($sline =~ /^.\s+[A-Za-z_][A-Za-z\d_]*:(?!\s*\d+)/ &&
+ $sline !~ /^. [A-Za-z\d_][A-Za-z\d_]*:/ &&
+ $sline !~ /^.\s+default:/) {
if (WARN("INDENTED_LABEL",
"labels should not be indented\n" . $herecurr) &&
$fix) {
@@ -5572,7 +5622,7 @@ sub process {
# Return of what appears to be an errno should normally be negative
if ($sline =~ /\breturn(?:\s*\(+\s*|\s+)(E[A-Z]+)(?:\s*\)+\s*|\s*)[;:,]/) {
my $name = $1;
- if ($name ne 'EOF' && $name ne 'ERROR') {
+ if ($name ne 'EOF' && $name ne 'ERROR' && $name !~ /^EPOLL/) {
WARN("USE_NEGATIVE_ERRNO",
"return of an errno should typically be negative (ie: return -$1)\n" . $herecurr);
}
@@ -6242,7 +6292,8 @@ sub process {
}
# concatenated string without spaces between elements
- if ($line =~ /$String[A-Za-z0-9_]/ || $line =~ /[A-Za-z0-9_]$String/) {
+ if ($line =~ /$String[A-Z_]/ ||
+ ($line =~ /([A-Za-z0-9_]+)$String/ && $1 !~ /^[Lu]$/)) {
if (CHK("CONCATENATED_STRING",
"Concatenated strings should use spaces between elements\n" . $herecurr) &&
$fix) {
@@ -6255,7 +6306,7 @@ sub process {
}
# uncoalesced string fragments
- if ($line =~ /$String\s*"/) {
+ if ($line =~ /$String\s*[Lu]?"/) {
if (WARN("STRING_FRAGMENTS",
"Consecutive strings are generally better as a single string\n" . $herecurr) &&
$fix) {
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 7b45d578a34..a6bc234f51e 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -21,7 +21,6 @@ CONFIG_AT91SAM9M10G45EK
CONFIG_AT91_GPIO_PULLUP
CONFIG_AT91_LED
CONFIG_AT91_WANTS_COMMON_PHY
-CONFIG_ATAPI
CONFIG_ATMEL_LCD
CONFIG_ATMEL_LCD_BGR555
CONFIG_ATMEL_LCD_RGB565
@@ -440,7 +439,6 @@ CONFIG_I2C_RTC_ADDR
CONFIG_ICACHE
CONFIG_ICS307_REFCLK_HZ
CONFIG_IDE_PREINIT
-CONFIG_IDE_RESET
CONFIG_IMX
CONFIG_IMX6_PWM_PER_CLK
CONFIG_IMX_HDMI
@@ -683,7 +681,6 @@ CONFIG_RAMDISK_ADDR
CONFIG_RAMDISK_BOOT
CONFIG_RD_LVL
CONFIG_RED_LED
-CONFIG_REMAKE_ELF
CONFIG_RESERVED_01_BASE
CONFIG_RESERVED_02_BASE
CONFIG_RESERVED_03_BASE
@@ -725,7 +722,6 @@ CONFIG_SAR_REG
CONFIG_SATA1
CONFIG_SATA2
CONFIG_SCIF_A
-CONFIG_SCSI_AHCI_PLAT
CONFIG_SCSI_DEV_LIST
CONFIG_SC_TIMER_CLK
CONFIG_SDCARD
@@ -844,13 +840,6 @@ CONFIG_SYS_AT91_MAIN_CLOCK
CONFIG_SYS_AT91_PLLA
CONFIG_SYS_AT91_PLLB
CONFIG_SYS_AT91_SLOW_CLOCK
-CONFIG_SYS_ATA_ALT_OFFSET
-CONFIG_SYS_ATA_BASE_ADDR
-CONFIG_SYS_ATA_DATA_OFFSET
-CONFIG_SYS_ATA_IDE0_OFFSET
-CONFIG_SYS_ATA_IDE1_OFFSET
-CONFIG_SYS_ATA_REG_OFFSET
-CONFIG_SYS_ATA_STRIDE
CONFIG_SYS_AUTOLOAD
CONFIG_SYS_AUTOMATIC_SDRAM_DETECTION
CONFIG_SYS_AUXCORE_BOOTDATA
@@ -1416,8 +1405,6 @@ CONFIG_SYS_I2C_RTC_ADDR
CONFIG_SYS_I2C_TCA642X_ADDR
CONFIG_SYS_I2C_TCA642X_BUS_NUM
CONFIG_SYS_ICACHE_INV
-CONFIG_SYS_IDE_MAXBUS
-CONFIG_SYS_IDE_MAXDEVICE
CONFIG_SYS_IFC_ADDR
CONFIG_SYS_IFC_CCR
CONFIG_SYS_INIT_DBCR
@@ -1800,7 +1787,6 @@ CONFIG_SYS_PIOC_PDR_VAL1
CONFIG_SYS_PIOC_PPUDR_VAL
CONFIG_SYS_PIOD_PDR_VAL1
CONFIG_SYS_PIOD_PPUDR_VAL
-CONFIG_SYS_PIO_MODE
CONFIG_SYS_PJPAR
CONFIG_SYS_PL310_BASE
CONFIG_SYS_PLLAR_VAL
@@ -1836,8 +1822,6 @@ CONFIG_SYS_RCAR_I2C0_BASE
CONFIG_SYS_RCAR_I2C1_BASE
CONFIG_SYS_RCAR_I2C2_BASE
CONFIG_SYS_RCAR_I2C3_BASE
-CONFIG_SYS_RESET_ADDR
-CONFIG_SYS_RESET_ADDRESS
CONFIG_SYS_RFD
CONFIG_SYS_RGMII1_PHY_ADDR
CONFIG_SYS_RGMII2_PHY_ADDR
@@ -1859,7 +1843,6 @@ CONFIG_SYS_SATA2
CONFIG_SYS_SATA2_FLAGS
CONFIG_SYS_SATA2_OFFSET
CONFIG_SYS_SATA_FAT_BOOT_PARTITION
-CONFIG_SYS_SATA_MAX_DEVICE
CONFIG_SYS_SBFHDR_DATA_OFFSET
CONFIG_SYS_SBFHDR_SIZE
CONFIG_SYS_SCCR_SATACM
@@ -1867,9 +1850,6 @@ CONFIG_SYS_SCCR_TSEC1CM
CONFIG_SYS_SCCR_TSEC2CM
CONFIG_SYS_SCCR_USBDRCM
CONFIG_SYS_SCR
-CONFIG_SYS_SCSI_MAX_DEVICE
-CONFIG_SYS_SCSI_MAX_LUN
-CONFIG_SYS_SCSI_MAX_SCSI_ID
CONFIG_SYS_SDRAM
CONFIG_SYS_SDRAM_BASE
CONFIG_SYS_SDRAM_BASE0
diff --git a/scripts/dtc/libfdt/fdt_ro.c b/scripts/dtc/libfdt/fdt_ro.c
index efe7efe9211..63eaf57f43a 100644
--- a/scripts/dtc/libfdt/fdt_ro.c
+++ b/scripts/dtc/libfdt/fdt_ro.c
@@ -937,4 +937,10 @@ int fdt_check_full(const void *fdt, size_t bufsize)
}
}
}
-#endif
+#else
+int fdt_check_full(const void __always_unused *fdt,
+ size_t __always_unused bufsize)
+{
+ return 0;
+}
+#endif /* #if !defined(FDT_ASSUME_MASK) || FDT_ASSUME_MASK != 0xff */
diff --git a/scripts/pylint.base b/scripts/pylint.base
index 8c650f25729..50e9989e879 100644
--- a/scripts/pylint.base
+++ b/scripts/pylint.base
@@ -1,5 +1,5 @@
-test_conftest.py 6.43
-test_multiplexed_log.py 7.20
+test_conftest.py 6.56
+test_multiplexed_log.py 7.49
test_test.py 8.18
test_tests_test_000_version.py 7.50
test_tests_test_android_test_ab.py 6.50
@@ -9,36 +9,37 @@ test_tests_test_bind.py -2.99
test_tests_test_button.py 3.33
test_tests_test_dfu.py 5.45
test_tests_test_dm.py 9.52
-test_tests_test_efi_capsule_capsule_defs.py 5.00
-test_tests_test_efi_capsule_conftest.py 1.25
-test_tests_test_efi_capsule_test_capsule_firmware.py 3.89
-test_tests_test_efi_fit.py 7.59
+test_tests_test_efi_capsule_capsule_defs.py 6.67
+test_tests_test_efi_capsule_conftest.py 1.86
+test_tests_test_efi_capsule_test_capsule_firmware.py 4.52
+test_tests_test_efi_capsule_test_capsule_firmware_signed.py 4.85
+test_tests_test_efi_fit.py 8.16
test_tests_test_efi_loader.py 7.38
-test_tests_test_efi_secboot_conftest.py -3.84
+test_tests_test_efi_secboot_conftest.py -3.29
test_tests_test_efi_secboot_defs.py 6.67
test_tests_test_efi_secboot_test_authvar.py 8.93
-test_tests_test_efi_secboot_test_signed.py 8.38
+test_tests_test_efi_secboot_test_signed.py 8.41
test_tests_test_efi_secboot_test_signed_intca.py 8.10
test_tests_test_efi_secboot_test_unsigned.py 8.00
test_tests_test_efi_selftest.py 6.36
-test_tests_test_env.py 7.08
+test_tests_test_env.py 7.15
test_tests_test_extension.py 2.14
-test_tests_test_fit.py 6.20
-test_tests_test_fit_ecdsa.py 7.50
+test_tests_test_fit.py 6.83
+test_tests_test_fit_ecdsa.py 7.94
test_tests_test_fit_hashes.py 7.70
test_tests_test_fpga.py 1.81
-test_tests_test_fs_conftest.py 4.62
+test_tests_test_fs_conftest.py 5.13
test_tests_test_fs_fstest_defs.py 8.33
test_tests_test_fs_fstest_helpers.py 4.29
-test_tests_test_fs_test_basic.py 0.40
-test_tests_test_fs_test_ext.py -0.25
+test_tests_test_fs_test_basic.py 0.60
+test_tests_test_fs_test_ext.py 0.00
test_tests_test_fs_test_fs_cmd.py 8.00
test_tests_test_fs_test_mkdir.py 1.96
-test_tests_test_fs_test_squashfs_sqfs_common.py 8.12
-test_tests_test_fs_test_squashfs_test_sqfs_load.py 7.12
+test_tests_test_fs_test_squashfs_sqfs_common.py 8.41
+test_tests_test_fs_test_squashfs_test_sqfs_load.py 7.46
test_tests_test_fs_test_squashfs_test_sqfs_ls.py 8.00
-test_tests_test_fs_test_symlink.py 0.82
-test_tests_test_fs_test_unlink.py 2.22
+test_tests_test_fs_test_symlink.py 1.22
+test_tests_test_fs_test_unlink.py 2.78
test_tests_test_gpio.py 6.09
test_tests_test_gpt.py 7.67
test_tests_test_handoff.py 5.00
@@ -57,7 +58,7 @@ test_tests_test_pstore.py 2.31
test_tests_test_qfw.py 8.75
test_tests_test_sandbox_exit.py 6.50
test_tests_test_scp03.py 3.33
-test_tests_test_sf.py 7.02
+test_tests_test_sf.py 7.13
test_tests_test_shell_basics.py 9.58
test_tests_test_sleep.py 7.78
test_tests_test_spl.py 2.22
@@ -66,32 +67,32 @@ test_tests_test_tpm2.py 8.51
test_tests_test_ums.py 6.32
test_tests_test_unknown_cmd.py 5.00
test_tests_test_ut.py 7.06
-test_tests_test_vboot.py 6.00
+test_tests_test_vboot.py 6.01
test_tests_vboot_evil.py 8.95
test_tests_vboot_forge.py 9.22
-test_u_boot_console_base.py 6.80
-test_u_boot_console_exec_attach.py 8.85
-test_u_boot_console_sandbox.py 7.22
-test_u_boot_spawn.py 7.39
-test_u_boot_utils.py 6.25
+test_u_boot_console_base.py 7.08
+test_u_boot_console_exec_attach.py 9.23
+test_u_boot_console_sandbox.py 8.06
+test_u_boot_spawn.py 7.65
+test_u_boot_utils.py 6.94
tools_binman_bintool 8.59
tools_binman_bintool_test 9.87
tools_binman_btool__testing 6.09
-tools_binman_btool_cbfstool 7.39
+tools_binman_btool_cbfstool 7.83
tools_binman_btool_fiptool 7.62
-tools_binman_btool_futility 6.96
-tools_binman_btool_ifwitool 3.33
-tools_binman_btool_lz4 5.93
-tools_binman_btool_lzma_alone 6.67
-tools_binman_btool_mkimage 6.79
-tools_binman_cbfs_util 7.77
-tools_binman_cbfs_util_test 9.27
+tools_binman_btool_futility 7.39
+tools_binman_btool_ifwitool 3.81
+tools_binman_btool_lz4 6.30
+tools_binman_btool_lzma_alone 6.97
+tools_binman_btool_mkimage 7.86
+tools_binman_cbfs_util 8.46
+tools_binman_cbfs_util_test 9.38
tools_binman_cmdline 9.03
-tools_binman_comp_util 6.25
-tools_binman_control 4.60
-tools_binman_elf 6.42
-tools_binman_elf_test 5.41
-tools_binman_entry 2.48
+tools_binman_comp_util 6.88
+tools_binman_control 5.01
+tools_binman_elf 6.98
+tools_binman_elf_test 5.62
+tools_binman_entry 3.55
tools_binman_entry_test 5.34
tools_binman_etype__testing 0.83
tools_binman_etype_atf_bl31 -6.00
@@ -103,15 +104,15 @@ tools_binman_etype_blob_ext_list 0.00
tools_binman_etype_blob_named_by_arg -7.78
tools_binman_etype_blob_phase -5.00
tools_binman_etype_cbfs -1.44
-tools_binman_etype_collection 2.33
+tools_binman_etype_collection 2.67
tools_binman_etype_cros_ec_rw -6.00
-tools_binman_etype_fdtmap -3.61
+tools_binman_etype_fdtmap -3.28
tools_binman_etype_files -7.43
tools_binman_etype_fill -6.43
-tools_binman_etype_fit 5.18
-tools_binman_etype_fmap -0.59
+tools_binman_etype_fit 6.31
+tools_binman_etype_fmap -0.29
tools_binman_etype_gbb 0.83
-tools_binman_etype_image_header 5.58
+tools_binman_etype_image_header 5.77
tools_binman_etype_intel_cmc -12.50
tools_binman_etype_intel_descriptor 4.62
tools_binman_etype_intel_fit 0.00
@@ -126,11 +127,12 @@ tools_binman_etype_intel_mrc -10.00
tools_binman_etype_intel_refcode -10.00
tools_binman_etype_intel_vbt -12.50
tools_binman_etype_intel_vga -12.50
-tools_binman_etype_mkimage 2.31
+tools_binman_etype_mkimage 1.47
tools_binman_etype_opensbi -6.00
tools_binman_etype_powerpc_mpc85xx_bootpg_resetvec -10.00
tools_binman_etype_scp -6.00
-tools_binman_etype_section 4.12
+tools_binman_etype_section 4.57
+tools_binman_etype_tee_os -6.00
tools_binman_etype_text -0.48
tools_binman_etype_u_boot -15.71
tools_binman_etype_u_boot_dtb -12.22
@@ -157,7 +159,7 @@ tools_binman_etype_u_boot_tpl_nodtb -10.91
tools_binman_etype_u_boot_tpl_with_ucode_ptr -20.83
tools_binman_etype_u_boot_ucode 1.52
tools_binman_etype_u_boot_with_ucode_ptr -0.71
-tools_binman_etype_vblock 0.00
+tools_binman_etype_vblock 0.27
tools_binman_etype_x86_reset16 -15.71
tools_binman_etype_x86_reset16_spl -15.71
tools_binman_etype_x86_reset16_tpl -15.71
@@ -167,60 +169,61 @@ tools_binman_etype_x86_start16_tpl -15.71
tools_binman_fdt_test 3.23
tools_binman_fip_util 9.85
tools_binman_fip_util_test 10.00
-tools_binman_fmap_util 6.67
-tools_binman_ftest 7.39
-tools_binman_image 6.48
+tools_binman_fmap_util 6.88
+tools_binman_ftest 7.46
+tools_binman_image 7.12
tools_binman_image_test 4.48
-tools_binman_main 4.29
+tools_binman_main 4.86
tools_binman_setup 5.00
-tools_binman_state 3.43
-tools_buildman_board 7.11
-tools_buildman_bsettings 0.98
-tools_buildman_builder 6.55
-tools_buildman_builderthread 7.35
-tools_buildman_cmdline 8.85
-tools_buildman_control 7.04
-tools_buildman_func_test 6.38
-tools_buildman_kconfiglib 7.48
-tools_buildman_main 1.43
-tools_buildman_test 6.10
-tools_buildman_toolchain 5.62
-tools_concurrencytest_concurrencytest 6.77
-tools_dtoc_dtb_platdata 7.82
-tools_dtoc_fdt 3.47
-tools_dtoc_fdt_util 5.00
-tools_dtoc_main 7.33
+tools_binman_state 4.15
+tools_buildman_board 7.82
+tools_buildman_bsettings 1.71
+tools_buildman_builder 6.92
+tools_buildman_builderthread 7.48
+tools_buildman_cfgutil 7.83
+tools_buildman_cmdline 8.89
+tools_buildman_control 8.12
+tools_buildman_func_test 7.18
+tools_buildman_kconfiglib 7.49
+tools_buildman_main -1.11
+tools_buildman_test 6.56
+tools_buildman_toolchain 6.44
+tools_concurrencytest_concurrencytest 7.26
+tools_dtoc_dtb_platdata 7.90
+tools_dtoc_fdt 4.46
+tools_dtoc_fdt_util 6.80
+tools_dtoc_main 7.78
tools_dtoc_setup 5.00
-tools_dtoc_src_scan 8.75
-tools_dtoc_test_dtoc 8.54
-tools_dtoc_test_fdt 6.92
+tools_dtoc_src_scan 8.91
+tools_dtoc_test_dtoc 8.56
+tools_dtoc_test_fdt 6.88
tools_dtoc_test_src_scan 9.43
tools_efivar 6.71
-tools_endian-swap 8.93
-tools_genboardscfg 7.27
-tools_microcode-tool 7.19
-tools_moveconfig 8.11
+tools_endian-swap 9.29
+tools_genboardscfg 7.95
+tools_microcode-tool 7.25
+tools_moveconfig 8.34
tools_patman___init__ 0.00
-tools_patman_checkpatch 7.61
-tools_patman_command 4.23
-tools_patman_commit 2.75
+tools_patman_checkpatch 8.48
+tools_patman_command 5.51
+tools_patman_commit 4.50
tools_patman_control 8.14
-tools_patman_cros_subprocess 7.41
-tools_patman_func_test 7.87
-tools_patman_get_maintainer 4.71
-tools_patman_gitutil 4.58
-tools_patman_main 8.23
-tools_patman_patchstream 9.04
-tools_patman_project 3.33
-tools_patman_series 5.95
-tools_patman_settings 5.63
+tools_patman_cros_subprocess 7.76
+tools_patman_func_test 8.51
+tools_patman_get_maintainer 7.06
+tools_patman_gitutil 6.65
+tools_patman_main 7.90
+tools_patman_patchstream 9.11
+tools_patman_project 7.78
+tools_patman_series 6.16
+tools_patman_settings 5.89
tools_patman_setup 5.00
-tools_patman_status 8.43
-tools_patman_terminal 6.29
-tools_patman_test_checkpatch 6.81
-tools_patman_test_util 6.51
-tools_patman_tools 3.98
-tools_patman_tout 2.97
-tools_rkmux 6.76
+tools_patman_status 8.62
+tools_patman_terminal 8.00
+tools_patman_test_checkpatch 7.75
+tools_patman_test_util 7.64
+tools_patman_tools 5.68
+tools_patman_tout 5.31
+tools_rkmux 6.90
tools_rmboard 7.76
tools_zynqmp_pm_cfg_obj_convert 6.67
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index c1c04352674..4a631437067 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -153,8 +153,9 @@ if test -e include/config/auto.conf; then
# We are interested only in CONFIG_LOCALVERSION and
# CONFIG_LOCALVERSION_AUTO, so extract these in a safe
# way (i.e. w/o sourcing auto.conf)
- CONFIG_LOCALVERSION=`cat include/config/auto.conf | awk -F '=' '/^CONFIG_LOCALVERSION=/ {print $2}'`
- CONFIG_LOCALVERSION_AUTO=`cat include/config/auto.conf | awk -F '=' '/^CONFIG_LOCALVERSION_AUTO=/ {print $2}'`
+ # xargs echo removes quotes
+ CONFIG_LOCALVERSION=`cat include/config/auto.conf | awk -F '=' '/^CONFIG_LOCALVERSION=/ {print $2}' | xargs echo`
+ CONFIG_LOCALVERSION_AUTO=`cat include/config/auto.conf | awk -F '=' '/^CONFIG_LOCALVERSION_AUTO=/ {print $2}' | xargs echo`
else
echo "Error: kernelrelease not valid - run 'make prepare' to update it" >&2
exit 1
diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py
index 3e784cf9f40..ebd06ae642c 100755
--- a/scripts/spdxcheck.py
+++ b/scripts/spdxcheck.py
@@ -44,7 +44,7 @@ def read_spdxdata(repo):
continue
exception = None
- for l in open(el.path).readlines():
+ for l in open(el.path, encoding="utf-8").readlines():
if l.startswith('Valid-License-Identifier:'):
lid = l.split(':')[1].strip().upper()
if lid in spdx.licenses: