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