mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
Multiple unrelated changes
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. Use correct type for toupper()/tolower()/isspace() functions. Specify software requirements in a generic way. Non-x86 compilation does not work with the default programmer set, so list the make parameters which result in a working build. Corresponding to flashrom svn r1203. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
This commit is contained in:
parent
ab6328fa36
commit
9e3a6c4913
30
Makefile
30
Makefile
@ -115,21 +115,6 @@ CONFIG_SERPROG ?= yes
|
|||||||
# RayeR SPIPGM hardware support
|
# RayeR SPIPGM hardware support
|
||||||
CONFIG_RAYER_SPI ?= yes
|
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.
|
# Always enable 3Com NICs for now.
|
||||||
CONFIG_NIC3COM ?= yes
|
CONFIG_NIC3COM ?= yes
|
||||||
|
|
||||||
@ -170,6 +155,21 @@ CONFIG_DEDIPROG ?= no
|
|||||||
# Disable wiki printing by default. It is only useful if you have wiki access.
|
# Disable wiki printing by default. It is only useful if you have wiki access.
|
||||||
CONFIG_PRINT_WIKI ?= no
|
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)
|
ifeq ($(CONFIG_INTERNAL), yes)
|
||||||
FEATURE_CFLAGS += -D'CONFIG_INTERNAL=1'
|
FEATURE_CFLAGS += -D'CONFIG_INTERNAL=1'
|
||||||
PROGRAMMER_OBJS += processor_enable.o chipset_enable.o board_enable.o cbtable.o dmi.o internal.o
|
PROGRAMMER_OBJS += processor_enable.o chipset_enable.o board_enable.o cbtable.o dmi.o internal.o
|
||||||
|
18
README
18
README
@ -42,7 +42,11 @@ processing.
|
|||||||
Build Instructions
|
Build Instructions
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
To build flashrom you need to install the following packages or ports:
|
To build flashrom you need to install the following software:
|
||||||
|
|
||||||
|
* pciutils+libpci (if you want support for mainboard or PCI device flashing)
|
||||||
|
* libusb (if you want FT2232 or Dediprog support)
|
||||||
|
* libftdi (if you want FT2232 support)
|
||||||
|
|
||||||
Linux et al:
|
Linux et al:
|
||||||
|
|
||||||
@ -111,6 +115,18 @@ To cross-compile on Linux for DOS:
|
|||||||
http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi7b.zip and make sure
|
http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi7b.zip and make sure
|
||||||
CWSDPMI.EXE is in the current directory.
|
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
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ int ft2232_spi_init(void)
|
|||||||
free(arg);
|
free(arg);
|
||||||
arg = extract_programmer_param("port");
|
arg = extract_programmer_param("port");
|
||||||
if (arg) {
|
if (arg) {
|
||||||
switch (toupper(*arg)) {
|
switch (toupper((unsigned char)*arg)) {
|
||||||
case 'A':
|
case 'A':
|
||||||
ft2232_interface = INTERFACE_A;
|
ft2232_interface = INTERFACE_A;
|
||||||
break;
|
break;
|
||||||
|
@ -268,8 +268,8 @@ void print_supported_wiki(void)
|
|||||||
time_t t = time(NULL);
|
time_t t = time(NULL);
|
||||||
|
|
||||||
printf(wiki_header, ctime(&t), flashrom_version);
|
printf(wiki_header, ctime(&t), flashrom_version);
|
||||||
#if CONFIG_INTERNAL == 1
|
|
||||||
print_supported_chips_wiki(2);
|
print_supported_chips_wiki(2);
|
||||||
|
#if CONFIG_INTERNAL == 1
|
||||||
print_supported_chipsets_wiki(3);
|
print_supported_chipsets_wiki(3);
|
||||||
print_supported_boards_wiki();
|
print_supported_boards_wiki();
|
||||||
#endif
|
#endif
|
||||||
|
@ -53,22 +53,22 @@ static int is_loongson(void)
|
|||||||
if (fgets(line, sizeof(line), cpuinfo) == NULL)
|
if (fgets(line, sizeof(line), cpuinfo) == NULL)
|
||||||
break;
|
break;
|
||||||
ptr = line;
|
ptr = line;
|
||||||
while (*ptr && isspace(*ptr))
|
while (*ptr && isspace((unsigned char)*ptr))
|
||||||
ptr++;
|
ptr++;
|
||||||
/* "cpu" part appears only with some Linux versions. */
|
/* "cpu" part appears only with some Linux versions. */
|
||||||
if (strncmp(ptr, "cpu", sizeof("cpu") - 1) == 0)
|
if (strncmp(ptr, "cpu", sizeof("cpu") - 1) == 0)
|
||||||
ptr += sizeof("cpu") - 1;
|
ptr += sizeof("cpu") - 1;
|
||||||
while (*ptr && isspace(*ptr))
|
while (*ptr && isspace((unsigned char)*ptr))
|
||||||
ptr++;
|
ptr++;
|
||||||
if (strncmp(ptr, "model", sizeof("model") - 1) != 0)
|
if (strncmp(ptr, "model", sizeof("model") - 1) != 0)
|
||||||
continue;
|
continue;
|
||||||
ptr += sizeof("model") - 1;
|
ptr += sizeof("model") - 1;
|
||||||
while (*ptr && isspace(*ptr))
|
while (*ptr && isspace((unsigned char)*ptr))
|
||||||
ptr++;
|
ptr++;
|
||||||
if (*ptr != ':')
|
if (*ptr != ':')
|
||||||
continue;
|
continue;
|
||||||
ptr++;
|
ptr++;
|
||||||
while (*ptr && isspace(*ptr))
|
while (*ptr && isspace((unsigned char)*ptr))
|
||||||
ptr++;
|
ptr++;
|
||||||
fclose(cpuinfo);
|
fclose(cpuinfo);
|
||||||
return (strncmp(ptr, "ICT Loongson-2 V0.3",
|
return (strncmp(ptr, "ICT Loongson-2 V0.3",
|
||||||
|
5
serial.c
5
serial.c
@ -106,8 +106,9 @@ fdtype sp_openserport(char *dev, unsigned int baud)
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
HANDLE fd;
|
HANDLE fd;
|
||||||
char *dev2 = dev;
|
char *dev2 = dev;
|
||||||
if ((strlen(dev) > 3) && (tolower(dev[0]) == 'c')
|
if ((strlen(dev) > 3) && (tolower((unsigned char)dev[0]) == 'c') &&
|
||||||
&& (tolower(dev[1]) == 'o') && (tolower(dev[2]) == 'm')) {
|
(tolower((unsigned char)dev[1]) == 'o') &&
|
||||||
|
(tolower((unsigned char)dev[2]) == 'm')) {
|
||||||
dev2 = malloc(strlen(dev) + 5);
|
dev2 = malloc(strlen(dev) + 5);
|
||||||
strcpy(dev2, "\\\\.\\");
|
strcpy(dev2, "\\\\.\\");
|
||||||
strcpy(dev2 + 4, dev);
|
strcpy(dev2 + 4, dev);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user