1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-29 12:00:17 +02:00

fixed some compiler warnings, smaller copyright headers

This commit is contained in:
shiyele 2009-06-25 04:33:46 +00:00
parent 56482a184a
commit c84634d0cf
10 changed files with 41 additions and 168 deletions

View File

@ -1,23 +1,11 @@
/* /*
* "Ingenic flash tool" - flash the Ingenic CPU via USB * Authors: Marek Lindner <lindner_marek@yahoo.de>
* * Xiangfu Liu <xiangfu.z@gmail.com>
* (C) Copyright 2009
* Author: Marek Lindner <lindner_marek@yahoo.de>
* Author: Xiangfu Liu <xiangfu.z@gmail.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation. * as published by the Free Software Foundation; either version
* * 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/ */
#include <stdio.h> #include <stdio.h>

View File

@ -1,22 +1,10 @@
/* /*
* "Ingenic flash tool" - flash the Ingenic CPU via USB * Authors: Xiangfu Liu <xiangfu.z@gmail.com>
*
* (C) Copyright 2009
* Author: Xiangfu Liu <xiangfu.z@gmail.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation. * as published by the Free Software Foundation; either version
* * 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/ */
#ifndef __CMD_H__ #ifndef __CMD_H__
@ -29,6 +17,7 @@
#define MAX_COMMAND_LENGTH 100 #define MAX_COMMAND_LENGTH 100
int boot(char *stage1_path, char *stage2_path); int boot(char *stage1_path, char *stage2_path);
int init_nand_in();
int nand_prog(void); int nand_prog(void);
int nand_query(void); int nand_query(void);
int nand_erase(struct nand_in *nand_in); int nand_erase(struct nand_in *nand_in);

View File

@ -1,22 +1,10 @@
/* /*
* "Ingenic flash tool" - flash the Ingenic CPU via USB * Authors: Xiangfu Liu <xiangfu.z@gmail.com>
*
* (C) Copyright 2009
* Author: Xiangfu Liu <xiangfu.z@gmail.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation. * as published by the Free Software Foundation; either version
* * 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/ */
#include <stdio.h> #include <stdio.h>
@ -98,23 +86,9 @@ static int handle_version(void)
return 1; return 1;
} }
static int handle_fconfig(void)
{
if (com_argc < 3) {
printf("\n Usage:"
" fconfig (1) (2) "
"\n 1:configration file name"
"\n 2:deivce index number");
return -1;
}
/* usb_infenic_config(atoi(com_argv[2]),com_argv[1]); */
return 1;
}
/* need transfer two para :blk_num ,start_blk */ /* need transfer two para :blk_num ,start_blk */
int handle_nerase(void) int handle_nerase(void)
{ {
int i;
if (com_argc < 5) { if (com_argc < 5) {
printf("\n Usage:"); printf("\n Usage:");
printf(" nerase (1) (2) (3) (4) "); printf(" nerase (1) (2) (3) (4) ");

View File

@ -1,23 +1,12 @@
/* /*
* "Ingenic flash tool" - flash the Ingenic CPU via USB * Authors: Xiangfu Liu <xiangfu.z@gmail.com>
*
* (C) Copyright 2009
* Author: Xiangfu Liu <xiangfu.z@gmail.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation. * as published by the Free Software Foundation; either version
* * 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/ */
#ifndef __COMMAND_LINE_H__ #ifndef __COMMAND_LINE_H__
#define __COMMAND_LINE_H__ #define __COMMAND_LINE_H__

View File

@ -1,27 +1,16 @@
/* /*
* put all the configure operate to this file * Authors: Marek Lindner <lindner_marek@yahoo.de>
*
* (C) Copyright 2009
* Author: Marek Lindner <lindner_marek@yahoo.de>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation. * as published by the Free Software Foundation; either version
* * 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/ */
#include <errno.h> #include <errno.h>
#include <confuse.h> #include <confuse.h>
#include <unistd.h> #include <unistd.h>
#include <string.h>
#include "ingenic_cfg.h" #include "ingenic_cfg.h"
#include "usb_boot_defines.h" #include "usb_boot_defines.h"
@ -142,7 +131,7 @@ int check_dump_cfg(struct hand *hand)
int parse_configure(struct hand *hand, char * file_path) int parse_configure(struct hand *hand, char * file_path)
{ {
if (access(file_path, F_OK)) { if (access(file_path, F_OK)) {
fprintf(stderr, "Error - can't read file: %s\n", fprintf(stderr, "Error - can't read file %s: %s\n",
file_path, strerror(errno)); file_path, strerror(errno));
return -1; return -1;
} }
@ -188,7 +177,7 @@ int parse_configure(struct hand *hand, char * file_path)
cfg_t *cfg; cfg_t *cfg;
cfg = cfg_init(opts, 0); cfg = cfg_init(opts, 0);
if (cfg_parse(cfg, file_path) == CFG_PARSE_ERROR) { if (cfg_parse(cfg, file_path) == CFG_PARSE_ERROR) {
fprintf(stderr, "Error - can't read file: %s\n", fprintf(stderr, "Error - can't read file %s: %s\n",
file_path, strerror(errno)); file_path, strerror(errno));
return -1; return -1;
} }

View File

@ -1,22 +1,10 @@
/* /*
* put all the configure operate to this file * Authors: Xiangfu Liu <xiangfu.z@gmail.com>
*
* (C) Copyright 2009
* Author: Marek Lindner <lindner_marek@yahoo.de>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation. * as published by the Free Software Foundation; either version
* * 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/ */
#ifndef __INGENIC_CFG_H__ #ifndef __INGENIC_CFG_H__

View File

@ -1,23 +1,11 @@
/* /*
* "Ingenic flash tool" - flash the Ingenic CPU via USB * Authors: Marek Lindner <lindner_marek@yahoo.de>
* * Xiangfu Liu <xiangfu.z@gmail.com>
* (C) Copyright 2009
* Author: Marek Lindner <lindner_marek@yahoo.de>
* Author: Xiangfu liu <xiangfu.z@gmail.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation. * as published by the Free Software Foundation; either version
* * 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/ */
#include "ingenic_usb.h" #include "ingenic_usb.h"

View File

@ -1,23 +1,13 @@
/* /*
* "Ingenic flash tool" - flash the Ingenic CPU via USB * Authors: Xiangfu Liu <xiangfu.z@gmail.com>
* * Marek Lindner <lindner_marek@yahoo.de>
* (C) Copyright 2009
* Author: Marek Lindner <lindner_marek@yahoo.de>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation. * as published by the Free Software Foundation; either version
* * 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/ */
#ifndef __INGENIC_USB_H__ #ifndef __INGENIC_USB_H__
#define __INGENIC_USB_H__ #define __INGENIC_USB_H__

View File

@ -1,27 +1,17 @@
/* /*
* "Ingenic flash tool" - flash the Ingenic CPU via USB * Authors: Xiangfu Liu <xiangfu.z@gmail.com>
*
* (C) Copyright 2009
* Author: Xiangfu Liu <xiangfu.z@gmail.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation. * as published by the Free Software Foundation; either version
* * 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <getopt.h> #include <getopt.h>
#include <unistd.h>
#include <string.h>
#include "inflash_version.h" #include "inflash_version.h"
#include "command_line.h" #include "command_line.h"
#include "ingenic_usb.h" #include "ingenic_usb.h"

View File

@ -1,22 +1,10 @@
/* /*
* "Ingenic flash tool" - flash the Ingenic CPU via USB * Authors: Marek Lindner <lindner_marek@yahoo.de>
*
* (C) Copyright 2009
* Author: Marek Lindner <lindner_marek@yahoo.de>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation. * as published by the Free Software Foundation; either version
* * 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/ */
#ifndef __USB_BOOT_DEFINES_H__ #ifndef __USB_BOOT_DEFINES_H__