I wanted to tag 0.9.3, but then I noticed that compilation was broken in a few cases, and the README had insufficient information. Fix that.
In detail: CONFIG_BITBANG_SPI was not selected if CONFIG_NICINTEL_SPI was on by default. Wiki output was missing all flash chips if CONFIG_INTERNAL was not selected. ft2232_spi used possibly negative indices in the toupper() function/array. Software requirements on non-Linux/FreeBSD/OpenBSD operating systems were missing. Non-x86 compilation does not work with the default programmer set, so list the make parameters which result in a working build.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-compilefixes/Makefile =================================================================== --- flashrom-compilefixes/Makefile (revision 1201) +++ flashrom-compilefixes/Makefile (working copy) @@ -115,21 +115,6 @@ # RayeR SPIPGM hardware support CONFIG_RAYER_SPI ?= yes
-# 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 - # Always enable 3Com NICs for now. CONFIG_NIC3COM ?= yes
@@ -170,7 +155,22 @@ # 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. Index: flashrom-compilefixes/print_wiki.c =================================================================== --- flashrom-compilefixes/print_wiki.c (revision 1201) +++ flashrom-compilefixes/print_wiki.c (working copy) @@ -268,8 +268,8 @@ time_t t = time(NULL);
printf(wiki_header, ctime(&t), flashrom_version); + print_supported_chips_wiki(2); #if CONFIG_INTERNAL == 1 - print_supported_chips_wiki(2); print_supported_chipsets_wiki(3); print_supported_boards_wiki(); #endif Index: flashrom-compilefixes/ft2232_spi.c =================================================================== --- flashrom-compilefixes/ft2232_spi.c (revision 1201) +++ flashrom-compilefixes/ft2232_spi.c (working copy) @@ -148,7 +148,7 @@ free(arg); arg = extract_programmer_param("port"); if (arg) { - switch (toupper(*arg)) { + switch (toupper((unsigned char)*arg)) { case 'A': ft2232_interface = INTERFACE_A; break; Index: flashrom-compilefixes/README =================================================================== --- flashrom-compilefixes/README (revision 1201) +++ flashrom-compilefixes/README (working copy) @@ -60,6 +60,11 @@ * devel/gmake * sysutils/pciutils
+On other operating systems, you need the following software: + + * pciutils+libpci (if you want support for mainboard or PCI device flashing) + * libusb (if you want FT2232 or Dediprog support) + To compile on Linux, use:
make @@ -111,6 +116,18 @@ http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi7b.zip and make sure CWSDPMI.EXE is in the current directory.
+Processor architecture dependent features: + + On non-x86 architectures you have to disable a few programmers because they + use port-based I/O which is not directly available on non-x86. Please add + CONFIG_RAYER_SPI=no CONFIG_NIC3COM=no CONFIG_ATAHPT=no CONFIG_NICREALTEK=no \ + CONFIG_NICNATSEMI=no + as parameters to the "make" invocation. + Besides that, the internal programmer is only supported on x86 and MIPS. On + other architectures, please add + CONFIG_INTERNAL=no + as parameter to the "make" invocation. + Installation ------------