From de9128a1e6b5ef6d91146b5b7d984efb1778fc34 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Tue, 16 Jan 2007 01:43:50 +0000 Subject: Merged revisions 1820 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 ................ r1820 | kpfleming | 2007-01-15 19:37:26 -0600 (Mon, 15 Jan 2007) | 11 lines 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 ........ ................ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1822 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- build_tools/make_firmware_object | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 build_tools/make_firmware_object (limited to 'build_tools') 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} -- cgit v1.2.3