FreeCalypso > hg > freecalypso-tools
diff loadtools/sertool.c @ 575:cef70d53fc5e
loadtools: new -P boot control mechanism implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 02 Feb 2020 20:01:22 +0000 |
parents | aba969153d20 |
children | ecea01f65146 |
line wrap: on
line diff
--- a/loadtools/sertool.c Sun Feb 02 19:37:50 2020 +0000 +++ b/loadtools/sertool.c Sun Feb 02 20:01:22 2020 +0000 @@ -26,7 +26,7 @@ extern int optind; int c; - while ((c = getopt(argc, argv, "b:c:C:h:H:i:")) != EOF) + while ((c = getopt(argc, argv, "b:c:C:h:H:i:P:")) != EOF) switch (c) { case 'b': set_romload_baudrate(optarg); @@ -46,6 +46,10 @@ case 'i': set_beacon_interval(optarg); continue; + case 'P': + if (find_bootctrl_entry(optarg) < 0) + exit(1); /* error msg already printed */ + continue; case '?': default: usage: fprintf(stderr, @@ -62,6 +66,7 @@ } open_serial_port(target_ttydev); + pwon_if_needed(); perform_compal_stage(); perform_romload(); if (passon_argv)