summaryrefslogtreecommitdiff
path: root/build_tools/make_firmware_object.in
diff options
context:
space:
mode:
Diffstat (limited to 'build_tools/make_firmware_object.in')
-rwxr-xr-xbuild_tools/make_firmware_object.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/build_tools/make_firmware_object.in b/build_tools/make_firmware_object.in
new file mode 100755
index 0000000..1c301a4
--- /dev/null
+++ b/build_tools/make_firmware_object.in
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+# make an object file from a raw binary firmware file
+# arguments:
+# 1 - firmware file
+# 2 - output file
+
+bfdname=@BDFNAME@
+bfdarch=@BDFARCH@
+
+objcopy -I binary ${1} -B ${bfdarch} -O ${bfdname} ${2} --rename-section .data=.rodata,alloc,load,data,contents,readonly