[svn-commits] kpfleming: trunk r1822 - in /trunk: ./ build_tools/ wct4xxp/

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Jan 15 18:43:51 MST 2007


Author: kpfleming
Date: Mon Jan 15 19:43:50 2007
New Revision: 1822

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

................
r1820 | kpfleming | 2007-01-15 19:37:26 -0600 (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

........

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

Added:
    trunk/build_tools/make_firmware_object
      - copied unchanged from r1820, branches/1.4/build_tools/make_firmware_object
Removed:
    trunk/wct4xxp/fw2h.c
Modified:
    trunk/   (props changed)
    trunk/Makefile
    trunk/wct4xxp/   (props changed)
    trunk/wct4xxp/Kbuild
    trunk/wct4xxp/Makefile
    trunk/wct4xxp/base.c
    trunk/wct4xxp/vpm450m.c

Propchange: trunk/
            ('branch-1.4-blocked' removed)

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Mon Jan 15 19:43:50 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-1471,1490,1500,1507,1520,1528,1530,1536,1543,1547,1568,1574,1576,1601,1611,1615,1642,1661,1664,1687,1698,1701,1767,1774
+/branches/1.4:1-1471,1490,1500,1507,1520,1528,1530,1536,1543,1547,1568,1574,1576,1601,1611,1615,1642,1661,1664,1687,1698,1701,1767,1774,1820

Modified: trunk/Makefile
URL: http://svn.digium.com/view/zaptel/trunk/Makefile?view=diff&rev=1822&r1=1821&r2=1822
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Mon Jan 15 19:43:50 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: trunk/wct4xxp/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jan 15 19:43:50 2007
@@ -1,6 +1,3 @@
 *.mod.c
 *.cmd
 *.ko
-vpmoct064_fw.h
-vpmoct128_fw.h
-fw2h

Modified: trunk/wct4xxp/Kbuild
URL: http://svn.digium.com/view/zaptel/trunk/wct4xxp/Kbuild?view=diff&rev=1822&r1=1821&r2=1822
==============================================================================
--- trunk/wct4xxp/Kbuild (original)
+++ trunk/wct4xxp/Kbuild Mon Jan 15 19:43:50 2007
@@ -1,32 +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
-
-# If hotplug firmware loading is disabled, do our header based stuff
-ifeq ($(HOTPLUG_FIRMWARE),no)
-
-host-progs := fw2h
-hostprogs-y := fw2h
-
-FIRMWARE := $(obj)/vpmoct128_fw.h $(obj)/vpmoct064_fw.h
-
-$(obj)/vpmoct128_fw.h: $(src)/OCT6114-128D.ima $(obj)/fw2h
-	$(obj)/fw2h $< $@
-
-$(obj)/vpmoct064_fw.h: $(src)/OCT6114-64D.ima $(obj)/fw2h
-	$(obj)/fw2h $< $@
-
-endif
-
 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: $(FIRMWARE) $(src)/vpm450m.h
+$(obj)/vpm450m.o: $(src)/vpm450m.h
 $(obj)/vpm450m.o: $(src)/../oct612x/include/oct6100api/oct6100_api.h
 
-clean-files := vpmoct128_fw.h vpmoct064_fw.h
+$(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)/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: trunk/wct4xxp/Makefile
URL: http://svn.digium.com/view/zaptel/trunk/wct4xxp/Makefile?view=diff&rev=1822&r1=1821&r2=1822
==============================================================================
--- trunk/wct4xxp/Makefile (original)
+++ trunk/wct4xxp/Makefile Mon Jan 15 19:43:50 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: trunk/wct4xxp/base.c
URL: http://svn.digium.com/view/zaptel/trunk/wct4xxp/base.c?view=diff&rev=1822&r1=1821&r2=1822
==============================================================================
--- trunk/wct4xxp/base.c (original)
+++ trunk/wct4xxp/base.c Mon Jan 15 19:43:50 2007
@@ -50,6 +50,11 @@
 #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
  * possibility of losing a frame of data at very infrequent intervals.  If
@@ -61,10 +66,6 @@
  */
 
 /* #define ENABLE_TASKLETS */
-
-/* Firmware filenames, used for hotplug firmware loading */
-static const char *oct064_firmware = "OCT6114-64D.ima";
-static const char *oct128_firmware = "OCT6114-128D.ima";
 
 /* Work queues are a way to better distribute load on SMP systems */
 #ifdef LINUX26

Modified: trunk/wct4xxp/vpm450m.c
URL: http://svn.digium.com/view/zaptel/trunk/wct4xxp/vpm450m.c?view=diff&rev=1822&r1=1821&r2=1822
==============================================================================
--- trunk/wct4xxp/vpm450m.c (original)
+++ trunk/wct4xxp/vpm450m.c Mon Jan 15 19:43:50 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	
 



More information about the svn-commits mailing list