diff options
Diffstat (limited to 'src/main2.c')
-rw-r--r-- | src/main2.c | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/src/main2.c b/src/main2.c index 5008430..903b596 100644 --- a/src/main2.c +++ b/src/main2.c @@ -712,41 +712,45 @@ int main(int argc, char **argv) { } } - while ( image_first ) { + if ( dev_boot || dev_reboot || dev_load || dev_flash || dev_cold_flash || dev_ident || set_root || set_usb || set_rd || set_rd_flags || set_hw || set_kernel || set_nolo || set_sw || set_emmc ) { - usb_dev = usb_open_and_wait_for_device(); + while ( image_first ) { - /* cold flash */ - if ( dev_cold_flash ) { + usb_dev = usb_open_and_wait_for_device(); - ret = cold_flash(usb_dev, image_2nd, image_secondary); - usb_close_device(usb_dev); - usb_dev = NULL; + /* cold flash */ + if ( dev_cold_flash ) { - if ( ret != 0 ) - continue; + ret = cold_flash(usb_dev, image_2nd, image_secondary); + usb_close_device(usb_dev); + usb_dev = NULL; - if ( dev_flash ) { - dev_cold_flash = 0; - continue; - } + if ( ret != 0 ) + continue; - break; + if ( dev_flash ) { + dev_cold_flash = 0; + continue; + } - } + break; - /* device identify */ -// while(get_status()); + } + + /* device identify */ +// while(get_status()); - /* flash */ + /* flash */ - /* configuration */ + /* configuration */ - /* load */ + /* load */ - /* boot */ + /* boot */ - /* reboot */ + /* reboot */ + + } } |