#!/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.

mkdir coreboot_data
parentdir=`pwd`
cd coreboot_data
lspci -vvvnnxxx >lspci-vvvnnxxx.txt
lspci -t >lspci-t.txt
dmidecode >dmidecode.txt
svn co svn://linuxbios.org/repos/trunk/util/flashrom
cd flashrom
make
cd -
./flashrom/flashrom -V >flashrom.txt
rm -rf flashrom
svn co svn://linuxbios.org/repos/trunk/util/superiotool
cd superiotool
make
cd -
./superiotool/superiotool -d -e -V >superiotool.txt
rm -rf superiotool
cat /proc/ioports >ioports.txt
cat /proc/iomem >iomem.txt
cat /proc/interrupts >interrupts.txt
cat /proc/cpuinfo >cpuinfo.txt
acpidump >acpidump.txt
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.
