[zaptel-commits] kpfleming: branch 1.4 r1820 - in /branches/1.4: ./ build_tools/ wct4xxp/

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Mon Jan 15 18:37:27 MST 2007


Author: kpfleming
Date: Mon Jan 15 19:37:26 2007
New Revision: 1820

URL: http://svn.digium.com/view/zaptel?view=rev&rev=1820
Log:
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:
    branches/1.4/build_tools/make_firmware_object
      - copied unchanged from r1818, branches/1.2/build_tools/make_firmware_object
Removed:
    branches/1.4/wct4xxp/fw2h.c
Modified:
    branches/1.4/   (props changed)
    branches/1.4/Makefile
    branches/1.4/wct4xxp/   (props changed)
    branches/1.4/wct4xxp/Kbuild
    branches/1.4/wct4xxp/Makefile
    branches/1.4/wct4xxp/base.c
    branches/1.4/wct4xxp/vpm450m.c
    branches/1.4/wct4xxp/vpm450m.h

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

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

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

Modified: branches/1.4/wct4xxp/Kbuild
URL: http://svn.digium.com/view/zaptel/branches/1.4/wct4xxp/Kbuild?view=diff&rev=1820&r1=1819&r2=1820
==============================================================================
--- branches/1.4/wct4xxp/Kbuild (original)
+++ branches/1.4/wct4xxp/Kbuild Mon Jan 15 19:37:26 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: branches/1.4/wct4xxp/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.4/wct4xxp/Makefile?view=diff&rev=1820&r1=1819&r2=1820
==============================================================================
--- branches/1.4/wct4xxp/Makefile (original)
+++ branches/1.4/wct4xxp/Makefile Mon Jan 15 19:37:26 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: branches/1.4/wct4xxp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/wct4xxp/base.c?view=diff&rev=1820&r1=1819&r2=1820
==============================================================================
--- branches/1.4/wct4xxp/base.c (original)
+++ branches/1.4/wct4xxp/base.c Mon Jan 15 19:37:26 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: branches/1.4/wct4xxp/vpm450m.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/wct4xxp/vpm450m.c?view=diff&rev=1820&r1=1819&r2=1820
==============================================================================
--- branches/1.4/wct4xxp/vpm450m.c (original)
+++ branches/1.4/wct4xxp/vpm450m.c Mon Jan 15 19:37:26 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: branches/1.4/wct4xxp/vpm450m.h
URL: http://svn.digium.com/view/zaptel/branches/1.4/wct4xxp/vpm450m.h?view=diff&rev=1820&r1=1819&r2=1820
==============================================================================
--- branches/1.4/wct4xxp/vpm450m.h (original)
+++ branches/1.4/wct4xxp/vpm450m.h Mon Jan 15 19:37:26 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