mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-28 15:33:42 +02:00
Some flashrom printing changes
- Also print URLs of boards with board-enables. - Mark known-bad operations for chips red in the wiki. - Clarifiy a wiki message a bit. Corresponding to flashrom svn r640. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
This commit is contained in:
parent
04d5dc4085
commit
e19e86d067
29
print.c
29
print.c
@ -239,7 +239,7 @@ const char *wiki_header = "= Supported devices =\n\n\
|
|||||||
<div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \
|
<div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \
|
||||||
background-color:#eeeeee; align:right; border:1px solid #aabbcc;\"><small>\n\
|
background-color:#eeeeee; align:right; border:1px solid #aabbcc;\"><small>\n\
|
||||||
Please do '''not''' edit these tables in the wiki directly, they are \
|
Please do '''not''' edit these tables in the wiki directly, they are \
|
||||||
semi-automatically generated by pasting '''flashrom -z''' output.<br />\
|
generated by pasting '''flashrom -z''' output.<br />\
|
||||||
'''Last update:''' %s(generated by flashrom %s)\n</small></div>\n";
|
'''Last update:''' %s(generated by flashrom %s)\n</small></div>\n";
|
||||||
|
|
||||||
const char *chipset_th = "{| border=\"0\" style=\"font-size: smaller\"\n\
|
const char *chipset_th = "{| border=\"0\" style=\"font-size: smaller\"\n\
|
||||||
@ -596,8 +596,9 @@ static void wiki_helper(const char *heading, const char *status,
|
|||||||
|
|
||||||
static void wiki_helper2(const char *heading, int cols)
|
static void wiki_helper2(const char *heading, int cols)
|
||||||
{
|
{
|
||||||
int i, j, boardcount = 0, color = 1;
|
int i, j, k, boardcount = 0, color = 1;
|
||||||
struct board_pciid_enable *b;
|
struct board_pciid_enable *b;
|
||||||
|
const struct board_info_url *u = boards_url;
|
||||||
|
|
||||||
for (b = board_pciid_enables; b->vendor_name != NULL; b++)
|
for (b = board_pciid_enables; b->vendor_name != NULL; b++)
|
||||||
boardcount++;
|
boardcount++;
|
||||||
@ -612,9 +613,13 @@ static void wiki_helper2(const char *heading, int cols)
|
|||||||
if (i > 0 && strcmp(b[i].vendor_name, b[i - 1].vendor_name))
|
if (i > 0 && strcmp(b[i].vendor_name, b[i - 1].vendor_name))
|
||||||
color = !color;
|
color = !color;
|
||||||
|
|
||||||
printf("|- bgcolor=\"#%s\" valign=\"top\"\n| %s || %s || "
|
k = url(b[i].vendor_name, b[i].board_name);
|
||||||
"%s%s%s%s || {{OK}}\n", (color) ? "eeeeee" : "dddddd",
|
|
||||||
b[i].vendor_name, b[i].board_name,
|
printf("|- bgcolor=\"#%s\" valign=\"top\"\n| %s || %s%s %s%s "
|
||||||
|
"|| %s%s%s%s || {{OK}}\n", (color) ? "eeeeee" : "dddddd",
|
||||||
|
b[i].vendor_name, (k != -1 && u[k].url) ? "[" : "",
|
||||||
|
(k != -1 && u[k].url) ? u[k].url : "", b[i].board_name,
|
||||||
|
(k != -1 && u[k].url) ? "]" : "",
|
||||||
(b[i].lb_vendor) ? "-m " : "—",
|
(b[i].lb_vendor) ? "-m " : "—",
|
||||||
(b[i].lb_vendor) ? b[i].lb_vendor : "",
|
(b[i].lb_vendor) ? b[i].lb_vendor : "",
|
||||||
(b[i].lb_vendor) ? ":" : "",
|
(b[i].lb_vendor) ? ":" : "",
|
||||||
@ -646,6 +651,7 @@ void print_supported_chips_wiki(void)
|
|||||||
{
|
{
|
||||||
int i = 0, c = 1, chipcount = 0;
|
int i = 0, c = 1, chipcount = 0;
|
||||||
struct flashchip *f, *old = NULL;
|
struct flashchip *f, *old = NULL;
|
||||||
|
uint32_t t;
|
||||||
|
|
||||||
for (f = flashchips; f->name != NULL; f++)
|
for (f = flashchips; f->name != NULL; f++)
|
||||||
chipcount++;
|
chipcount++;
|
||||||
@ -663,14 +669,19 @@ void print_supported_chips_wiki(void)
|
|||||||
if (old != NULL && strcmp(old->vendor, f->vendor))
|
if (old != NULL && strcmp(old->vendor, f->vendor))
|
||||||
c = !c;
|
c = !c;
|
||||||
|
|
||||||
|
t = f->tested;
|
||||||
printf("|- bgcolor=\"#%s\" valign=\"top\"\n| %s || %s || %d "
|
printf("|- bgcolor=\"#%s\" valign=\"top\"\n| %s || %s || %d "
|
||||||
"|| %s || {{%s}} || {{%s}} || {{%s}} || {{%s}}\n",
|
"|| %s || {{%s}} || {{%s}} || {{%s}} || {{%s}}\n",
|
||||||
(c == 1) ? "eeeeee" : "dddddd", f->vendor, f->name,
|
(c == 1) ? "eeeeee" : "dddddd", f->vendor, f->name,
|
||||||
f->total_size, flashbuses_to_text(f->bustype),
|
f->total_size, flashbuses_to_text(f->bustype),
|
||||||
((f->tested & TEST_OK_PROBE) ? "OK" : (c) ? "?2" : "?"),
|
(t & TEST_OK_PROBE) ? "OK" :
|
||||||
((f->tested & TEST_OK_READ) ? "OK" : (c) ? "?2" : "?"),
|
(t & TEST_BAD_PROBE) ? "No" : ((c) ? "?2" : "?"),
|
||||||
((f->tested & TEST_OK_ERASE) ? "OK" : (c) ? "?2" : "?"),
|
(t & TEST_OK_READ) ? "OK" :
|
||||||
((f->tested & TEST_OK_WRITE) ? "OK" : (c) ? "?2" : "?"));
|
(t & TEST_BAD_READ) ? "No" : ((c) ? "?2" : "?"),
|
||||||
|
(t & TEST_OK_ERASE) ? "OK" :
|
||||||
|
(t & TEST_BAD_ERASE) ? "No" : ((c) ? "?2" : "?"),
|
||||||
|
(t & TEST_OK_WRITE) ? "OK" :
|
||||||
|
(t & TEST_BAD_WRITE) ? "No" : ((c) ? "?2" : "?"));
|
||||||
|
|
||||||
/* Split table into three columns. */
|
/* Split table into three columns. */
|
||||||
if (i >= (chipcount / 3 + 1)) {
|
if (i >= (chipcount / 3 + 1)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user