On 03.03.2008 16:19, Paul Menzel wrote:
Hi,
Am Donnerstag, den 28.02.2008, 15:21 +0100 schrieb Carl-Daniel
Hailfinger:
This is a ready-made script which gathers all information about a system
we could want to evaluate whether porting is possible and/or easy.
The idea behind it is to get loads of people to run the script and help
us analyze coverage of flashrom and superiotool, together with board
distribution among willing testers.
In the future, this could include the ICH GPIO dumper, the K8 resource
dumper, the MCP55 configuration dumper and a few other utilities.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Great idea.
Thanks.
acpidump >acpidump.txt
The problem is, that it is not certain, that acpidump is installed on
the system (It is not on mine). So maybe we should test for the
existence. I do not know of a better way to check, whether a program is
in the path.
[...]
I adapted your code somewhat, but it is not finished. Thanks for the code.
An other thing is, whether the script should use sudo and compile the
programs with the right of the normal user.
Indeed. I'd even say we could split the script in two scripts, one
privileged and one unprivileged.
New version attached.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
#!/bin/bash
# Coreboot system information gathering script
# This is very Linux-specific right now.
#
# This script is Copyright (C) 2008 Carl-Daniel Hailfinger
#
# 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; either version 2 of the License, or
# (at your option) any later version.
#
# 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.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
parentdir=`pwd`
ACPIDUMP=`which acpidump 2>/dev/null`
test -z "$ACPIDUMP" && for a in /usr/bin /bin /usr/local/bin /usr/sbin /sbin /usr/local/sbin; do
test -f $a/acpidump && IASL="$a/acpidump"
done
test -z "$ACPIDUMP" && { echo acpidump not found.; exit 1; }
LSPCI=`which lspci 2>/dev/null`
test -z "$LSPCI" && for a in /usr/bin /bin /usr/local/bin /usr/sbin /sbin /usr/local/sbin; do
test -f $a/lspci && LSPCI="$a/lspci"
done
test -z "$LSPCI" && { echo lspci not found.; exit 1; }
DMIDECODE=`which dmidecode 2>/dev/null`
test -z "$DMIDECODE" && for a in /usr/bin /bin /usr/local/bin /usr/sbin /sbin /usr/local/sbin; do
test -f $a/dmidecode && IASL="$a/dmidecode"
done
test -z "$DMIDECODE" && { echo dmidecode not found.; exit 1; }
mkdir coreboot_data
cd coreboot_data
mkdir utils
# Warning: The following commands should be run as a normal, but trusted, user.
{
svn co svn://linuxbios.org/repos/trunk/util/flashrom
cd flashrom
make
cp -a flashrom ../utils
cd $parentdir/coreboot_data
rm -rf flashrom
}
{
svn co svn://linuxbios.org/repos/trunk/util/superiotool
cd superiotool
make
cp -a superiotool ../utils
cd $parentdir/coreboot_data
rm -rf superiotool
}
# as needed only
{
wget
http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/utils/pmtools-200711...
tar xjvf pmtools-20071116.tar.bz2
cd pmtools-20071116/acpidump/
make
cp -a acpidump ../../utils
cd $parentdir/coreboot_data
rm -rf pmtools-20071116
}
cat /proc/ioports >ioports.txt
cat /proc/iomem >iomem.txt
cat /proc/interrupts >interrupts.txt
cat /proc/cpuinfo >cpuinfo.txt
$LSPCI -vvvnnxxx >lspci-vvvnnxxx.txt
$LSPCI -t >lspci-t.txt
$DMIDECODE >dmidecode.txt
$ACPIDUMP >acpidump.txt
./utils/flashrom -V >flashrom.txt
./utils/superiotool -d -e -V >superiotool.txt
rm -rf utils
cd $parentdir
tar cjf coreboot_data.tar.bz2 coreboot_data/
echo
echo All done. Please send coreboot_data.tar.bz2 to dumps@coreboot.org. Thanks.