mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-22 07:39:42 +02:00
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>
This commit is contained in:
parent
fdbf94c903
commit
71d2db02e5
3
.gitignore
vendored
3
.gitignore
vendored
@ -7,7 +7,8 @@
|
|||||||
/stamp-h1
|
/stamp-h1
|
||||||
/m4/
|
/m4/
|
||||||
/autom4te.cache/
|
/autom4te.cache/
|
||||||
|
/Makefile
|
||||||
|
/xburst-tools-config.h*
|
||||||
|
|
||||||
Makefile.in
|
Makefile.in
|
||||||
|
|
||||||
/Makefile
|
|
||||||
|
18
configure.ac
18
configure.ac
@ -2,10 +2,10 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ(2.63)
|
AC_PREREQ(2.63)
|
||||||
AC_INIT([xburst-tools], [0.1])
|
AC_INIT([xburst-tools], [201104])
|
||||||
AC_CONFIG_AUX_DIR(m4)
|
AC_CONFIG_AUX_DIR(m4)
|
||||||
AM_INIT_AUTOMAKE([foreign])
|
AM_INIT_AUTOMAKE([foreign])
|
||||||
AM_CONFIG_HEADER([config.h])
|
AM_CONFIG_HEADER([xburst-tools-config.h])
|
||||||
|
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
@ -39,17 +39,21 @@ AC_PROG_CXX
|
|||||||
|
|
||||||
# Checks for libraries.
|
# Checks for libraries.
|
||||||
AC_CHECK_LIB([c], [main])
|
AC_CHECK_LIB([c], [main])
|
||||||
|
AC_CHECK_LIB([m], [main])
|
||||||
|
AC_CHECK_LIB([gcc], [main])
|
||||||
|
|
||||||
AC_CHECK_LIB([confuse], [main], [], [
|
AC_CHECK_LIB([confuse], [main], [], [
|
||||||
echo "Error! You need to have libconfuse."
|
echo "Error! You need to have libconfuse."
|
||||||
echo "Maybe run 'sudo apt-get install libconfuse-dev' under debian"
|
echo "Maybe run 'sudo apt-get install libconfuse-dev' under debian"
|
||||||
exit -1 ])
|
exit -1 ])
|
||||||
AC_CHECK_LIB([gcc], [main])
|
|
||||||
AC_CHECK_LIB([m], [main])
|
|
||||||
AC_CHECK_LIB([usb], [main], [], [
|
AC_CHECK_LIB([usb], [main], [], [
|
||||||
echo "Error! You need to have libusb-0.1. \n"
|
echo "Error! You need to have libusb-0.1. \n"
|
||||||
echo "Maybe run 'sudo apt-get install libusb-dev' under debian"
|
echo "Maybe run 'sudo apt-get install libusb-dev' under debian"
|
||||||
exit -1 ])
|
exit -1 ])
|
||||||
PKG_CHECK_MODULES([LIBUSB1], [libusb-1.0])
|
|
||||||
|
PKG_CHECK_MODULES(LIBUSB, libusb-1.0 > 1.0,
|
||||||
|
[LIBS="$LIBS $LIBUSB_LIBS" CFLAGS="$CFLAGS $LIBUSB_CFLAGS"],
|
||||||
|
AC_MSG_ERROR(Maybe run 'sudo apt-get install libusb1.0-0-dev' under debian"))
|
||||||
|
|
||||||
AC_ARG_WITH([readline],
|
AC_ARG_WITH([readline],
|
||||||
[AS_HELP_STRING([--with-readline],
|
[AS_HELP_STRING([--with-readline],
|
||||||
@ -70,8 +74,8 @@ AS_IF([test "x$with_readline" != xno],
|
|||||||
fi
|
fi
|
||||||
], -lncurses)])
|
], -lncurses)])
|
||||||
|
|
||||||
LIBS="$LIBS $USB_LIBS $READLINE_LIBS $LIBUSB1_LIBS"
|
LIBS="$LIBS $USB_LIBS $READLINE_LIBS"
|
||||||
CFLAGS="$CFLAGS $USB_CFLAGS $LIBUSB1_CFLAGS"
|
CFLAGS="$CFLAGS $USB_CFLAGS"
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
|
1
usbboot/src/.gitignore
vendored
1
usbboot/src/.gitignore
vendored
@ -1,3 +1,2 @@
|
|||||||
/.deps/
|
/.deps/
|
||||||
/*_version.h
|
|
||||||
/usbboot
|
/usbboot
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
AM_CFLAGS = -pedantic -Wall -W -DCFGDIR=\"$(cfgdir)\" -DDATADIR=\"$(pkgdatadir)\"
|
AM_CFLAGS = -pedantic -Wall -W -DCFGDIR=\"$(cfgdir)\" -DDATADIR=\"$(pkgdatadir)\"
|
||||||
|
|
||||||
xburst-tools_version.h:
|
|
||||||
echo -e '#ifndef XBURST_TOOLS_VERSION' \
|
|
||||||
'\n#define XBURST_TOOLS_VERSION "201103"' \
|
|
||||||
'\n#endif' > xburst-tools_version.h
|
|
||||||
BUILT_SOURCES = xburst-tools_version.h
|
|
||||||
|
|
||||||
bin_PROGRAMS = usbboot
|
bin_PROGRAMS = usbboot
|
||||||
usbboot_SOURCES = cmd.c command_line.c ingenic_cfg.c \
|
usbboot_SOURCES = cmd.c command_line.c ingenic_cfg.c \
|
||||||
ingenic_usb.c main.c
|
ingenic_usb.c main.c
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include "usb_boot_defines.h"
|
#include "usb_boot_defines.h"
|
||||||
#include "ingenic_usb.h"
|
#include "ingenic_usb.h"
|
||||||
#include "cmd.h"
|
#include "cmd.h"
|
||||||
#include "xburst-tools_version.h"
|
|
||||||
|
|
||||||
extern struct nand_in nand_in;
|
extern struct nand_in nand_in;
|
||||||
extern struct sdram_in sdram_in;
|
extern struct sdram_in sdram_in;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "xburst-tools_version.h"
|
#include "xburst-tools-config.h"
|
||||||
#include "command_line.h"
|
#include "command_line.h"
|
||||||
#include "ingenic_usb.h"
|
#include "ingenic_usb.h"
|
||||||
#include "ingenic_cfg.h"
|
#include "ingenic_cfg.h"
|
||||||
@ -43,16 +43,16 @@ static void help(void)
|
|||||||
" -c --command\t\t\tDirect run the commands, split by ';'\n"
|
" -c --command\t\t\tDirect run the commands, split by ';'\n"
|
||||||
" \t\t\tNOTICE: the max commands count is 10!\n"
|
" \t\t\tNOTICE: the max commands count is 10!\n"
|
||||||
" -f --configure\t\tconfigure file path\n"
|
" -f --configure\t\tconfigure file path\n"
|
||||||
" -1 --stage1\t\tstage1 file path\n"
|
" -1 --stage1\t\t\tstage1 file path\n"
|
||||||
" -2 --stage2\t\tstage2 file path\n"
|
" -2 --stage2\t\t\tstage2 file path\n"
|
||||||
" <run without options to enter commands via usbboot prompt>\n\n"
|
" <run without options to enter commands via usbboot prompt>\n\n"
|
||||||
"Report bugs to <xiangfu@sharism.cc>.\n"
|
"Report bugs to xiangfu@sharism.cc.\n"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_version(void)
|
static void print_version(void)
|
||||||
{
|
{
|
||||||
printf("usbboot version: %s\n", XBURST_TOOLS_VERSION);
|
printf("usbboot %s\n", PACKAGE_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct option opts[] = {
|
static struct option opts[] = {
|
||||||
@ -76,10 +76,6 @@ int main(int argc, char **argv)
|
|||||||
stage1 = STAGE1_FILE_PATH;
|
stage1 = STAGE1_FILE_PATH;
|
||||||
stage2 = STAGE2_FILE_PATH;
|
stage2 = STAGE2_FILE_PATH;
|
||||||
|
|
||||||
printf("usbboot - 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) {
|
while(1) {
|
||||||
int c, option_index = 0;
|
int c, option_index = 0;
|
||||||
c = getopt_long(argc, argv, "hvc:f:1:2:", opts,
|
c = getopt_long(argc, argv, "hvc:f:1:2:", opts,
|
||||||
@ -113,6 +109,10 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("\nusbboot version %s - 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", PACKAGE_VERSION);
|
||||||
|
|
||||||
if (usb_ingenic_init(&ingenic_dev) < 1)
|
if (usb_ingenic_init(&ingenic_dev) < 1)
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
|
1
xbboot/host-app/.gitignore
vendored
1
xbboot/host-app/.gitignore
vendored
@ -2,5 +2,4 @@
|
|||||||
host_main.o
|
host_main.o
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
xbboot_version.h
|
|
||||||
xbboot
|
xbboot
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
AM_CFLAGS = -pedantic -Wall -W -std=gnu99 -DDATADIR=\"$(pkgdatadir)\"
|
AM_CFLAGS = -pedantic -Wall -W -std=gnu99 -DDATADIR=\"$(pkgdatadir)\"
|
||||||
|
|
||||||
xbboot_version.h:
|
|
||||||
echo -e '#ifndef XBBOOT_VERSION' \
|
|
||||||
'\n#define XBBOOT_VERSION "201012"' \
|
|
||||||
'\n#endif' > xbboot_version.h
|
|
||||||
BUILT_SOURCES = xbboot_version.h
|
|
||||||
|
|
||||||
bin_PROGRAMS = xbboot
|
bin_PROGRAMS = xbboot
|
||||||
xbboot_SOURCES = host_main.c
|
xbboot_SOURCES = host_main.c
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "xbboot_version.h"
|
#include "xburst-tools-config.h"
|
||||||
|
|
||||||
#define HIWORD(dw) (((dw) >> 16) & 0xFFFF)
|
#define HIWORD(dw) (((dw) >> 16) & 0xFFFF)
|
||||||
#define LOWORD(dw) ((dw) & 0xFFFF)
|
#define LOWORD(dw) ((dw) & 0xFFFF)
|
||||||
@ -66,7 +66,7 @@ int main(int argc, char** argv)
|
|||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
if (!strcmp(argv[1], "-v") || !strcmp(argv[1], "--version")) {
|
if (!strcmp(argv[1], "-v") || !strcmp(argv[1], "--version")) {
|
||||||
printf("xbboot version %s\n", XBBOOT_VERSION);
|
printf("xbboot version %s\n", PACKAGE_VERSION);
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -445,5 +445,5 @@ void show_help()
|
|||||||
" [start2 | VR_PROGRAM_START2] <addr> branch to <addr> directly\n"
|
" [start2 | VR_PROGRAM_START2] <addr> branch to <addr> directly\n"
|
||||||
"\n"
|
"\n"
|
||||||
"- all numbers can be prefixed 0x for hex otherwise decimal\n"
|
"- all numbers can be prefixed 0x for hex otherwise decimal\n"
|
||||||
"\n", XBBOOT_VERSION);
|
"\n", PACKAGE_VERSION);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user