From 9d964488e109c34c4703da0fc8f5b52ca0baac2ee4f2e5484ca35de2db839d3a Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Tue, 21 Dec 2010 16:33:44 +0000 Subject: [PATCH] Accepting request 55464 from home:reinauer:branches:hardware Flashrom gets splitted out into a seperate package (new package accepted via submitrequest #56361) - would be great to see in openSUSE 11.4 soon OBS-URL: https://build.opensuse.org/request/show/55464 OBS-URL: https://build.opensuse.org/package/show/hardware/coreboot-utils?expand=0&rev=11 --- coreboot-utils-r6158.tar.bz2 | 3 + coreboot-utils.changes | 13 +++ coreboot-utils.spec | 190 +++++++++++++++++++++-------------- flashrom-0.9.1.tar.bz2 | 3 - k8resdump.diff | 11 ++ nvramtool-revision.diff | 29 ++++++ nvramtool-svn-r4625.tar.bz2 | 3 - ready | 0 superiotool-revision.diff | 46 +++++++++ update-snapshots.sh | 54 ++++++++++ 10 files changed, 272 insertions(+), 80 deletions(-) create mode 100644 coreboot-utils-r6158.tar.bz2 delete mode 100644 flashrom-0.9.1.tar.bz2 create mode 100644 k8resdump.diff create mode 100644 nvramtool-revision.diff delete mode 100644 nvramtool-svn-r4625.tar.bz2 delete mode 100644 ready create mode 100644 superiotool-revision.diff create mode 100644 update-snapshots.sh diff --git a/coreboot-utils-r6158.tar.bz2 b/coreboot-utils-r6158.tar.bz2 new file mode 100644 index 0000000..e5068ba --- /dev/null +++ b/coreboot-utils-r6158.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2df9b6f8afd2d15b5a7ca63e22f9019af1016029d99c45e8a99cf60a1aa53386 +size 520621 diff --git a/coreboot-utils.changes b/coreboot-utils.changes index 6ea243a..ac7adbf 100644 --- a/coreboot-utils.changes +++ b/coreboot-utils.changes @@ -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 diff --git a/coreboot-utils.spec b/coreboot-utils.spec index 2ba694d..74ef4a1 100644 --- a/coreboot-utils.spec +++ b/coreboot-utils.spec @@ -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 # remain the property of their copyright owners, unless otherwise agreed @@ -20,107 +20,149 @@ Name: coreboot-utils Url: http://coreboot.org/ -Summary: A universal flashrom programming utility -Version: 0.9.1 +Summary: A universal flash programming utility +Version: r6158 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 -Source0: flashrom-%{version}.tar.bz2 -Source1: nvramtool-svn-%{nvramtool_version}.tar.bz2 +Source0: coreboot-utils-%{version}.tar.bz2 +Source23: update-snapshots.sh +Patch0: nvramtool-revision.diff +Patch1: superiotool-revision.diff +Patch2: k8resdump.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: pciutils-devel zlib-devel -Provides: flashrom = %{version} -Obsoletes: flashrom < %{version} +BuildRequires: gcc-c++ ExclusiveArch: %ix86 x86_64 %description -flashrom is a utility for reading, writing, verifying and erasing flash ROM -chips. It's often used to flash BIOS/EFI/coreboot/firmware images in-system -using a supported mainboard, but it also supports flashing of network -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. - - +coreboot utilities are a comprehensive set of tools to work with coreboot. +Currently it includes: +* nvramtool - a tool to set CMOS variables Authors: -------- - Carl-Daniel Hailfinger - Claus Gindhart - Dominik Geyer - Eric Biederman - Giampiero Giancipoli - Joe Bao - Luc Verhaegen - Li-Ta Lo - Markus Boas - Nikolay Petukhov - Peter Stuge - Reinder E.N. de Haan - Ronald G. Minnich - Ronald Hoogenboom - Stefan Reinauer - Stefan Wildemann - Steven James - Uwe Hermann - Wang Qingpei - Yinghai Lu - David S. Peterson - some others + Stefan Reinauer et al. %prep -%setup -q -n flashrom-%{version} -a 1 +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build +cd nvramtool make %{?jobs:-j%jobs} \ - CFLAGS="$RPM_OPT_FLAGS" -gzip flashrom.8 -cd nvramtool-svn-%{nvramtool_version} -make %{?jobs:-j%jobs} \ - CFLAGS="$RPM_OPT_FLAGS" + CFLAGS="$RPM_OPT_FLAGS -Os -Wall" \ + LDFLAGS="-lpci -lz" +strip nvramtool 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 +mkdir -p %{buildroot}%{_bindir} mkdir -p $RPM_BUILD_ROOT/%{_sbindir} 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-svn-%{nvramtool_version} + +cd nvramtool install -m 0755 nvramtool $RPM_BUILD_ROOT/%{_sbindir} install -m 0644 nvramtool.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8 -cd - -cp README README.flashrom -cp ChangeLog ChangeLog.flashrom -cp nvramtool-svn-%{nvramtool_version}/COPYING . -cp nvramtool-svn-%{nvramtool_version}/DISCLAIMER DISCLAIMER.nvramtool -cp nvramtool-svn-%{nvramtool_version}/README README.nvramtool -cp nvramtool-svn-%{nvramtool_version}/ChangeLog ChangeLog.nvramtool +cp DISCLAIMER DISCLAIMER.nvramtool +cp README README.nvramtool +cp ChangeLog ChangeLog.nvramtool + +cd ../inteltool +install -m 0755 inteltool $RPM_BUILD_ROOT/%{_sbindir} +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 rm -rf %{buildroot} %files %defattr(-,root,root) -%doc COPYING -%doc README.flashrom ChangeLog.flashrom serprog-protocol.txt -%doc DISCLAIMER.nvramtool ChangeLog.nvramtool README.nvramtool -%{_sbindir}/flashrom +%doc nvramtool/COPYING +%doc nvramtool/DISCLAIMER.nvramtool nvramtool/ChangeLog.nvramtool nvramtool/README.nvramtool +%doc superiotool/README.superiotool cbfstool/EXAMPLE.cbfstool +%doc amdtools/README.amdtools amdtools/example_input.amdtools %{_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/flashrom.8.gz +%{_mandir}/man8/inteltool.8.gz +%{_mandir}/man8/superiotool.8.gz %changelog diff --git a/flashrom-0.9.1.tar.bz2 b/flashrom-0.9.1.tar.bz2 deleted file mode 100644 index 372dc71..0000000 --- a/flashrom-0.9.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:88db7a739d315f25e10f318b1dee070af57124965b5edcbfc17239d080aeafe0 -size 143890 diff --git a/k8resdump.diff b/k8resdump.diff new file mode 100644 index 0000000..294ff51 --- /dev/null +++ b/k8resdump.diff @@ -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 + diff --git a/nvramtool-revision.diff b/nvramtool-revision.diff new file mode 100644 index 0000000..1640e91 --- /dev/null +++ b/nvramtool-revision.diff @@ -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 + diff --git a/nvramtool-svn-r4625.tar.bz2 b/nvramtool-svn-r4625.tar.bz2 deleted file mode 100644 index 93ecb3e..0000000 --- a/nvramtool-svn-r4625.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8be08411da2bd3170c0f8b8e3581ab8ae6397da398c1e5feb1eaacede3dc8a4f -size 50949 diff --git a/ready b/ready deleted file mode 100644 index 473a0f4..0000000 diff --git a/superiotool-revision.diff b/superiotool-revision.diff new file mode 100644 index 0000000..e64a776 --- /dev/null +++ b/superiotool-revision.diff @@ -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 + diff --git a/update-snapshots.sh b/update-snapshots.sh new file mode 100644 index 0000000..3a1c855 --- /dev/null +++ b/update-snapshots.sh @@ -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 +