diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-01-16 01:28:54 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-01-16 01:28:54 +0000 |
commit | 76f1e96f8dc1882f9e992bdf80489929aa746a88 (patch) | |
tree | 6197c933e076ba1c8d2c9ad625c03648217afd6d /build_tools | |
parent | 1c8d37674171447cb9529db2f0c6b2e12abe3bc8 (diff) |
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
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@1818 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'build_tools')
-rwxr-xr-x | build_tools/make_firmware_object | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/build_tools/make_firmware_object b/build_tools/make_firmware_object new file mode 100755 index 0000000..1aadde3 --- /dev/null +++ b/build_tools/make_firmware_object @@ -0,0 +1,12 @@ +#!/bin/sh -e + +# make an object file from a raw binary firmware file +# arguments: +# 1 - firmware file +# 2 - output file +# 3 - template output file (used to learn desired format) + +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} |