Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13543
-gerrit
commit 662c24956f1a60a47fe0f752c6d450896c6c70de
Author: Martin Roth <martinroth(a)google.com>
Date: Sun Jan 31 15:17:34 2016 -0700
build-system: create lint-jenkins set for jenkins to run
- Create a lint-jenkins target for lint scripts that are for jenkins,
but not a part of lint-stable
- Append lint-jenkins to the junit.xml file instead of overwriting it.
- Add lint-kconfig to lint-jenkins. I'm hesitant to add this to
lint-stable because lint-stable gets run by the git-hook. Because
the kconfig_lint tool is written in perl, and we don't currently have
any other perl scripts being run by the make, I don't want cause
artificial failures for people when they try to commit patches.
Change-Id: I679d98d75021d705d355a2708636983ca84d89b7
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
Makefile.inc | 3 ++-
util/lint/lint | 14 +++++++++++---
util/lint/lint-jenkins-008-kconfig | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 49 insertions(+), 4 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index 122b83a..a629ef3 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -447,7 +447,7 @@ printcrt0s:
update:
dongle.py -c /dev/term/1 $(obj)/coreboot.rom EOF
-lint lint-stable:
+lint lint-stable lint-jenkins:
util/lint/lint $@
gitconfig:
@@ -931,6 +931,7 @@ JENKINS_PAYLOAD?=none
CPUS?=4
what-jenkins-does:
util/lint/lint lint-stable --junit
+ util/lint/lint lint-jenkins --junit
util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD) -x -X $(top)/abuild-chromeos.xml
util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD)
(cd payloads/libpayload; unset COREBOOT_BUILD_DIR; $(MAKE) $(if $(JENKINS_NOCCACHE),,CONFIG_LP_CCACHE=y) V=$(V) Q=$(Q) junit.xml)
diff --git a/util/lint/lint b/util/lint/lint
index 826685d..03d5e2c 100755
--- a/util/lint/lint
+++ b/util/lint/lint
@@ -14,7 +14,7 @@
#set -x # uncomment for debug
usage () {
- printf "Usage: %s <lint|lint-stable> [--junit]\n" "$0"
+ printf "Usage: %s <lint|lint-stable|lint-jenkins> [--junit]\n" "$0"
}
#write to the junit xml file if --junit was specified
@@ -25,7 +25,8 @@ junit_write () {
}
#verify the first command line parameter
-if [ -z "$1" ] || [ "$1" != "lint" ] && [ "$1" != "lint-stable" ]; then
+if [ -z "$1" ] || [ "$1" != "lint" ] && [ "$1" != "lint-stable" ] &&
+ [ "$1" != "lint-jenkins" ]; then
usage
exit 1
fi
@@ -33,12 +34,19 @@ fi
LINTLOG=$(mktemp .tmpconfig.lintXXXXX);
XMLFILE="$(dirname "$0")/junit.xml"
FAILED=0;
+JUNIT_APPEND=0
+
+if [ "$1" = "lint-jenkins" ]; then
+ JUNIT_APPEND=1
+fi
#check optional second command line parameter.
#TODO: Add real command line handling if anything more is added
if [ "$2" = "--junit" ]; then
JUNIT=1
- echo '<?xml version="1.0" encoding="utf-8"?>' > "$XMLFILE"
+ if [ "$JUNIT_APPEND" -eq 0 ]; then
+ echo '<?xml version="1.0" encoding="utf-8"?>' > "$XMLFILE"
+ fi
junit_write '<testsuite>'
else
JUNIT=0
diff --git a/util/lint/lint-jenkins-008-kconfig b/util/lint/lint-jenkins-008-kconfig
new file mode 100755
index 0000000..53d3ab0
--- /dev/null
+++ b/util/lint/lint-jenkins-008-kconfig
@@ -0,0 +1,36 @@
+#!/bin/sh
+# This file is part of the coreboot project.
+#
+# Copyright 2016 Google Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# DESCR: check Kconfig files
+
+LC_ALL=C export LC_ALL
+
+# Give users a way to disable the test locally if they don't have perl installed
+if [ -e "util/lint/.no_kconfig_lint_check" ]; then
+ exit 0
+fi
+
+# Verify that the test can run, tell users the issue
+if [ -z "$(command -v perl)" ]; then
+ echo "The kconfig lint tool uses perl. Please install it or create the"
+ echo "file util/lint/.no_kconfig_lint_check to disable this test locally"
+fi
+
+# If coreboot is in a git repo, use git grep to check as it will ignore any
+# files in the tree that aren't checked into git
+if [ -z "$(command -v git)" ] && [ -e ".git" ]; then
+ env perl util/lint/kconfig_lint --no_git_grep --warnings_off
+else
+ env perl util/lint/kconfig_lint --warnings_off
+fi
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13542
-gerrit
commit ad1e0637d73af48f7f4f632a2e3c90c6b0a66d7a
Author: Martin Roth <martinroth(a)google.com>
Date: Sun Jan 31 14:35:48 2016 -0700
kconfig_lint: update lint script
- Enable warnings in addition to errors
- Use git grep if the code is in a git repo now that exclusions are
working.
- Add check for perl, and a way to disable the script locally if
perl isn't installed.
Change-Id: Ie60d21f4ef8a61d879f116eb2056eb805b0a55f2
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
util/lint/lint-008-kconfig | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/util/lint/lint-008-kconfig b/util/lint/lint-008-kconfig
index 16ae251..182f33c 100755
--- a/util/lint/lint-008-kconfig
+++ b/util/lint/lint-008-kconfig
@@ -15,4 +15,22 @@
# DESCR: check Kconfig files
LC_ALL=C export LC_ALL
-env perl util/lint/kconfig_lint --no_git_grep --warnings_off
+
+# Give users a way to disable the test locally if they don't have perl installed
+if [ -e "util/lint/.no_kconfig_lint_check" ]; then
+ exit 0
+fi
+
+# Verify that the test can run, tell users the issue
+if [ -z "$(command -v perl)" ]; then
+ echo "The kconfig lint tool uses perl. Please install it or create the"
+ echo "file util/lint/.no_kconfig_lint_check to disable this test locally"
+fi
+
+# If coreboot is in a git repo, use git grep to check as it will ignore any
+# files in the tree that aren't checked into git
+if [ -z "$(command -v git)" ] || [ -e ".git" ]; then
+ env perl util/lint/kconfig_lint --no_git_grep
+else
+ env perl util/lint/kconfig_lint
+fi
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13541
-gerrit
commit 0dd8f8f66d622d0d158619cdb637ccc270f3a06f
Author: Martin Roth <martinroth(a)google.com>
Date: Sun Jan 31 10:44:33 2016 -0700
kconfig_lint: demote 'always defined' errors to warnings
To be able to rrun this as a lint-stable test, demote these to warnings
for now. After the current CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL
issues get fixed, these can be promoted again.
Change-Id: I1432980eb0c871fc61c12dcc351f8d46513a7965
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
util/lint/kconfig_lint | 4 ++--
util/lint/kconfig_lint_README | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index 787ab6a..b5a62d3 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -186,7 +186,7 @@ sub check_for_ifdef {
my $symbol = $3;
if ( ( exists $symbols{$symbol} ) && ( $symbols{$symbol}{type} ne "string" ) ) {
- show_error( "#ifdef 'CONFIG_$symbol' used at $file:$lineno."
+ show_warning( "#ifdef 'CONFIG_$symbol' used at $file:$lineno."
. " Symbols of type '$symbols{$symbol}{type}' are always defined." );
}
}
@@ -205,7 +205,7 @@ sub check_for_ifdef {
if ( $line =~ /^([^:]+):(\d+):.+defined\s*\(\s*CONFIG_$symbol.*(&&|\|\|)\s*!?\s*\(?\s*CONFIG_$symbol/ );
if ( ( exists $symbols{$symbol} ) && ( $symbols{$symbol}{type} ne "string" ) ) {
- show_error( "defined 'CONFIG_$symbol' used at $file:$lineno."
+ show_warning( "defined 'CONFIG_$symbol' used at $file:$lineno."
. " Symbols of type '$symbols{$symbol}{type}' are always defined." );
}
}
diff --git a/util/lint/kconfig_lint_README b/util/lint/kconfig_lint_README
index 3c638f5..5a5eacd 100644
--- a/util/lint/kconfig_lint_README
+++ b/util/lint/kconfig_lint_README
@@ -57,6 +57,8 @@ Warnings in coreboot source files:
symbols.
- 'IS_ENABLED()' block that could not be interpreted.
- Kconfig files that are not loaded by a 'source' keyword.
+- '#ifdef' or '#if defined' used on bool, int, or hex - these are always
+ defined in coreboot's version of Kconfig.
Errors in Kconfig files:
- Selects do not work on symbols created in a choice block.
@@ -89,8 +91,6 @@ Errors in Kconfig that are also caught by Kconfig itself:
- Using a 'prompt' keyword not inside a config or choice block.
Errors in coreboot source files:
-- '#ifdef' or '#if defined' used on bool, int, or hex - these are always
- defined in coreboot's version of Kconfig.
- The IS_ENABLED macro is only valid for bool symbols.
- The IS_ENABLED used on unknown CONFIG_ value, like an obsolete symbol.
- The IS_ENABLED macro is used on a symbol without the CONFIG_ prefix.
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13539
-gerrit
commit d0fd71c1be6c56e3bf0cd9a812c72ffc4d20a662
Author: Martin Roth <martinroth(a)google.com>
Date: Sun Jan 31 10:37:22 2016 -0700
src/: Fix Kcofig symbols missing CONFIG_ prefix
- Add CONFIG_ prefix to two symbols.
- Remove the use of the third symbol as it will never be matched.
Change-Id: Ifa7f6884001cb05fb8397f193c4b08a0161f498c
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
src/cpu/amd/car/disable_cache_as_ram.c | 2 +-
src/mainboard/intel/bayleybay_fsp/romstage.c | 2 +-
src/mainboard/siemens/mc_tcu3/romstage.c | 4 ----
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/cpu/amd/car/disable_cache_as_ram.c b/src/cpu/amd/car/disable_cache_as_ram.c
index e8d5af8..1eb3dd7 100644
--- a/src/cpu/amd/car/disable_cache_as_ram.c
+++ b/src/cpu/amd/car/disable_cache_as_ram.c
@@ -72,7 +72,7 @@ static inline __attribute__((always_inline)) void disable_cache_as_ram(uint8_t s
family = amd_fam1x_cpu_family();
-#if IS_ENABLED(CPU_AMD_MODEL_10XXX)
+#if IS_ENABLED(CONFIG_CPU_AMD_MODEL_10XXX)
if (family >= 0x6f) {
/* Family 15h or later */
diff --git a/src/mainboard/intel/bayleybay_fsp/romstage.c b/src/mainboard/intel/bayleybay_fsp/romstage.c
index 7af782f..56ca33a 100644
--- a/src/mainboard/intel/bayleybay_fsp/romstage.c
+++ b/src/mainboard/intel/bayleybay_fsp/romstage.c
@@ -171,7 +171,7 @@ void romstage_fsp_rt_buffer_callback(FSP_INIT_RT_BUFFER *FspRtBuffer)
UpdData->AzaliaConfigPtr = (UINT32)&mainboard_AzaliaConfig;
/* Disable 2nd DIMM on Bakersport*/
-#if IS_ENABLED(BOARD_INTEL_BAKERSPORT_FSP)
+#if IS_ENABLED(CONFIG_BOARD_INTEL_BAKERSPORT_FSP)
UpdData->PcdMrcInitSPDAddr2 = 0x00; /* cannot use SPD_ADDR_DISABLED at this point */
#endif
}
diff --git a/src/mainboard/siemens/mc_tcu3/romstage.c b/src/mainboard/siemens/mc_tcu3/romstage.c
index 49483e5..1fa78ca 100644
--- a/src/mainboard/siemens/mc_tcu3/romstage.c
+++ b/src/mainboard/siemens/mc_tcu3/romstage.c
@@ -172,10 +172,6 @@ void romstage_fsp_rt_buffer_callback(FSP_INIT_RT_BUFFER *FspRtBuffer)
/* Initialize the Azalia Verb Tables to mainboard specific version */
UpdData->AzaliaConfigPtr = (UINT32)&mainboard_AzaliaConfig;
- /* Disable 2nd DIMM on Bakersport*/
-#if IS_ENABLED(BOARD_INTEL_BAKERSPORT_FSP)
- UpdData->PcdMrcInitSPDAddr2 = 0x00; /* cannot use SPD_ADDR_DISABLED at this point */
-#endif
/* Get SPD data from hardware information block and setup memory down */
/* parameters for FSP accordingly */
hwi_main = get_hwinfo((char*)"hwinfo.hex");
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13538
-gerrit
commit 0380d051ceb1e21fc5af09d096f490127cd24226
Author: Martin Roth <martinroth(a)google.com>
Date: Sun Jan 31 10:34:13 2016 -0700
kconfig_lint: Check for IS_ENABLED used on symbols without CONFIG_
This looks at the coreboot codebase for the IS_ENABLED macro, and
gives an error if there is a symbol used without the CONFIG_ prefix.
This only works for symbols of type bool.
A future check will be added for all symbols, but that will take
a significant amount of time to run, because each symbol will need
to be searched for individually.
Change-Id: I92f2de2d231610d1a788da965f21966d89c2f25c
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
util/lint/kconfig_lint | 21 +++++++++++++++++++++
util/lint/kconfig_lint_README | 1 +
2 files changed, 22 insertions(+)
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index adb42c8..787ab6a 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -210,6 +210,27 @@ sub check_for_ifdef {
}
}
}
+
+ my @collected_is_enabled;
+ if ($dont_use_git_grep) {
+ @collected_is_enabled =
+ `grep -Irn -- "[[:space:]]IS_ENABLED[[:space:]]*(.*)" | grep -v '$exclude_dirs_and_files' | grep -v "kconfig.h"`;
+ }
+ else {
+ @collected_is_enabled =
+ `git grep -In -- "[[:space:]]IS_ENABLED[[:space:]]*(.*)" | grep -v '$exclude_dirs_and_files' | grep -v "kconfig.h"`;
+ }
+
+ while ( my $line = shift @collected_is_enabled ) {
+ if ($line !~ /CONFIG_/ && $line =~ /^([^:]+):(\d+):.+IS_ENABLED\s*\(\s*(\w+)/ ) {
+ my $file = $1;
+ my $lineno = $2;
+ my $symbol = $3;
+ if ( ( exists $symbols{$symbol} ) ) {
+ show_error("IS_ENABLED missing CONFIG_ prefix on symbol '$symbol' at $file:$lineno.");
+ }
+ }
+ }
}
#-------------------------------------------------------------------------------
diff --git a/util/lint/kconfig_lint_README b/util/lint/kconfig_lint_README
index 9076f4c..3c638f5 100644
--- a/util/lint/kconfig_lint_README
+++ b/util/lint/kconfig_lint_README
@@ -93,5 +93,6 @@ Errors in coreboot source files:
defined in coreboot's version of Kconfig.
- The IS_ENABLED macro is only valid for bool symbols.
- The IS_ENABLED used on unknown CONFIG_ value, like an obsolete symbol.
+- The IS_ENABLED macro is used on a symbol without the CONFIG_ prefix.
TODO: check for choice entries at the top level
the following patch was just integrated into master:
commit a851bbb40a36d4722b51c8232d2307bf0b2e9c5d
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Fri Jan 29 18:03:26 2016 -0800
buildgcc: Add GNU make to reference toolchain
Change-Id: I8a41065880c3fd1f95ee8877031bf1738aaae859
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Reviewed-on: https://review.coreboot.org/13519
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See https://review.coreboot.org/13519 for details.
-gerrit
the following patch was just integrated into master:
commit ea1a5fef4d3b57db1d9ad4adf13d6607fd2acd2f
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Fri Jan 29 17:33:56 2016 -0800
buildgcc: Update LLVM to 3.7.1
Not much testing, update mostly so we can test with the
latest scan-build.
Change-Id: I50d28b7e0dfd31f9ae565c8515d5ab1760ca4c62
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Reviewed-on: https://review.coreboot.org/13516
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See https://review.coreboot.org/13516 for details.
-gerrit
the following patch was just integrated into master:
commit 27522ad375aa43ab9d321b049da78b8e649ca537
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Fri Jan 29 17:31:34 2016 -0800
buildgcc: Rename armv7-a-eabi compiler to arm-eabi
The compiler really supports a whole line of ARM CPUs, not just
ARMv7a:
arm-eabi-gcc: note: valid arguments to '-march=' are: armv2 armv2a
armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m
armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m
armv7-r armv7e-m armv7ve armv8-a armv8-a+crc iwmmxt iwmmxt2 native
So let's reflect this in the cross compiler name.
Change-Id: I717760d80954655b2de9ae019b813d81e9a75762
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Reviewed-on: https://review.coreboot.org/13515
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See https://review.coreboot.org/13515 for details.
-gerrit
the following patch was just integrated into master:
commit eaa014676ee264df5583764581344a1ea2301868
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Sat Jan 30 02:02:21 2016 -0800
vendorcode/intel: remove unused apple specific assembler macros
Since this code is pulled in through commonlib, it will break compilation
of cbfstool on OSX.
Change-Id: I342bfa7e755aa540c4563bb5cd8cccacee39d188
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Reviewed-on: https://review.coreboot.org/13525
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/13525 for details.
-gerrit