diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2013-07-13 23:21:05 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2013-07-13 23:21:05 +0000 |
commit | ae356998b5315c82b2ac23ffb9ce3cd73cc8deda (patch) | |
tree | 5c905e082327d5714b6a09d30ae38e210d610ca9 /internal.c | |
parent | 2ce27a97c246c58625afb5e15db314311e9d2a49 (diff) | |
download | flashrom-ae356998b5315c82b2ac23ffb9ce3cd73cc8deda.zip flashrom-ae356998b5315c82b2ac23ffb9ce3cd73cc8deda.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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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. */ |