diff --git a/.gitignore b/.gitignore index 2e72103..aba245a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ flashrom-0.9.2.tar.bz2 /flashrom-0.9.5.2.tar.bz2 /flashrom-0.9.6.1.tar.bz2 /flashrom-0.9.7.tar.bz2 +/flashrom-0.9.9.tar.bz2 diff --git a/flashrom-0001-Initial-commit-of-autotools-related-files.patch b/flashrom-0001-Initial-commit-of-autotools-related-files.patch deleted file mode 100644 index 50550a0..0000000 --- a/flashrom-0001-Initial-commit-of-autotools-related-files.patch +++ /dev/null @@ -1,680 +0,0 @@ -From: Peter Lemenkov -Date: Fri, 17 Sep 2010 18:58:28 +0400 -Subject: [PATCH] Initial commit of autotools-related files - -Signed-off-by: Peter Lemenkov - -diff --git a/Makefile.am b/Makefile.am -new file mode 100644 -index 0000000..ea25e2c ---- /dev/null -+++ b/Makefile.am -@@ -0,0 +1,252 @@ -+sbin_PROGRAMS = flashrom -+ -+man_MANS = flashrom.8 -+ -+# FIXME use "config.h" in the future -+DEFS += -DFLASHROM_VERSION=\"@VERSION@\" -DCONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_INTERNAL -DSTANDALONE -DCONFIG_DEFAULT_PROGRAMMER_ARGS=\"\" -+ -+if HAVE_DMIDECODE -+if HAVE_DMIDECODE_EXT -+DEFS += -DCONFIG_INTERNAL_DMI=0 -DDMIDECODE_PATH=\"@DMIDECODE@\" -+else -+DEFS += -DCONFIG_INTERNAL_DMI=1 -DDMIDECODE_PATH=\"\" -+endif -+endif -+ -+ -+if HAVE_INTERNAL -+internal_SOURCES = \ -+ board_enable.c \ -+ cbtable.c \ -+ coreboot_tables.h \ -+ chipset_enable.c \ -+ internal.c \ -+ processor_enable.c -+if HAVE_X86_ONLY_INTERNAL -+internal_x86_only_SOURCES = \ -+ amd_imc.c \ -+ dmi.c \ -+ ich_descriptors.c \ -+ ich_descriptors.h \ -+ ichspi.c \ -+ it85spi.c \ -+ it87spi.c \ -+ mcp6x_spi.c \ -+ sb600spi.c \ -+ wbsio_spi.c -+endif -+DEFS += -DCONFIG_INTERNAL=1 -+endif -+ -+if HAVE_SERPROG -+serprog_SOURCES = serprog.c serprog.h -+DEFS += -DCONFIG_SERPROG=1 -+endif -+ -+if HAVE_LINUX_SPI -+linux_spi_SOURCES = linux_spi.c -+DEFS += -DCONFIG_LINUX_SPI=1 -+endif -+ -+if HAVE_RAYER_SPI -+rayer_spi_SOURCES = rayer_spi.c -+DEFS += -DCONFIG_RAYER_SPI=1 -+endif -+ -+if HAVE_PONY_SPI -+pony_spi_SOURCES = pony_spi.c -+DEFS += -DCONFIG_PONY_SPI=1 -+endif -+ -+if HAVE_BITBANG_SPI -+bitbang_spi_SOURCES = bitbang_spi.c -+DEFS += -DCONFIG_BITBANG_SPI=1 -+endif -+ -+if HAVE_NIC3COM -+nic3com_SOURCES = nic3com.c -+DEFS += -DCONFIG_NIC3COM=1 -+endif -+ -+if HAVE_GFXNVIDIA -+gfxnvidia_SOURCES = gfxnvidia.c -+DEFS += -DCONFIG_GFXNVIDIA=1 -+endif -+ -+if HAVE_SATASII -+satasii_SOURCES = satasii.c -+DEFS += -DCONFIG_SATASII=1 -+endif -+ -+if HAVE_ATAHPT -+atahpt_SOURCES = atahpt.c -+DEFS += -DCONFIG_ATAHPT=1 -+endif -+ -+if HAVE_ATAVIA -+atavia_SOURCES = atavia.c -+DEFS += -DCONFIG_ATAVIA=1 -+endif -+ -+if HAVE_IT8212 -+it8212_SOURCES = it8212.c -+DEFS += -DCONFIG_IT8212=1 -+endif -+ -+if HAVE_FT2232_SPI -+ft_2232_spi_SOURCES = ft2232_spi.c -+DEFS += -DCONFIG_FT2232_SPI=1 -+endif -+ -+if HAVE_DUMMY -+dummy_SOURCES= dummyflasher.c -+DEFS += -DCONFIG_DUMMY=1 -+endif -+ -+if HAVE_DRKAISER -+drkaiser_SOURCES = drkaiser.c -+DEFS += -DCONFIG_DRKAISER=1 -+endif -+ -+if HAVE_NICREALTEK -+nicrealtek_SOURCES = nicrealtek.c -+DEFS += -DCONFIG_NICREALTEK=1 -+endif -+ -+if HAVE_NICNATSEMI -+nicnatsemi_SOURCES = nicnatsemi.c -+DEFS += -DCONFIG_NICNATSEMI=1 -+endif -+ -+if HAVE_NICINTEL -+nicintel_SOURCES = nicintel.c -+DEFS += -DCONFIG_NICINTEL=1 -+endif -+ -+if HAVE_NICINTEL_SPI -+nicintel_spi_SOURCES = nicintel_spi.c -+DEFS += -DCONFIG_NICINTEL_SPI=1 -+endif -+ -+if HAVE_NICINTEL_EEPROM -+nicintel_eeprom_SOURCES = nicintel_eeprom.c -+DEFS += -DCONFIG_NICINTEL_EEPROM=1 -+endif -+ -+ -+if HAVE_GFXOGP -+gfxogp_SOURCES = ogp_spi.c -+DEFS += -DCONFIG_OGP_SPI=1 -+endif -+ -+if HAVE_BUSPIRATE_SPI -+buspirate_SOURCES = buspirate_spi.c -+DEFS += -DCONFIG_BUSPIRATE_SPI=1 -+endif -+ -+if HAVE_DEDIPROG -+dediprog_SOURCES = dediprog.c -+DEFS += -DCONFIG_DEDIPROG=1 -+endif -+ -+if HAVE_SATAMV -+satamv_SOURCES = satamv.c -+DEFS += -DCONFIG_SATAMV=1 -+endif -+ -+if HAVE_SERIAL -+serial_SOURCES = serial.c -+endif -+ -+if HAVE_USBBLASTER_SPI -+usbblaster_SOURCES = usbblaster_spi.c -+DEFS += -DCONFIG_USBBLASTER_SPI=1 -+endif -+ -+if HAVE_PRINT_WIKI -+print_wiki_SOURCES = print_wiki.c -+DEFS += -DCONFIG_PRINT_WIKI=1 -+endif -+ -+if HAVE_PCI -+pci_SOURCES = pcidev.c \ -+ physmap.c \ -+ hwaccess.c \ -+ hwaccess.h -+DEFS += -DNEED_PCI=1 -+endif -+ -+chip_SOURCES = 82802ab.c \ -+ at45db.c \ -+ chipdrivers.h \ -+ flashchips.c \ -+ flashchips.h \ -+ en29lv640b.c \ -+ jedec.c \ -+ opaque.c \ -+ sfdp.c \ -+ spi.c \ -+ spi.h \ -+ spi25_statusreg.c \ -+ spi25.c \ -+ sst_fwhub.c \ -+ sst28sf040.c \ -+ sst49lfxxxc.c \ -+ stm50.c \ -+ w29ee011.c \ -+ w39.c -+ -+cli_SOURCES = \ -+ cli_classic.c \ -+ cli_common.c \ -+ cli_output.c \ -+ print.c -+ -+lib_SOURCES = flashrom.c \ -+ helpers.c \ -+ layout.c \ -+ programmer.c \ -+ programmer.h \ -+ udelay.c -+ -+flashrom_SOURCES = \ -+ flash.h \ -+ $(internal_SOURCES) \ -+ $(internal_x86_only_SOURCES) \ -+ $(serprog_SOURCES) \ -+ $(linux_spi_SOURCES) \ -+ $(rayer_spi_SOURCES) \ -+ $(pony_spi_SOURCES) \ -+ $(bitbang_spi_SOURCES) \ -+ $(nic3com_SOURCES) \ -+ $(gfxnvidia_SOURCES) \ -+ $(satasii_SOURCES) \ -+ $(atahpt_SOURCES) \ -+ $(atavia_SOURCES) \ -+ $(it8212_SOURCES) \ -+ $(ft_2232_spi_SOURCES) \ -+ $(dummy_SOURCES) \ -+ $(drkaiser_SOURCES) \ -+ $(nicrealtek_SOURCES) \ -+ $(nicnatsemi_SOURCES) \ -+ $(nicintel_SOURCES) \ -+ $(nicintel_eeprom_SOURCES) \ -+ $(nicintel_spi_SOURCES) \ -+ $(gfxogp_SOURCES) \ -+ $(buspirate_SOURCES) \ -+ $(dediprog_SOURCES) \ -+ $(satamv_SOURCES) \ -+ $(serial_SOURCES) \ -+ $(usbblaster_SOURCES) \ -+ $(print_wiki_SOURCES) \ -+ $(pci_SOURCES) \ -+ $(chip_SOURCES) \ -+ $(cli_SOURCES) \ -+ $(lib_SOURCES) -+ -+EXTRA_DIST = COPYING Documentation README util arch.h os.h util flashrom.8.tmpl -+ -+BUILT_SOURCES = flashrom.8 -+ -+flashrom.8: flashrom.8.tmpl -+ @sed -e '1 s#".*".*#"$(shell ./util/getrevision.sh -d flashrom.8.tmpl)" "$(VERSION)"#' <$< >$@ -diff --git a/bootstrap.sh b/bootstrap.sh -new file mode 100755 -index 0000000..0213288 ---- /dev/null -+++ b/bootstrap.sh -@@ -0,0 +1,4 @@ -+#!/bin/sh -+aclocal --force -+/usr/bin/autoconf --force -+automake --add-missing --copy --force-missing -diff --git a/configure.ac b/configure.ac -new file mode 100644 -index 0000000..a8858ab ---- /dev/null -+++ b/configure.ac -@@ -0,0 +1,400 @@ -+AC_INIT([flashrom], [0.9.7-r1850], [flashrom@flashrom.org], [flashrom], [http://www.flashrom.org/]) -+ -+AC_PREREQ(2.59) -+ -+AC_CANONICAL_TARGET -+ -+AC_CONFIG_SRCDIR([flashrom.c]) -+AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip tar-ustar foreign]) -+ -+# Internal (mainboard) flashing -+AC_ARG_WITH([internal], -+ AC_HELP_STRING([--with-internal],[mainboard internal flashing support.]), -+ [internal="$withval"],[internal="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([pony_spi], -+ AC_HELP_STRING([--with-pony-spi],[PonyProg2000 SPI hardware support.]), -+ [pony_spi="$withval"],[pony_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="yes"]) -+ -+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([atavia], -+ AC_HELP_STRING([--with-atavia],[VIA VT6421A LPC programmer support.]), -+ [atavia="$withval"],[atavia="no"]) -+ -+AC_ARG_WITH([it8212], -+ AC_HELP_STRING([--with-it8212],[Innovision Multimedia IT8212F PCI PATA/RAID controller support.]), -+ [it8212="$withval"],[it8212="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], -+ AC_HELP_STRING([--with-nicintel],[Intel NICs support.]), -+ [nicintel="$withval"],[nicintel="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([nicintel_eeprom], -+ AC_HELP_STRING([--with-nicintel-eeprom],[EEPROM on Intel NICs support.]), -+ [nicintel_eeprom="$withval"],[nicintel_eeprom="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([usbblaster_spi], -+ AC_HELP_STRING([--with-usbblaster-spi],[Altera USB-Blaster dongles support.]), -+ [usbblaster_spi="$withval"],[usbblaster_spi="yes"]) -+ -+AC_ARG_WITH([dediprog], -+ AC_HELP_STRING([--with-dediprog],[Dediprog SF100 support. Incomplete and untested.]), -+ [dediprog="$withval"],[dediprog="no"]) -+ -+AC_ARG_WITH([satamv], -+ AC_HELP_STRING([--with-satamv],[Marvell SATA controllers support.]), -+ [satamv="$withval"],[satamv="yes"]) -+ -+AC_ARG_WITH([dmidecode], -+ AC_HELP_STRING([--with-dmidecode],[Enable dmidecode (only for x86/x86_64).]), -+ [dmidecode="$withval"],[dmidecode="yes"]) -+AC_ARG_WITH([dmidecode_ext], -+ AC_HELP_STRING([--with-dmidecode-external],[Use external dmidecode utility instead of internal one (only for x86/x86_64).]), -+ [dmidecode_ext="$withval"],[dmidecode_ext="yes"]) -+ -+# 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.]), -+ [print_wiki="$withval"],[print_wiki="no"]) -+ -+AC_C_BIGENDIAN( -+ [AC_DEFINE([__FLASHROM_BIG_ENDIAN__], [1], [Big endian])], -+ [AC_DEFINE([__FLASHROM_LITTLE_ENDIAN__], [1], [Little endian])], -+ [AC_MSG_ERROR([Unknown endianness])], -+ [AC_MSG_ERROR([No support for universal binaries yet])] -+ ) -+ -+# Check for CPU-specific features -+case "$target_cpu" in -+ i386|i486|i586|i686|i786|x86_64) -+ if test "$internal" = 'yes'; then -+ enable_x86_only_internal="yes" -+ else -+ enable_x86_only_internal="no" -+ fi -+ -+ AC_CHECK_HEADERS([sys/io.h]) -+ -+ if test "$dmidecode_ext" = 'yes'; then -+ AC_PATH_PROG([DMIDECODE], dmidecode, [], [$PATH$PATH_SEPARATOR/usr/sbin]) -+ fi -+ -+ ;; -+ mips*|power*|arm*) -+ enable_x86_only_internal="n/a" -+ if test "$nic3com" = 'yes'; then -+ AC_MSG_WARN([NIC 3Com is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.]) -+ nic3com="no" -+ fi -+ if test "$nicnatsemi" = 'yes'; then -+ AC_MSG_WARN([NIC NatSemi is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.]) -+ nicnatsemi="no" -+ fi -+ if test "$nicrealtek" = 'yes'; then -+ AC_MSG_WARN([NIC Realtek is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.]) -+ nicrealtek="no" -+ fi -+ if test "$rayer_spi" = 'yes'; then -+ AC_MSG_WARN([RayeR SPIPGM is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.]) -+ rayer_spi="no" -+ fi -+ if test "$satamv" = 'yes'; then -+ AC_MSG_WARN([Marvell SATA is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet]) -+ satamv="no" -+ fi -+ if test "$atahpt" = 'yes'; then -+ AC_MSG_WARN([Highpoint (HPT) ATA/RAID controller support is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.]) -+ atahpt="no" -+ fi -+ if test "$dmidecode" = 'yes' -o "$dmidecode_ext" = 'yes' ; then -+ AC_MSG_WARN([DMI handling is not supported for this target ($target_cpu).]) -+ dmidecode="no" -+ dmidecode_ext="" -+ fi -+ ;; -+ *) -+ AC_MSG_ERROR([No support for this CPU ($target_cpu) yet]) -+ ;; -+esac -+ -+# Enable OS-specific compilation flags -+case "$target_os" in -+ linux*) -+ AC_CHECK_HEADERS([sys/ioctl.h]) -+ AC_ARG_WITH( -+ [linux_spi], -+ AC_HELP_STRING([--with-linux-spi],[Linux SPI subsystem support.]), -+ [linux_spi="$withval"], -+ [linux_spi="yes"] -+ ) -+ if test "$linux_spi" = "yes" ; then -+ AC_CHECK_HEADERS([linux/types.h], [], [AC_MSG_ERROR([ not found])], []) -+ AC_CHECK_HEADERS([linux/spi/spidev.h], [], [AC_MSG_ERROR([ not found])], []) -+ fi -+ ;; -+ darwin*) -+ linux_spi="n/a" -+ AC_CHECK_HEADERS([DirectIO/darwinio.h DirectHW/DirectHW.h]) -+ ;; -+ freebsd*) -+ linux_spi="n/a" -+ AC_CHECK_HEADERS([machine/cpufunc.h]) -+ ;; -+ openbsd*) -+ linux_spi="n/a" -+ AC_CHECK_HEADERS([machine/sysarch.h sys/types.h]) -+ ;; -+ netbsd*) -+ linux_spi="n/a" -+ AC_CHECK_HEADERS([machine/sysarch.h sys/types.h]) -+ ;; -+ *solaris*) -+ linux_spi="n/a" -+ AC_CHECK_HEADERS([asm/sunddi.h strings.h sys/psw.h sys/sysi86.h]) -+ ;; -+ mingw*) -+ linux_spi="n/a" -+ # MinGW doesn't have the ffs() function, but we can use gcc's __builtin_ffs(). -+ CFLAGS="$CFLAGS -Dffs=__builtin_ffs" -+ # Some functions provided by Microsoft do not work as described in C99 specifications. This macro fixes that -+ # for MinGW. See http://sourceforge.net/apps/trac/mingw-w64/wiki/printf%20and%20scanf%20family */ -+ CFLAGS="$CFLAGS -D__USE_MINGW_ANSI_STDIO=1" -+ ;; -+ *djgpp*) -+ linux_spi="n/a" -+ AC_CHECK_HEADERS([pc.h]) -+ # DJGPP has odd uint*_t definitions which cause lots of format string warnings. -+ CFLAGS="$CFLAGS -Wno-format" -+ ;; -+ *) -+ AC_MSG_ERROR([No support for this OS ($target_os) yet]) -+ ;; -+esac -+ -+# Check whether we need serial support -+if test "$serprog" = 'yes' -o \ -+ "$buspirate_spi" = 'yes' -o \ -+ "$pony_spi" = 'yes' ; then -+ serial="yes" -+else -+ serial="no" -+fi -+ -+# Check whether we need PCI support -+if test "$internal" = 'yes' -o \ -+ "$rayer_spi" = 'yes' -o \ -+ "$nic3com" = 'yes' -o \ -+ "$gfxnvidia" = 'yes' -o \ -+ "$satasii" = 'yes' -o \ -+ "$atahpt" = 'yes' -o \ -+ "$atavia" = 'yes' -o \ -+ "$it8212" = 'yes' -o \ -+ "$drkaiser" = 'yes' -o \ -+ "$nicrealtek" = 'yes' -o \ -+ "$nicnatsemi" = 'yes' -o \ -+ "$nicintel" = 'yes' -o \ -+ "$nicintel_spi" = 'yes' -o \ -+ "$nicintel_eeprom" = 'yes' -o \ -+ "$gfxogp" = 'yes' -o \ -+ "$satamv" = 'yes' ; then -+ pci="yes" -+fi -+ -+if test "$rayer_spi" = 'yes' -o \ -+ "$pony_spi" = 'yes' -o \ -+ "$internal" = 'yes' -o \ -+ "$nicintel_spi" = 'yes' -o \ -+ "$gfxogp" = 'yes' ; then -+ bitbang_spi="yes" -+else -+ bitbang_spi="no" -+fi -+ -+# Checks for programs. -+AC_PROG_CC -+AC_PROG_INSTALL -+AC_PROG_MAKE_SET -+ -+# Checks for header files. -+AC_CHECK_HEADERS([limits.h stddef.h stdint.h stdlib.h string.h sys/time.h sys/utsname.h]) -+ -+# Checks for typedefs, structures, and compiler characteristics. -+AC_C_INLINE -+AC_TYPE_OFF_T -+AC_TYPE_SIZE_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 -+AC_FUNC_MMAP -+AC_FUNC_REALLOC -+AC_CHECK_FUNCS([getpagesize gettimeofday memmove memset munmap strcasecmp strchr strcspn strdup strerror strncasecmp strspn strstr strtol strtoul uname]) -+ -+# Checks for pcilib -+if test "$pci" = 'yes' ; then -+ AC_CHECK_LIB([pci], [pci_alloc],,[AC_MSG_ERROR([pci library missing])]) -+fi -+ -+# check for socket (required for SunOS) -+if test "$serprog" = 'yes' ; then -+ AC_CHECK_LIB([socket], [socket]) -+ AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h sys/socket.h termios.h unistd.h]) -+ AC_CHECK_FUNCS([gethostbyaddr gethostbyname socket]) -+fi -+ -+# Check for libusb -+if test "$dediprog" = 'yes' -o "$ft2232_spi" = 'yes' ; then -+ AC_CHECK_LIB([usb], [usb_init]) -+fi -+ -+if test "$ft2232_spi" = 'yes' -o "$usbblaster_spi" = 'yes' ; then -+ AC_CHECK_HEADERS([ftdi.h],[],[AC_MSG_ERROR([ header not found])],[AC_INCLUDES_DEFAULT]) -+ AC_CHECK_LIB([ftdi],[ftdi_init],,[AC_MSG_ERROR([ftdi library is missing])]) -+fi -+ -+# For Makefile.am -+AM_CONDITIONAL(HAVE_INTERNAL, test "$internal" = "yes") -+AM_CONDITIONAL(HAVE_DMIDECODE, test "$dmidecode" = "yes") -+AM_CONDITIONAL(HAVE_DMIDECODE_EXT, test "$DMIDECODE" != "") -+AM_CONDITIONAL(HAVE_X86_ONLY_INTERNAL, test "$enable_x86_only_internal" = "yes") -+AM_CONDITIONAL(HAVE_SERPROG, test "$serprog" = "yes") -+AM_CONDITIONAL(HAVE_LINUX_SPI, test "$linux_spi" = "yes") -+AM_CONDITIONAL(HAVE_RAYER_SPI, test "$rayer_spi" = "yes") -+AM_CONDITIONAL(HAVE_PONY_SPI, test "$pony_spi" = "yes") -+AM_CONDITIONAL(HAVE_BITBANG_SPI, test "$bitbang_spi" = "yes") -+AM_CONDITIONAL(HAVE_NIC3COM, test "$nic3com" = "yes") -+AM_CONDITIONAL(HAVE_GFXNVIDIA, test "$gfxnvidia" = "yes") -+AM_CONDITIONAL(HAVE_SATASII, test "$satasii" = "yes") -+AM_CONDITIONAL(HAVE_ATAHPT, test "$atahpt" = "yes") -+AM_CONDITIONAL(HAVE_ATAVIA, test "$atavia" = "yes") -+AM_CONDITIONAL(HAVE_IT8212, test "$it8212" = "yes") -+AM_CONDITIONAL(HAVE_FT2232_SPI, test "$ft2232_spi" = "yes") -+AM_CONDITIONAL(HAVE_DUMMY, test "$dummy" = "yes") -+AM_CONDITIONAL(HAVE_DRKAISER, test "$drkaiser" = "yes") -+AM_CONDITIONAL(HAVE_NICREALTEK, test "$nicrealtek" = "yes") -+AM_CONDITIONAL(HAVE_NICNATSEMI, test "$nicnatsemi" = "yes") -+AM_CONDITIONAL(HAVE_NICINTEL, test "$nicintel" = "yes") -+AM_CONDITIONAL(HAVE_NICINTEL_SPI, test "$nicintel_spi" = "yes") -+AM_CONDITIONAL(HAVE_NICINTEL_EEPROM, test "$nicintel_eeprom" = "yes") -+AM_CONDITIONAL(HAVE_GFXOGP, test "$gfxogp" = "yes") -+AM_CONDITIONAL(HAVE_BUSPIRATE_SPI, test "$buspirate_spi" = "yes") -+AM_CONDITIONAL(HAVE_USBBLASTER_SPI, test "$usbblaster_spi" = "yes") -+AM_CONDITIONAL(HAVE_DEDIPROG, test "$dediprog" = "yes") -+AM_CONDITIONAL(HAVE_SATAMV, test "$satamv" = "yes") -+AM_CONDITIONAL(HAVE_SERIAL, test "$serial" = "yes") -+AM_CONDITIONAL(HAVE_PCI, test "$pci" = "yes") -+AM_CONDITIONAL(HAVE_PRINT_WIKI, test "$print_wiki" = "yes") -+ -+AC_CONFIG_FILES([Makefile]) -+AC_OUTPUT -+ -+AC_MSG_RESULT([ -+------------------------------------------------------------------------ -+ $PACKAGE $VERSION configuration. -+ -+ Compiler support: -+ -+ Target CPU: ................... ${target_cpu} -+ Target OS: .................... ${target_os} -+ -+ Suppored programmers: -+ -+ Internal: ..................... ${internal} -+ x86-only features: .......... ${enable_x86_only_internal} -+ serprog: ...................... ${serprog} -+ Linux SPI: .................... ${linux_spi} -+ RayeR SPI: .................... ${rayer_spi} -+ PonyProg2000 SPI: ............. ${pony_spi} -+ Bitbang SPI: .................. ${bitbang_spi} -+ 3COM NIC: ..................... ${nic3com} -+ NVIDIA GFX: ................... ${gfxnvidia} -+ Silicon Image SATA: ........... ${satasii} -+ Highpoint ATA: ................ ${atahpt} -+ VIA VT6421A LPC: .............. ${atavia} -+ IT8212F PCI PATA/RAID: ........ ${it8212} -+ FT232 SPI: .................... ${ft2232_spi} -+ Dummy: ........................ ${dummy} -+ Dr. Kaiser: ................... ${drkaiser} -+ Realtek NIC: .................. ${nicrealtek} -+ National Semiconductor NIC: ... ${nicnatsemi} -+ Intel NIC: .................... ${nicintel} -+ Intel NIC SPI: ................ ${nicintel_spi} -+ Intel NIC EEPROM: ............. ${nicintel_eeprom} -+ Open Graphics Project GFX: .... ${gfxogp} -+ Bus Pirate SPI: ............... ${buspirate_spi} -+ Altera USB-Blaster SPI: ....... ${usbblaster_spi} -+ Dediprog SF100: ............... ${dediprog} -+ Marvell SATA: ................. ${satamv} -+ Serial: ....................... ${serial} -+ -+------------------------------------------------------------------------ -+]) diff --git a/flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch b/flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch deleted file mode 100644 index 17821d0..0000000 --- a/flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Peter Lemenkov -Date: Sat, 12 Jun 2010 22:13:53 +0400 -Subject: [PATCH] Use dmidecode path defined at configure stage - -Signed-off-by: Peter Lemenkov - -diff --git a/dmi.c b/dmi.c -index a7a9a61..093b9a2 100644 ---- a/dmi.c -+++ b/dmi.c -@@ -294,7 +294,7 @@ out: - #else /* CONFIG_INTERNAL_DMI */ - - #define DMI_COMMAND_LEN_MAX 300 --static const char *dmidecode_command = "dmidecode"; -+static const char *dmidecode_command = DMIDECODE_PATH; - - static char *get_dmi_string(const char *string_name) - { diff --git a/flashrom-0003-Use-macros-from-configure-stage-instead-of-HAVE_UTSN.patch b/flashrom-0003-Use-macros-from-configure-stage-instead-of-HAVE_UTSN.patch deleted file mode 100644 index 351fca9..0000000 --- a/flashrom-0003-Use-macros-from-configure-stage-instead-of-HAVE_UTSN.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Peter Lemenkov -Date: Sat, 18 Sep 2010 09:05:43 +0400 -Subject: [PATCH] Use macros from configure stage instead of HAVE_UTSNAME - -Signed-off-by: Peter Lemenkov - -diff --git a/flashrom.c b/flashrom.c -index 9b82d4c..b0b97df 100644 ---- a/flashrom.c -+++ b/flashrom.c -@@ -32,7 +32,8 @@ - #include - #include - #include --#if HAVE_UTSNAME == 1 -+ -+#if HAVE_SYS_UTSNAME_H == 1 - #include - #endif - #include "flash.h" -@@ -1674,7 +1675,7 @@ void print_sysinfo(void) - msg_ginfo(" (unknown arch)"); - break; - } --#elif HAVE_UTSNAME == 1 -+#elif HAVE_UNAME == 1 - struct utsname osinfo; - - uname(&osinfo); diff --git a/flashrom-0004-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch b/flashrom-0004-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch deleted file mode 100644 index 110ead8..0000000 --- a/flashrom-0004-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch +++ /dev/null @@ -1,318 +0,0 @@ -From: Peter Lemenkov -Date: Sat, 18 Sep 2010 09:40:01 +0400 -Subject: [PATCH] Kill some x86-related ifdefs in code - this is now controlled - via autotools - -Signed-off-by: Peter Lemenkov - -diff --git a/amd_imc.c b/amd_imc.c -index b05390c..9aabe3f 100644 ---- a/amd_imc.c -+++ b/amd_imc.c -@@ -19,8 +19,6 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - --#if defined(__i386__) || defined(__x86_64__) -- - #include "flash.h" - #include "programmer.h" - #include "hwaccess.h" -@@ -155,5 +153,3 @@ int amd_imc_shutdown(struct pci_dev *dev) - - return ret; - } -- --#endif -diff --git a/atahpt.c b/atahpt.c -index 5966be8..03627f4 100644 ---- a/atahpt.c -+++ b/atahpt.c -@@ -18,8 +18,6 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - --#if defined(__i386__) || defined(__x86_64__) -- - #include - #include - #include "flash.h" -@@ -97,7 +95,3 @@ static uint8_t atahpt_chip_readb(const struct flashctx *flash, - OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR); - return INB(io_base_addr + BIOS_ROM_DATA); - } -- --#else --#error PCI port I/O access is not supported on this architecture yet. --#endif -diff --git a/dmi.c b/dmi.c -index 093b9a2..a37edea 100644 ---- a/dmi.c -+++ b/dmi.c -@@ -30,8 +30,6 @@ - #include "flash.h" - #include "programmer.h" - --#if defined(__i386__) || defined(__x86_64__) -- - /* Enable SMBIOS decoding. Currently legacy DMI decoding is enough. */ - #define SM_SUPPORT 0 - -@@ -482,5 +480,3 @@ int dmi_match(const char *pattern) - - return 0; - } -- --#endif // defined(__i386__) || defined(__x86_64__) -diff --git a/ich_descriptors.c b/ich_descriptors.c -index 1966f66..0e7675a 100644 ---- a/ich_descriptors.c -+++ b/ich_descriptors.c -@@ -19,8 +19,6 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - --#if defined(__i386__) || defined(__x86_64__) -- - #include "ich_descriptors.h" - - #ifdef ICH_DESCRIPTORS_FROM_DUMP -@@ -923,4 +921,3 @@ int read_ich_descriptors_via_fdo(void *spibar, struct ich_descriptors *desc) - return ICH_RET_OK; - } - #endif /* ICH_DESCRIPTORS_FROM_DUMP */ --#endif /* defined(__i386__) || defined(__x86_64__) */ -diff --git a/ich_descriptors.h b/ich_descriptors.h -index c41f9d9..056e6e4 100644 ---- a/ich_descriptors.h -+++ b/ich_descriptors.h -@@ -19,7 +19,6 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - --#if defined(__i386__) || defined(__x86_64__) - #ifndef __ICH_DESCRIPTORS_H__ - #define __ICH_DESCRIPTORS_H__ 1 - -@@ -599,4 +598,3 @@ int getFCBA_component_density(enum ich_chipset cs, const struct ich_descriptors - - #endif /* ICH_DESCRIPTORS_FROM_DUMP */ - #endif /* __ICH_DESCRIPTORS_H__ */ --#endif /* defined(__i386__) || defined(__x86_64__) */ -diff --git a/ichspi.c b/ichspi.c -index 0cd9c68..b7cc882 100644 ---- a/ichspi.c -+++ b/ichspi.c -@@ -23,8 +23,6 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - --#if defined(__i386__) || defined(__x86_64__) -- - #include - #include - #include "flash.h" -@@ -1877,5 +1875,3 @@ int via_init_spi(struct pci_dev *dev, uint32_t mmio_base) - - return 0; - } -- --#endif -diff --git a/it85spi.c b/it85spi.c -index 1cc8730..55783ac 100644 ---- a/it85spi.c -+++ b/it85spi.c -@@ -24,8 +24,6 @@ - * Contains the ITE IT85* SPI specific routines - */ - --#if defined(__i386__) || defined(__x86_64__) -- - #include - #include - #include -@@ -373,5 +371,3 @@ static int it85xx_spi_send_command(struct flashctx *flash, - - return 0; - } -- --#endif -diff --git a/it87spi.c b/it87spi.c -index 0a1e894..1218b41 100644 ---- a/it87spi.c -+++ b/it87spi.c -@@ -23,8 +23,6 @@ - * Contains the ITE IT87* SPI specific routines - */ - --#if defined(__i386__) || defined(__x86_64__) -- - #include - #include - #include -@@ -434,5 +432,3 @@ static int it8716f_spi_chip_write_256(struct flashctx *flash, const uint8_t *buf - - return 0; - } -- --#endif -diff --git a/mcp6x_spi.c b/mcp6x_spi.c -index 38e9a8b..eb6bcd3 100644 ---- a/mcp6x_spi.c -+++ b/mcp6x_spi.c -@@ -23,8 +23,6 @@ - * created by Michael Karcher. - */ - --#if defined(__i386__) || defined(__x86_64__) -- - #include - #include - #include "flash.h" -@@ -164,5 +162,3 @@ int mcp6x_spi_init(int want_spi) - - return 0; - } -- --#endif -diff --git a/nic3com.c b/nic3com.c -index 4d4702a..1e10325 100644 ---- a/nic3com.c -+++ b/nic3com.c -@@ -18,8 +18,6 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - --#if defined(__i386__) || defined(__x86_64__) -- - #include - #include "flash.h" - #include "programmer.h" -@@ -142,7 +140,3 @@ static uint8_t nic3com_chip_readb(const struct flashctx *flash, - OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR); - return INB(io_base_addr + BIOS_ROM_DATA); - } -- --#else --#error PCI port I/O access is not supported on this architecture yet. --#endif -diff --git a/nicnatsemi.c b/nicnatsemi.c -index ce22c94..3d11f28 100644 ---- a/nicnatsemi.c -+++ b/nicnatsemi.c -@@ -18,8 +18,6 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - --#if defined(__i386__) || defined(__x86_64__) -- - #include - #include "flash.h" - #include "programmer.h" -@@ -109,7 +107,3 @@ static uint8_t nicnatsemi_chip_readb(const struct flashctx *flash, - */ - return INB(io_base_addr + BOOT_ROM_DATA); - } -- --#else --#error PCI port I/O access is not supported on this architecture yet. --#endif -diff --git a/nicrealtek.c b/nicrealtek.c -index 07910a8..1f52c42 100644 ---- a/nicrealtek.c -+++ b/nicrealtek.c -@@ -18,8 +18,6 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - --#if defined(__i386__) || defined(__x86_64__) -- - #include - #include "flash.h" - #include "programmer.h" -@@ -132,7 +130,3 @@ static uint8_t nicrealtek_chip_readb(const struct flashctx *flash, const chipadd - - return val; - } -- --#else --#error PCI port I/O access is not supported on this architecture yet. --#endif -diff --git a/rayer_spi.c b/rayer_spi.c -index 4f1eee4..f8448eb 100644 ---- a/rayer_spi.c -+++ b/rayer_spi.c -@@ -26,7 +26,6 @@ - * most OS parport drivers will perform many unnecessary accesses although - * this driver just treats the parallel port as a GPIO set. - */ --#if defined(__i386__) || defined(__x86_64__) - - #include - #include -@@ -276,7 +275,3 @@ static int dlc5_shutdown(void *data) { - OUTB(lpt_outbyte, lpt_iobase); - return 0; - } -- --#else --#error PCI port I/O access is not supported on this architecture yet. --#endif -diff --git a/satamv.c b/satamv.c -index e76d126..ce83c2e 100644 ---- a/satamv.c -+++ b/satamv.c -@@ -19,7 +19,6 @@ - */ - - /* Datasheets are not public (yet?) */ --#if defined(__i386__) || defined(__x86_64__) - - #include - #include "flash.h" -@@ -191,7 +190,3 @@ static uint8_t satamv_chip_readb(const struct flashctx *flash, - { - return satamv_indirect_chip_readb(addr); - } -- --#else --#error PCI port I/O access is not supported on this architecture yet. --#endif -diff --git a/sb600spi.c b/sb600spi.c -index 69fad65..f909aec 100644 ---- a/sb600spi.c -+++ b/sb600spi.c -@@ -22,8 +22,6 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - --#if defined(__i386__) || defined(__x86_64__) -- - #include - #include - #include "flash.h" -@@ -695,5 +693,3 @@ int sb600_probe_spi(struct pci_dev *dev) - register_spi_master(&spi_master_yangtze); - return 0; - } -- --#endif -diff --git a/wbsio_spi.c b/wbsio_spi.c -index 0eeeb9b..050e2e7 100644 ---- a/wbsio_spi.c -+++ b/wbsio_spi.c -@@ -18,8 +18,6 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - --#if defined(__i386__) || defined(__x86_64__) -- - #include "flash.h" - #include "chipdrivers.h" - #include "programmer.h" -@@ -207,5 +205,3 @@ static int wbsio_spi_read(struct flashctx *flash, uint8_t *buf, - mmio_readn((void *)(flash->virtual_memory + start), buf, len); - return 0; - } -- --#endif diff --git a/flashrom-0005-Use-endiannes-determined-at-the-configure-stage.patch b/flashrom-0005-Use-endiannes-determined-at-the-configure-stage.patch deleted file mode 100644 index 1118a27..0000000 --- a/flashrom-0005-Use-endiannes-determined-at-the-configure-stage.patch +++ /dev/null @@ -1,91 +0,0 @@ -From: Peter Lemenkov -Date: Sun, 26 Sep 2010 18:25:31 +0400 -Subject: [PATCH] Use endiannes determined at the configure stage - -Signed-off-by: Peter Lemenkov - -diff --git a/hwaccess.h b/hwaccess.h -index 83f349e..1fa7815 100644 ---- a/hwaccess.h -+++ b/hwaccess.h -@@ -47,58 +47,6 @@ - #undef index - #endif - --#if defined (__i386__) || defined (__x86_64__) -- --/* All x86 is little-endian. */ --#define __FLASHROM_LITTLE_ENDIAN__ 1 -- --#elif defined (__mips) || defined (__mips__) || defined (_mips) || defined (mips) -- --/* MIPS can be either endian. */ --#if defined (__MIPSEL) || defined (__MIPSEL__) || defined (_MIPSEL) || defined (MIPSEL) --#define __FLASHROM_LITTLE_ENDIAN__ 1 --#elif defined (__MIPSEB) || defined (__MIPSEB__) || defined (_MIPSEB) || defined (MIPSEB) --#define __FLASHROM_BIG_ENDIAN__ 1 --#endif -- --#elif defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__) || defined(__ppc64__) -- --/* PowerPC can be either endian. */ --#if defined (_BIG_ENDIAN) || defined (__BIG_ENDIAN__) --#define __FLASHROM_BIG_ENDIAN__ 1 --/* Error checking in case some weird header has #defines for LE as well. */ --#if defined (_LITTLE_ENDIAN) || defined (__LITTLE_ENDIAN__) --#error Conflicting endianness #define --#endif --#else --#error Little-endian PowerPC #defines are unknown --#endif -- --#elif defined (__arm__) --#if defined (__ARMEL__) --#define __FLASHROM_LITTLE_ENDIAN__ 1 --#else --#error Big-endian ARM #defines are unknown --#endif -- --#endif -- --#if !defined (__FLASHROM_BIG_ENDIAN__) && !defined (__FLASHROM_LITTLE_ENDIAN__) --/* Nonstandard libc-specific macros for determining endianness. */ --#if defined(__GLIBC__) --#include --#if BYTE_ORDER == LITTLE_ENDIAN --#define __FLASHROM_LITTLE_ENDIAN__ 1 --#elif BYTE_ORDER == BIG_ENDIAN --#define __FLASHROM_BIG_ENDIAN__ 1 --#endif --#endif --#endif -- --#if !defined (__FLASHROM_BIG_ENDIAN__) && !defined (__FLASHROM_LITTLE_ENDIAN__) --#error Unable to determine endianness. Please add support for your arch or libc. --#endif -- - #define ___constant_swab8(x) ((uint8_t) ( \ - (((uint8_t)(x) & (uint8_t)0xffU)))) - -@@ -140,7 +88,7 @@ cpu_to_le(64) - #define cpu_to_be32 - #define cpu_to_be64 - --#elif defined (__FLASHROM_LITTLE_ENDIAN__) -+#else /* defined (__FLASHROM_BIG_ENDIAN__) */ - - #define cpu_to_be(bits) \ - static inline uint##bits##_t cpu_to_be##bits(uint##bits##_t val) \ -@@ -158,11 +106,7 @@ cpu_to_be(64) - #define cpu_to_le32 - #define cpu_to_le64 - --#else -- --#error Could not determine endianness. -- --#endif -+#endif /* defined (__FLASHROM_BIG_ENDIAN__) */ - - #define be_to_cpu8 cpu_to_be8 - #define be_to_cpu16 cpu_to_be16 diff --git a/flashrom-0006-Use-HAVE_-_H-macro-for-detecting-includes.patch b/flashrom-0006-Use-HAVE_-_H-macro-for-detecting-includes.patch deleted file mode 100644 index 76f1f03..0000000 --- a/flashrom-0006-Use-HAVE_-_H-macro-for-detecting-includes.patch +++ /dev/null @@ -1,127 +0,0 @@ -From: Peter Lemenkov -Date: Sun, 26 Sep 2010 21:05:50 +0400 -Subject: [PATCH] Use HAVE_*_H macro for detecting includes - -Signed-off-by: Peter Lemenkov - -diff --git a/hwaccess.h b/hwaccess.h -index 1fa7815..fda9530 100644 ---- a/hwaccess.h -+++ b/hwaccess.h -@@ -24,11 +24,9 @@ - #ifndef __HWACCESS_H__ - #define __HWACCESS_H__ 1 - --#if defined (__i386__) || defined (__x86_64__) --#if defined(__GLIBC__) -+#if defined (HAVE_SYS_IO_H) - #include --#endif --#endif -+#endif /* defined (HAVE_SYS_IO_H) */ - - #if NEED_PCI == 1 - /* -@@ -45,7 +43,53 @@ - #endif - - #undef index -+ -+#if defined (HAVE_STRINGS_H) -+#include -+#endif /* defined (HAVE_STRINGS_H) */ -+ -+#if defined (HAVE_STDINT_H) -+#include -+#endif /* defined (HAVE_STDINT_H) */ -+ -+#if defined (HAVE_SYS_TYPES_H) -+#include -+#endif /* defined (HAVE_SYS_TYPES_H) */ -+ -+#if defined (HAVE_MACHINE_SYSARCH_H) -+#include -+#endif /* defined (HAVE_MACHINE_SYSARCH_H) */ -+ -+#if defined (HAVE_MACHINE_CPUFUNC_H) -+#if defined(__FreeBSD__) || defined(__DragonFly__) -+ /* Note that Debian/kFreeBSD (FreeBSD kernel with glibc) has conflicting -+ * out[bwl] definitions in machine/cpufunc.h and sys/io.h at least in some -+ * versions. Use machine/cpufunc.h only for plain FreeBSD/DragonFlyBSD. -+ */ -+#include - #endif -+#endif /* defined (HAVE_MACHINE_CPUFUNC_H) */ -+ -+/* for iopl and outb under Solaris */ -+#if defined HAVE_ASM_SUNDDI_H -+#include -+#endif /* defined HAVE_ASM_SUNDDI_H */ -+#if defined HAVE_SYS_SYSI86_H -+#include -+#endif /* defined HAVE_SYS_SYSI86_H */ -+#if defined HAVE_SYS_PSW_H -+#include -+#endif /* defined HAVE_SYS_PSW_H */ -+ -+#ifdef __DJGPP__ -+#include -+#endif /* __DJGPP__ */ -+ -+#if defined HAVE_DIRECTIO_DARWINIO_H -+#include -+#endif /* defined HAVE_DIRECTIO_DARWINIO_H */ -+ -+#endif /* defined (HAVE_LIBPCI) */ - - #define ___constant_swab8(x) ((uint8_t) ( \ - (((uint8_t)(x) & (uint8_t)0xffU)))) -@@ -118,15 +162,15 @@ cpu_to_be(64) - #define le_to_cpu64 cpu_to_le64 - - #if NEED_PCI == 1 -+ -+/* PCI port I/O is not yet implemented on PowerPC. */ -+/* PCI port I/O is not yet implemented on MIPS. */ - #if defined (__i386__) || defined (__x86_64__) - - #define __FLASHROM_HAVE_OUTB__ 1 - --/* for iopl and outb under Solaris */ --#if defined (__sun) && (defined(__i386) || defined(__amd64)) --#include --#include --#include -+#if (defined(__MACH__) && defined(__APPLE__)) -+#define __DARWIN__ - #endif - - /* Clarification about OUTB/OUTW/OUTL argument order: -@@ -162,8 +206,6 @@ cpu_to_be(64) - - #ifdef __DJGPP__ - --#include -- - #define OUTB(x,y) outportb(y, x) - #define OUTW(x,y) outportw(y, x) - #define OUTL(x,y) outportl(y, x) -@@ -246,7 +288,7 @@ static inline uint32_t inl(uint16_t port) - typedef struct { uint32_t hi, lo; } msr_t; - msr_t rdmsr(int addr); - int wrmsr(int addr, msr_t msr); --#endif -+#endif /* !defined(__DARWIN__) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__) && !defined(__LIBPAYLOAD__) */ - #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) - /* FreeBSD already has conflicting definitions for wrmsr/rdmsr. */ - #undef rdmsr -@@ -256,7 +298,8 @@ int wrmsr(int addr, msr_t msr); - typedef struct { uint32_t hi, lo; } msr_t; - msr_t freebsd_rdmsr(int addr); - int freebsd_wrmsr(int addr, msr_t msr); --#endif -+#endif /* defined(__FreeBSD__) || defined(__DragonFly__) */ -+ - #if defined(__LIBPAYLOAD__) - #include - #include diff --git a/flashrom-0007-ppc-hack.patch b/flashrom-0007-ppc-hack.patch deleted file mode 100644 index 490f020..0000000 --- a/flashrom-0007-ppc-hack.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Mattias Mattsson -Date: Wed, 27 Jul 2011 21:02:50 +0400 -Subject: [PATCH] ppc hack - - -diff --git a/internal.c b/internal.c -index e646ca8..6101222 100644 ---- a/internal.c -+++ b/internal.c -@@ -344,6 +344,8 @@ int internal_init(void) - "Aborting.\n"); - return 1; - #endif -+#elif defined(__powerpc__) || defined(__ppc__) -+ return 0; - #else - /* FIXME: Remove this unconditional abort once all PCI drivers are - * converted to use little-endian accesses for memory BARs. -diff --git a/processor_enable.c b/processor_enable.c -index 1361dd5..49d4006 100644 ---- a/processor_enable.c -+++ b/processor_enable.c -@@ -77,7 +77,7 @@ int processor_flash_enable(void) - flashbase = 0x1fc00000; - ret = 0; - } --#elif defined(__i386__) || defined(__x86_64__) -+#elif defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__) - /* On x86, flash access is not processor specific except on - * AMD Elan SC520, AMD Geode and maybe other SoC-style CPUs. - * FIXME: Move enable_flash_cs5536 and get_flashbase_sc520 here. diff --git a/flashrom.spec b/flashrom.spec index ec98ca7..6a01a3b 100644 --- a/flashrom.spec +++ b/flashrom.spec @@ -1,91 +1,65 @@ -Summary: Simple program for reading/writing BIOS chips content +Summary: Simple program for reading/writing flash chips content Name: flashrom -Version: 0.9.7 -Release: 5.svn1850%{?dist} +Version: 0.9.9 +Release: 1%{?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 -r 1850 export svn://coreboot.org/flashrom/trunk flashrom-0.9.7 -## tar -cjvf flashrom-0.9.7.tar.bz2 flashrom-0.9.7 -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-macros-from-configure-stage-instead-of-HAVE_UTSN.patch -Patch4: flashrom-0004-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch -Patch5: flashrom-0005-Use-endiannes-determined-at-the-configure-stage.patch -Patch6: flashrom-0006-Use-HAVE_-_H-macro-for-detecting-includes.patch -Patch7: flashrom-0007-ppc-hack.patch -BuildRequires: autoconf -BuildRequires: automake +Source0: http://download.flashrom.org/releases/%{name}-%{version}.tar.bz2 BuildRequires: pciutils-devel BuildRequires: libusb-devel BuildRequires: zlib-devel -%ifnarch ppc ppc64 %{arm} +%ifnarch %{arm} ppc %{power64} BuildRequires: libftdi-devel BuildRequires: dmidecode Requires: dmidecode %endif Requires: udev -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - # see rhbz #450273, #495226 ExclusiveArch: %{ix86} x86_64 ppc %{power64} %{arm} %description -Utility which can be used to detect BIOS chips (DIP, PLCC), read their contents -and write new contents on the chips ("flash the chip"). +flashrom is a utility for identifying, reading, writing, verifying and erasing +flash chips. It is designed to flash BIOS/EFI/coreboot/firmware/optionROM +images on mainboards, network/graphics/storage controller cards, and various +other programmer devices. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 - -%build -autoreconf -ivf -%if 0%{?el5} -%configure --with-linux-spi=no +%ifarch %{ix86} x86_64 +# 'internal' programmer is only supported on x86 platforms +%global flashrom_flags CFLAGS='%{optflags}' %else -%configure --with-ft2232-spi=no --with-usbblaster-spi=no --with-dediprog=yes +%global flashrom_flags CFLAGS='%{optflags}' CONFIG_INTERNAL=no %endif -make %{?_smp_mflags} -%install -rm -rf %{buildroot} -make install DESTDIR=%{buildroot} -%if 0%{?el5} -install -D -p -m 0644 util/z60_flashrom.rules %{buildroot}/etc/udev/rules.d/z60_flashrom.rules -%else -install -D -p -m 0644 util/z60_flashrom.rules %{buildroot}/lib/udev/rules.d/z60_flashrom.rules -%endif +%build +make %{?_smp_mflags} %{flashrom_flags} -%clean -rm -rf %{buildroot} +%install +make install %{flashrom_flags} DESTDIR=%{buildroot} PREFIX=%{_prefix} +install -D -p -m 0644 util/z60_flashrom.rules %{buildroot}/lib/udev/rules.d/z60_flashrom.rules %files %doc COPYING README %{_sbindir}/%{name} %{_mandir}/man8/%{name}.* -%if 0%{?el5} -/etc/udev/rules.d/z60_flashrom.rules -%else /lib/udev/rules.d/z60_flashrom.rules -%endif %changelog +* Sun Feb 26 2017 Alexandru Gagniuc - 0.9.9-1 +- Update to flashrom 0.9.9 +- Drop the autotools patches (they were rejected upstream) +- Update description to match flashrom.org main page +- Use {optflags} macro to set CFLAGS + * Fri Feb 10 2017 Fedora Release Engineering - 0.9.7-5.svn1850 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index b740e44..38f30cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d0546f8a080aa5369acba2b8966667a9 flashrom-0.9.7.tar.bz2 +SHA512 (flashrom-0.9.9.tar.bz2) = 155445ce7acab97f91596aad704aa2211da1c3f71fb463fc65c621dfea41e44b5de7db801c5b5cfc37450e8a8cfed5b202553715d999710422c830a0c38ae153