blob: a6a199379a8d1f58d9435c3d8b4fb984ec1f253d [file] [log] [blame]
Fabio Berton988c11d2015-10-15 14:45:08 -03001Upstream-Status: Inappropriate [configuration]
2
3Subject: [PATCH] Use objcopy from toolchain
4Organization: O.S. Systems Software LTDA.
5
6Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
7---
8 drivers/dahdi/firmware/Makefile | 4 ++--
9 drivers/dahdi/firmware/make_firmware_object.in | 2 +-
10 2 files changed, 3 insertions(+), 3 deletions(-)
11
12diff --git a/drivers/dahdi/firmware/Makefile b/drivers/dahdi/firmware/Makefile
13index fbd6582..1f9ce7f 100644
14--- a/drivers/dahdi/firmware/Makefile
15+++ b/drivers/dahdi/firmware/Makefile
16@@ -158,8 +158,8 @@ hotplug-uninstall:
17 fi
18
19 make_firmware_object: make_firmware_object.in ../dahdi-base.o
20- @export BFDNAME=`LANG=C objdump -f ../dahdi-base.o | grep -e "dahdi-base.o:" | sed "s/.*file format \(.*\)/\1/"`; \
21- export BFDARCH=`LANG=C objdump -f ../dahdi-base.o | grep -e "architecture:" | sed "s/.*ture: \(.*\),.*/\1/"`; \
22+ @export BFDNAME=`LANG=C ${TARGET_SYS}-objdump -f ../dahdi-base.o | grep -e "dahdi-base.o:" | sed "s/.*file format \(.*\)/\1/"`; \
23+ export BFDARCH=`LANG=C ${TARGET_SYS}-objdump -f ../dahdi-base.o | grep -e "architecture:" | sed "s/.*ture: \(.*\),.*/\1/"`; \
24 sed -e s/BFDNAME/$${BFDNAME}/ -e s/BFDARCH/$${BFDARCH}/ $< > $@
25 @chmod +x $@
26
27diff --git a/drivers/dahdi/firmware/make_firmware_object.in b/drivers/dahdi/firmware/make_firmware_object.in
28index 0effb32..6fe232a 100644
29--- a/drivers/dahdi/firmware/make_firmware_object.in
30+++ b/drivers/dahdi/firmware/make_firmware_object.in
31@@ -5,4 +5,4 @@
32 # 1 - firmware file
33 # 2 - output file
34
35-objcopy -I binary ${1} -B BFDARCH -O BFDNAME ${2} --rename-section .data=.rodata,alloc,load,data,contents,readonly
36+${TARGET_SYS}-objcopy -I binary ${1} -B BFDARCH -O BFDNAME ${2} --rename-section .data=.rodata,alloc,load,data,contents,readonly
37--
382.1.4
39