FreeCalypso > hg > freecalypso-tools
diff loadtools/clmain.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/clmain.c Sun Feb 02 19:37:50 2020 +0000 +++ b/loadtools/clmain.c Sun Feb 02 20:01:22 2020 +0000 @@ -37,7 +37,7 @@ int c; struct baudrate *br; - while ((c = getopt(argc, argv, "+a:b:B:c:C:h:H:i:jr:")) != EOF) + while ((c = getopt(argc, argv, "+a:b:B:c:C:h:H:i:jP:r:")) != EOF) switch (c) { case 'a': iramimage.filename = optarg; @@ -69,6 +69,10 @@ case 'j': xram_jtag_mode = 1; continue; + case 'P': + if (find_bootctrl_entry(optarg) < 0) + exit(1); /* error msg already printed */ + continue; case 'r': br = find_baudrate_by_name(optarg); if (!br) @@ -93,6 +97,7 @@ } open_serial_port(target_ttydev); + pwon_if_needed(); perform_compal_stage(); perform_romload(); /* loadagent should be running now */