1
0

Accepting request 56586 from hardware

Accepted submit request 56586 from user a_jaeger

OBS-URL: https://build.opensuse.org/request/show/56586
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/coreboot-utils?expand=0&rev=8
This commit is contained in:
Ruediger Oertel 2010-12-28 22:56:56 +00:00 committed by Git OBS Bridge
commit ffe16092af
9 changed files with 272 additions and 80 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2df9b6f8afd2d15b5a7ca63e22f9019af1016029d99c45e8a99cf60a1aa53386
size 520621

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Thu Dec 9 22:11:02 CET 2010 - stepan@coresystems.de
- update to r6158
- add coreboot utilities:
* inteltool
* superiotool
* ectool
* msrtool
* k8resdump et al
* cbfstool
- split off flashrom into separate package
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Sep 2 20:04:06 CEST 2009 - kernel01@hailfinger.org Wed Sep 2 20:04:06 CEST 2009 - kernel01@hailfinger.org

View File

@ -1,7 +1,7 @@
# #
# spec file for package coreboot-utils (Version 0.9.1) # spec file for package coreboot-utils
# #
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -20,107 +20,149 @@
Name: coreboot-utils Name: coreboot-utils
Url: http://coreboot.org/ Url: http://coreboot.org/
Summary: A universal flashrom programming utility Summary: A universal flash programming utility
Version: 0.9.1 Version: r6158
Release: 1 Release: 1
%define nvramtool_version r4625 License: GPL v2 only; GPL v2 or later
License: GPL v2 only ; GPL v2 or later
Group: Development/Tools/Other Group: Development/Tools/Other
Source0: flashrom-%{version}.tar.bz2 Source0: coreboot-utils-%{version}.tar.bz2
Source1: nvramtool-svn-%{nvramtool_version}.tar.bz2 Source23: update-snapshots.sh
Patch0: nvramtool-revision.diff
Patch1: superiotool-revision.diff
Patch2: k8resdump.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: pciutils-devel zlib-devel BuildRequires: pciutils-devel zlib-devel
Provides: flashrom = %{version} BuildRequires: gcc-c++
Obsoletes: flashrom < %{version}
ExclusiveArch: %ix86 x86_64 ExclusiveArch: %ix86 x86_64
%description %description
flashrom is a utility for reading, writing, verifying and erasing flash ROM coreboot utilities are a comprehensive set of tools to work with coreboot.
chips. It's often used to flash BIOS/EFI/coreboot/firmware images in-system Currently it includes:
using a supported mainboard, but it also supports flashing of network * nvramtool - a tool to set CMOS variables
cards (NICs), SATA controller cards, and other external devices which can
program flash chips.
It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, and
TSOP40 chips, which use various protocols such as LPC, FWH, parallel flash,
or SPI.
nvramtool is a utility for reading/writing coreboot parameters and
displaying information from the coreboot table. It is intended for x86-based
systems (both 32-bit and 64-bit) that use coreboot.
The coreboot table resides in low physical memory, and may be accessed
through the /dev/mem interface. It is created at boot time by coreboot, and
contains various system information such as the type of mainboard in use. It
specifies locations in the CMOS (nonvolatile RAM) where the coreboot
parameters are stored.
Authors: Authors:
-------- --------
Carl-Daniel Hailfinger Stefan Reinauer <stepan@coresystems.de> et al.
Claus Gindhart <claus.gindhart@kontron.com>
Dominik Geyer <dominik.geyer@kontron.com>
Eric Biederman <ebiederman@lnxi.com>
Giampiero Giancipoli <gianci@email.it>
Joe Bao <Zheng.Bao@amd.com>
Luc Verhaegen <libv@skynet.be>
Li-Ta Lo
Markus Boas <ryven@ryven.de>
Nikolay Petukhov <nikolay.petukhov@gmail.com>
Peter Stuge <peter@stuge.se>
Reinder E.N. de Haan <lb_reha@mveas.com>
Ronald G. Minnich <rminnich@gmail.com>
Ronald Hoogenboom <ronald@zonnet.nl>
Stefan Reinauer <stepan@coresystems.de>
Stefan Wildemann <stefan.wildemann@kontron.com>
Steven James <pyro@linuxlabs.com>
Uwe Hermann <uwe@hermann-uwe.de>
Wang Qingpei <Qingpei.Wang@amd.com>
Yinghai Lu <yinghai.lu@amd.com>
David S. Peterson <dsp@llnl.gov> <dave_peterson@pobox.com>
some others
%prep %prep
%setup -q -n flashrom-%{version} -a 1 %setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build %build
cd nvramtool
make %{?jobs:-j%jobs} \ make %{?jobs:-j%jobs} \
CFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS -Os -Wall" \
gzip flashrom.8 LDFLAGS="-lpci -lz"
cd nvramtool-svn-%{nvramtool_version} strip nvramtool
make %{?jobs:-j%jobs} \
CFLAGS="$RPM_OPT_FLAGS"
gzip nvramtool.8 gzip nvramtool.8
cd ../inteltool
make inteltool \
CFLAGS="$RPM_OPT_FLAGS -Os -Wall" \
LDFLAGS="-lpci -lz"
strip inteltool
gzip inteltool.8
cd ../superiotool
make %{?jobs:-j%jobs} \
CFLAGS="$RPM_OPT_FLAGS -Os -Wall -DPCI_SUPPORT" \
LDFLAGS="-lpci -lz"
strip superiotool
gzip superiotool.8
cd ../ectool
make %{?jobs:-j%jobs} \
CFLAGS="$RPM_OPT_FLAGS -Os -Wall" \
LDFLAGS="-lpci -lz"
strip ectool
cd ../msrtool
CFLAGS="$RPM_OPT_FLAGS" ./configure
make %{?jobs:-j%jobs}
strip msrtool
cd ../k8resdump
make %{?jobs:-j%jobs}
strip k8resdump
cd ../cbfstool
make %{?jobs:-j%jobs} \
CFLAGS="$RPM_OPT_FLAGS -Os -Wall" \
CXXFLAGS="$RPM_OPT_FLAGS -Os -Wall -DCOMPACT"
cd ../
%install %install
mkdir -p %{buildroot}%{_bindir}
mkdir -p $RPM_BUILD_ROOT/%{_sbindir} mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8 mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8
install -m 0755 flashrom $RPM_BUILD_ROOT/%{_sbindir}
install -m 0644 flashrom.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8 cd nvramtool
cd nvramtool-svn-%{nvramtool_version}
install -m 0755 nvramtool $RPM_BUILD_ROOT/%{_sbindir} install -m 0755 nvramtool $RPM_BUILD_ROOT/%{_sbindir}
install -m 0644 nvramtool.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8 install -m 0644 nvramtool.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8
cd - cp DISCLAIMER DISCLAIMER.nvramtool
cp README README.flashrom cp README README.nvramtool
cp ChangeLog ChangeLog.flashrom cp ChangeLog ChangeLog.nvramtool
cp nvramtool-svn-%{nvramtool_version}/COPYING .
cp nvramtool-svn-%{nvramtool_version}/DISCLAIMER DISCLAIMER.nvramtool cd ../inteltool
cp nvramtool-svn-%{nvramtool_version}/README README.nvramtool install -m 0755 inteltool $RPM_BUILD_ROOT/%{_sbindir}
cp nvramtool-svn-%{nvramtool_version}/ChangeLog ChangeLog.nvramtool install -m 0644 inteltool.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8
cd ../superiotool
install -m 0755 superiotool $RPM_BUILD_ROOT/%{_sbindir}
install -m 0644 superiotool.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8
cp README README.superiotool
cd ../ectool
install -m 0755 ectool $RPM_BUILD_ROOT/%{_sbindir}
cd ../msrtool
install -m 0755 msrtool $RPM_BUILD_ROOT/%{_sbindir}
cd ../k8resdump
install -m 0755 k8resdump $RPM_BUILD_ROOT/%{_sbindir}
cd ../amdtools
install -m 0755 k8-interpret-extended-memory-settings.pl \
$RPM_BUILD_ROOT/%{_sbindir}/k8-interpret-extended-memory-settings.pl
install -m 0755 k8-compare-pci-space.pl \
$RPM_BUILD_ROOT/%{_sbindir}/k8-compare-pci-space.pl
install -m 0755 k8-read-mem-settings.sh \
$RPM_BUILD_ROOT/%{_sbindir}/k8-read-mem-settings.sh
install -m 0755 parse-bkdg.pl \
$RPM_BUILD_ROOT/%{_sbindir}/parse-bkdg.pl
cp -a example_input example_input.amdtools
cp -a README README.amdtools
cd ../cbfstool
install -m 0755 cbfstool $RPM_BUILD_ROOT/%{_bindir}
cp EXAMPLE EXAMPLE.cbfstool
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc COPYING %doc nvramtool/COPYING
%doc README.flashrom ChangeLog.flashrom serprog-protocol.txt %doc nvramtool/DISCLAIMER.nvramtool nvramtool/ChangeLog.nvramtool nvramtool/README.nvramtool
%doc DISCLAIMER.nvramtool ChangeLog.nvramtool README.nvramtool %doc superiotool/README.superiotool cbfstool/EXAMPLE.cbfstool
%{_sbindir}/flashrom %doc amdtools/README.amdtools amdtools/example_input.amdtools
%{_sbindir}/nvramtool %{_sbindir}/nvramtool
%{_sbindir}/inteltool
%{_sbindir}/superiotool
%{_sbindir}/ectool
%{_sbindir}/msrtool
%{_sbindir}/k8resdump
%{_sbindir}/k8-interpret-extended-memory-settings.pl
%{_sbindir}/k8-compare-pci-space.pl
%{_sbindir}/k8-read-mem-settings.sh
%{_sbindir}/parse-bkdg.pl
%{_bindir}/cbfstool
%{_mandir}/man8/nvramtool.8.gz %{_mandir}/man8/nvramtool.8.gz
%{_mandir}/man8/flashrom.8.gz %{_mandir}/man8/inteltool.8.gz
%{_mandir}/man8/superiotool.8.gz
%changelog %changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:88db7a739d315f25e10f318b1dee070af57124965b5edcbfc17239d080aeafe0
size 143890

11
k8resdump.diff Normal file
View File

@ -0,0 +1,11 @@
--- a/k8resdump/Makefile
+++ b/k8resdump/Makefile
@@ -16,7 +16,7 @@
ifeq ($(OS_ARCH), SunOS)
LDFLAGS = -lpci
else
-LDFLAGS = -lpci -lz -static
+LDFLAGS = -lpci -lz
STRIP_ARGS = -s
endif

29
nvramtool-revision.diff Normal file
View File

@ -0,0 +1,29 @@
--- a/nvramtool/common.c
+++ b/nvramtool/common.c
@@ -34,7 +34,7 @@
const char prog_name[] = "nvramtool";
/* version of this program */
-const char prog_version[] = "2.1";
+const char prog_version[] = "2.1 (r" NVRAMTOOL_REVISION ")";
/****************************************************************************
* get_line_from_file
--- a/nvramtool/Makefile
+++ b/nvramtool/Makefile
@@ -20,10 +20,15 @@
all: dep $(PROGRAM)
+SVNDEF := -D'NVRAMTOOL_REVISION="$(shell basename `cd ..;pwd`|cut -c17-)"'
+
$(PROGRAM): $(OBJS)
$(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
$(STRIP) $(STRIP_ARGS) $(PROGRAM)
+common.o: common.c
+ $(CC) -c $(CFLAGS) $(SVNDEF) $< -o $@
+
clean:
rm -f $(PROGRAM) *.o

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8be08411da2bd3170c0f8b8e3581ab8ae6397da398c1e5feb1eaacede3dc8a4f
size 50949

46
superiotool-revision.diff Normal file
View File

@ -0,0 +1,46 @@
--- a/superiotool/Makefile
+++ b/superiotool/Makefile
@@ -26,12 +26,10 @@
# Set the superiotool version string from the highest revision number
# of the checked out superiotool files.
-SVNDEF := -D'SUPERIOTOOL_VERSION="$(shell svnversion -cn . \
- | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"'
+SVNDEF := -D'SUPERIOTOOL_VERSION="$(shell basename `cd ..;pwd`|cut -c17-)"'
CFLAGS += -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
- -Werror-implicit-function-declaration -ansi -pedantic $(SVNDEF)
-LDFLAGS += -lz
+ -Werror-implicit-function-declaration -ansi -pedantic
OBJS = superiotool.o ali.o fintek.o ite.o nsc.o nuvoton.o smsc.o winbond.o
@@ -41,10 +39,9 @@
endif
ifeq ($(OS_ARCH), FreeBSD)
CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
- -Werror-implicit-function-declaration -ansi $(SVNDEF) \
+ -Werror-implicit-function-declaration -ansi \
-I/usr/local/include
LDFLAGS += -L/usr/local/lib
-LIBS = -lz
endif
ifeq ($(OS_ARCH), NetBSD)
LDFLAGS = -l$(shell uname -p)
@@ -55,6 +52,7 @@
ifeq ($(CONFIG_PCI), yes)
CFLAGS += -DPCI_SUPPORT
+LIBS += -lz
LIBS += -lpci
OBJS += pci.o via.o
endif
@@ -75,5 +73,8 @@
clean:
rm -f $(PROGRAM) *.o
+%.o: %.c
+ $(CC) $(CFLAGS) $(SVNDEF) -c $< -o $@
+
.PHONY: all install clean

54
update-snapshots.sh Normal file
View File

@ -0,0 +1,54 @@
#!/bin/bash
# get upstream revisions
printf "Checking coreboot revision... "
REV=$(svn info svn://coreboot.org/coreboot/trunk/util |grep ^Revision|cut -c11-)
printf "done. (r$REV)\n"
printf "Continue? (YES/no) "
read answer
answer=$(echo $answer|tr "a-z" "A-Z")
if [ "$answer" == "YES" -o "$answer" == "Y" -o "$answer" == "" ]; then
printf "Updating tree... \n"
else
printf "Good bye.\n"
exit 0
fi
osc rm coreboot-utils-r*.tar.bz2
# clean up
printf "Cleaning up... "
rm -rf coreboot-utils-r????
printf "done.\n"
# check out nvramtool
printf "Checking out coreboot-utils r$REV... "
svn export -q svn://coreboot.org/coreboot/trunk/util/ coreboot-utils-r$REV
cd coreboot-utils-r$REV
rm -rf x86emu newconfig abuild analysis compareboard kconfig options xcompile
rm -rf kbuildall optionlist sconfig
cd ..
printf "packing... "
tar cjf coreboot-utils-r$REV.tar.bz2 coreboot-utils-r$REV
printf "done.\n"
sed -i s/Version:.*r[0-9].*$/Version:\ \ \ \ \ \ \ \ r$REV/ \
coreboot-utils.spec
osc add coreboot-utils-r$REV.tar.bz2
mv coreboot-utils.changes coreboot-utils.changes.old
echo "-------------------------------------------------------------------" > \
coreboot-utils.changes
echo "`date` - stepan@coresystems.de" >> \
coreboot-utils.changes
echo >> coreboot-utils.changes
echo "- update to r$REV." >> coreboot-utils.changes
echo >> coreboot-utils.changes
cat coreboot-utils.changes.old >> coreboot-utils.changes
rm coreboot-utils.changes.old
# finished.
ls -la *.bz2