summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstepan <stepan@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-07-30 13:30:17 +0000
committerstepan <stepan@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-07-30 13:30:17 +0000
commitddecbc40aa3a7c725c31dc3b5c7c3ec3d3655210 (patch)
tree50e1d66441dcc18b74aa192c51aac257fe51548f
parentb53db2a9bf404ee38f40b9fbdb1f3062a5ea5ecf (diff)
downloadflashrom-ddecbc40aa3a7c725c31dc3b5c7c3ec3d3655210.tar.gz
Boards with coreboot have a cbtable containing vendor and board name.
flashrom tries to match these with board enable entries in its database. If no such board enable entry exists because the board doesn't need one, flashrom complains. Silence that complaint. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Slightly updated and Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@668 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r--board_enable.c11
-rw-r--r--cbtable.c2
-rw-r--r--flash.h1
3 files changed, 12 insertions, 2 deletions
diff --git a/board_enable.c b/board_enable.c
index b094e9b..a47318f 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -1134,7 +1134,14 @@ static struct board_pciid_enable *board_match_coreboot_name(const char *vendor,
if (partmatch)
return partmatch;
- printf("\nUnknown vendor:board from coreboot table or -m option: %s:%s\n\n", vendor, part);
+ if (!partvendor_from_cbtable) {
+ /* Only warn if the mainboard type was not gathered from the
+ * coreboot table. If it was, the coreboot implementor is
+ * expected to fix flashrom, too.
+ */
+ printf("\nUnknown vendor:board from -m option: %s:%s\n\n",
+ vendor, part);
+ }
return NULL;
}
@@ -1187,7 +1194,7 @@ int board_flash_enable(const char *vendor, const char *part)
board = board_match_pci_card_ids();
if (board) {
- printf("Found board \"%s %s\", enabling flash write... ",
+ printf("Disabling flash write protection for board \"%s %s\"... ",
board->vendor_name, board->board_name);
ret = board->enable(board->vendor_name);
diff --git a/cbtable.c b/cbtable.c
index 4bcfa88..10fe494 100644
--- a/cbtable.c
+++ b/cbtable.c
@@ -31,6 +31,7 @@
#include "coreboot_tables.h"
char *lb_part = NULL, *lb_vendor = NULL;
+int partvendor_from_cbtable = 0;
static unsigned long compute_checksum(void *addr, unsigned long length)
{
@@ -150,6 +151,7 @@ static void find_mainboard(struct lb_record *ptr, unsigned long addr)
if (lb_part) {
printf("Overwritten by command line, vendor ID: %s, part ID: %s.\n", lb_vendor, lb_part);
} else {
+ partvendor_from_cbtable = 1;
lb_part = strdup(part);
lb_vendor = strdup(vendor);
}
diff --git a/flash.h b/flash.h
index d8454ff..8a80dc5 100644
--- a/flash.h
+++ b/flash.h
@@ -402,6 +402,7 @@ int handle_romentries(uint8_t *buffer, uint8_t *content);
/* cbtable.c */
int coreboot_init(void);
extern char *lb_part, *lb_vendor;
+extern int partvendor_from_cbtable;
/* spi.c */
enum spi_controller {