[zaptel-commits] mogorman: branch mogorman/zaptel-1.2-transcoder r1841 - in /team/mogorman/zap...

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Wed Jan 17 15:10:22 MST 2007


Author: mogorman
Date: Wed Jan 17 16:10:21 2007
New Revision: 1841

URL: http://svn.digium.com/view/zaptel?view=rev&rev=1841
Log:
Merged revisions 1818,1826-1827,1835 via svnmerge from 
https://svn.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

........
r1826 | kpfleming | 2007-01-15 22:30:00 -0600 (Mon, 15 Jan 2007) | 3 lines

make the 'firmware object' files load the firmware blobs as read-only data
simplify the code that uses the firmware objects a bit

........
r1827 | kpfleming | 2007-01-15 22:37:06 -0600 (Mon, 15 Jan 2007) | 2 lines

use latest Octasic API tag

........
r1835 | qwell | 2007-01-16 17:44:28 -0600 (Tue, 16 Jan 2007) | 6 lines

Remove file that was never (literally) able to compile - dates all the way back to zaptel 0.8.0

If we can figure out where this coeffs.h comes from, I suppose it would be easy to add this back in the future.

Issue 8493

........

Added:
    team/mogorman/zaptel-1.2-transcoder/build_tools/make_firmware_object
      - copied unchanged from r1835, branches/1.2/build_tools/make_firmware_object
Removed:
    team/mogorman/zaptel-1.2-transcoder/fxsdump.c
    team/mogorman/zaptel-1.2-transcoder/wct4xxp/fw2h.c
Modified:
    team/mogorman/zaptel-1.2-transcoder/   (props changed)
    team/mogorman/zaptel-1.2-transcoder/Makefile
    team/mogorman/zaptel-1.2-transcoder/wct4xxp/   (props changed)
    team/mogorman/zaptel-1.2-transcoder/wct4xxp/Kbuild
    team/mogorman/zaptel-1.2-transcoder/wct4xxp/Makefile
    team/mogorman/zaptel-1.2-transcoder/wct4xxp/base.c
    team/mogorman/zaptel-1.2-transcoder/wct4xxp/vpm450m.c
    team/mogorman/zaptel-1.2-transcoder/wct4xxp/vpm450m.h

Propchange: team/mogorman/zaptel-1.2-transcoder/
------------------------------------------------------------------------------
--- svn:externals (original)
+++ svn:externals Wed Jan 17 16:10:21 2007
@@ -1,1 +1,1 @@
-oct612x		http://svn.digium.com/svn/octasic_api/oct612x/tags/PR43-00/software
+oct612x		http://svn.digium.com/svn/octasic_api/oct612x/tags/PR43-01/software

Propchange: team/mogorman/zaptel-1.2-transcoder/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jan 17 16:10:21 2007
@@ -1,1 +1,1 @@
-/branches/1.2:1-1784
+/branches/1.2:1-1840

Modified: team/mogorman/zaptel-1.2-transcoder/Makefile
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-1.2-transcoder/Makefile?view=diff&rev=1841&r1=1840&r2=1841
==============================================================================
--- team/mogorman/zaptel-1.2-transcoder/Makefile (original)
+++ team/mogorman/zaptel-1.2-transcoder/Makefile Wed Jan 17 16:10:21 2007
@@ -142,7 +142,7 @@
 linux26: prereq $(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
-	$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules
+	$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE) modules
 
 version.h: FORCE
 	ZAPTELVERSION="${ZAPTELVERSION}" build_tools/make_version_h > $@.tmp

Propchange: team/mogorman/zaptel-1.2-transcoder/wct4xxp/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Jan 17 16:10:21 2007
@@ -1,6 +1,3 @@
 *.mod.c
 *.cmd
 *.ko
-vpmoct064_fw.h
-vpmoct128_fw.h
-fw2h

Modified: team/mogorman/zaptel-1.2-transcoder/wct4xxp/Kbuild
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-1.2-transcoder/wct4xxp/Kbuild?view=diff&rev=1841&r1=1840&r2=1841
==============================================================================
--- team/mogorman/zaptel-1.2-transcoder/wct4xxp/Kbuild (original)
+++ team/mogorman/zaptel-1.2-transcoder/wct4xxp/Kbuild Wed Jan 17 16:10:21 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/mogorman/zaptel-1.2-transcoder/wct4xxp/Makefile
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-1.2-transcoder/wct4xxp/Makefile?view=diff&rev=1841&r1=1840&r2=1841
==============================================================================
--- team/mogorman/zaptel-1.2-transcoder/wct4xxp/Makefile (original)
+++ team/mogorman/zaptel-1.2-transcoder/wct4xxp/Makefile Wed Jan 17 16:10:21 2007
@@ -14,23 +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: CFLAGS=
-
-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/mogorman/zaptel-1.2-transcoder/wct4xxp/base.c
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-1.2-transcoder/wct4xxp/base.c?view=diff&rev=1841&r1=1840&r2=1841
==============================================================================
--- team/mogorman/zaptel-1.2-transcoder/wct4xxp/base.c (original)
+++ team/mogorman/zaptel-1.2-transcoder/wct4xxp/base.c Wed Jan 17 16:10:21 2007
@@ -46,6 +46,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/mogorman/zaptel-1.2-transcoder/wct4xxp/vpm450m.c
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-1.2-transcoder/wct4xxp/vpm450m.c?view=diff&rev=1841&r1=1840&r2=1841
==============================================================================
--- team/mogorman/zaptel-1.2-transcoder/wct4xxp/vpm450m.c (original)
+++ team/mogorman/zaptel-1.2-transcoder/wct4xxp/vpm450m.c Wed Jan 17 16:10:21 2007
@@ -12,9 +12,6 @@
 #include <linux/time.h>
 #ifdef HOTPLUG_FIRMWARE
 #include <linux/firmware.h>
-#else
-#include "vpmoct128_fw.h"
-#include "vpmoct064_fw.h"
 #endif
 
 #include "oct6100api/oct6100_api.h"
@@ -42,7 +39,7 @@
 	return cOCT6100_ERR_OK;
 }
 
-UINT32 Oct6100UserMemCopy(PVOID f_pDestination, PVOID f_pSource, UINT32 f_ulLength)
+UINT32 Oct6100UserMemCopy(PVOID f_pDestination, const void *f_pSource, UINT32 f_ulLength)
 {
 	memcpy(f_pDestination, f_pSource, f_ulLength);
 	return cOCT6100_ERR_OK;
@@ -409,11 +406,17 @@
 	ChipOpen.ulImageSize = firmware->size;
 #else
 	if (vpm450m->numchans > 64) {
-		ChipOpen.pbyImageFile = vpmoct128_fw;
-		ChipOpen.ulImageSize = sizeof(vpmoct128_fw);
+		extern const unsigned char _binary_OCT6114_128D_ima_start[];
+		extern const unsigned int _binary_OCT6114_128D_ima_size;
+
+		ChipOpen.pbyImageFile = _binary_OCT6114_128D_ima_start;
+		ChipOpen.ulImageSize = _binary_OCT6114_128D_ima_size;
 	} else {
-		ChipOpen.pbyImageFile = vpmoct064_fw;
-		ChipOpen.ulImageSize = sizeof(vpmoct064_fw);
+		extern const unsigned char _binary_OCT6114_64D_ima_start[];
+		extern const unsigned int _binary_OCT6114_64D_ima_size;
+
+		ChipOpen.pbyImageFile = _binary_OCT6114_64D_ima_start;
+		ChipOpen.ulImageSize = _binary_OCT6114_64D_ima_size;
 	}
 #endif	
 

Modified: team/mogorman/zaptel-1.2-transcoder/wct4xxp/vpm450m.h
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-1.2-transcoder/wct4xxp/vpm450m.h?view=diff&rev=1841&r1=1840&r2=1841
==============================================================================
--- team/mogorman/zaptel-1.2-transcoder/wct4xxp/vpm450m.h (original)
+++ team/mogorman/zaptel-1.2-transcoder/wct4xxp/vpm450m.h Wed Jan 17 16:10:21 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 zaptel-commits mailing list