Author: stepan Date: 2009-07-30 15:30:17 +0200 (Thu, 30 Jul 2009) New Revision: 668
Modified: trunk/board_enable.c trunk/cbtable.c trunk/flash.h Log: 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
Modified: trunk/board_enable.c =================================================================== --- trunk/board_enable.c 2009-07-24 13:59:27 UTC (rev 667) +++ trunk/board_enable.c 2009-07-30 13:30:17 UTC (rev 668) @@ -1134,7 +1134,14 @@ 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 @@ 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);
Modified: trunk/cbtable.c =================================================================== --- trunk/cbtable.c 2009-07-24 13:59:27 UTC (rev 667) +++ trunk/cbtable.c 2009-07-30 13:30:17 UTC (rev 668) @@ -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 @@ 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); }
Modified: trunk/flash.h =================================================================== --- trunk/flash.h 2009-07-24 13:59:27 UTC (rev 667) +++ trunk/flash.h 2009-07-30 13:30:17 UTC (rev 668) @@ -402,6 +402,7 @@ /* cbtable.c */ int coreboot_init(void); extern char *lb_part, *lb_vendor; +extern int partvendor_from_cbtable;
/* spi.c */ enum spi_controller {