1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 22:21:16 +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:
Carl-Daniel Hailfinger
2010-10-08 12:40:09 +00:00
parent ab6328fa36
commit 9e3a6c4913
6 changed files with 41 additions and 24 deletions

View File

@ -53,22 +53,22 @@ static int is_loongson(void)
if (fgets(line, sizeof(line), cpuinfo) == NULL)
break;
ptr = line;
while (*ptr && isspace(*ptr))
while (*ptr && isspace((unsigned char)*ptr))
ptr++;
/* "cpu" part appears only with some Linux versions. */
if (strncmp(ptr, "cpu", sizeof("cpu") - 1) == 0)
ptr += sizeof("cpu") - 1;
while (*ptr && isspace(*ptr))
while (*ptr && isspace((unsigned char)*ptr))
ptr++;
if (strncmp(ptr, "model", sizeof("model") - 1) != 0)
continue;
ptr += sizeof("model") - 1;
while (*ptr && isspace(*ptr))
while (*ptr && isspace((unsigned char)*ptr))
ptr++;
if (*ptr != ':')
continue;
ptr++;
while (*ptr && isspace(*ptr))
while (*ptr && isspace((unsigned char)*ptr))
ptr++;
fclose(cpuinfo);
return (strncmp(ptr, "ICT Loongson-2 V0.3",