Date:2011-04-08 09:48:59 (9 years 2 months ago)
Author:Xiangfu Liu
Commit:71d2db02e5572bb8319802134029cf37813b6bca
Message:update libusb-1.0 LIBS CFLAGS to configure.ac

update package version define in usbboot, xbboot
update .gitignore
resolve the confilict file on "config.h"

Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
Files: .gitignore (1 diff)
configure.ac (3 diffs)
usbboot/src/.gitignore (1 diff)
usbboot/src/Makefile.am (1 diff)
usbboot/src/command_line.c (1 diff)
usbboot/src/main.c (4 diffs)
xbboot/host-app/.gitignore (1 diff)
xbboot/host-app/Makefile.am (1 diff)
xbboot/host-app/host_main.c (3 diffs)

Change Details

.gitignore
77/stamp-h1
88/m4/
99/autom4te.cache/
10/Makefile
11/xburst-tools-config.h*
1012
1113Makefile.in
1214
13/Makefile
configure.ac
22# Process this file with autoconf to produce a configure script.
33
44AC_PREREQ(2.63)
5AC_INIT([xburst-tools], [0.1])
5AC_INIT([xburst-tools], [201104])
66AC_CONFIG_AUX_DIR(m4)
77AM_INIT_AUTOMAKE([foreign])
8AM_CONFIG_HEADER([config.h])
8AM_CONFIG_HEADER([xburst-tools-config.h])
99
1010AM_MAINTAINER_MODE
1111
...... 
3939
4040# Checks for libraries.
4141AC_CHECK_LIB([c], [main])
42AC_CHECK_LIB([confuse], [main], [], [
43echo "Error! You need to have libconfuse."
44echo "Maybe run 'sudo apt-get install libconfuse-dev' under debian"
45exit -1 ])
46AC_CHECK_LIB([gcc], [main])
4742AC_CHECK_LIB([m], [main])
43AC_CHECK_LIB([gcc], [main])
44
45AC_CHECK_LIB([confuse], [main], [], [
46  echo "Error! You need to have libconfuse."
47  echo "Maybe run 'sudo apt-get install libconfuse-dev' under debian"
48  exit -1 ])
4849AC_CHECK_LIB([usb], [main], [], [
49echo "Error! You need to have libusb-0.1. \n"
50echo "Maybe run 'sudo apt-get install libusb-dev' under debian"
51exit -1 ])
52PKG_CHECK_MODULES([LIBUSB1], [libusb-1.0])
50  echo "Error! You need to have libusb-0.1. \n"
51  echo "Maybe run 'sudo apt-get install libusb-dev' under debian"
52  exit -1 ])
53
54PKG_CHECK_MODULES(LIBUSB, libusb-1.0 > 1.0,
55  [LIBS="$LIBS $LIBUSB_LIBS" CFLAGS="$CFLAGS $LIBUSB_CFLAGS"],
56  AC_MSG_ERROR(Maybe run 'sudo apt-get install libusb1.0-0-dev' under debian"))
5357
5458AC_ARG_WITH([readline],
5559  [AS_HELP_STRING([--with-readline],
...... 
7074     fi
7175    ], -lncurses)])
7276
73LIBS="$LIBS $USB_LIBS $READLINE_LIBS $LIBUSB1_LIBS"
74CFLAGS="$CFLAGS $USB_CFLAGS $LIBUSB1_CFLAGS"
77LIBS="$LIBS $USB_LIBS $READLINE_LIBS"
78CFLAGS="$CFLAGS $USB_CFLAGS"
7579
7680# Checks for header files.
7781AC_HEADER_STDC
usbboot/src/.gitignore
11/.deps/
2/*_version.h
32/usbboot
usbboot/src/Makefile.am
11AM_CFLAGS = -pedantic -Wall -W -DCFGDIR=\"$(cfgdir)\" -DDATADIR=\"$(pkgdatadir)\"
22
3xburst-tools_version.h:
4    echo -e '#ifndef XBURST_TOOLS_VERSION' \
5    '\n#define XBURST_TOOLS_VERSION "201103"' \
6    '\n#endif' > xburst-tools_version.h
7BUILT_SOURCES = xburst-tools_version.h
8
93bin_PROGRAMS = usbboot
104usbboot_SOURCES = cmd.c command_line.c ingenic_cfg.c \
115    ingenic_usb.c main.c
usbboot/src/command_line.c
2222#include "usb_boot_defines.h"
2323#include "ingenic_usb.h"
2424#include "cmd.h"
25#include "xburst-tools_version.h"
2625
2726extern struct nand_in nand_in;
2827extern struct sdram_in sdram_in;
usbboot/src/main.c
2121#include <getopt.h>
2222#include <unistd.h>
2323#include <string.h>
24#include "xburst-tools_version.h"
24#include "xburst-tools-config.h"
2525#include "command_line.h"
2626#include "ingenic_usb.h"
2727#include "ingenic_cfg.h"
...... 
4343           " -c --command\t\t\tDirect run the commands, split by ';'\n"
4444           " \t\t\tNOTICE: the max commands count is 10!\n"
4545           " -f --configure\t\tconfigure file path\n"
46           " -1 --stage1\t\tstage1 file path\n"
47           " -2 --stage2\t\tstage2 file path\n"
46           " -1 --stage1\t\t\tstage1 file path\n"
47           " -2 --stage2\t\t\tstage2 file path\n"
4848           " <run without options to enter commands via usbboot prompt>\n\n"
49           "Report bugs to <xiangfu@sharism.cc>.\n"
49           "Report bugs to xiangfu@sharism.cc.\n"
5050        );
5151}
5252
5353static void print_version(void)
5454{
55    printf("usbboot version: %s\n", XBURST_TOOLS_VERSION);
55    printf("usbboot %s\n", PACKAGE_VERSION);
5656}
5757
5858static struct option opts[] = {
...... 
7676    stage1 = STAGE1_FILE_PATH;
7777    stage2 = STAGE2_FILE_PATH;
7878
79    printf("usbboot - Ingenic XBurst USB Boot Utility\n"
80           "(c) 2009 Ingenic Semiconductor Inc., Qi Hardware Inc., Xiangfu Liu, Marek Lindner\n"
81           "This program is Free Software and comes with ABSOLUTELY NO WARRANTY.\n\n");
82
8379    while(1) {
8480        int c, option_index = 0;
8581        c = getopt_long(argc, argv, "hvc:f:1:2:", opts,
...... 
113109        }
114110    }
115111
112    printf("\nusbboot version %s - Ingenic XBurst USB Boot Utility\n"
113           "(c) 2009 Ingenic Semiconductor Inc., Qi Hardware Inc., Xiangfu Liu, Marek Lindner\n"
114           "This program is Free Software and comes with ABSOLUTELY NO WARRANTY.\n\n", PACKAGE_VERSION);
115
116116    if (usb_ingenic_init(&ingenic_dev) < 1)
117117         return EXIT_FAILURE;
118118
xbboot/host-app/.gitignore
22host_main.o
33Makefile
44Makefile.in
5xbboot_version.h
65xbboot
xbboot/host-app/Makefile.am
11AM_CFLAGS = -pedantic -Wall -W -std=gnu99 -DDATADIR=\"$(pkgdatadir)\"
22
3xbboot_version.h:
4    echo -e '#ifndef XBBOOT_VERSION' \
5    '\n#define XBBOOT_VERSION "201012"' \
6    '\n#endif' > xbboot_version.h
7BUILT_SOURCES = xbboot_version.h
8
93bin_PROGRAMS = xbboot
104xbboot_SOURCES = host_main.c
115
xbboot/host-app/host_main.c
1313#include <string.h>
1414#include <usb.h>
1515#include <time.h>
16#include "xbboot_version.h"
16#include "xburst-tools-config.h"
1717
1818#define HIWORD(dw) (((dw) >> 16) & 0xFFFF)
1919#define LOWORD(dw) ((dw) & 0xFFFF)
...... 
6666        return EXIT_SUCCESS;
6767    }
6868    if (!strcmp(argv[1], "-v") || !strcmp(argv[1], "--version")) {
69        printf("xbboot version %s\n", XBBOOT_VERSION);
69        printf("xbboot version %s\n", PACKAGE_VERSION);
7070        return EXIT_SUCCESS;
7171    }
7272
...... 
445445           " [start2 | VR_PROGRAM_START2] <addr> branch to <addr> directly\n"
446446           "\n"
447447           "- all numbers can be prefixed 0x for hex otherwise decimal\n"
448           "\n", XBBOOT_VERSION);
448           "\n", PACKAGE_VERSION);
449449}

Archive Download the corresponding diff file



interactive