Updated to latest svn ver. 1250 (post-release snapshot for 0.9.3)
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
This commit is contained in:
parent
a1e5088739
commit
523d4bdbfa
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
flashrom-0.9.2.tar.bz2
|
||||
/flashrom-0.9.2.tar.bz2
|
||||
/flashrom-0.9.3.tar.xz
|
||||
/flashrom-0.9.3.tar.bz2
|
||||
|
@ -1,482 +1,22 @@
|
||||
From ea547fead702d32b58cfe48f9f998edea02cb427 Mon Sep 17 00:00:00 2001
|
||||
From cb95544e4b35737ccb4abc5d041a975a79e8f4d1 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Fri, 17 Sep 2010 18:58:28 +0400
|
||||
Subject: [PATCH 01/12] Initial commit of autotools-related files
|
||||
Subject: [PATCH 01/13] Initial commit of autotools-related files
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
Makefile | 452 ----------------------------------------------------------
|
||||
Makefile.am | 166 +++++++++++++++++++++
|
||||
configure.ac | 204 ++++++++++++++++++++++++++
|
||||
3 files changed, 370 insertions(+), 452 deletions(-)
|
||||
delete mode 100644 Makefile
|
||||
Makefile.am | 172 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
configure.ac | 227 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 399 insertions(+), 0 deletions(-)
|
||||
create mode 100644 Makefile.am
|
||||
create mode 100644 configure.ac
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
deleted file mode 100644
|
||||
index c525e39..0000000
|
||||
--- a/Makefile
|
||||
+++ /dev/null
|
||||
@@ -1,452 +0,0 @@
|
||||
-#
|
||||
-# This file is part of the flashrom project.
|
||||
-#
|
||||
-# Copyright (C) 2005 coresystems GmbH <stepan@coresystems.de>
|
||||
-# Copyright (C) 2009,2010 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; version 2 of the License.
|
||||
-#
|
||||
-# 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 St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
-#
|
||||
-
|
||||
-PROGRAM = flashrom
|
||||
-
|
||||
-CC ?= gcc
|
||||
-STRIP ?= strip
|
||||
-INSTALL = install
|
||||
-DIFF = diff
|
||||
-PREFIX ?= /usr/local
|
||||
-MANDIR ?= $(PREFIX)/share/man
|
||||
-CFLAGS ?= -Os -Wall -Wshadow
|
||||
-EXPORTDIR ?= .
|
||||
-
|
||||
-WARNERROR ?= yes
|
||||
-
|
||||
-ifeq ($(WARNERROR), yes)
|
||||
-CFLAGS += -Werror
|
||||
-endif
|
||||
-
|
||||
-# FIXME We have to differentiate between host and target arch.
|
||||
-OS_ARCH ?= $(shell uname)
|
||||
-ifneq ($(OS_ARCH), SunOS)
|
||||
-STRIP_ARGS = -s
|
||||
-endif
|
||||
-ifeq ($(OS_ARCH), Darwin)
|
||||
-CPPFLAGS += -I/opt/local/include -I/usr/local/include
|
||||
-# DirectIO framework can be found in the DirectHW library.
|
||||
-LDFLAGS += -framework IOKit -framework DirectIO -L/opt/local/lib -L/usr/local/lib
|
||||
-endif
|
||||
-ifeq ($(OS_ARCH), FreeBSD)
|
||||
-CPPFLAGS += -I/usr/local/include
|
||||
-LDFLAGS += -L/usr/local/lib
|
||||
-endif
|
||||
-ifeq ($(OS_ARCH), OpenBSD)
|
||||
-CPPFLAGS += -I/usr/local/include
|
||||
-LDFLAGS += -L/usr/local/lib
|
||||
-endif
|
||||
-ifeq ($(OS_ARCH), DOS)
|
||||
-EXEC_SUFFIX := .exe
|
||||
-CPPFLAGS += -I../libgetopt -I../libpci/include
|
||||
-# FIXME Check if we can achieve the same effect with -L../libgetopt -lgetopt
|
||||
-LIBS += ../libgetopt/libgetopt.a
|
||||
-# Bus Pirate and Serprog are not supported under DOS (missing serial support).
|
||||
-ifeq ($(CONFIG_BUSPIRATE_SPI), yes)
|
||||
-UNSUPPORTED_FEATURES += CONFIG_BUSPIRATE_SPI=yes
|
||||
-else
|
||||
-override CONFIG_BUSPIRATE_SPI = no
|
||||
-endif
|
||||
-ifeq ($(CONFIG_SERPROG), yes)
|
||||
-UNSUPPORTED_FEATURES += CONFIG_SERPROG=yes
|
||||
-else
|
||||
-override CONFIG_SERPROG = no
|
||||
-endif
|
||||
-# Dediprog and FT2232 are not supported under DOS (missing USB support).
|
||||
-ifeq ($(CONFIG_DEDIPROG), yes)
|
||||
-UNSUPPORTED_FEATURES += CONFIG_DEDIPROG=yes
|
||||
-else
|
||||
-override CONFIG_DEDIPROG = no
|
||||
-endif
|
||||
-ifeq ($(CONFIG_FT2232_SPI), yes)
|
||||
-UNSUPPORTED_FEATURES += CONFIG_FT2232_SPI=yes
|
||||
-else
|
||||
-override CONFIG_FT2232_SPI = no
|
||||
-endif
|
||||
-endif
|
||||
-
|
||||
-CHIP_OBJS = jedec.o stm50flw0x0x.o w39v040c.o w39v080fa.o w29ee011.o \
|
||||
- sst28sf040.o m29f400bt.o 82802ab.o pm49fl00x.o \
|
||||
- sst49lfxxxc.o sst_fwhub.o flashchips.o spi.o spi25.o
|
||||
-
|
||||
-LIB_OBJS = layout.o
|
||||
-
|
||||
-CLI_OBJS = flashrom.o cli_classic.o cli_output.o print.o
|
||||
-
|
||||
-PROGRAMMER_OBJS = udelay.o programmer.o
|
||||
-
|
||||
-all: pciutils features $(PROGRAM)$(EXEC_SUFFIX)
|
||||
-
|
||||
-# Set the flashrom version string from the highest revision number
|
||||
-# of the checked out flashrom files.
|
||||
-# Note to packagers: Any tree exported with "make export" or "make tarball"
|
||||
-# will not require subversion. The downloadable snapshots are already exported.
|
||||
-SVNVERSION := $(shell LC_ALL=C svnversion -cn . 2>/dev/null | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/" | grep "[0-9]" || LC_ALL=C svn info . 2>/dev/null | awk '/^Revision:/ {print $$2 }' | grep "[0-9]" || LC_ALL=C git svn info . 2>/dev/null | awk '/^Revision:/ {print $$2 }' | grep "[0-9]" || echo unknown)
|
||||
-
|
||||
-RELEASE := 0.9.3
|
||||
-VERSION := $(RELEASE)-r$(SVNVERSION)
|
||||
-RELEASENAME ?= $(VERSION)
|
||||
-
|
||||
-SVNDEF := -D'FLASHROM_VERSION="$(VERSION)"'
|
||||
-
|
||||
-# Always enable internal/onboard support for now.
|
||||
-CONFIG_INTERNAL ?= yes
|
||||
-
|
||||
-# Always enable serprog for now. Needs to be disabled on Windows.
|
||||
-CONFIG_SERPROG ?= yes
|
||||
-
|
||||
-# RayeR SPIPGM hardware support
|
||||
-CONFIG_RAYER_SPI ?= yes
|
||||
-
|
||||
-# Always enable 3Com NICs for now.
|
||||
-CONFIG_NIC3COM ?= yes
|
||||
-
|
||||
-# Enable NVIDIA graphics cards. Note: write and erase do not work properly.
|
||||
-CONFIG_GFXNVIDIA ?= yes
|
||||
-
|
||||
-# Always enable SiI SATA controllers for now.
|
||||
-CONFIG_SATASII ?= yes
|
||||
-
|
||||
-# Highpoint (HPT) ATA/RAID controller support.
|
||||
-# IMPORTANT: This code is not yet working!
|
||||
-CONFIG_ATAHPT ?= no
|
||||
-
|
||||
-# Always enable FT2232 SPI dongles for now.
|
||||
-CONFIG_FT2232_SPI ?= yes
|
||||
-
|
||||
-# Always enable dummy tracing for now.
|
||||
-CONFIG_DUMMY ?= yes
|
||||
-
|
||||
-# Always enable Dr. Kaiser for now.
|
||||
-CONFIG_DRKAISER ?= yes
|
||||
-
|
||||
-# Always enable Realtek NICs for now.
|
||||
-CONFIG_NICREALTEK ?= yes
|
||||
-
|
||||
-# Disable National Semiconductor NICs until support is complete and tested.
|
||||
-CONFIG_NICNATSEMI ?= no
|
||||
-
|
||||
-# Always enable SPI on Intel NICs for now.
|
||||
-CONFIG_NICINTEL_SPI ?= yes
|
||||
-
|
||||
-# Always enable Bus Pirate SPI for now.
|
||||
-CONFIG_BUSPIRATE_SPI ?= yes
|
||||
-
|
||||
-# Disable Dediprog SF100 until support is complete and tested.
|
||||
-CONFIG_DEDIPROG ?= no
|
||||
-
|
||||
-# Disable wiki printing by default. It is only useful if you have wiki access.
|
||||
-CONFIG_PRINT_WIKI ?= no
|
||||
-
|
||||
-# Bitbanging SPI infrastructure, default off unless needed.
|
||||
-ifeq ($(CONFIG_RAYER_SPI), yes)
|
||||
-override CONFIG_BITBANG_SPI = yes
|
||||
-else
|
||||
-ifeq ($(CONFIG_INTERNAL), yes)
|
||||
-override CONFIG_BITBANG_SPI = yes
|
||||
-else
|
||||
-ifeq ($(CONFIG_NICINTEL_SPI), yes)
|
||||
-override CONFIG_BITBANG_SPI = yes
|
||||
-else
|
||||
-CONFIG_BITBANG_SPI ?= no
|
||||
-endif
|
||||
-endif
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_INTERNAL), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_INTERNAL=1'
|
||||
-PROGRAMMER_OBJS += processor_enable.o chipset_enable.o board_enable.o cbtable.o dmi.o internal.o
|
||||
-# FIXME: The PROGRAMMER_OBJS below should only be included on x86.
|
||||
-PROGRAMMER_OBJS += it87spi.o ichspi.o sb600spi.o wbsio_spi.o mcp6x_spi.o
|
||||
-NEED_PCI := yes
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_SERPROG), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_SERPROG=1'
|
||||
-PROGRAMMER_OBJS += serprog.o
|
||||
-NEED_SERIAL := yes
|
||||
-NEED_NET := yes
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_RAYER_SPI), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_RAYER_SPI=1'
|
||||
-PROGRAMMER_OBJS += rayer_spi.o
|
||||
-# Actually, NEED_PCI is wrong. NEED_IOPORT_ACCESS would be more correct.
|
||||
-NEED_PCI := yes
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_BITBANG_SPI), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_BITBANG_SPI=1'
|
||||
-PROGRAMMER_OBJS += bitbang_spi.o
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_NIC3COM), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_NIC3COM=1'
|
||||
-PROGRAMMER_OBJS += nic3com.o
|
||||
-NEED_PCI := yes
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_GFXNVIDIA), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_GFXNVIDIA=1'
|
||||
-PROGRAMMER_OBJS += gfxnvidia.o
|
||||
-NEED_PCI := yes
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_SATASII), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_SATASII=1'
|
||||
-PROGRAMMER_OBJS += satasii.o
|
||||
-NEED_PCI := yes
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_ATAHPT), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_ATAHPT=1'
|
||||
-PROGRAMMER_OBJS += atahpt.o
|
||||
-NEED_PCI := yes
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_FT2232_SPI), yes)
|
||||
-FTDILIBS := $(shell pkg-config --libs libftdi 2>/dev/null || printf "%s" "-lftdi -lusb")
|
||||
-# This is a totally ugly hack.
|
||||
-FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-D'CONFIG_FT2232_SPI=1'")
|
||||
-FEATURE_LIBS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "$(FTDILIBS)")
|
||||
-PROGRAMMER_OBJS += ft2232_spi.o
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_DUMMY), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_DUMMY=1'
|
||||
-PROGRAMMER_OBJS += dummyflasher.o
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_DRKAISER), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_DRKAISER=1'
|
||||
-PROGRAMMER_OBJS += drkaiser.o
|
||||
-NEED_PCI := yes
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_NICREALTEK), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_NICREALTEK=1'
|
||||
-PROGRAMMER_OBJS += nicrealtek.o
|
||||
-NEED_PCI := yes
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_NICNATSEMI), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_NICNATSEMI=1'
|
||||
-PROGRAMMER_OBJS += nicnatsemi.o
|
||||
-NEED_PCI := yes
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_NICINTEL_SPI), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_NICINTEL_SPI=1'
|
||||
-PROGRAMMER_OBJS += nicintel_spi.o
|
||||
-NEED_PCI := yes
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_BUSPIRATE_SPI), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_BUSPIRATE_SPI=1'
|
||||
-PROGRAMMER_OBJS += buspirate_spi.o
|
||||
-NEED_SERIAL := yes
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_DEDIPROG), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_DEDIPROG=1'
|
||||
-FEATURE_LIBS += -lusb
|
||||
-PROGRAMMER_OBJS += dediprog.o
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(NEED_SERIAL), yes)
|
||||
-LIB_OBJS += serial.o
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(NEED_NET), yes)
|
||||
-ifeq ($(OS_ARCH), SunOS)
|
||||
-LIBS += -lsocket
|
||||
-endif
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(NEED_PCI), yes)
|
||||
-CHECK_LIBPCI = yes
|
||||
-FEATURE_CFLAGS += -D'NEED_PCI=1'
|
||||
-PROGRAMMER_OBJS += pcidev.o physmap.o hwaccess.o
|
||||
-ifeq ($(OS_ARCH), NetBSD)
|
||||
-# The libpci we want is called libpciutils on NetBSD and needs NetBSD libpci.
|
||||
-LIBS += -lpciutils -lpci
|
||||
-# For (i386|x86_64)_iopl(2).
|
||||
-LIBS += -l$(shell uname -p)
|
||||
-else
|
||||
-ifeq ($(OS_ARCH), DOS)
|
||||
-# FIXME There needs to be a better way to do this
|
||||
-LIBS += ../libpci/lib/libpci.a
|
||||
-else
|
||||
-LIBS += -lpci
|
||||
-ifeq ($(OS_ARCH), OpenBSD)
|
||||
-# For (i386|amd64)_iopl(2).
|
||||
-LIBS += -l$(shell uname -m)
|
||||
-endif
|
||||
-endif
|
||||
-endif
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_PRINT_WIKI), yes)
|
||||
-FEATURE_CFLAGS += -D'CONFIG_PRINT_WIKI=1'
|
||||
-CLI_OBJS += print_wiki.o
|
||||
-endif
|
||||
-
|
||||
-FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "UTSNAME := yes" .features && printf "%s" "-D'HAVE_UTSNAME=1'")
|
||||
-
|
||||
-# We could use PULLED_IN_LIBS, but that would be ugly.
|
||||
-FEATURE_LIBS += $(shell LC_ALL=C grep -q "NEEDLIBZ := yes" .libdeps && printf "%s" "-lz")
|
||||
-
|
||||
-OBJS = $(CHIP_OBJS) $(CLI_OBJS) $(PROGRAMMER_OBJS) $(LIB_OBJS)
|
||||
-
|
||||
-$(PROGRAM)$(EXEC_SUFFIX): $(OBJS)
|
||||
- $(CC) $(LDFLAGS) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJS) $(FEATURE_LIBS) $(LIBS)
|
||||
-
|
||||
-# TAROPTIONS reduces information leakage from the packager's system.
|
||||
-# If other tar programs support command line arguments for setting uid/gid of
|
||||
-# stored files, they can be handled here as well.
|
||||
-TAROPTIONS = $(shell LC_ALL=C tar --version|grep -q GNU && echo "--owner=root --group=root")
|
||||
-
|
||||
-%.o: %.c .features
|
||||
- $(CC) -MMD $(CFLAGS) $(CPPFLAGS) $(FEATURE_CFLAGS) $(SVNDEF) -o $@ -c $<
|
||||
-
|
||||
-# Make sure to add all names of generated binaries here.
|
||||
-# This includes all frontends and libflashrom.
|
||||
-# We don't use EXEC_SUFFIX here because we want to clean everything.
|
||||
-clean:
|
||||
- rm -f $(PROGRAM) $(PROGRAM).exe *.o *.d
|
||||
-
|
||||
-distclean: clean
|
||||
- rm -f .features .libdeps
|
||||
-
|
||||
-strip: $(PROGRAM)$(EXEC_SUFFIX)
|
||||
- $(STRIP) $(STRIP_ARGS) $(PROGRAM)$(EXEC_SUFFIX)
|
||||
-
|
||||
-compiler: featuresavailable
|
||||
- @printf "Checking for a C compiler... "
|
||||
- @$(shell ( echo "int main(int argc, char **argv)"; \
|
||||
- echo "{ return 0; }"; ) > .test.c )
|
||||
- @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .test.c -o .test$(EXEC_SUFFIX) >/dev/null && \
|
||||
- echo "found." || ( echo "not found."; \
|
||||
- rm -f .test.c .test$(EXEC_SUFFIX); exit 1)
|
||||
- @rm -f .test.c .test$(EXEC_SUFFIX)
|
||||
-
|
||||
-ifeq ($(CHECK_LIBPCI), yes)
|
||||
-pciutils: compiler
|
||||
- @printf "Checking for libpci headers... "
|
||||
- @# Avoid a failing test due to libpci header symbol shadowing breakage
|
||||
- @$(shell ( echo "#define index shadow_workaround_index"; \
|
||||
- echo "#include <pci/pci.h>"; \
|
||||
- echo "struct pci_access *pacc;"; \
|
||||
- echo "int main(int argc, char **argv)"; \
|
||||
- echo "{ pacc = pci_alloc(); return 0; }"; ) > .test.c )
|
||||
- @$(CC) -c $(CPPFLAGS) $(CFLAGS) .test.c -o .test.o >/dev/null 2>&1 && \
|
||||
- echo "found." || ( echo "not found."; echo; \
|
||||
- echo "Please install libpci headers (package pciutils-devel)."; \
|
||||
- echo "See README for more information."; echo; \
|
||||
- rm -f .test.c .test.o; exit 1)
|
||||
- @printf "Checking if libpci is present and sufficient... "
|
||||
- @printf "" > .libdeps
|
||||
- @$(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) >/dev/null 2>&1 && \
|
||||
- echo "yes." || ( echo "no."; \
|
||||
- printf "Checking if libz+libpci are present and sufficient..."; \
|
||||
- $(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) -lz >/dev/null 2>&1 && \
|
||||
- ( echo "yes."; echo "NEEDLIBZ := yes" > .libdeps ) || ( echo "no."; echo; \
|
||||
- echo "Please install libpci (package pciutils) and/or libz."; \
|
||||
- echo "See README for more information."; echo; \
|
||||
- rm -f .test.c .test.o .test$(EXEC_SUFFIX); exit 1) )
|
||||
- @rm -f .test.c .test.o .test$(EXEC_SUFFIX)
|
||||
-else
|
||||
-pciutils: compiler
|
||||
- @printf "" > .libdeps
|
||||
-endif
|
||||
-
|
||||
-.features: features
|
||||
-
|
||||
-# If a user does not explicitly request a non-working feature, we should
|
||||
-# silently disable it. However, if a non-working (does not compile) feature
|
||||
-# is explicitly requested, we should bail out with a descriptive error message.
|
||||
-ifeq ($(UNSUPPORTED_FEATURES), )
|
||||
-featuresavailable:
|
||||
-else
|
||||
-featuresavailable:
|
||||
- @echo "The following features are unavailable on your machine: $(UNSUPPORTED_FEATURES)"
|
||||
- @false
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(CONFIG_FT2232_SPI), yes)
|
||||
-features: compiler
|
||||
- @echo "FEATURES := yes" > .features.tmp
|
||||
- @printf "Checking for FTDI support... "
|
||||
- @$(shell ( echo "#include <ftdi.h>"; \
|
||||
- echo "struct ftdi_context *ftdic = NULL;"; \
|
||||
- echo "int main(int argc, char **argv)"; \
|
||||
- echo "{ return ftdi_init(ftdic); }"; ) > .featuretest.c )
|
||||
- @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS) >/dev/null 2>&1 && \
|
||||
- ( echo "found."; echo "FTDISUPPORT := yes" >> .features.tmp ) || \
|
||||
- ( echo "not found."; echo "FTDISUPPORT := no" >> .features.tmp )
|
||||
- @printf "Checking for utsname support... "
|
||||
- @$(shell ( echo "#include <sys/utsname.h>"; \
|
||||
- echo "struct utsname osinfo;"; \
|
||||
- echo "int main(int argc, char **argv)"; \
|
||||
- echo "{ uname (&osinfo); return 0; }"; ) > .featuretest.c )
|
||||
- @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) >/dev/null 2>&1 && \
|
||||
- ( echo "found."; echo "UTSNAME := yes" >> .features.tmp ) || \
|
||||
- ( echo "not found."; echo "UTSNAME := no" >> .features.tmp )
|
||||
- @$(DIFF) -q .features.tmp .features >/dev/null 2>&1 && rm .features.tmp || mv .features.tmp .features
|
||||
- @rm -f .featuretest.c .featuretest$(EXEC_SUFFIX)
|
||||
-else
|
||||
-features: compiler
|
||||
- @echo "FEATURES := yes" > .features.tmp
|
||||
- @printf "Checking for utsname support... "
|
||||
- @$(shell ( echo "#include <sys/utsname.h>"; \
|
||||
- echo "struct utsname osinfo;"; \
|
||||
- echo "int main(int argc, char **argv)"; \
|
||||
- echo "{ uname (&osinfo); return 0; }"; ) > .featuretest.c )
|
||||
- @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) >/dev/null 2>&1 && \
|
||||
- ( echo "found."; echo "UTSNAME := yes" >> .features.tmp ) || \
|
||||
- ( echo "not found."; echo "UTSNAME := no" >> .features.tmp )
|
||||
- @$(DIFF) -q .features.tmp .features >/dev/null 2>&1 && rm .features.tmp || mv .features.tmp .features
|
||||
- @rm -f .featuretest.c .featuretest$(EXEC_SUFFIX)
|
||||
-endif
|
||||
-
|
||||
-install: $(PROGRAM)$(EXEC_SUFFIX)
|
||||
- mkdir -p $(DESTDIR)$(PREFIX)/sbin
|
||||
- mkdir -p $(DESTDIR)$(MANDIR)/man8
|
||||
- $(INSTALL) -m 0755 $(PROGRAM)$(EXEC_SUFFIX) $(DESTDIR)$(PREFIX)/sbin
|
||||
- $(INSTALL) -m 0644 $(PROGRAM).8 $(DESTDIR)$(MANDIR)/man8
|
||||
-
|
||||
-export:
|
||||
- @rm -rf $(EXPORTDIR)/flashrom-$(RELEASENAME)
|
||||
- @svn export -r BASE . $(EXPORTDIR)/flashrom-$(RELEASENAME)
|
||||
- @sed "s/^SVNVERSION.*/SVNVERSION := $(SVNVERSION)/" Makefile >$(EXPORTDIR)/flashrom-$(RELEASENAME)/Makefile
|
||||
- @LC_ALL=C svn log >$(EXPORTDIR)/flashrom-$(RELEASENAME)/ChangeLog
|
||||
- @echo Exported $(EXPORTDIR)/flashrom-$(RELEASENAME)/
|
||||
-
|
||||
-tarball: export
|
||||
- @tar cjf $(EXPORTDIR)/flashrom-$(RELEASENAME).tar.bz2 -C $(EXPORTDIR)/ $(TAROPTIONS) flashrom-$(RELEASENAME)/
|
||||
- @rm -rf $(EXPORTDIR)/flashrom-$(RELEASENAME)
|
||||
- @echo Created $(EXPORTDIR)/flashrom-$(RELEASENAME).tar.bz2
|
||||
-
|
||||
-djgpp-dos: clean
|
||||
- make CC=i586-pc-msdosdjgpp-gcc STRIP=i586-pc-msdosdjgpp-strip WARNERROR=no OS_ARCH=DOS
|
||||
-
|
||||
-.PHONY: all clean distclean compiler pciutils features export tarball dos featuresavailable
|
||||
-
|
||||
--include $(OBJS:.o=.d)
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
new file mode 100644
|
||||
index 0000000..671287c
|
||||
index 0000000..6790ac5
|
||||
--- /dev/null
|
||||
+++ b/Makefile.am
|
||||
@@ -0,0 +1,166 @@
|
||||
@@ -0,0 +1,172 @@
|
||||
+sbin_PROGRAMS = flashrom
|
||||
+
|
||||
+man_MANS = flashrom.8
|
||||
@ -517,6 +57,11 @@ index 0000000..671287c
|
||||
+DEFS += -DCONFIG_GFXNVIDIA=1
|
||||
+endif
|
||||
+
|
||||
+if HAVE_GFXOGP
|
||||
+gfxogp_SOURCES = ogp_spi.c
|
||||
+DEFS += -DCONFIG_OGP_SPI=1
|
||||
+endif
|
||||
+
|
||||
+if HAVE_SATASII
|
||||
+satasii_SOURCES = satasii.c
|
||||
+DEFS += -DCONFIG_SATASII=1
|
||||
@ -592,6 +137,7 @@ index 0000000..671287c
|
||||
+ jedec.c \
|
||||
+ m29f400bt.c \
|
||||
+ pm49fl00x.c \
|
||||
+ sharplhf00l04.c \
|
||||
+ spi.c \
|
||||
+ spi25.c \
|
||||
+ sst_fwhub.c \
|
||||
@ -599,8 +145,7 @@ index 0000000..671287c
|
||||
+ sst49lfxxxc.c \
|
||||
+ stm50flw0x0x.c \
|
||||
+ w29ee011.c \
|
||||
+ w39v040c.c \
|
||||
+ w39v080fa.c
|
||||
+ w39.c
|
||||
+
|
||||
+cli_SOURCES = \
|
||||
+ flashrom.c \
|
||||
@ -635,6 +180,7 @@ index 0000000..671287c
|
||||
+ $(dummy_SOURCES) \
|
||||
+ $(ft_2232_spi_SOURCES) \
|
||||
+ $(gfxnvidia_SOURCES) \
|
||||
+ $(gfxogp_SOURCES) \
|
||||
+ $(drkaiser_SOURCES) \
|
||||
+ $(nicrealtek_SOURCES) \
|
||||
+ $(nicnatsemi_SOURCES) \
|
||||
@ -645,11 +191,13 @@ index 0000000..671287c
|
||||
+ $(serial_SOURCES)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
new file mode 100644
|
||||
index 0000000..a77cb26
|
||||
index 0000000..27fa0f9
|
||||
--- /dev/null
|
||||
+++ b/configure.ac
|
||||
@@ -0,0 +1,204 @@
|
||||
+AC_INIT([flashrom], [0.9.3-r1205], [flashrom@flashrom.org], [flashrom], [http://www.flashrom.org/])
|
||||
@@ -0,0 +1,227 @@
|
||||
+AC_INIT([flashrom], [0.9.3-r1250], [flashrom@flashrom.org], [flashrom], [http://www.flashrom.org/])
|
||||
+
|
||||
+AC_PREREQ(2.59)
|
||||
+
|
||||
+AC_CANONICAL_TARGET
|
||||
+
|
||||
@ -657,63 +205,73 @@ index 0000000..a77cb26
|
||||
+AC_CONFIG_HEADERS([config.h])
|
||||
+AM_INIT_AUTOMAKE([foreign])
|
||||
+
|
||||
+AC_ARG_WITH([dummy],
|
||||
+ AC_HELP_STRING([--with-dummy],[dummy flashing support.]),
|
||||
+ [dummy="$withval"],[dummy="yes"])
|
||||
+
|
||||
+# Internal (mainboard) flashing
|
||||
+AC_ARG_WITH([internal],
|
||||
+ AC_HELP_STRING([--with-internal],[mainboard's internal flashing support.]),
|
||||
+ [internal="$withval"],[internal="yes"])
|
||||
+
|
||||
+# SATA and ATA PCI adapters
|
||||
+AC_ARG_WITH([satasii],
|
||||
+ AC_HELP_STRING([--with-satasii],[SiI SATA controllers support.]),
|
||||
+ [satasii="$withval"],[satasii="no"])
|
||||
+AC_ARG_WITH([atahpt],
|
||||
+ AC_HELP_STRING([--with-atahpt],[Highpoint (HPT) ATA/RAID controller support. IMPORTANT: This code is not yet working!]),
|
||||
+ [atahpt="$withval"],[atahpt="no"])
|
||||
+
|
||||
+# Network interface cards
|
||||
+AC_ARG_WITH([nic3com],
|
||||
+ AC_HELP_STRING([--with-nic3com],[3Com NICs support.]),
|
||||
+ [nic3com="$withval"],[nic3com="yes"])
|
||||
+AC_ARG_WITH([nicintel_spi],
|
||||
+ AC_HELP_STRING([--with-nicintel-spi],[SPI on Intel NICs support.]),
|
||||
+ [nicintel_spi="$withval"],[nicintel_spi="yes"])
|
||||
+AC_ARG_WITH([nicnatsemi],
|
||||
+ AC_HELP_STRING([--with-nicnatsemi],[National Semiconductor NICs support. Incomplete and untested.]),
|
||||
+ [nicnatsemi="$withval"],[nicnatsemi="no"])
|
||||
+AC_ARG_WITH([nicrealtek],
|
||||
+ AC_HELP_STRING([--with-nicrealtek],[Realtek NICs support.]),
|
||||
+ [nicrealtek="$withval"],[nicrealtek="yes"])
|
||||
+
|
||||
+# Graphics cards
|
||||
+AC_ARG_WITH([gfxnvidia],
|
||||
+ AC_HELP_STRING([--with-gfxnvidia],[NVIDIA graphics cards support. Note: write and erase do not work properly.]),
|
||||
+ [gfxnvidia="$withval"],[gfxnvidia="yes"])
|
||||
+
|
||||
+# External flashers
|
||||
+AC_ARG_WITH([buspirate_spi],
|
||||
+ AC_HELP_STRING([--with-buspirate-spi],[Bus Pirate SPI support.]),
|
||||
+ [buspirate_spi="$withval"],[buspirate_spi="yes"])
|
||||
+AC_ARG_WITH([dediprog],
|
||||
+ AC_HELP_STRING([--with-dediprog],[Dediprog SF100 support. Incomplete and untested.]),
|
||||
+ [dediprog="$withval"],[dediprog="no"])
|
||||
+AC_ARG_WITH([drkaiser],
|
||||
+ AC_HELP_STRING([--with-drkaiser],[Dr. Kaiser support.]),
|
||||
+ [drkaiser="$withval"],[drkaiser="yes"])
|
||||
+AC_ARG_WITH([ft2232_spi],
|
||||
+ AC_HELP_STRING([--with-ft2232-spi],[FT2232 SPI dongles support.]),
|
||||
+ [ft2232_spi="$withval"],[ft2232_spi="yes"])
|
||||
+AC_ARG_WITH([rayer_spi],
|
||||
+ AC_HELP_STRING([--with-rayer-spi],[RayeR SPIPGM hardware support.]),
|
||||
+ [rayer_spi="$withval"],[rayer_spi="yes"])
|
||||
+# Needs to be disabled on Windows.
|
||||
+AC_ARG_WITH([serprog],
|
||||
+ AC_HELP_STRING([--with-serprog],[serprog support.]),
|
||||
+ [serprog="$withval"],[serprog="yes"])
|
||||
+
|
||||
+AC_ARG_WITH([rayer_spi],
|
||||
+ AC_HELP_STRING([--with-rayer-spi],[RayeR SPIPGM hardware support.]),
|
||||
+ [rayer_spi="$withval"],[rayer_spi="yes"])
|
||||
+
|
||||
+AC_ARG_WITH([nic3com],
|
||||
+ AC_HELP_STRING([--with-nic3com],[3Com NICs support.]),
|
||||
+ [nic3com="$withval"],[nic3com="yes"])
|
||||
+
|
||||
+AC_ARG_WITH([gfxnvidia],
|
||||
+ AC_HELP_STRING([--with-gfxnvidia],[NVIDIA graphics cards support. Note: write and erase do not work properly.]),
|
||||
+ [gfxnvidia="$withval"],[gfxnvidia="yes"])
|
||||
+
|
||||
+AC_ARG_WITH([satasii],
|
||||
+ AC_HELP_STRING([--with-satasii],[SiI SATA controllers support.]),
|
||||
+ [satasii="$withval"],[satasii="no"])
|
||||
+
|
||||
+AC_ARG_WITH([atahpt],
|
||||
+ AC_HELP_STRING([--with-atahpt],[Highpoint (HPT) ATA/RAID controller support. IMPORTANT: This code is not yet working!]),
|
||||
+ [atahpt="$withval"],[atahpt="no"])
|
||||
+
|
||||
+AC_ARG_WITH([ft2232_spi],
|
||||
+ AC_HELP_STRING([--with-ft2232-spi],[FT2232 SPI dongles support.]),
|
||||
+ [ft2232_spi="$withval"],[ft2232_spi="yes"])
|
||||
+
|
||||
+AC_ARG_WITH([dummy],
|
||||
+ AC_HELP_STRING([--with-dummy],[dummy flashing support.]),
|
||||
+ [dummy="$withval"],[dummy="yes"])
|
||||
+
|
||||
+AC_ARG_WITH([drkaiser],
|
||||
+ AC_HELP_STRING([--with-drkaiser],[Dr. Kaiser support.]),
|
||||
+ [drkaiser="$withval"],[drkaiser="yes"])
|
||||
+
|
||||
+AC_ARG_WITH([nicrealtek],
|
||||
+ AC_HELP_STRING([--with-nicrealtek],[Realtek NICs support.]),
|
||||
+ [nicrealtek="$withval"],[nicrealtek="yes"])
|
||||
+
|
||||
+AC_ARG_WITH([nicnatsemi],
|
||||
+ AC_HELP_STRING([--with-nicnatsemi],[National Semiconductor NICs support. Incomplete and untested.]),
|
||||
+ [nicnatsemi="$withval"],[nicnatsemi="no"])
|
||||
+
|
||||
+AC_ARG_WITH([nicintel_spi],
|
||||
+ AC_HELP_STRING([--with-nicintel-spi],[SPI on Intel NICs support.]),
|
||||
+ [nicintel_spi="$withval"],[nicintel_spi="yes"])
|
||||
+
|
||||
+AC_ARG_WITH([gfxogp],
|
||||
+ AC_HELP_STRING([--with-gfxogp],[The Open Graphics Project graphics card support.]),
|
||||
+ [gfxogp="$withval"],[gfxogp="yes"])
|
||||
+
|
||||
+
|
||||
+AC_ARG_WITH([buspirate_spi],
|
||||
+ AC_HELP_STRING([--with-buspirate-spi],[Bus Pirate SPI support.]),
|
||||
+ [buspirate_spi="$withval"],[buspirate_spi="yes"])
|
||||
+
|
||||
+AC_ARG_WITH([dediprog],
|
||||
+ AC_HELP_STRING([--with-dediprog],[Dediprog SF100 support. Incomplete and untested.]),
|
||||
+ [dediprog="$withval"],[dediprog="no"])
|
||||
+
|
||||
+# Specific for Flashrom Wiki
|
||||
+AC_ARG_WITH([print_wiki],
|
||||
+ AC_HELP_STRING([--with-print-wiki],[enable wiki export support. It is only useful if you have Flashrom wiki access.]),
|
||||
@ -753,7 +311,7 @@ index 0000000..a77cb26
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
+# Enable OS-specific fompilation flags
|
||||
+# Enable OS-specific compilation flags
|
||||
+# TODO
|
||||
+
|
||||
+# Check whether we need seial support
|
||||
@ -768,6 +326,7 @@ index 0000000..a77cb26
|
||||
+ "$bitbang_spi" = 'yes' -o \
|
||||
+ "$nic3com" = 'yes' -o \
|
||||
+ "$gfxnvidia" = 'yes' -o \
|
||||
+ "$gfxogp" = 'yes' -o \
|
||||
+ "satasii" = 'yes' -o \
|
||||
+ "$atahpt" = 'yes' -o \
|
||||
+ "$drkaiser" = 'yes' -o \
|
||||
@ -779,6 +338,7 @@ index 0000000..a77cb26
|
||||
+
|
||||
+if test "$internal" = 'yes' -o \
|
||||
+ "$rayer_spi" = 'yes' -o \
|
||||
+ "$gfxogp" = 'yes' -o \
|
||||
+ "$nicintel_spi" = 'yes' ; then
|
||||
+ bitbang_spi="yes"
|
||||
+fi
|
||||
@ -797,11 +357,19 @@ index 0000000..a77cb26
|
||||
+AC_C_INLINE
|
||||
+AC_TYPE_OFF_T
|
||||
+AC_TYPE_SIZE_T
|
||||
+AC_TYPE_SSIZE_T
|
||||
+AC_TYPE_UINT16_T
|
||||
+AC_TYPE_UINT32_T
|
||||
+AC_TYPE_UINT64_T
|
||||
+AC_TYPE_UINT8_T
|
||||
+AC_CHECK_SIZEOF(int)
|
||||
+dnl mingw (for instance) lacks ssize_t
|
||||
+AC_CHECK_TYPE(ssize_t, int)
|
||||
+AC_CHECK_TYPE(uint8_t, unsigned char)
|
||||
+AC_CHECK_TYPE(uint16_t, unsigned short)
|
||||
+AC_CHECK_TYPE(uint64_t, unsigned long long)
|
||||
+if test $ac_cv_sizeof_int -eq 4 ; then
|
||||
+AC_CHECK_TYPE(uint32_t, unsigned int)
|
||||
+elif test $ac_cv_size_long -eq 4 ; then
|
||||
+AC_CHECK_TYPE(uint32_t, unsigned long)
|
||||
+else
|
||||
+AC_MSG_ERROR([no 32-bit type found])
|
||||
+fi
|
||||
+
|
||||
+# Checks for library functions.
|
||||
+AC_FUNC_MALLOC
|
||||
@ -841,6 +409,7 @@ index 0000000..a77cb26
|
||||
+AM_CONDITIONAL(HAVE_NICNATSEMI, test "$nicnatsemi" = "yes")
|
||||
+AM_CONDITIONAL(HAVE_NICREALTEK, test "$nicrealtek" = "yes")
|
||||
+AM_CONDITIONAL(HAVE_GFXNVIDIA, test "$gfxnvidia" = "yes")
|
||||
+AM_CONDITIONAL(HAVE_GFXOGP, test "$gfxogp" = "yes")
|
||||
+AM_CONDITIONAL(HAVE_SERPROG, test "$serprog" = "yes")
|
||||
+AM_CONDITIONAL(HAVE_BUSPIRATE_SPI, test "$buspirate_spi" = "yes")
|
||||
+AM_CONDITIONAL(HAVE_SERIAL, test "$serial" = "yes")
|
||||
@ -854,5 +423,5 @@ index 0000000..a77cb26
|
||||
+AC_CONFIG_FILES([Makefile])
|
||||
+AC_OUTPUT
|
||||
--
|
||||
1.7.3.1
|
||||
1.7.3.4
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 4c2775e9957db3722c07c9c7b710867d868cfc2f Mon Sep 17 00:00:00 2001
|
||||
From a9c3a3d0fb1a35f99562e7cf5e13332510ff8c33 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Sat, 12 Jun 2010 22:13:53 +0400
|
||||
Subject: [PATCH 02/12] Use dmidecode path defined at configure stage
|
||||
Subject: [PATCH 02/13] Use dmidecode path defined at configure stage
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
@ -22,5 +22,5 @@ index cda6656..2853c93 100644
|
||||
static char *dmistrings[ARRAY_SIZE(dmidecode_names)];
|
||||
|
||||
--
|
||||
1.7.3.1
|
||||
1.7.3.4
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From b5d6b6405a831a0b8694629fefa228b7f1f2eb84 Mon Sep 17 00:00:00 2001
|
||||
From 969d01d210afc2fc7a69c85c9f23ae3061201552 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Fri, 17 Sep 2010 22:32:07 +0400
|
||||
Subject: [PATCH 03/12] Use flashrom's version from config.h
|
||||
Subject: [PATCH 03/13] Use flashrom's version from config.h
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
@ -11,10 +11,10 @@ Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
3 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/flash.h b/flash.h
|
||||
index 9566af9..33a7890 100644
|
||||
index 250482f..630f7c6 100644
|
||||
--- a/flash.h
|
||||
+++ b/flash.h
|
||||
@@ -187,7 +187,6 @@ enum write_granularity {
|
||||
@@ -188,7 +188,6 @@ enum write_granularity {
|
||||
};
|
||||
extern enum chipbustype buses_supported;
|
||||
extern int verbose;
|
||||
@ -23,12 +23,12 @@ index 9566af9..33a7890 100644
|
||||
void map_flash_registers(struct flashchip *flash);
|
||||
int read_memmapped(struct flashchip *flash, uint8_t *buf, int start, int len);
|
||||
diff --git a/flashrom.c b/flashrom.c
|
||||
index e5e334c..dd6d6df 100644
|
||||
index f3497d0..49e1a52 100644
|
||||
--- a/flashrom.c
|
||||
+++ b/flashrom.c
|
||||
@@ -30,6 +30,9 @@
|
||||
#include <string.h>
|
||||
@@ -31,6 +31,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <getopt.h>
|
||||
+
|
||||
+#include "config.h"
|
||||
@ -36,7 +36,7 @@ index e5e334c..dd6d6df 100644
|
||||
#if HAVE_UTSNAME == 1
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
@@ -37,7 +40,6 @@
|
||||
@@ -38,7 +41,6 @@
|
||||
#include "flashchips.h"
|
||||
#include "programmer.h"
|
||||
|
||||
@ -44,7 +44,7 @@ index e5e334c..dd6d6df 100644
|
||||
char *chip_to_probe = NULL;
|
||||
int verbose = 0;
|
||||
|
||||
@@ -1420,7 +1422,7 @@ void print_sysinfo(void)
|
||||
@@ -1662,7 +1664,7 @@ void print_sysinfo(void)
|
||||
|
||||
void print_version(void)
|
||||
{
|
||||
@ -54,7 +54,7 @@ index e5e334c..dd6d6df 100644
|
||||
}
|
||||
|
||||
diff --git a/print_wiki.c b/print_wiki.c
|
||||
index 1b46dd0..4363eba 100644
|
||||
index 48e0122..eb044a4 100644
|
||||
--- a/print_wiki.c
|
||||
+++ b/print_wiki.c
|
||||
@@ -26,6 +26,7 @@
|
||||
@ -75,5 +75,5 @@ index 1b46dd0..4363eba 100644
|
||||
#if CONFIG_INTERNAL == 1
|
||||
print_supported_chipsets_wiki(3);
|
||||
--
|
||||
1.7.3.1
|
||||
1.7.3.4
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 39bd06642030c29b202ae52162de0f437cfffedc Mon Sep 17 00:00:00 2001
|
||||
From 6a58ab71cb5f216b7db64cf9be308e967edf3824 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Fri, 17 Sep 2010 22:33:12 +0400
|
||||
Subject: [PATCH 04/12] Use HAVE_LIBPCI from config.h instead of NEED_PCI
|
||||
Subject: [PATCH 04/13] Use HAVE_LIBPCI from config.h instead of NEED_PCI
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
@ -12,10 +12,10 @@ Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
4 files changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/flashrom.c b/flashrom.c
|
||||
index dd6d6df..df4cc67 100644
|
||||
index 49e1a52..f05e36c 100644
|
||||
--- a/flashrom.c
|
||||
+++ b/flashrom.c
|
||||
@@ -1388,7 +1388,7 @@ void print_sysinfo(void)
|
||||
@@ -1630,7 +1630,7 @@ void print_sysinfo(void)
|
||||
msg_ginfo(" on unknown machine");
|
||||
#endif
|
||||
msg_ginfo(", built with");
|
||||
@ -70,7 +70,7 @@ index c96db99..8bc49b9 100644
|
||||
{
|
||||
struct pci_dev *temp;
|
||||
diff --git a/programmer.h b/programmer.h
|
||||
index 6407695..dfd99b4 100644
|
||||
index 7bd1405..f0fef1c 100644
|
||||
--- a/programmer.h
|
||||
+++ b/programmer.h
|
||||
@@ -24,6 +24,8 @@
|
||||
@ -82,7 +82,7 @@ index 6407695..dfd99b4 100644
|
||||
enum programmer {
|
||||
#if CONFIG_INTERNAL == 1
|
||||
PROGRAMMER_INTERNAL,
|
||||
@@ -198,7 +200,7 @@ void myusec_delay(int usecs);
|
||||
@@ -204,7 +206,7 @@ void myusec_delay(int usecs);
|
||||
void myusec_calibrate_delay(void);
|
||||
void internal_delay(int usecs);
|
||||
|
||||
@ -91,7 +91,7 @@ index 6407695..dfd99b4 100644
|
||||
/* pcidev.c */
|
||||
extern uint32_t io_base_addr;
|
||||
extern struct pci_access *pacc;
|
||||
@@ -253,7 +255,7 @@ void dmi_init(void);
|
||||
@@ -265,7 +267,7 @@ void dmi_init(void);
|
||||
int dmi_match(const char *pattern);
|
||||
|
||||
/* internal.c */
|
||||
@ -101,5 +101,5 @@ index 6407695..dfd99b4 100644
|
||||
uint16_t vendor;
|
||||
uint16_t port;
|
||||
--
|
||||
1.7.3.1
|
||||
1.7.3.4
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From a03c6656f46d44d48229571bde54f6c2e1192380 Mon Sep 17 00:00:00 2001
|
||||
From c0e8393c2149fb44b45ccb0e58af618c4d2b8301 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Sat, 18 Sep 2010 09:05:43 +0400
|
||||
Subject: [PATCH 05/12] Use macros from config.h instead of HAVE_UTSNAME
|
||||
Subject: [PATCH 05/13] Use macros from config.h instead of HAVE_UTSNAME
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
@ -9,10 +9,10 @@ Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/flashrom.c b/flashrom.c
|
||||
index df4cc67..b9285a3 100644
|
||||
index f05e36c..fdb14fc 100644
|
||||
--- a/flashrom.c
|
||||
+++ b/flashrom.c
|
||||
@@ -33,7 +33,7 @@
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
@ -21,7 +21,7 @@ index df4cc67..b9285a3 100644
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
#include "flash.h"
|
||||
@@ -1378,7 +1378,7 @@ void list_programmers_linebreak(int startcol, int cols, int paren)
|
||||
@@ -1620,7 +1620,7 @@ void list_programmers_linebreak(int startcol, int cols, int paren)
|
||||
|
||||
void print_sysinfo(void)
|
||||
{
|
||||
@ -31,5 +31,5 @@ index df4cc67..b9285a3 100644
|
||||
uname(&osinfo);
|
||||
|
||||
--
|
||||
1.7.3.1
|
||||
1.7.3.4
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From eaa749e886343597ddf01353f19c260e42d66270 Mon Sep 17 00:00:00 2001
|
||||
From f4498e0b2c8f68d4ce4189d41da77c2dd7a14e9d Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Sat, 18 Sep 2010 09:40:01 +0400
|
||||
Subject: [PATCH 06/12] Kill some x86-related ifdefs in code - this is now controlled via autotools
|
||||
Subject: [PATCH 06/13] Kill some x86-related ifdefs in code - this is now controlled via autotools
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
9 files changed, 0 insertions(+), 43 deletions(-)
|
||||
|
||||
diff --git a/ichspi.c b/ichspi.c
|
||||
index c26366e..5438efe 100644
|
||||
index a087a0b..ea77361 100644
|
||||
--- a/ichspi.c
|
||||
+++ b/ichspi.c
|
||||
@@ -34,8 +34,6 @@
|
||||
@ -29,14 +29,14 @@ index c26366e..5438efe 100644
|
||||
#include <string.h>
|
||||
#include "flash.h"
|
||||
#include "chipdrivers.h"
|
||||
@@ -1131,5 +1129,3 @@ int via_init_spi(struct pci_dev *dev)
|
||||
@@ -1173,5 +1171,3 @@ int via_init_spi(struct pci_dev *dev)
|
||||
|
||||
return 0;
|
||||
}
|
||||
-
|
||||
-#endif
|
||||
diff --git a/it87spi.c b/it87spi.c
|
||||
index 9ecc414..1750cf8 100644
|
||||
index fb1448a..c0f73e3 100644
|
||||
--- a/it87spi.c
|
||||
+++ b/it87spi.c
|
||||
@@ -23,8 +23,6 @@
|
||||
@ -48,7 +48,7 @@ index 9ecc414..1750cf8 100644
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "flash.h"
|
||||
@@ -371,5 +369,3 @@ int it8716f_spi_chip_write_256(struct flashchip *flash, uint8_t *buf, int start,
|
||||
@@ -374,5 +372,3 @@ int it8716f_spi_chip_write_256(struct flashchip *flash, uint8_t *buf, int start,
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -195,5 +195,5 @@ index acf9cb2..1a583a8 100644
|
||||
-
|
||||
-#endif
|
||||
--
|
||||
1.7.3.1
|
||||
1.7.3.4
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From c3103091f40eaedd03a1f1bcb3503311a6072927 Mon Sep 17 00:00:00 2001
|
||||
From 610af38a4cc47c5ba95f7ff324beb7cf1253824f Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Tue, 21 Sep 2010 17:51:08 +0400
|
||||
Subject: [PATCH 07/12] Simplify hwaccess.c
|
||||
Subject: [PATCH 07/13] Simplify hwaccess.c
|
||||
|
||||
This file is saturated with superfluous ifdefs arranged into
|
||||
several nested levels. This in turn adds additional complexity
|
||||
@ -142,5 +142,5 @@ index bbb91a6..e700b67 100644
|
||||
void mmio_writeb(uint8_t val, void *addr)
|
||||
{
|
||||
--
|
||||
1.7.3.1
|
||||
1.7.3.4
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From f0185abacc6a326a0778f480d1fde1cc4380c442 Mon Sep 17 00:00:00 2001
|
||||
From 9b762628575706bf7bf6a8858dc1582ec42b92e5 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Sun, 26 Sep 2010 18:25:31 +0400
|
||||
Subject: [PATCH 08/12] Use endiannes determined at the configure stage
|
||||
Subject: [PATCH 08/13] Use endiannes determined at the configure stage
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
@ -87,5 +87,5 @@ index 920b82c..4655003 100644
|
||||
#define be_to_cpu8 cpu_to_be8
|
||||
#define be_to_cpu16 cpu_to_be16
|
||||
--
|
||||
1.7.3.1
|
||||
1.7.3.4
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From aa1ca481e2f28fd442c129884fdb08d169efdd41 Mon Sep 17 00:00:00 2001
|
||||
From 876786ac15f0635b3f4128cba035e675517267bb Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Sun, 26 Sep 2010 20:14:18 +0400
|
||||
Subject: [PATCH 09/12] Kill unused __FLASHROM_HAVE_OUTB__ define
|
||||
Subject: [PATCH 09/13] Kill unused __FLASHROM_HAVE_OUTB__ define
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
@ -22,5 +22,5 @@ index 4655003..111f7d9 100644
|
||||
#if defined (__sun) && (defined(__i386) || defined(__amd64))
|
||||
#include <strings.h>
|
||||
--
|
||||
1.7.3.1
|
||||
1.7.3.4
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 0ed4f34440b0da7957b4f301da35ba2c8354405a Mon Sep 17 00:00:00 2001
|
||||
From a1968cc96e0aa0b58d3582109749a98e83c63b70 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Sun, 26 Sep 2010 21:05:50 +0400
|
||||
Subject: [PATCH 10/12] Use HAVE_*_H macro for detecting includes
|
||||
Subject: [PATCH 10/13] Use HAVE_*_H macro for detecting includes
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
@ -119,5 +119,5 @@ index 111f7d9..3326383 100644
|
||||
#if defined(__i386__)
|
||||
#define iopl i386_iopl
|
||||
--
|
||||
1.7.3.1
|
||||
1.7.3.4
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 074d25561454e4f6f23c3c0b2c27bb0454a25f90 Mon Sep 17 00:00:00 2001
|
||||
From 56f8ec888c9e3fcd6d08b86b22572ed9277f9ee5 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Sun, 17 Oct 2010 12:52:02 +0400
|
||||
Subject: [PATCH 11/12] Add more comments (cosmetic change)
|
||||
Subject: [PATCH 11/13] Add more comments (cosmetic change)
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
@ -45,5 +45,5 @@ index 3326383..9fb078f 100644
|
||||
#include <arch/io.h>
|
||||
#include <arch/msr.h>
|
||||
--
|
||||
1.7.3.1
|
||||
1.7.3.4
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 25d6e8fc99c76e37af16ec068e35b4c053b2fc3c Mon Sep 17 00:00:00 2001
|
||||
From 5dbbcb034eb2c903ac29b5d5e43919c8e75b45be Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Sun, 17 Oct 2010 12:53:18 +0400
|
||||
Subject: [PATCH 12/12] Move arch-checking #ifdef block into header
|
||||
Subject: [PATCH 12/13] Move arch-checking #ifdef block into header
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
@ -74,5 +74,5 @@ index 9fb078f..b166429 100644
|
||||
#endif
|
||||
|
||||
--
|
||||
1.7.3.1
|
||||
1.7.3.4
|
||||
|
||||
|
61
flashrom-0013-rtl8169-support.patch
Normal file
61
flashrom-0013-rtl8169-support.patch
Normal file
@ -0,0 +1,61 @@
|
||||
From ae1f7fc89fe25fa663069f697a436aba85df3c06 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Lichack <shadowpilot34@gmail.com>
|
||||
Date: Tue, 4 Jan 2011 11:20:33 +0300
|
||||
Subject: [PATCH 13/13] rtl8169 support
|
||||
|
||||
Here's a small patch that would add rtl8169 support to flashrom, but I
|
||||
need someone to test it for me.
|
||||
|
||||
Signed-off-by: Sergey Lichack <shadowpilot34@gmail.com>
|
||||
---
|
||||
nicrealtek.c | 17 +++++++++++++++--
|
||||
1 files changed, 15 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/nicrealtek.c b/nicrealtek.c
|
||||
index b5bcbaf..b43e330 100644
|
||||
--- a/nicrealtek.c
|
||||
+++ b/nicrealtek.c
|
||||
@@ -25,11 +25,12 @@
|
||||
#define PCI_VENDOR_ID_REALTEK 0x10ec
|
||||
#define PCI_VENDOR_ID_SMC1211 0x1113
|
||||
|
||||
-#define BIOS_ROM_ADDR 0xD4
|
||||
-#define BIOS_ROM_DATA 0xD7
|
||||
+int BIOS_ROM_ADDR, BIOS_ROM_DATA;
|
||||
+
|
||||
|
||||
const struct pcidev_status nics_realtek[] = {
|
||||
{0x10ec, 0x8139, OK, "Realtek", "RTL8139/8139C/8139C+"},
|
||||
+ {0x10ec, 0x8169, OK, "Realtek", "RTL8169"},
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -38,6 +39,8 @@ const struct pcidev_status nics_realteksmc1211[] = {
|
||||
{},
|
||||
};
|
||||
|
||||
+static uint16_t id;
|
||||
+
|
||||
int nicrealtek_init(void)
|
||||
{
|
||||
get_io_perms();
|
||||
@@ -47,6 +50,16 @@ int nicrealtek_init(void)
|
||||
|
||||
buses_supported = CHIP_BUSTYPE_PARALLEL;
|
||||
|
||||
+ id = pcidev_dev->device_id;
|
||||
+ if(id == 0x8139) {
|
||||
+ BIOS_ROM_ADDR = 0xD4;
|
||||
+ BIOS_ROM_DATA = 0xD7;
|
||||
+ }
|
||||
+ else {
|
||||
+ BIOS_ROM_ADDR = 0x30;
|
||||
+ BIOS_ROM_DATA = 0x33;
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
1.7.3.4
|
||||
|
@ -1,15 +1,15 @@
|
||||
Summary: Simple program for reading/writing BIOS chips content
|
||||
Name: flashrom
|
||||
Version: 0.9.3
|
||||
Release: 0.1.svn1205%{?dist}
|
||||
Release: 1.svn1250%{?dist}
|
||||
License: GPLv2
|
||||
Group: Applications/System
|
||||
URL: http://flashrom.org
|
||||
#Source0: http://qa.coreboot.org/releases/%{name}-%{version}.tar.bz2
|
||||
#Source1: http://qa.coreboot.org/releases/%{name}-%{version}.tar.bz2.asc
|
||||
## svn co svn://coreboot.org/flashrom/tags/flashrom-0.9.3
|
||||
## tar cJf flashrom-0.9.3.tar.xz flashrom-0.9.3/
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
## svn -r 1250 export svn://coreboot.org/flashrom/trunk flashrom-0.9.3
|
||||
## tar -cjvf flashrom-0.9.3.tar.bz2 flashrom-0.9.3
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Patch1: flashrom-0001-Initial-commit-of-autotools-related-files.patch
|
||||
Patch2: flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch
|
||||
Patch3: flashrom-0003-Use-flashrom-s-version-from-config.h.patch
|
||||
@ -22,6 +22,7 @@ Patch9: flashrom-0009-Kill-unused-__FLASHROM_HAVE_OUTB__-define.patch
|
||||
Patch10: flashrom-0010-Use-HAVE_-_H-macro-for-detecting-includes.patch
|
||||
Patch11: flashrom-0011-Add-more-comments-cosmetic-change.patch
|
||||
Patch12: flashrom-0012-Move-arch-checking-ifdef-block-into-header.patch
|
||||
Patch13: flashrom-0013-rtl8169-support.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: pciutils-devel
|
||||
@ -53,6 +54,7 @@ and write new contents on the chips ("flash the chip").
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
|
||||
%build
|
||||
autoreconf -ivf
|
||||
@ -74,6 +76,23 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man8/%{name}.*
|
||||
|
||||
%changelog
|
||||
* Tue Jan 4 2011 Peter Lemenkov <lemenkov@gmail.com> 0.9.3-1.svn1250
|
||||
- Updated to latest svn ver. 1250 (post-release snapshot for 0.9.3)
|
||||
- Initial rtl8169 support (UNTESTED)
|
||||
- Fix decoding of SB600 LPC ROM protection registers
|
||||
- Erasing/writing of Winbond W39V040FB chips
|
||||
- Support for the Open Graphics Project development card
|
||||
- Support for SST SST25VF010 chip
|
||||
- Board-enable for the MSI MS-6391 (845 Pro4)
|
||||
- Support for Spansion S25FL004A, S25FL032A, and S25FL064A chips
|
||||
- Add chunked write ability to the Dediprog SF100 driver
|
||||
- Support bulk read on Dediprog SF100
|
||||
- Support for the OpenMoko Neo1973/Neo FreeRunner debug board (ver, 2 or 3)
|
||||
- Real partial writes were implemented
|
||||
- Add SPI flash emulation capability to the dummy programmer
|
||||
- Board enable for the EPoX EP-8NPA7I board
|
||||
- Fixed build on EL-5
|
||||
|
||||
* Tue Oct 26 2010 Peter Lemenkov <lemenkov@gmail.com> 0.9.3-0.1.svn1205
|
||||
- Ver. 0.9.3 (pre-release, exported from SCM)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user