[svn-commits] file: branch file/zaptel-firmware r1821 - in /team/file/zaptel-firmware: ./ w...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Jan 15 18:41:45 MST 2007


Author: file
Date: Mon Jan 15 19:41:44 2007
New Revision: 1821

URL: http://svn.digium.com/view/zaptel?view=rev&rev=1821
Log:
Merged revisions 1820 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.4

................
r1820 | kpfleming | 2007-01-15 20:37:26 -0500 (Mon, 15 Jan 2007) | 11 lines

Merged revisions 1818 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.2

........
r1818 | kpfleming | 2007-01-15 19:28:54 -0600 (Mon, 15 Jan 2007) | 3 lines

eliminate the fw2h tool, and instead use objcopy to directly make object files from the firmware binary files
pass HOTPLUG_FIRMWARE down to the module build so that we can avoid various compiler warnings

........

................

Removed:
    team/file/zaptel-firmware/wct4xxp/fw2h.c
Modified:
    team/file/zaptel-firmware/   (props changed)
    team/file/zaptel-firmware/Makefile
    team/file/zaptel-firmware/wct4xxp/   (props changed)
    team/file/zaptel-firmware/wct4xxp/Kbuild
    team/file/zaptel-firmware/wct4xxp/Makefile
    team/file/zaptel-firmware/wct4xxp/base.c
    team/file/zaptel-firmware/wct4xxp/vpm450m.c
    team/file/zaptel-firmware/wct4xxp/vpm450m.h

Propchange: team/file/zaptel-firmware/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/file/zaptel-firmware/
            ('branch-1.4-blocked' removed)

Propchange: team/file/zaptel-firmware/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jan 15 19:41:44 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-1797
+/branches/1.4:1-1820

Modified: team/file/zaptel-firmware/Makefile
URL: http://svn.digium.com/view/zaptel/team/file/zaptel-firmware/Makefile?view=diff&rev=1821&r1=1820&r2=1821
==============================================================================
--- team/file/zaptel-firmware/Makefile (original)
+++ team/file/zaptel-firmware/Makefile Mon Jan 15 19:41:44 2007
@@ -195,7 +195,7 @@
 
 linux26: prereq
 	@if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
-	$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules
+	$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE) modules
 
 xpp: linux26
 

Propchange: team/file/zaptel-firmware/wct4xxp/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jan 15 19:41:44 2007
@@ -1,6 +1,3 @@
 *.mod.c
 *.cmd
 *.ko
-vpmoct064_fw.h
-vpmoct128_fw.h
-fw2h

Modified: team/file/zaptel-firmware/wct4xxp/Kbuild
URL: http://svn.digium.com/view/zaptel/team/file/zaptel-firmware/wct4xxp/Kbuild?view=diff&rev=1821&r1=1820&r2=1821
==============================================================================
--- team/file/zaptel-firmware/wct4xxp/Kbuild (original)
+++ team/file/zaptel-firmware/wct4xxp/Kbuild Mon Jan 15 19:41:44 2007
@@ -1,24 +1,23 @@
-# yes, this is redundant... the Kbuild system is changing to hostprogs-y,
-# but we need to be able to support older verions as well
-host-progs := fw2h
-hostprogs-y := fw2h
-
 obj-m += wct4xxp.o
 
 EXTRA_CFLAGS := -I$(src)/.. $(shell $(src)/../oct612x/octasic-helper cflags $(src)/../oct612x) -Wno-undef
 
 wct4xxp-objs := base.o vpm450m.o $(shell $(src)/../oct612x/octasic-helper objects ../oct612x)
 
+ifneq ($(HOTPLUG_FIRMWARE),yes)
+wct4xxp-objs += firmware_oct6114-64d.o firmware_oct6114-128d.o
+endif
+
 $(obj)/base.o: $(src)/vpm450m.h $(src)/wct4xxp.h
 $(obj)/base.o: $(src)/../zaptel.h
 
-$(obj)/vpm450m.o: $(obj)/vpmoct128_fw.h $(obj)/vpmoct064_fw.h $(src)/vpm450m.h
+$(obj)/vpm450m.o: $(src)/vpm450m.h
 $(obj)/vpm450m.o: $(src)/../oct612x/include/oct6100api/oct6100_api.h
 
-$(obj)/vpmoct128_fw.h: $(src)/OCT6114-128D.ima $(obj)/fw2h
-	$(obj)/fw2h $< $@
+$(obj)/firmware_oct6114-64d.o: $(src)/OCT6114-64D.ima $(obj)/base.o
+	@echo Making firmware object file for $(notdir $<)
+	@cd $(src) && ../build_tools/make_firmware_object $(notdir $<) $@ $(obj)/base.o
 
-$(obj)/vpmoct064_fw.h: $(src)/OCT6114-64D.ima $(obj)/fw2h
-	$(obj)/fw2h $< $@
-
-clean-files := vpmoct128_fw.h vpmoct064_fw.h
+$(obj)/firmware_oct6114-128d.o: $(src)/OCT6114-128D.ima $(obj)/base.o
+	@echo Making firmware object file for $(notdir $<)
+	@cd $(src) && ../build_tools/make_firmware_object $(notdir $<) $@ $(obj)/base.o

Modified: team/file/zaptel-firmware/wct4xxp/Makefile
URL: http://svn.digium.com/view/zaptel/team/file/zaptel-firmware/wct4xxp/Makefile?view=diff&rev=1821&r1=1820&r2=1821
==============================================================================
--- team/file/zaptel-firmware/wct4xxp/Makefile (original)
+++ team/file/zaptel-firmware/wct4xxp/Makefile Mon Jan 15 19:41:44 2007
@@ -14,24 +14,21 @@
 
 base.o: ../zaptel.h vpm450m.h wct4xxp.h
 
-vpm450m.o: vpm450m.h vpmoct128_fw.h vpmoct064_fw.h ../oct612x/include/oct6100api/oct6100_api.h
+vpm450m.o: vpm450m.h ../oct612x/include/oct6100api/oct6100_api.h
 
-wct4xxp.o: base.o vpm450m.o $(OCTASIC_OBJS)
+firmware_oct6114-64d.o: OCT6114-64D.ima base.o
+	@echo Making firmware object file for $<
+	../build_tools/make_firmware_object $< $@ base.o
+
+firmware_oct6114-128d.o: OCT6114-128D.ima base.o
+	@echo Making firmware object file for $<
+	../build_tools/make_firmware_object $< $@ base.o
+
+wct4xxp.o: base.o vpm450m.o $(OCTASIC_OBJS) firmware_oct6114-64d.o firmware_oct6114-128d.o
 	$(LD) -r -o $@ $^
 
-fw2h: fw2h.c
-	$(HOSTCC) -o $@ $^
-
-vpmoct128_fw.h: OCT6114-128D.ima fw2h
-	./fw2h $< $@
-
-vpmoct064_fw.h: OCT6114-64D.ima fw2h
-	./fw2h $< $@
-
 clean:
-	rm -f *.o fw2h
-	rm -f vpmoct128_fw.h
-	rm -f vpmoct064_fw.h
+	rm -f *.o
 	rm -f $(OCTASIC_OBJS)
 
 endif

Modified: team/file/zaptel-firmware/wct4xxp/base.c
URL: http://svn.digium.com/view/zaptel/team/file/zaptel-firmware/wct4xxp/base.c?view=diff&rev=1821&r1=1820&r2=1821
==============================================================================
--- team/file/zaptel-firmware/wct4xxp/base.c (original)
+++ team/file/zaptel-firmware/wct4xxp/base.c Mon Jan 15 19:41:44 2007
@@ -48,6 +48,11 @@
 #endif
 #include "wct4xxp.h"
 #include "vpm450m.h"
+
+#ifdef HOTPLUG_FIRMWARE
+static const char *oct064_firmware = "OCT6114-64D.ima";
+static const char *oct128_firmware = "OCT6114-128D.ima";
+#endif
 
 /*
  * Tasklets provide better system interactive response at the cost of the

Modified: team/file/zaptel-firmware/wct4xxp/vpm450m.c
URL: http://svn.digium.com/view/zaptel/team/file/zaptel-firmware/wct4xxp/vpm450m.c?view=diff&rev=1821&r1=1820&r2=1821
==============================================================================
--- team/file/zaptel-firmware/wct4xxp/vpm450m.c (original)
+++ team/file/zaptel-firmware/wct4xxp/vpm450m.c Mon Jan 15 19:41:44 2007
@@ -13,8 +13,10 @@
 #ifdef HOTPLUG_FIRMWARE
 #include <linux/firmware.h>
 #else
-#include "vpmoct128_fw.h"
-#include "vpmoct064_fw.h"
+extern unsigned char _binary_OCT6114_64D_ima_start;
+extern unsigned int _binary_OCT6114_64D_ima_size;
+extern unsigned char _binary_OCT6114_128D_ima_start;
+extern unsigned int _binary_OCT6114_128D_ima_size;
 #endif
 
 #include "oct6100api/oct6100_api.h"
@@ -409,11 +411,11 @@
 	ChipOpen.ulImageSize = firmware->size;
 #else
 	if (vpm450m->numchans > 64) {
-		ChipOpen.pbyImageFile = vpmoct128_fw;
-		ChipOpen.ulImageSize = sizeof(vpmoct128_fw);
+		ChipOpen.pbyImageFile = &_binary_OCT6114_128D_ima_start;
+		ChipOpen.ulImageSize = _binary_OCT6114_128D_ima_size;
 	} else {
-		ChipOpen.pbyImageFile = vpmoct064_fw;
-		ChipOpen.ulImageSize = sizeof(vpmoct064_fw);
+		ChipOpen.pbyImageFile = &_binary_OCT6114_64D_ima_start;
+		ChipOpen.ulImageSize = _binary_OCT6114_64D_ima_size;
 	}
 #endif	
 

Modified: team/file/zaptel-firmware/wct4xxp/vpm450m.h
URL: http://svn.digium.com/view/zaptel/team/file/zaptel-firmware/wct4xxp/vpm450m.h?view=diff&rev=1821&r1=1820&r2=1821
==============================================================================
--- team/file/zaptel-firmware/wct4xxp/vpm450m.h (original)
+++ team/file/zaptel-firmware/wct4xxp/vpm450m.h Mon Jan 15 19:41:44 2007
@@ -30,9 +30,6 @@
 struct firmware;
 #endif
 
-static const char *oct064_firmware = "OCT6114-64D.ima";
-static const char *oct128_firmware = "OCT6114-128D.ima";
-
 /* From driver */
 unsigned int oct_get_reg(void *data, unsigned int reg);
 void oct_set_reg(void *data, unsigned int reg, unsigned int val);



More information about the svn-commits mailing list