1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-01 10:15:19 +02:00

cleanup output message

This commit is contained in:
xiangfu 2009-06-25 16:39:24 +00:00
parent 800e15d07e
commit ebabca03e0
5 changed files with 22 additions and 32 deletions

View File

@ -105,7 +105,7 @@ void init_cfg()
if (usb_read_data_from_ingenic(&ingenic_dev, ret, 8) != 1)
goto xout;
printf("Configuring XBurst CPU succeeded.\n");
printf(" Configuring XBurst CPU succeeded.\n");
return;
xout:
printf("Configuring XBurst CPU failed.\n");
@ -137,10 +137,10 @@ int boot(char *stage1_path, char *stage2_path){
}
if (status) {
printf("Already booted.");
printf(" Already booted.");
return 1;
} else {
printf("CPU not yet booted, now booting...\n");
printf(" CPU not yet booted, now booting...\n");
/* now we upload the boot stage1 */
printf(" Loading stage1 from '%s'\n", stage1_path);
@ -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;
@ -159,9 +159,9 @@ int boot(char *stage1_path, char *stage2_path){
if (usb_ingenic_upload(&ingenic_dev, 2) < 1)
return -1;
printf("Booted successfully!\n");
printf(" Booted successfully!\n");
}
sleep(1);
usleep(100);
init_cfg();
return 1;
}

View File

@ -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;
}
j=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;
}

View File

@ -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, "

View File

@ -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;

View File

@ -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;
@ -96,7 +95,7 @@ int main(int argc, char **argv)
}
while (1) {
printf("\n inflash :> ");
printf("\ninflash :> ");
cptr = fgets(com_buf, 256, stdin);
if (cptr == NULL)
continue;