1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 06:01:16 +02:00

Introduce a compile time option to select a default programmer

Heavily influenced by a discussion with (and based on code from) Peter Stuge.
Please read the comment in the Makefile before using this option.

Corresponding to flashrom svn r1607.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Peter Stuge <peter@stuge.se>
This commit is contained in:
Stefan Tauner
2012-09-25 21:24:55 +00:00
parent 98feaa5c2c
commit fd0d413537
2 changed files with 25 additions and 5 deletions

View File

@ -402,11 +402,17 @@ int main(int argc, char *argv[])
}
if (prog == PROGRAMMER_INVALID) {
msg_perr("Please select a programmer with the --programmer parameter.\n"
"Valid choices are:\n");
list_programmers_linebreak(0, 80, 0);
ret = 1;
goto out;
if (CONFIG_DEFAULT_PROGRAMMER != PROGRAMMER_INVALID) {
prog = CONFIG_DEFAULT_PROGRAMMER;
msg_pinfo("Using default programmer \"%s\".\n",
programmer_table[CONFIG_DEFAULT_PROGRAMMER].name);
} else {
msg_perr("Please select a programmer with the --programmer parameter.\n"
"Valid choices are:\n");
list_programmers_linebreak(0, 80, 0);
ret = 1;
goto out;
}
}
/* FIXME: Delay calibration should happen in programmer code. */