summaryrefslogtreecommitdiffstats
path: root/internal.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2013-07-13 23:21:05 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-07-13 23:21:05 +0000
commit11990da1d3a4ca913ed5b85888a37188c4a621db (patch)
tree5c905e082327d5714b6a09d30ae38e210d610ca9 /internal.c
parent6bf5fe78f1064b56275056b2a90ea4e1c34e42be (diff)
downloadast2050-flashrom-11990da1d3a4ca913ed5b85888a37188c4a621db.zip
ast2050-flashrom-11990da1d3a4ca913ed5b85888a37188c4a621db.tar.gz
Various cross-platform fixes
Improve compilation with libpayload (compiling flashrom.c and linking is still broken): - disable Ponyprog (which enforced serial.c compilation) - make errno available where it is needed Fix internal.c for non-x86 and enable cb parsing on ARM. Fix mingw builds by using its __USE_MINGW_ANSI_STDIO macro and gnu_printf definition for printf format style checking. See http://sourceforge.net/apps/trac/mingw-w64/wiki/gnu%20printf This requires inclusion of stdio.h in flash.h. Fix order of libraries in the Makefile: FEATURE_LIBS needs to come *after* PCILIBS in case ZLIB is needed by it. Corresponding to flashrom svn r1697. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'internal.c')
-rw-r--r--internal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal.c b/internal.c
index 5af74cd..ab3c81f 100644
--- a/internal.c
+++ b/internal.c
@@ -172,8 +172,10 @@ int internal_init(void)
int not_a_laptop = 0;
const char *board_vendor = NULL;
const char *board_model = NULL;
+#if defined (__i386__) || defined (__x86_64__) || defined (__arm__)
const char *cb_vendor = NULL;
const char *cb_model = NULL;
+#endif
char *arg;
arg = extract_programmer_param("boardenable");
@@ -254,7 +256,7 @@ int internal_init(void)
return 1;
}
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || defined (__arm__)
if ((cb_parse_table(&cb_vendor, &cb_model) == 0) && (board_vendor != NULL) && (board_model != NULL)) {
if (strcasecmp(board_vendor, cb_vendor) || strcasecmp(board_model, cb_model)) {
msg_pwarn("Warning: The mainboard IDs set by -p internal:mainboard (%s:%s) do not\n"
@@ -265,7 +267,9 @@ int internal_init(void)
msg_pinfo("Continuing anyway.\n");
}
}
+#endif
+#if defined(__i386__) || defined(__x86_64__)
dmi_init();
/* In case Super I/O probing would cause pretty explosions. */
OpenPOWER on IntegriCloud