summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild_tools/make_firmware_object2
-rw-r--r--wct4xxp/vpm450m.c17
2 files changed, 10 insertions, 9 deletions
diff --git a/build_tools/make_firmware_object b/build_tools/make_firmware_object
index 1aadde3..b00c8f9 100755
--- a/build_tools/make_firmware_object
+++ b/build_tools/make_firmware_object
@@ -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
diff --git a/wct4xxp/vpm450m.c b/wct4xxp/vpm450m.c
index 5eb40eb..89874ac 100644
--- a/wct4xxp/vpm450m.c
+++ b/wct4xxp/vpm450m.c
@@ -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 @@ UINT32 Oct6100UserMemSet(PVOID f_pAddress, UINT32 f_ulPattern, UINT32 f_ulLength
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 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans)
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