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 9f0220dce71148bcf08c308dae19e9303292f205
Author: Martin Roth <martinroth(a)google.com>
Date: Sun Jan 31 15:17:34 2016 -0700
kconfig_lint: update kconfig lint shell scripts
- Add lint-stable script with just error checking
- Enable warnings in addition to errors in non-stable test.
- Use git grep if the code is in a git repo now that exclusions are
working.
- Check for perl, and ask the user to install it if it isn't
available.
Change-Id: Ie60d21f4ef8a61d879f116eb2056eb805b0a55f2
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
util/lint/lint-008-kconfig | 16 ++++++++++++++--
util/lint/lint-stable-008-kconfig | 30 ++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/util/lint/lint-008-kconfig b/util/lint/lint-008-kconfig
index 16ae251..d3da17e 100755
--- a/util/lint/lint-008-kconfig
+++ b/util/lint/lint-008-kconfig
@@ -12,7 +12,19 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-# DESCR: check Kconfig files
+# DESCR: check Kconfig files for warnings and errors
LC_ALL=C export LC_ALL
-env perl util/lint/kconfig_lint --no_git_grep --warnings_off
+
+# 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 to run this test."
+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 [ -n "$(command -v git)" ] && [ -e ".git" ]; then
+ env perl util/lint/kconfig_lint
+else
+ env perl util/lint/kconfig_lint --no_git_grep
+fi
diff --git a/util/lint/lint-stable-008-kconfig b/util/lint/lint-stable-008-kconfig
new file mode 100755
index 0000000..986fdc9
--- /dev/null
+++ b/util/lint/lint-stable-008-kconfig
@@ -0,0 +1,30 @@
+#!/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 for errors
+
+LC_ALL=C export LC_ALL
+
+# 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 to run this test."
+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 [ -n "$(command -v git)" ] && [ -e ".git" ]; then
+ env perl util/lint/kconfig_lint --warnings_off
+else
+ env perl util/lint/kconfig_lint --no_git_grep --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/13541
-gerrit
commit 753351ab80407ab2a0d649db9b788b93fa178a83
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 run 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/12490
-gerrit
commit bbd15c35cd01925fa3ebdcb140c3ceafecae045d
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Thu Nov 19 13:08:51 2015 -0800
board_status.sh: Be smarter about cbfstool usage
This changes how we build and use cbfstool:
1. If build/cbfstool exists, use it.
2. Otherwise, try util/cbfstool/cbfstool.
3. As a last resort, build it and clean it when we're done.
Hopefully this will resolve issues people have had with permissions
and reduce overhead of building cbfstool when not necessary.
Change-Id: I5de6581ca765e5a8420b101a5865ddd633334b9c
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
---
util/board_status/board_status.sh | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index 1fb599e..95bc536 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -218,13 +218,27 @@ fi
# Results will be placed in a temporary location until we're ready to upload.
# If the user does not wish to upload, results will remain in /tmp.
tmpdir=$(mktemp -d --tmpdir coreboot_board_status.XXXXXXXX)
-tmpcfg=$(mktemp coreboot_config.XXXXXX)
+# Obtain coreboot config by running cbfstool on the ROM image. cbfstool may
+# already exist in build/ or util/cbfstool/, but if not then we'll build it
+# now and clean it when we're done.
cbfstool_cmd="build/cbfstool"
-if test ! -x build/cbfstool; then
- make -C util/cbfstool/ && cp util/cbfstool/cbfstool build/cbfstool
+do_clean_cbfstool=0
+if [ ! -x $cbfstool_cmd ]; then
+ cbfstool_cmd="util/cbfstool/cbfstool"
+ if [ -e $cbfstool_cmd ]; then
+ if test ! -x $cbfstool_cmd; then
+ echo "Cannot execute $cbfstool_cmd."
+ exit $EXIT_FAILURE
+ fi
+ else
+ make -C util/cbfstool/
+ do_clean_cbfstool=1
+ fi
fi
test_cmd $LOCAL "$cbfstool_cmd"
+
+tmpcfg=$(mktemp coreboot_config.XXXXXX)
echo "Extracting config.txt from build/coreboot.rom"
$cbfstool_cmd build/coreboot.rom extract -n config -f "${tmpdir}/config.txt" >/dev/null 2>&1
mv "${tmpdir}/config.txt" "${tmpdir}/config.short.txt"
@@ -244,6 +258,10 @@ if [ -n "$(echo $rom_contents | grep payload_version)" ]; then
fi
md5sum -b build/coreboot.rom > "${tmpdir}/rom_checksum.txt"
+if test $do_clean_cbfstool -eq 1; then
+ make -C util/cbfstool clean
+fi
+
# Obtain board and revision info to form the directory structure:
# <vendor>/<board>/<revision>/<timestamp>
mainboard_dir="$(grep CONFIG_MAINBOARD_DIR "${tmpdir}/config.txt" | awk -F '"' '{ print $2 }')"
the following patch was just integrated into master:
commit 609bd9445ed1cc76496a9d65ad1d158904d3cf47
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Sun Jan 31 14:00:54 2016 +0100
ivy: Add a possiblity for mainboard early init.
This is needed for stout EC init.
Change-Id: I5c73499c17763229840152a473a2d820802ee2f6
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
Reviewed-on: https://review.coreboot.org/13535
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/13535 for details.
-gerrit
the following patch was just integrated into master:
commit bf725b48f730b5996cf1ee7e5ac84ebc0ec78460
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Sun Feb 7 22:14:29 2016 +0100
superio/nuvoton/nct5572d: Add PS/2 presence detect
On certain Super I/O devices, when a PS/2 mouse is not present on the
auxiliary channel both channels will cease to function if the
auxiliary channel is probed while the primary channel is active.
Therefore, knowledge of mouse presence must be gathered by coreboot
during early boot, and used to enable or disable the auxiliary PS/2
port before control is passed to the operating system.
This is added in commit 448e3863 (drivers/pc80: Add PS/2 mouse
presence detect).
Update the Nuvoton NCT5572D driver to flag the auxiliary channel as
disabled if no device was detected. The code is copied from the Winbond
W83667HG-A driver.
Note, the ACPI changes are not part of this commit.
TEST=Currently, on the ASRock E350M1, PS/2 does not work. With this
change, a PS/2 keyboard works fine in SeaBIOS, GRUB in MBR, and Debian
GNU/Linux Sid/unstable with Linux 3.19.
```
[ 1.185195] i8042: PNP: No PS/2 controller found. Probing ports directly.
[ 1.189110] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 1.189133] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 1.189970] mousedev: PS/2 mouse device common for all mice
```
Change-Id: I7f9be348d295e70437bef089d4c2173169f38459
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/13618
Tested-by: build bot (Jenkins)
Reviewed-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/13618 for details.
-gerrit
the following patch was just integrated into master:
commit 21c0650fdd8322ace159f91b23ba4e04657ccdec
Author: Martin Roth <martinroth(a)google.com>
Date: Thu Feb 4 19:52:27 2016 -0700
Kconfig: Move payloads section to payloads/Kconfig
Move the payloads section of the kconfig tree out of the top level
kconfig file and into a separate Kconfig just for payloads before
it starts to get added to.
Change-Id: I4f52818f862bf1aeba538c1c6ed93211a78b9853
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/13608
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See https://review.coreboot.org/13608 for details.
-gerrit
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13648
-gerrit
commit 4de1134436fb92ce88cbac04d58bbe2a5d5c68e4
Author: Martin Roth <martinroth(a)google.com>
Date: Tue Feb 9 12:20:32 2016 -0700
board_status: Add script that will set up a ubuntu live image
This is a pretty basic script that can be downloaded with wget to a
ubuntu-based live image, and will set it up so that the board_status
script can connect and run cbmem.
1) Verify that this is being run on a ubuntu-based live image by
checking for the installer.
2) Install and configure the ssh server.
3) Set a root password 'coreboot' so that root can log in.
4) download and build cbmem.
5) find and print the IP(s) that should be used to connect.
Change-Id: I068423c9f5501b156f25371d89559f4a206916b5
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
util/board_status/set_up_live_image.sh | 69 ++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/util/board_status/set_up_live_image.sh b/util/board_status/set_up_live_image.sh
new file mode 100755
index 0000000..850ae99
--- /dev/null
+++ b/util/board_status/set_up_live_image.sh
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+# This script is used to set up a ubuntu-based live image to be used
+# with coreboot's board_status script. It modifies the system so that
+# board_status can connect over SSH and run cbmem. This script is NOT
+# meant to be run on an installed system, and changes the configuration
+# in ways that would be dangerous to security on an installed system.
+
+# Make sure we're on a ubuntu live image
+if [ ! -e /usr/bin/ubiquity ]; then
+ echo "Error: This doesn't appear to be a ubuntu based live image. Exiting."
+ exit 1
+fi
+
+RED='\033[1;31m'
+GREEN='\033[1;32m'
+NC='\033[0m' # No Color
+
+# shellcheck disable=SC2059
+error ()
+{
+ printf "${RED}ERROR: $1 ${NC}\n" >&2
+ if [ -n "$2" ]; then printf "${RED}Removing $2 ${NC}\n"; rm -rf "./$2"; fi
+ exit 1
+}
+
+# shellcheck disable=SC2059
+status ()
+{
+ printf "${GREEN}${1}${NC}"
+}
+
+# Install and configure the ssh server for the board-status script to connect to.
+status "Installing and configuring ssh server\n"
+sudo apt-get update || \
+ error "Could not update packages"
+sudo apt-get install -y openssh-server || \
+ error "Could not install openssh-server"
+sudo sed -i.bak 's/PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config || \
+ error "Could not update sshd.config to allow root login."
+sudo systemctl restart ssh || sudo restart ssh || \
+ error "Could not restart ssh server"
+
+# Set the root password so it can be used to log in
+status "Setting root password to 'coreboot'\n"
+echo -e "root:coreboot" | sudo chpasswd || \
+ error "Could not reset root password"
+
+# Download the coreboot tree
+status "Installing git and clone the coreboot repo\n"
+sudo apt-get install -y git || \
+ error "Could not install git"
+git clone --depth 1 https://review.coreboot.org/coreboot || \
+ error "Could not download coreboot repository"
+
+# Build and install cbmem
+status "Building and installing cbmem\n"
+make -C coreboot/util/cbmem || \
+ error "Could not build cbmem"
+sudo make -C coreboot/util/cbmem install || \
+ error "Could not instll cbmem"
+sudo cbmem || \
+ error "cbmem did not run correctly"
+rm -rf coreboot
+
+# Identify the ip address that board-status will connect to
+IP_ADDR=$(ifconfig -a | grep 'inet addr' | grep -v '127.0.0.1' | \
+ sed 's|.*inet addr:||' | sed 's|Bcast.*||')
+status "\nAddress or addresses for this board: $IP_ADDR\n"
the following patch was just integrated into master:
commit c3686b3d02ceb7d54913d12995b9d3bce45e376f
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Mon Feb 1 15:28:02 2016 +0100
chromebooks: Configure Chrome EC board names
For devices with Chrome EC, state the "board" name(s), so they're built
as part of the image.
A number of EC boards aren't supported in the Chrome EC master branch,
they're brought along but commented out, waiting for a port to master
in the Chrome EC code base.
Change-Id: Ic6ab821de55cf9b4e8b48fe5ebc603adeb8bb28b
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: https://review.coreboot.org/13548
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/13548 for details.
-gerrit