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:
@ -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. */
|
||||
|
Reference in New Issue
Block a user