changeset 274:e3f17ff16915

gsm-fw: buildrel.sh script for building mokoffs-edit-kit release images
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 07 Feb 2014 08:32:25 +0000
parents d6dfad22cccd
children cedf09b6b5ac
files gsm-fw/buildrel.sh gsm-fw/configs/buildlists/mokoffs-edit-kit
diffstat 2 files changed, 57 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/buildrel.sh	Fri Feb 07 08:32:25 2014 +0000
@@ -0,0 +1,55 @@
+#!/bin/sh
+# Shell script for building gsm-fw release binaries
+
+if [ $# != 1 ]
+then
+	echo "usage: ./buildrel.sh buildlist" 1>&2
+	exit 1
+fi
+
+if [ ! -f "configs/buildlists/$1" ]
+then
+	echo "Error: no buildlist named $1" 1>&2
+	exit 1
+fi
+
+# get to work
+set -e
+mkdir -p images
+exec < "configs/buildlists/$1"
+while read config imglist
+do
+
+	if [ -z "$config" -o -z "$imglist" ]
+	then
+		echo "Error: bad line in configs/buildlists/$1" 1>&2
+		exit 1
+	fi
+
+	echo "Building $config configuration"
+	cp configs/$config build.conf
+	make clean
+
+	for img in $imglist
+	do
+		case "$img" in
+		flashImage)
+			format=bin
+			;;
+		ramImage)
+			format=srec
+			;;
+		*)
+			echo \
+		"Error: invalid image type $img in configs/buildlists/$1" 1>&2
+			exit 1
+			;;
+		esac
+
+		echo "Building $img"
+		make $img
+		cp -p finlink/$img.$format images/$config-$img.$format
+		cp -p finlink/$img.elf images/$config-$img.elf
+	done
+
+done
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/configs/buildlists/mokoffs-edit-kit	Fri Feb 07 08:32:25 2014 +0000
@@ -0,0 +1,2 @@
+gtamodem-etmffsrw-ext	ramImage
+gtamodem-etmffsrw-int	ramImage