Accepting request 352720 from home:posophe:branches:hardware

fixed as requested

OBS-URL: https://build.opensuse.org/request/show/352720
OBS-URL: https://build.opensuse.org/package/show/hardware/coreboot-utils?expand=0&rev=18
This commit is contained in:
Ismail Dönmez 2016-01-09 19:39:41 +00:00 committed by Git OBS Bridge
parent c22d48ea79
commit dc926b24f2
8 changed files with 95 additions and 247 deletions

3
coreboot-4.2.tar.xz Normal file
View File

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

View File

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

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Sun Dec 6 16:14:56 UTC 2015 - p.drouand@gmail.com
- Use upstream tarball instead of svn revisions
version 4.2
- Remove obsolete patches
* nvramtool-revision.diff
* superiotool-revision.diff
- Remove update-snapshots.sh
- Use download Url as source
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Mar 13 12:04:46 UTC 2013 - cfarrell@suse.com Wed Mar 13 12:04:46 UTC 2013 - cfarrell@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package coreboot-utils # spec file for package coreboot-utils
# #
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2015 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
@ -21,12 +21,9 @@ Url: http://coreboot.org/
Summary: A universal flash programming utility Summary: A universal flash programming utility
License: GPL-2.0 License: GPL-2.0
Group: Development/Tools/Other Group: Development/Tools/Other
Version: r6158 Version: 4.2
Release: 0 Release: 0
Source0: coreboot-utils-%{version}.tar.bz2 Source0: http://www.coreboot.org/releases/coreboot-%{version}.tar.xz
Source23: update-snapshots.sh
Patch0: nvramtool-revision.diff
Patch1: superiotool-revision.diff
Patch2: k8resdump.diff Patch2: k8resdump.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -35,125 +32,94 @@ BuildRequires: zlib-devel
ExclusiveArch: %ix86 x86_64 ExclusiveArch: %ix86 x86_64
%description %description
coreboot utilities are a comprehensive set of tools to work with coreboot. coreboot is a Free Software project aimed at replacing the proprietary BIOS
Currently it includes: (firmware) found in most computers. This package contains various utilities
* nvramtool - a tool to set CMOS variables used to develop and configure systems with coreboot.
%prep %prep
%setup -q %setup -q -n coreboot-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1 %patch2 -p1
%build %build
cd nvramtool make %{?_smp_mflags} CFLAGS="%{optflags}" -C util/ectool
make %{?_smp_mflags} \ make %{?_smp_mflags} CC="%{__cc} %{optflags}" -C util/superiotool
CFLAGS="$RPM_OPT_FLAGS -Os -Wall" \ make %{?_smp_mflags} CFLAGS="%{optflags} -DCMOS_HAL=1 -I." -C util/nvramtool
LDFLAGS="-lpci -lz" make %{?_smp_mflags} CFLAGS="%{optflags}" -C util/romcc romcc
strip nvramtool make %{?_smp_mflags} CFLAGS="%{optflags}" -C util/cbmem
gzip nvramtool.8 make %{?_smp_mflags} CFLAGS="%{optflags}" -C util/fletcher
make %{?_smp_mflags} CFLAGS="%{optflags}" -C util/ifdfake
cd ../inteltool make %{?_smp_mflags} CFLAGS="%{optflags}" -C util/ifdtool
make inteltool \ make %{?_smp_mflags} CFLAGS="%{optflags}" -C util/cbfstool
CFLAGS="$RPM_OPT_FLAGS -Os -Wall" \ make %{?_smp_mflags} CFLAGS="%{optflags}" -C util/k8resdump
LDFLAGS="-lpci -lz" %ifarch %{ix86} x86_64
strip inteltool make %{?_smp_mflags} CFLAGS="%{optflags}" -C util/inteltool
gzip inteltool.8 make %{?_smp_mflags} CFLAGS="%{optflags} -I." -C util/viatool
(cd util/msrtool && %configure && make %{?_smp_mflags})
cd ../superiotool %endif
make %{?_smp_mflags} \
CFLAGS="$RPM_OPT_FLAGS -Os -Wall -DPCI_SUPPORT" \
LDFLAGS="-lpci -lz"
strip superiotool
gzip superiotool.8
cd ../ectool
make %{?_smp_mflags} \
CFLAGS="$RPM_OPT_FLAGS -Os -Wall" \
LDFLAGS="-lpci -lz"
strip ectool
cd ../msrtool
CFLAGS="$RPM_OPT_FLAGS" ./configure
make %{?_smp_mflags}
strip msrtool
cd ../k8resdump
make %{?_smp_mflags}
strip k8resdump
cd ../cbfstool
make %{?_smp_mflags} \
CFLAGS="$RPM_OPT_FLAGS -Os -Wall" \
CXXFLAGS="$RPM_OPT_FLAGS -Os -Wall -DCOMPACT"
cd ../
%install %install
mkdir -p %{buildroot}%{_bindir} install -d %{buildroot}%{_sbindir}
mkdir -p $RPM_BUILD_ROOT/%{_sbindir} install -d %{buildroot}%{_bindir}
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8 install -d %{buildroot}%{_datadir}
install -d %{buildroot}%{_mandir}/man1
cd nvramtool make %{?_smp_mflags} PREFIX=%{buildroot}/%{_prefix} -C util/ectool install
install -m 0755 nvramtool $RPM_BUILD_ROOT/%{_sbindir} make %{?_smp_mflags} DESTDIR=%{buildroot} PREFIX=%{_prefix} -C util/superiotool install
install -m 0644 nvramtool.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8 make %{?_smp_mflags} DESTDIR=%{buildroot} PREFIX=%{_prefix} -C util/nvramtool install
cp DISCLAIMER DISCLAIMER.nvramtool make %{?_smp_mflags} DESTDIR=%{buildroot} PREFIX=%{_prefix} -C util/ifdfake install
cp README README.nvramtool # ifdtool & viatool install targets try to install a nonexistent manpage...
cp ChangeLog ChangeLog.nvramtool install util/ifdtool/ifdtool %{buildroot}%{_bindir}
install util/cbfstool/cbfstool %{buildroot}%{_bindir}
install util/cbmem/cbmem %{buildroot}%{_bindir}
install util/fletcher/fletcher %{buildroot}%{_bindir}
install util/romcc/romcc %{buildroot}%{_bindir}
install -pm644 util/romcc/romcc.1 %{buildroot}%{_mandir}/man1/
install util/k8resdump/k8resdump %{buildroot}%{_sbindir}
install util/amdtools/*.pl %{buildroot}%{_sbindir}
install util/amdtools/k8-read-mem-settings.sh %{buildroot}%{_sbindir}
%ifarch %{ix86} x86_64
make %{?_smp_mflags} DESTDIR=%{buildroot} PREFIX=%{_prefix} -C util/inteltool install
install util/viatool/viatool %{buildroot}%{_bindir}
make -C util/msrtool DESTDIR=%{buildroot} PREFIX=%{_prefix} install
%endif
cd ../inteltool install -pm644 util/superiotool/README README.superiotool
install -m 0755 inteltool $RPM_BUILD_ROOT/%{_sbindir} install -pm644 util/superiotool/COPYING COPYING.superiotool
install -m 0644 inteltool.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8 install -pm644 util/nvramtool/README README.nvramtool
install -pm644 util/nvramtool/COPYING COPYING.nvramtool
cd ../superiotool install -pm644 util/nvramtool/DISCLAIMER DISCLAIMER.nvramtool
install -m 0755 superiotool $RPM_BUILD_ROOT/%{_sbindir} install -pm644 util/romcc/COPYING COPYING.romcc
install -m 0644 superiotool.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8 install -pm644 util/optionlist/README README.optionlist
cp README README.superiotool install -pm644 util/amdtools/README README.amdtools
cp -a util/amdtools/example_input example_input.amdtools
cd ../ectool %ifarch %{ix86} x86_64
install -m 0755 ectool $RPM_BUILD_ROOT/%{_sbindir} install -pm644 util/viatool/README README.viatool
install -pm644 util/msrtool/COPYING COPYING.msrtool
cd ../msrtool %endif
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
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc nvramtool/COPYING %doc README.superiotool COPYING.superiotool
%doc nvramtool/DISCLAIMER.nvramtool nvramtool/ChangeLog.nvramtool nvramtool/README.nvramtool %doc README.nvramtool COPYING.nvramtool DISCLAIMER.nvramtool
%doc superiotool/README.superiotool cbfstool/EXAMPLE.cbfstool %doc README.amdtools example_input.amdtools
%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 %{_bindir}/cbfstool
%{_mandir}/man8/nvramtool.8.gz %{_bindir}/cbmem
%{_mandir}/man8/inteltool.8.gz %{_bindir}/fletcher
%{_mandir}/man8/superiotool.8.gz %{_bindir}/ifdfake
%{_bindir}/ifdtool
%{_bindir}/romcc
%{_bindir}/viatool
%{_sbindir}/ectool
%{_sbindir}/inteltool
%{_sbindir}/k8-compare-pci-space.pl
%{_sbindir}/k8-interpret-extended-memory-settings.pl
%{_sbindir}/k8-read-mem-settings.sh
%{_sbindir}/k8resdump
%{_sbindir}/msrtool
%{_sbindir}/nvramtool
%{_sbindir}/parse-bkdg.pl
%{_sbindir}/superiotool
%{_mandir}/man1/*
%{_mandir}/man8/*
%changelog %changelog

View File

@ -1,5 +1,5 @@
--- a/k8resdump/Makefile --- a/util/k8resdump/Makefile
+++ b/k8resdump/Makefile +++ b/util/k8resdump/Makefile
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
ifeq ($(OS_ARCH), SunOS) ifeq ($(OS_ARCH), SunOS)
LDFLAGS = -lpci LDFLAGS = -lpci

View File

@ -1,29 +0,0 @@
--- 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,46 +0,0 @@
--- 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

View File

@ -1,54 +0,0 @@
#!/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