From da4424df4b546a0434f75be3da418a9002aaeda7 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Sun, 4 Apr 2010 22:41:05 -0500 Subject: [PATCH] configure: Add --disable-firmware option to avoid building firmware Allow usbboot to be built on systems without a mipsel cross-compiler by passing configure the --disable-firmware option. Before using the resulting binary, one would need to grab the firmware from another machine. Signed-off-by: Jonathan Nieder --- usbboot/configure.ac | 12 ++++++++++++ usbboot/src/Makefile.am | 3 +++ 2 files changed, 15 insertions(+) diff --git a/usbboot/configure.ac b/usbboot/configure.ac index d7c7459..9253dd2 100644 --- a/usbboot/configure.ac +++ b/usbboot/configure.ac @@ -9,6 +9,18 @@ AM_CONFIG_HEADER([config.h]) AM_MAINTAINER_MODE +AC_ARG_ENABLE([firmware], + [AS_HELP_STRING([--disable-firmware], + [Do not build initialization code] + [(for example, because some other package contains it).])], + [ +case "$enableval" in +yes) firmware=true ;; +no) firmware=false ;; +*) AC_MSG_ERROR([bad value $enableval for --enable-firmware]) ;; +esac],[firmware=false]) +AM_CONDITIONAL([COND_FIRMWARE], [test "$firmware" = true]) + # Checks for programs. AC_PROG_CC AC_PROG_CXX diff --git a/usbboot/src/Makefile.am b/usbboot/src/Makefile.am index fb61303..e3e937d 100644 --- a/usbboot/src/Makefile.am +++ b/usbboot/src/Makefile.am @@ -12,8 +12,11 @@ usbboot_SOURCES = cmd.c command_line.c ingenic_cfg.c \ ingenic_usb.c main.c pkgdatadir = $(datadir)/xburst-tools/ + +if COND_FIRMWARE pkgdata_DATA = ../xburst_stage1/xburst_stage1.bin \ ../xburst_stage2/xburst_stage2.bin +endif cfgdir = $(sysconfdir)/xburst-tools/ cfg_DATA = ../doc/usbboot.cfg