From 11990da1d3a4ca913ed5b85888a37188c4a621db Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Sat, 13 Jul 2013 23:21:05 +0000 Subject: 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 Signed-off-by: Stefan Tauner Acked-by: Carl-Daniel Hailfinger --- internal.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'internal.c') diff --git a/internal.c b/internal.c index 5af74cd7c..ab3c81fe2 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. */ -- cgit v1.2.3