summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorfile <file@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-07-15 20:26:53 +0000
committerfile <file@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-07-15 20:26:53 +0000
commit7f1dacd15c4e52e661d92b830ad8f3b3c323498f (patch)
tree1fcdb23dac7681bc11ba8b5a615e2ebbb071a200 /Makefile
parent16323aa644eae99aa146991fbeb1d2945f59f55c (diff)
Add support for loading the VPM450M firmware using hotplug from userspace.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@1233 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 25 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 776bde5..869c15f 100644
--- a/Makefile
+++ b/Makefile
@@ -70,6 +70,7 @@ ifeq ($(BUILDVER),linux26)
DYNFS=yes
UDEVRULES=yes
endif
+ HOTPLUG_FIRMWARE:=yes
endif
CHKCONFIG:=$(shell sh -c 'type -p chkconfig' 2> /dev/null)
@@ -81,6 +82,16 @@ ifneq ($(wildcard .version),)
ZAPTELVERSION:=$(shell cat .version)
endif
+# Set this to override hotplug firmware loading and revert to classic header based
+#HOTPLUG_FIRMWARE=no
+
+ifeq ($(HOTPLUG_FIRMWARE),yes)
+ CFLAGS+=-DHOTPLUG_FIRMWARE
+ VPM450M_FIRMWARE_HEADER=
+else
+ VPM450M_FIRMWARE_HEADER=vpm450m_fw.h
+endif
+
# CVS mirrors of SVN have .svnrevision files showing
# which SVN revision they are based on, and .svnbranch
# showing the branch they are made from
@@ -133,7 +144,7 @@ all: $(BUILDVER) $(LIBTONEZONE_SO)
linux24: prereq vpm450m_fw.h $(MODULESO) $(BINS)
-linux26: prereq vpm450m_fw.h $(BINS)
+linux26: prereq $(VPM450M_FIRMWARE_HEADER) $(BINS)
@echo $(KSRC)
@if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
$(KMAKE) modules
@@ -314,7 +325,7 @@ else # DYNFS
endif
endif
-install: all devices
+install: all devices firmware
install -D -m 755 ztcfg $(INSTALL_PREFIX)/sbin/ztcfg
if [ -f sethdlc-new ]; then \
install -D -m 755 sethdlc-new $(INSTALL_PREFIX)/sbin/sethdlc; \
@@ -358,6 +369,18 @@ endif
install-udev: devices
+firmware:
+ifeq ($(HOTPLUG_FIRMWARE),yes)
+ if [ -d /usr/lib/hotplug/firmware ]; then \
+ install -D -m 644 *.ima /usr/lib/hotplug/firmware ; \
+ elif [ -d /lib/firmware ]; then \
+ install -D -m 644 *.ima /lib/firmware ; \
+ fi
+ @echo "Installed firmware"
+else
+ @echo "Not installing firmware because we are not using hotplug firmware"
+endif
+
config:
if [ -d $(INSTALL_PREFIX)/etc/rc.d/init.d ]; then \
install -D -m 755 zaptel.init $(INSTALL_PREFIX)/etc/rc.d/init.d/zaptel; \