summaryrefslogtreecommitdiff
path: root/images/srec.sh
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-05-19 19:04:07 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-05-19 19:48:10 +0300
commitbcd880c8e4085c943a055bcb2e2dc78feda33bea (patch)
treeb2af36a014b6159c2d5f33a4b726bb69d03c4b97 /images/srec.sh
parentc743f77f9979b813da18585e9ca559d26913a62e (diff)
Modularise image handling
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'images/srec.sh')
-rw-r--r--images/srec.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/images/srec.sh b/images/srec.sh
new file mode 100644
index 0000000..6f89b92
--- /dev/null
+++ b/images/srec.sh
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+make_srec_image() {
+ local image=$output_dir/arch/$arch/boot/$image_kernel
+
+ cat $image | lzma -z -e > $image.xz
+ objcopy -I binary -O srec --srec-forceS3 --srec-len 516 \
+ $image.xz $image.xz.srec
+
+ for dtb in $DTBS ; do
+ local src=${dtb/:*/}
+
+ objcopy -I binary -O srec --srec-forceS3 --srec-len 516 \
+ $src $src.srec
+ done
+}
+
+image_file=$output_dir/arch/$arch/boot/$kernel_image.xz.srec