mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-01 12:38:27 +02:00
cleanup output message
This commit is contained in:
parent
800e15d07e
commit
ebabca03e0
@ -151,7 +151,7 @@ int boot(char *stage1_path, char *stage2_path){
|
||||
return -1;
|
||||
|
||||
/* now we upload the boot stage2 */
|
||||
sleep(1);
|
||||
usleep(100);
|
||||
printf(" Loading stage2 from '%s'\n", stage2_path);
|
||||
if (load_file(&ingenic_dev, stage2_path) < 1)
|
||||
return -1;
|
||||
@ -161,7 +161,7 @@ int boot(char *stage1_path, char *stage2_path){
|
||||
|
||||
printf(" Booted successfully!\n");
|
||||
}
|
||||
sleep(1);
|
||||
usleep(100);
|
||||
init_cfg();
|
||||
return 1;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ static const char COMMAND[][30]=
|
||||
|
||||
static int handle_help(void)
|
||||
{
|
||||
printf("\n Command support in current version:"
|
||||
printf("\n command support in current version:"
|
||||
"\n help print this help;"
|
||||
"\n boot boot device and make it in stage2;"
|
||||
"\n list show current device number can connect;"
|
||||
@ -128,19 +128,15 @@ int command_interpret(char * com_buf)
|
||||
while ( *(++buf) == ' ' );
|
||||
com_argv[i][j] = '\0';
|
||||
i++;
|
||||
if (i > MAX_ARGC) {
|
||||
printf("\n Para is too much! About!");
|
||||
return 0;
|
||||
}
|
||||
if (i > MAX_ARGC)
|
||||
return COMMAND_NUM + 1;
|
||||
j = 0;
|
||||
continue;
|
||||
} else {
|
||||
com_argv[i][j] = *buf;
|
||||
j++;
|
||||
if (j > MAX_COMMAND_LENGTH) {
|
||||
printf("\n Para is too long! About!");
|
||||
return 0;
|
||||
}
|
||||
if (j > MAX_COMMAND_LENGTH)
|
||||
return COMMAND_NUM + 1;
|
||||
}
|
||||
buf++;
|
||||
}
|
||||
@ -193,7 +189,7 @@ int command_handle(char *buf)
|
||||
boot(STAGE1_FILE_PATH, STAGE2_FILE_PATH);
|
||||
break;
|
||||
default:
|
||||
printf("\n Command not support!");
|
||||
printf("\n command not support or input error!");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -107,17 +107,17 @@ int check_dump_cfg(struct hand *hand)
|
||||
printf(" YES\n");
|
||||
|
||||
printf("Current device information:\n");
|
||||
printf(" CPU is Jz%x",hand->fw_args.cpu_id);
|
||||
printf("\n Crystal work at %dMHz, the CCLK up to %dMHz and PMH_CLK up to %dMHz",
|
||||
printf("CPU type is Ingenic XBurst Jz%x\n",hand->fw_args.cpu_id);
|
||||
printf("Crystal work at %dMHz, the CCLK up to %dMHz and PMH_CLK up to %dMHz\n",
|
||||
hand->fw_args.ext_clk,
|
||||
(unsigned int)hand->fw_args.cpu_speed * hand->fw_args.ext_clk,
|
||||
((unsigned int)hand->fw_args.cpu_speed * hand->fw_args.ext_clk) / hand->fw_args.phm_div);
|
||||
|
||||
printf("\n Total SDRAM size is %d MB, work in %d bank and %d bit mode",
|
||||
printf("SDRAM Total size is %d MB, work in %d bank and %d bit mode\n",
|
||||
total_size / 0x100000, 2 * (hand->fw_args.bank_num + 1),
|
||||
16 * (2 - hand->fw_args.bus_width));
|
||||
|
||||
printf("\n Nand page size %d, "
|
||||
printf("Nand page size %d, "
|
||||
"ECC offset in OOB %d, "
|
||||
"bad block offset in OOB %d, "
|
||||
"bad block page %d, "
|
||||
|
@ -155,12 +155,7 @@ int usb_get_ingenic_cpu(struct ingenic_dev *ingenic_dev)
|
||||
}
|
||||
|
||||
ingenic_dev->cpu_info_buff[8] = '\0';
|
||||
printf(" CPU data: "
|
||||
"%02x, %02x, %02x, %02x, %02x, %02x, %02x, %02x : %s\n",
|
||||
ingenic_dev->cpu_info_buff[0], ingenic_dev->cpu_info_buff[1],
|
||||
ingenic_dev->cpu_info_buff[2], ingenic_dev->cpu_info_buff[3],
|
||||
ingenic_dev->cpu_info_buff[4], ingenic_dev->cpu_info_buff[5],
|
||||
ingenic_dev->cpu_info_buff[6], ingenic_dev->cpu_info_buff[7],
|
||||
printf(" CPU data: %s\n",
|
||||
ingenic_dev->cpu_info_buff);
|
||||
|
||||
if (!strcmp(ingenic_dev->cpu_info_buff,"JZ4740V1")) return 1;
|
||||
|
@ -49,10 +49,9 @@ int main(int argc, char **argv)
|
||||
char *cptr;
|
||||
char com_buf[256] = {0};
|
||||
|
||||
printf("\n inflash - Ingenic XBurst USB Boot Utility"
|
||||
"\n (c) 2009 Ingenic Semiconductor Inc., Qi Hardware Inc., Xiangfu Liu, Marek Lindner"
|
||||
"\n This program is Free Software and comes with ABSOLUTELY NO WARRANTY."
|
||||
"\n\n");
|
||||
printf("inflash - Ingenic XBurst USB Boot Utility\n"
|
||||
"(c) 2009 Ingenic Semiconductor Inc., Qi Hardware Inc., Xiangfu Liu, Marek Lindner\n"
|
||||
"This program is Free Software and comes with ABSOLUTELY NO WARRANTY.\n\n");
|
||||
|
||||
while(1) {
|
||||
int c, option_index = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user