[zaptel-commits] kpfleming: branch 1.2 r1996 -
/branches/1.2/wct4xxp/base.c
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Mon Jan 29 12:20:33 MST 2007
Author: kpfleming
Date: Mon Jan 29 13:20:32 2007
New Revision: 1996
URL: http://svn.digium.com/view/zaptel?view=rev&rev=1996
Log:
_really_ fix the non-hotplug firmware case
Modified:
branches/1.2/wct4xxp/base.c
Modified: branches/1.2/wct4xxp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wct4xxp/base.c?view=diff&rev=1996&r1=1995&r2=1996
==============================================================================
--- branches/1.2/wct4xxp/base.c (original)
+++ branches/1.2/wct4xxp/base.c Mon Jan 29 13:20:32 2007
@@ -2679,8 +2679,8 @@
struct firmware embedded_firmware;
const struct firmware *firmware = &embedded_firmware;
#if !defined(HOTPLUG_FIRMWARE)
- extern const u32 *_binary_OCT6114_64D_ima_size;
- extern const u32 *_binary_OCT6114_128D_ima_size;
+ extern void *_binary_OCT6114_64D_ima_size;
+ extern void *_binary_OCT6114_128D_ima_size;
extern u8 _binary_OCT6114_64D_ima_start[];
extern u8 _binary_OCT6114_128D_ima_start[];
#endif
@@ -2719,7 +2719,13 @@
}
#else
embedded_firmware.data = _binary_OCT6114_64D_ima_start;
- embedded_firmware.size = *_binary_OCT6114_64D_ima_size;
+ /* Yes... this is weird. objcopy gives us a symbol containing
+ the size of the firmware, not a pointer a variable containing
+ the size. The only way we can get the value of the symbol
+ is to take its address, so we define it as a pointer and
+ then cast that value to the proper type.
+ */
+ embedded_firmware.size = (size_t) _binary_OCT6114_64D_ima_size;
#endif
break;
case 128:
@@ -2731,7 +2737,13 @@
}
#else
embedded_firmware.data = _binary_OCT6114_128D_ima_start;
- embedded_firmware.size = *_binary_OCT6114_128D_ima_size;
+ /* Yes... this is weird. objcopy gives us a symbol containing
+ the size of the firmware, not a pointer a variable containing
+ the size. The only way we can get the value of the symbol
+ is to take its address, so we define it as a pointer and
+ then cast that value to the proper type.
+ */
+ embedded_firmware.size = (size_t) _binary_OCT6114_128D_ima_size;
#endif
break;
default:
More information about the zaptel-commits
mailing list