[svn-commits] kpfleming: branch 1.2 r1826 - in /branches/1.2: build_tools/ wct4xxp/

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Jan 15 21:30:01 MST 2007


Author: kpfleming
Date: Mon Jan 15 22:30:00 2007
New Revision: 1826

URL: http://svn.digium.com/view/zaptel?view=rev&rev=1826
Log:
make the 'firmware object' files load the firmware blobs as read-only data
simplify the code that uses the firmware objects a bit

Modified:
    branches/1.2/build_tools/make_firmware_object
    branches/1.2/wct4xxp/vpm450m.c

Modified: branches/1.2/build_tools/make_firmware_object
URL: http://svn.digium.com/view/zaptel/branches/1.2/build_tools/make_firmware_object?view=diff&rev=1826&r1=1825&r2=1826
==============================================================================
--- branches/1.2/build_tools/make_firmware_object (original)
+++ branches/1.2/build_tools/make_firmware_object Mon Jan 15 22:30:00 2007
@@ -9,4 +9,4 @@
 bfdname=`objdump -f ${3} | grep -e "${3}:" | sed "s/.*file format \(.*\)/\1/"`
 bfdarch=`objdump -f ${3} | grep -e "architecture:" | sed "s/.*ture: \(.*\),.*/\1/"`
 
-objcopy -I binary ${1} -B ${bfdarch} -O ${bfdname} ${2}
+objcopy -I binary ${1} -B ${bfdarch} -O ${bfdname} ${2} --rename-section .data=.rodata,alloc,load,data,contents,readonly

Modified: branches/1.2/wct4xxp/vpm450m.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wct4xxp/vpm450m.c?view=diff&rev=1826&r1=1825&r2=1826
==============================================================================
--- branches/1.2/wct4xxp/vpm450m.c (original)
+++ branches/1.2/wct4xxp/vpm450m.c Mon Jan 15 22:30:00 2007
@@ -12,11 +12,6 @@
 #include <linux/time.h>
 #ifdef HOTPLUG_FIRMWARE
 #include <linux/firmware.h>
-#else
-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"
@@ -44,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;
@@ -411,10 +406,16 @@
 	ChipOpen.ulImageSize = firmware->size;
 #else
 	if (vpm450m->numchans > 64) {
-		ChipOpen.pbyImageFile = &_binary_OCT6114_128D_ima_start;
+		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 = &_binary_OCT6114_64D_ima_start;
+		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	



More information about the svn-commits mailing list