From 2026e4b4a0ec2bcc3605f109298b5cda632cf7dd Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Fri, 12 Aug 2011 22:44:38 +0400 Subject: [PATCH] Updated to latest svn ver. 1412 (post-release snapshot for 0.9.4) Signed-off-by: Peter Lemenkov --- .gitignore | 1 + ...al-commit-of-autotools-related-files.patch | 32 +++-- ...code-path-defined-at-configure-stage.patch | 8 +- ...Use-flashrom-s-version-from-config.h.patch | 14 +- ...CI-from-config.h-instead-of-NEED_PCI.patch | 16 +-- ...rom-config.h-instead-of-HAVE_UTSNAME.patch | 8 +- ...lated-ifdefs-in-code-this-is-now-con.patch | 71 ++++++++-- flashrom-0007-Simplify-hwaccess.c.patch | 6 +- ...es-determined-at-the-configure-stage.patch | 6 +- ...AVE_-_H-macro-for-detecting-includes.patch | 6 +- ...rch-checking-ifdef-block-into-header.patch | 8 +- flashrom-0011-ppc-hack.patch | 39 ++++++ ...m-0012-Support-for-LH28F008BJT-BTLZ1.patch | 128 ++++++++++++++++++ flashrom-0013-Simplify-processor.h.patch | 55 ++++++++ flashrom.spec | 32 ++++- sources | 2 +- 16 files changed, 366 insertions(+), 66 deletions(-) create mode 100644 flashrom-0011-ppc-hack.patch create mode 100644 flashrom-0012-Support-for-LH28F008BJT-BTLZ1.patch create mode 100644 flashrom-0013-Simplify-processor.h.patch diff --git a/.gitignore b/.gitignore index 3ca6626..f1447e6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,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 +/flashrom-0.9.4.tar.bz2 diff --git a/flashrom-0001-Initial-commit-of-autotools-related-files.patch b/flashrom-0001-Initial-commit-of-autotools-related-files.patch index 2b17f05..9d9dd00 100644 --- a/flashrom-0001-Initial-commit-of-autotools-related-files.patch +++ b/flashrom-0001-Initial-commit-of-autotools-related-files.patch @@ -1,27 +1,32 @@ -From f55bd3a36f62ec722db60c9c123f5e8c8e3d3d8a Mon Sep 17 00:00:00 2001 +From 29c6d0872db6f9189a2cdc076f38eff1bb646ade Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Fri, 17 Sep 2010 18:58:28 +0400 -Subject: [PATCH 01/10] Initial commit of autotools-related files +Subject: [PATCH 01/13] Initial commit of autotools-related files Signed-off-by: Peter Lemenkov --- - Makefile.am | 188 +++++++++++++++++++++++++++++++++++++++++++++ - configure.ac | 241 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 429 insertions(+), 0 deletions(-) + Makefile.am | 193 +++++++++++++++++++++++++++++++++++++++++++++ + configure.ac | 246 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 439 insertions(+), 0 deletions(-) create mode 100644 Makefile.am create mode 100644 configure.ac diff --git a/Makefile.am b/Makefile.am new file mode 100644 -index 0000000..60e3b43 +index 0000000..9ae35e5 --- /dev/null +++ b/Makefile.am -@@ -0,0 +1,188 @@ +@@ -0,0 +1,193 @@ +sbin_PROGRAMS = flashrom + +man_MANS = flashrom.8 + ++if HAVE_DMIDECODE +DEFS += -DDMIDECODE_PATH=\"@DMIDECODE@\" ++else ++DEFS += -DSTANDALONE ++endif ++ + +if HAVE_INTERNAL +internal_SOURCES = \ @@ -207,11 +212,11 @@ index 0000000..60e3b43 + $(lib_SOURCES) diff --git a/configure.ac b/configure.ac new file mode 100644 -index 0000000..767966b +index 0000000..87b7520 --- /dev/null +++ b/configure.ac -@@ -0,0 +1,241 @@ -+AC_INIT([flashrom], [0.9.3-r1368], [flashrom@flashrom.org], [flashrom], [http://www.flashrom.org/]) +@@ -0,0 +1,246 @@ ++AC_INIT([flashrom], [0.9.4-r1412], [flashrom@flashrom.org], [flashrom], [http://www.flashrom.org/]) + +AC_PREREQ(2.59) + @@ -335,6 +340,10 @@ index 0000000..767966b + echo "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 ++ echo "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 + ;; +esac + @@ -376,7 +385,7 @@ index 0000000..767966b +AC_PROG_INSTALL +AC_PROG_MAKE_SET + -+AC_PATH_PROG([DMIDECODE], dmidecode, [dmidecode], [$PATH$PATH_SEPARATOR/usr/sbin]) ++AC_PATH_PROG([DMIDECODE], dmidecode, [], [$PATH$PATH_SEPARATOR/usr/sbin]) + +# Checks for header files. +AC_CHECK_HEADERS([DirectIO/darwinio.h arpa/inet.h asm/sunddi.h fcntl.h inttypes.h limits.h machine/cpufunc.h machine/sysarch.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/io.h sys/ioctl.h sys/psw.h sys/socket.h sys/sysi86.h sys/time.h sys/utsname.h termios.h unistd.h]) @@ -427,6 +436,7 @@ index 0000000..767966b + +# For Makefile.am +AM_CONDITIONAL(HAVE_INTERNAL, test "$internal" = "yes") ++AM_CONDITIONAL(HAVE_DMIDECODE, test "$DMIDECODE" != "") +AM_CONDITIONAL(HAVE_X86_ONLY_INTERNAL, test "$enable_x86_only_internal" = "yes") +AM_CONDITIONAL(HAVE_SERPROG, test "$serprog" = "yes") +AM_CONDITIONAL(HAVE_RAYER_SPI, test "$rayer_spi" = "yes") diff --git a/flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch b/flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch index 128966e..ef4d491 100644 --- a/flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch +++ b/flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch @@ -1,7 +1,7 @@ -From 1c6ebd7aedccf6929c3b176ebde2748d324b1a00 Mon Sep 17 00:00:00 2001 +From e389cb3a26fac0ff6f343fcad17a592c0b81c6aa Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 12 Jun 2010 22:13:53 +0400 -Subject: [PATCH 02/10] Use dmidecode path defined at configure stage +Subject: [PATCH 02/13] Use dmidecode path defined at configure stage Signed-off-by: Peter Lemenkov --- @@ -9,10 +9,10 @@ Signed-off-by: Peter Lemenkov 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dmi.c b/dmi.c -index 836b38b..8a1e987 100644 +index 4f36245..d03e2b8 100644 --- a/dmi.c +++ b/dmi.c -@@ -75,7 +75,7 @@ static const struct { +@@ -84,7 +84,7 @@ static const struct { }; #define DMI_COMMAND_LEN_MAX 260 diff --git a/flashrom-0003-Use-flashrom-s-version-from-config.h.patch b/flashrom-0003-Use-flashrom-s-version-from-config.h.patch index b528ace..a31edb7 100644 --- a/flashrom-0003-Use-flashrom-s-version-from-config.h.patch +++ b/flashrom-0003-Use-flashrom-s-version-from-config.h.patch @@ -1,7 +1,7 @@ -From 84bff76a4d40d33bbb43bbc6002a9dc3327caefb Mon Sep 17 00:00:00 2001 +From acae0d448b6f947d5592d588ef6ecb8d51c599fa Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Fri, 17 Sep 2010 22:32:07 +0400 -Subject: [PATCH 03/10] Use flashrom's version from config.h +Subject: [PATCH 03/13] Use flashrom's version from config.h Signed-off-by: Peter Lemenkov --- @@ -11,7 +11,7 @@ Signed-off-by: Peter Lemenkov 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/flash.h b/flash.h -index 9c6d535..c6cf750 100644 +index 4b1cca2..d164883 100644 --- a/flash.h +++ b/flash.h @@ -199,7 +199,6 @@ enum write_granularity { @@ -23,7 +23,7 @@ index 9c6d535..c6cf750 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 d5892ca..dce2216 100644 +index 07cfdd9..578e256 100644 --- a/flashrom.c +++ b/flashrom.c @@ -31,6 +31,9 @@ @@ -44,7 +44,7 @@ index d5892ca..dce2216 100644 char *chip_to_probe = NULL; int verbose = 0; -@@ -1681,7 +1683,7 @@ void print_sysinfo(void) +@@ -1684,7 +1686,7 @@ void print_sysinfo(void) void print_version(void) { @@ -54,7 +54,7 @@ index d5892ca..dce2216 100644 } diff --git a/print_wiki.c b/print_wiki.c -index 6280aff..d70a717 100644 +index b70da86..8240e6c 100644 --- a/print_wiki.c +++ b/print_wiki.c @@ -26,6 +26,7 @@ @@ -65,7 +65,7 @@ index 6280aff..d70a717 100644 static const char wiki_header[] = "= Supported devices =\n\n\
Date: Fri, 17 Sep 2010 22:33:12 +0400 -Subject: [PATCH 04/10] 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 --- @@ -12,10 +12,10 @@ Signed-off-by: Peter Lemenkov 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/flashrom.c b/flashrom.c -index dce2216..df755c8 100644 +index 578e256..0ff1fad 100644 --- a/flashrom.c +++ b/flashrom.c -@@ -1649,7 +1649,7 @@ void print_sysinfo(void) +@@ -1652,7 +1652,7 @@ void print_sysinfo(void) msg_ginfo(" on unknown machine"); #endif msg_ginfo(", built with"); @@ -25,7 +25,7 @@ index dce2216..df755c8 100644 msg_ginfo(" libpci %s,", PCILIB_VERSION); #else diff --git a/hwaccess.h b/hwaccess.h -index a58194f..d4dd155 100644 +index eea3652..5ca8975 100644 --- a/hwaccess.h +++ b/hwaccess.h @@ -24,13 +24,15 @@ @@ -55,7 +55,7 @@ index a58194f..d4dd155 100644 #define __FLASHROM_HAVE_OUTB__ 1 diff --git a/internal.c b/internal.c -index 32bfb3a..32f734c 100644 +index 846cf1e..6cd791c 100644 --- a/internal.c +++ b/internal.c @@ -22,8 +22,9 @@ @@ -70,7 +70,7 @@ index 32bfb3a..32f734c 100644 { struct pci_dev *temp; diff --git a/programmer.h b/programmer.h -index cd82dcb..af9790d 100644 +index 6a28dbe..a6c04d5 100644 --- a/programmer.h +++ b/programmer.h @@ -24,6 +24,8 @@ @@ -98,7 +98,7 @@ index cd82dcb..af9790d 100644 -#if NEED_PCI == 1 +#if HAVE_LIBPCI == 1 struct pci_dev *pci_dev_find_filter(struct pci_filter filter); - struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t class); + struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t devclass); struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device); -- 1.7.6 diff --git a/flashrom-0005-Use-macros-from-config.h-instead-of-HAVE_UTSNAME.patch b/flashrom-0005-Use-macros-from-config.h-instead-of-HAVE_UTSNAME.patch index eeac56a..fd842f0 100644 --- a/flashrom-0005-Use-macros-from-config.h-instead-of-HAVE_UTSNAME.patch +++ b/flashrom-0005-Use-macros-from-config.h-instead-of-HAVE_UTSNAME.patch @@ -1,7 +1,7 @@ -From 9df1b7fb4cff1734bff49863d5d5e8df80ed9b44 Mon Sep 17 00:00:00 2001 +From a15e045ef7c703186ae728a271eba4a35a059cee Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 18 Sep 2010 09:05:43 +0400 -Subject: [PATCH 05/10] 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 --- @@ -9,7 +9,7 @@ Signed-off-by: Peter Lemenkov 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flashrom.c b/flashrom.c -index df755c8..c4cc406 100644 +index 0ff1fad..15246cd 100644 --- a/flashrom.c +++ b/flashrom.c @@ -34,7 +34,7 @@ @@ -21,7 +21,7 @@ index df755c8..c4cc406 100644 #include #endif #include "flash.h" -@@ -1639,7 +1639,7 @@ void list_programmers_linebreak(int startcol, int cols, int paren) +@@ -1642,7 +1642,7 @@ void list_programmers_linebreak(int startcol, int cols, int paren) void print_sysinfo(void) { diff --git a/flashrom-0006-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch b/flashrom-0006-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch index b728a4d..dab393d 100644 --- a/flashrom-0006-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch +++ b/flashrom-0006-Kill-some-x86-related-ifdefs-in-code-this-is-now-con.patch @@ -1,11 +1,12 @@ -From a3b5e3fe0e99dca11e1d88f5debb1159583d9eb3 Mon Sep 17 00:00:00 2001 +From d143299bcd2d0dcb4c9753f3ff0b795dc04ed465 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 18 Sep 2010 09:40:01 +0400 -Subject: [PATCH 06/10] Kill some x86-related ifdefs in code - this is now +Subject: [PATCH 06/13] Kill some x86-related ifdefs in code - this is now controlled via autotools Signed-off-by: Peter Lemenkov --- + atahpt.c | 6 ------ ichspi.c | 4 ---- it85spi.c | 4 ---- it87spi.c | 4 ---- @@ -14,16 +15,38 @@ Signed-off-by: Peter Lemenkov nicnatsemi.c | 6 ------ nicrealtek.c | 6 ------ rayer_spi.c | 5 ----- + satamv.c | 5 ----- sb600spi.c | 4 ---- wbsio_spi.c | 4 ---- - 10 files changed, 0 insertions(+), 47 deletions(-) + 12 files changed, 0 insertions(+), 58 deletions(-) +diff --git a/atahpt.c b/atahpt.c +index 3451342..eadb158 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" +@@ -79,7 +77,3 @@ uint8_t atahpt_chip_readb(const chipaddr addr) + 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/ichspi.c b/ichspi.c -index 99c4613..8942b68 100644 +index 34f0891..27170c6 100644 --- a/ichspi.c +++ b/ichspi.c -@@ -34,8 +34,6 @@ - * +@@ -23,8 +23,6 @@ + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if defined(__i386__) || defined(__x86_64__) @@ -31,14 +54,14 @@ index 99c4613..8942b68 100644 #include #include "flash.h" #include "chipdrivers.h" -@@ -1418,5 +1416,3 @@ int via_init_spi(struct pci_dev *dev) +@@ -1397,5 +1395,3 @@ int via_init_spi(struct pci_dev *dev) return 0; } - -#endif diff --git a/it85spi.c b/it85spi.c -index d4ca13b..9d29e46 100644 +index 76e4861..c9cbb72 100644 --- a/it85spi.c +++ b/it85spi.c @@ -24,8 +24,6 @@ @@ -50,14 +73,14 @@ index d4ca13b..9d29e46 100644 #include #include #include -@@ -361,5 +359,3 @@ static int it85xx_spi_send_command(unsigned int writecnt, unsigned int readcnt, +@@ -354,5 +352,3 @@ static int it85xx_spi_send_command(unsigned int writecnt, unsigned int readcnt, return 0; } - -#endif diff --git a/it87spi.c b/it87spi.c -index 54f41fa..db60cbc 100644 +index c24ba9b..24dd746 100644 --- a/it87spi.c +++ b/it87spi.c @@ -23,8 +23,6 @@ @@ -69,7 +92,7 @@ index 54f41fa..db60cbc 100644 #include #include #include "flash.h" -@@ -399,5 +397,3 @@ static int it8716f_spi_chip_write_256(struct flashchip *flash, uint8_t *buf, int +@@ -400,5 +398,3 @@ static int it8716f_spi_chip_write_256(struct flashchip *flash, uint8_t *buf, return 0; } @@ -95,7 +118,7 @@ index d2c31be..19509be 100644 - -#endif diff --git a/nic3com.c b/nic3com.c -index bcc63e0..72c1029 100644 +index d8a11d0..9f0bd16 100644 --- a/nic3com.c +++ b/nic3com.c @@ -18,8 +18,6 @@ @@ -116,7 +139,7 @@ index bcc63e0..72c1029 100644 -#error PCI port I/O access is not supported on this architecture yet. -#endif diff --git a/nicnatsemi.c b/nicnatsemi.c -index ac37cf0..b2a2f66 100644 +index b89b5c5..cccc484 100644 --- a/nicnatsemi.c +++ b/nicnatsemi.c @@ -18,8 +18,6 @@ @@ -137,7 +160,7 @@ index ac37cf0..b2a2f66 100644 -#error PCI port I/O access is not supported on this architecture yet. -#endif diff --git a/nicrealtek.c b/nicrealtek.c -index 4566e50..b57f5bf 100644 +index bed0710..39bbc8a 100644 --- a/nicrealtek.c +++ b/nicrealtek.c @@ -18,8 +18,6 @@ @@ -177,6 +200,26 @@ index 0807487..f722f95 100644 -#else -#error PCI port I/O access is not supported on this architecture yet. -#endif +diff --git a/satamv.c b/satamv.c +index 5c15fc8..618f946 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" +@@ -183,7 +182,3 @@ uint8_t satamv_chip_readb(const chipaddr addr) + { + 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 37aac3b..e176f00 100644 --- a/sb600spi.c diff --git a/flashrom-0007-Simplify-hwaccess.c.patch b/flashrom-0007-Simplify-hwaccess.c.patch index 2fb9430..d44182d 100644 --- a/flashrom-0007-Simplify-hwaccess.c.patch +++ b/flashrom-0007-Simplify-hwaccess.c.patch @@ -1,7 +1,7 @@ -From 7413473c97fcd9b3d9d2b27765a35641cd2fb985 Mon Sep 17 00:00:00 2001 +From 63f49c09bafe87945d71d72e6b1c9aabea65c5d7 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Tue, 21 Sep 2010 17:51:08 +0400 -Subject: [PATCH 07/10] 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 @@ -16,7 +16,7 @@ Signed-off-by: Peter Lemenkov 1 files changed, 30 insertions(+), 55 deletions(-) diff --git a/hwaccess.c b/hwaccess.c -index efe8bb0..50ef404 100644 +index 8c89925..f10d957 100644 --- a/hwaccess.c +++ b/hwaccess.c @@ -31,30 +31,47 @@ diff --git a/flashrom-0008-Use-endiannes-determined-at-the-configure-stage.patch b/flashrom-0008-Use-endiannes-determined-at-the-configure-stage.patch index 5342eac..4c1393b 100644 --- a/flashrom-0008-Use-endiannes-determined-at-the-configure-stage.patch +++ b/flashrom-0008-Use-endiannes-determined-at-the-configure-stage.patch @@ -1,7 +1,7 @@ -From 96273a02b83f8ebd42c86b42a25f1e6fcb004a74 Mon Sep 17 00:00:00 2001 +From 99b4c8249dffba7072f770436615d633b6920c52 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sun, 26 Sep 2010 18:25:31 +0400 -Subject: [PATCH 08/10] Use endiannes determined at the configure stage +Subject: [PATCH 08/13] Use endiannes determined at the configure stage Signed-off-by: Peter Lemenkov --- @@ -9,7 +9,7 @@ Signed-off-by: Peter Lemenkov 1 files changed, 2 insertions(+), 51 deletions(-) diff --git a/hwaccess.h b/hwaccess.h -index d4dd155..27ecead 100644 +index 5ca8975..61f1251 100644 --- a/hwaccess.h +++ b/hwaccess.h @@ -43,51 +43,6 @@ diff --git a/flashrom-0009-Use-HAVE_-_H-macro-for-detecting-includes.patch b/flashrom-0009-Use-HAVE_-_H-macro-for-detecting-includes.patch index 0c5268c..2388df7 100644 --- a/flashrom-0009-Use-HAVE_-_H-macro-for-detecting-includes.patch +++ b/flashrom-0009-Use-HAVE_-_H-macro-for-detecting-includes.patch @@ -1,7 +1,7 @@ -From 1bcb40559465c50ae7499196e4c4864136ecabb4 Mon Sep 17 00:00:00 2001 +From fb8494eb62635a5520aa1da7bad4555882026af9 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sun, 26 Sep 2010 21:05:50 +0400 -Subject: [PATCH 09/10] Use HAVE_*_H macro for detecting includes +Subject: [PATCH 09/13] Use HAVE_*_H macro for detecting includes Signed-off-by: Peter Lemenkov --- @@ -9,7 +9,7 @@ Signed-off-by: Peter Lemenkov 1 files changed, 51 insertions(+), 21 deletions(-) diff --git a/hwaccess.h b/hwaccess.h -index 27ecead..b73513b 100644 +index 61f1251..b3024b3 100644 --- a/hwaccess.h +++ b/hwaccess.h @@ -26,13 +26,11 @@ diff --git a/flashrom-0010-Move-arch-checking-ifdef-block-into-header.patch b/flashrom-0010-Move-arch-checking-ifdef-block-into-header.patch index 87a394b..3387a68 100644 --- a/flashrom-0010-Move-arch-checking-ifdef-block-into-header.patch +++ b/flashrom-0010-Move-arch-checking-ifdef-block-into-header.patch @@ -1,7 +1,7 @@ -From e76ae6f1ac18d2b8a562ab9eff0538197a67996e Mon Sep 17 00:00:00 2001 +From 7364a346bc8e0026df4d470809035cd4d3dc916a Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sun, 17 Oct 2010 12:53:18 +0400 -Subject: [PATCH 10/10] Move arch-checking #ifdef block into header +Subject: [PATCH 10/13] Move arch-checking #ifdef block into header Signed-off-by: Peter Lemenkov --- @@ -10,7 +10,7 @@ Signed-off-by: Peter Lemenkov 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/hwaccess.c b/hwaccess.c -index 50ef404..b23cee6 100644 +index f10d957..98dbfaa 100644 --- a/hwaccess.c +++ b/hwaccess.c @@ -31,13 +31,6 @@ @@ -28,7 +28,7 @@ index 50ef404..b23cee6 100644 #if defined(__FreeBSD__) || defined(__DragonFly__) int io_fd; diff --git a/hwaccess.h b/hwaccess.h -index b73513b..807bb8f 100644 +index b3024b3..214c38b 100644 --- a/hwaccess.h +++ b/hwaccess.h @@ -26,6 +26,13 @@ diff --git a/flashrom-0011-ppc-hack.patch b/flashrom-0011-ppc-hack.patch new file mode 100644 index 0000000..24c8b71 --- /dev/null +++ b/flashrom-0011-ppc-hack.patch @@ -0,0 +1,39 @@ +From 64d86555c0c1061572d8cb66a8ec5e73423ad7e6 Mon Sep 17 00:00:00 2001 +From: Mattias Mattsson +Date: Wed, 27 Jul 2011 21:02:50 +0400 +Subject: [PATCH 11/13] ppc hack + +--- + internal.c | 2 ++ + processor_enable.c | 2 +- + 2 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/internal.c b/internal.c +index 6cd791c..c7e527f 100644 +--- a/internal.c ++++ b/internal.c +@@ -293,6 +293,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 d680f97..014e019 100644 +--- a/processor_enable.c ++++ b/processor_enable.c +@@ -24,7 +24,7 @@ + #include "flash.h" + #include "programmer.h" + +-#if defined(__i386__) || defined(__x86_64__) ++#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__) + + int processor_flash_enable(void) + { +-- +1.7.6 + diff --git a/flashrom-0012-Support-for-LH28F008BJT-BTLZ1.patch b/flashrom-0012-Support-for-LH28F008BJT-BTLZ1.patch new file mode 100644 index 0000000..f8a9b70 --- /dev/null +++ b/flashrom-0012-Support-for-LH28F008BJT-BTLZ1.patch @@ -0,0 +1,128 @@ +From dfd43b86397cf877450b3e75608fc897e71b0b06 Mon Sep 17 00:00:00 2001 +From: Mattias Mattsson +Date: Wed, 27 Jul 2011 21:03:48 +0400 +Subject: [PATCH 12/13] Support for LH28F008BJT-BTLZ1 + +--- + 82802ab.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + chipdrivers.h | 1 + + flashchips.c | 30 ++++++++++++++++++++++++++++++ + 3 files changed, 84 insertions(+), 0 deletions(-) + +diff --git a/82802ab.c b/82802ab.c +index cd59c07..abffff9 100644 +--- a/82802ab.c ++++ b/82802ab.c +@@ -208,3 +208,56 @@ int unlock_28f004s5(struct flashchip *flash) + + return 0; + } ++ ++int unlock_lh28f008bjt(struct flashchip *flash) ++{ ++ chipaddr bios = flash->virtual_memory; ++ uint8_t mcfg, bcfg, need_unlock = 0, can_unlock = 0; ++ int i; ++ ++ /* Wait if chip is busy */ ++ wait_82802ab(flash); ++ ++ /* Read identifier codes */ ++ chip_writeb(0x90, bios); ++ ++ /* Read master lock-bit */ ++ mcfg = chip_readb(bios + 0x3); ++ msg_cdbg("master lock is "); ++ if (mcfg) { ++ msg_cdbg("locked!\n"); ++ } else { ++ msg_cdbg("unlocked!\n"); ++ can_unlock = 1; ++ } ++ ++ /* Read block lock-bits, 8 * 8 KiB + 15 * 64 KiB */ ++ for (i = 0; i < flash->total_size * 1024; i+= (i >= (64 * 1024) ? 64 * 1024 : 8 * 1024)) { ++ bcfg = chip_readb(bios + i + 2); // read block lock config ++ msg_cdbg("block lock at %06x is %slocked!\n", i, bcfg ? "" : "un"); ++ if (bcfg) { ++ need_unlock = 1; ++ } ++ } ++ ++ /* Reset chip */ ++ chip_writeb(0xFF, bios); ++ ++ /* Unlock: clear block lock-bits, if needed */ ++ if (can_unlock && need_unlock) { ++ msg_cdbg("Unlock: "); ++ chip_writeb(0x60, bios); ++ chip_writeb(0xD0, bios); ++ chip_writeb(0xFF, bios); ++ wait_82802ab(flash); ++ msg_cdbg("Done!\n"); ++ } ++ ++ /* Error: master locked or a block is locked */ ++ if (!can_unlock && need_unlock) { ++ msg_cerr("At least one block is locked and lockdown is active!\n"); ++ return -1; ++ } ++ ++ return 0; ++} +diff --git a/chipdrivers.h b/chipdrivers.h +index 92ddbea..4c29b65 100644 +--- a/chipdrivers.h ++++ b/chipdrivers.h +@@ -83,6 +83,7 @@ int write_82802ab(struct flashchip *flash, uint8_t *buf, int start, int len); + void print_status_82802ab(uint8_t status); + int unlock_82802ab(struct flashchip *flash); + int unlock_28f004s5(struct flashchip *flash); ++int unlock_lh28f008bjt(struct flashchip *flash); + + /* jedec.c */ + uint8_t oddparity(uint8_t val); +diff --git a/flashchips.c b/flashchips.c +index 1a5622f..109b9b7 100644 +--- a/flashchips.c ++++ b/flashchips.c +@@ -5379,6 +5379,36 @@ const struct flashchip flashchips[] = { + + { + .vendor = "Sharp", ++ .name = "LH28F008BJT-BTLZ1", ++ .bustype = BUS_PARALLEL, ++ .manufacture_id = SHARP_ID, ++ .model_id = SHARP_LH28F008BJxxPB, ++ .total_size = 1024, ++ .page_size = 64 * 1024, ++ .tested = TEST_OK_PREW, ++ .probe = probe_82802ab, ++ .probe_timing = TIMING_ZERO, ++ .block_erasers = ++ { ++ { ++ .eraseblocks = { ++ {8 * 1024, 8}, ++ {64 * 1024, 15} ++ }, ++ .block_erase = erase_block_82802ab, ++ }, { ++ .eraseblocks = { {1024 * 1024, 1} }, ++ .block_erase = erase_sector_49lfxxxc, ++ } ++ }, ++ .unlock = unlock_lh28f008bjt, ++ .write = write_82802ab, ++ .read = read_memmapped, ++ .voltage = {2700, 3600}, ++ }, ++ ++ { ++ .vendor = "Sharp", + .name = "LHF00L04", + .bustype = BUS_FWH, /* A/A Mux */ + .manufacture_id = SHARP_ID, +-- +1.7.6 + diff --git a/flashrom-0013-Simplify-processor.h.patch b/flashrom-0013-Simplify-processor.h.patch new file mode 100644 index 0000000..235867f --- /dev/null +++ b/flashrom-0013-Simplify-processor.h.patch @@ -0,0 +1,55 @@ +From 4dd2659b1379d008709e63ae9f28bb09382221d2 Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov +Date: Thu, 28 Jul 2011 12:56:17 +0400 +Subject: [PATCH 13/13] Simplify processor.h + +Signed-off-by: Peter Lemenkov +--- + processor_enable.c | 24 ++++++++---------------- + 1 files changed, 8 insertions(+), 16 deletions(-) + +diff --git a/processor_enable.c b/processor_enable.c +index 014e019..d2e98b0 100644 +--- a/processor_enable.c ++++ b/processor_enable.c +@@ -24,19 +24,6 @@ + #include "flash.h" + #include "programmer.h" + +-#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__) +- +-int processor_flash_enable(void) +-{ +- /* 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. +- */ +- return 0; +-} +- +-#else +- + #if defined (__MIPSEL__) && defined (__linux) + #include + #include +@@ -89,9 +76,14 @@ int processor_flash_enable(void) + flashbase = 0x1fc00000; + return 0; + } +-#endif ++#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. ++ */ ++ return 0; ++#else + /* Not implemented yet. Oh well. */ + return 1; +-} +- + #endif ++} +-- +1.7.6 + diff --git a/flashrom.spec b/flashrom.spec index 8150ca7..95d940a 100644 --- a/flashrom.spec +++ b/flashrom.spec @@ -1,14 +1,14 @@ Summary: Simple program for reading/writing BIOS chips content Name: flashrom -Version: 0.9.3 -Release: 5.svn1368%{?dist} +Version: 0.9.4 +Release: 1.svn1412%{?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 1368 export svn://coreboot.org/flashrom/trunk flashrom-0.9.3 -## tar -cjvf flashrom-0.9.3.tar.bz2 flashrom-0.9.3 +## svn -r 1412 export svn://coreboot.org/flashrom/trunk flashrom-0.9.4 +## tar -cjvf flashrom-0.9.4.tar.bz2 flashrom-0.9.4 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 @@ -20,6 +20,9 @@ Patch7: flashrom-0007-Simplify-hwaccess.c.patch Patch8: flashrom-0008-Use-endiannes-determined-at-the-configure-stage.patch Patch9: flashrom-0009-Use-HAVE_-_H-macro-for-detecting-includes.patch Patch10: flashrom-0010-Move-arch-checking-ifdef-block-into-header.patch +Patch11: flashrom-0011-ppc-hack.patch +Patch12: flashrom-0012-Support-for-LH28F008BJT-BTLZ1.patch +Patch13: flashrom-0013-Simplify-processor.h.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: pciutils-devel @@ -49,6 +52,9 @@ and write new contents on the chips ("flash the chip"). %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 %build autoreconf -ivf @@ -70,6 +76,24 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/%{name}.* %changelog +* Fri Aug 12 2011 Peter Lemenkov - 0.9.4-1.svn1412 +- Updated to latest svn ver. 1412 (post-release snapshot for 0.9.4) +- Experimental support for Apple PowerPC Macs reflashing +- Added support for the Dangerous Prototypes Bus Blaster +- Board enable for ASUS P5GD2 Premium +- (Untested) board enable for Asus P5LD2 +- Board enable for ASUS A8M2N-LA (HP OEM "NodusM3-GL8E") +- Add J-7BXAN to the list of supported boards +- Add ASUS P4S533-X to the list of supported boards +- Add ASUS M4A785TD-V EVO to the list of supported board +- Add GA-945PL-S3P (rev. 6.6) to the list of supported boards +- Add MS-7142 (K8MM-V) to the list of supported boards +- Add MS-7369 (K9N Neo V2) to the list of supported boards +- Add X7DBT-INF to the list of supported boards +- Add support for the GIGABYTE GA-8SIMLH board +- Support for EN25Q(H) series SPI flash chips +- Add satamv programmer + * Tue Jul 12 2011 Peter Lemenkov - 0.9.3-5.svn1368 - Updated to latest svn ver. 1368 (post-release snapshot for 0.9.3) - Added 32 (yes, thirty-two) new boards diff --git a/sources b/sources index 901be05..b9c9bbf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7d96f91729912837369cb4e21ec64058 flashrom-0.9.3.tar.bz2 +fb58fca9ff8b93de876bc4c3cfd77007 flashrom-0.9.4.tar.bz2