" erase erase all data on device\n"
" write <imagefile> write imagefile to device\n"
"Following options are available:\n"
" erase erase all data on device\n"
" write <imagefile> write imagefile to device\n"
"Following options are available:\n"
- " -u unlock device before accessing it\n"
" -r reboot after successful command\n"
" -e <device> erase <device> before executing the command\n\n"
"Example: To write linux.trx to mtd4 labeled as linux and reboot afterwards\n"
" -r reboot after successful command\n"
" -e <device> erase <device> before executing the command\n\n"
"Example: To write linux.trx to mtd4 labeled as linux and reboot afterwards\n"
erase[0] = NULL;
boot = 0;
erase[0] = NULL;
boot = 0;
- while ((ch = getopt(argc, argv, "ure:")) != -1)
+ while ((ch = getopt(argc, argv, "re:")) != -1)
- case 'u':
- unlock = 1;
- break;
case 'r':
boot = 1;
break;
case 'r':
boot = 1;
break;
- if (unlock)
- mtd_unlock(device);
switch (cmd) {
case CMD_UNLOCK:
switch (cmd) {
case CMD_UNLOCK:
break;
case CMD_ERASE:
mtd_erase(device);
break;
case CMD_ERASE:
mtd_erase(device);