changeset 524:11b6ca57a079

gsm-fw/cfgmagic: first rough sketch at L1 configuration
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 14 Jul 2014 07:03:53 +0000
parents b92febec14aa
children 98c6be4d3d8d
files gsm-fw/cfgmagic/feature.gsm gsm-fw/cfgmagic/feature.l1stand gsm-fw/cfgmagic/feature.l1tm gsm-fw/cfgmagic/functions gsm-fw/cfgmagic/processconf.sh
diffstat 5 files changed, 68 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/cfgmagic/feature.gsm	Mon Jul 14 07:03:53 2014 +0000
@@ -0,0 +1,9 @@
+# My vision is that feature gsm and the CONFIG_GSM symbol it defines will
+# include everything that is needed for basic GSM functionality: GPF, L1,
+# SIM driver, G23 stack and ACI.
+# We'll see how it pans out as the project progresses.
+
+CONFIG_GPF=1
+CONFIG_GSM=1
+export_to_c	CONFIG_GPF CONFIG_GSM
+export_to_mk	CONFIG_GPF CONFIG_GSM
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/cfgmagic/feature.l1stand	Mon Jul 14 07:03:53 2014 +0000
@@ -0,0 +1,3 @@
+CONFIG_L1_STANDALONE=1
+export_to_c	CONFIG_L1_STANDALONE
+export_to_mk	CONFIG_L1_STANDALONE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/cfgmagic/feature.l1tm	Mon Jul 14 07:03:53 2014 +0000
@@ -0,0 +1,3 @@
+TESTMODE=1
+export_to_c	TESTMODE
+export_to_mk	TESTMODE
--- a/gsm-fw/cfgmagic/functions	Mon Jul 14 05:16:14 2014 +0000
+++ b/gsm-fw/cfgmagic/functions	Mon Jul 14 07:03:53 2014 +0000
@@ -41,46 +41,43 @@
 }
 
 export_to_c() {
-	if [ $# != 1 ]
-	then
-		echo "export_to_c: wrong number of arguments" 1>&2
-		exit 1
-	fi
-	case "$c_export_list" in
-		*" $1 "* | *" $1")
-			;;
-		*)
-			c_export_list="$c_export_list $1"
-			;;
-	esac
+	while [ $# != 0 ]
+	do
+		case "$c_export_list" in
+			*" $1 "* | *" $1")
+				;;
+			*)
+				c_export_list="$c_export_list $1"
+				;;
+		esac
+		shift
+	done
 }
 
 export_to_mk() {
-	if [ $# != 1 ]
-	then
-		echo "export_to_mk: wrong number of arguments" 1>&2
-		exit 1
-	fi
-	case "$mk_export_list" in
-		*" $1 "* | *" $1")
-			;;
-		*)
-			mk_export_list="$mk_export_list $1"
-			;;
-	esac
+	while [ $# != 0 ]
+	do
+		case "$mk_export_list" in
+			*" $1 "* | *" $1")
+				;;
+			*)
+				mk_export_list="$mk_export_list $1"
+				;;
+		esac
+		shift
+	done
 }
 
 export_to_m4() {
-	if [ $# != 1 ]
-	then
-		echo "export_to_m4: wrong number of arguments" 1>&2
-		exit 1
-	fi
-	case "$m4_export_list" in
-		*" $1 "* | *" $1")
-			;;
-		*)
-			m4_export_list="$m4_export_list $1"
-			;;
-	esac
+	while [ $# != 0 ]
+	do
+		case "$m4_export_list" in
+			*" $1 "* | *" $1")
+				;;
+			*)
+				m4_export_list="$m4_export_list $1"
+				;;
+		esac
+		shift
+	done
 }
--- a/gsm-fw/cfgmagic/processconf.sh	Mon Jul 14 05:16:14 2014 +0000
+++ b/gsm-fw/cfgmagic/processconf.sh	Mon Jul 14 07:03:53 2014 +0000
@@ -57,10 +57,22 @@
 	"Error: RAMFFS_BLKSIZE_LOG2 and RAMFFS_NBLOCKS need to be defined" 1>&2
 		exit 1
 	fi
-	export_to_c	RAMFFS_BLKSIZE_LOG2
-	export_to_m4	RAMFFS_BLKSIZE_LOG2
-	export_to_c	RAMFFS_NBLOCKS
-	export_to_m4	RAMFFS_NBLOCKS
+	export_to_c	RAMFFS_BLKSIZE_LOG2 RAMFFS_NBLOCKS
+	export_to_m4	RAMFFS_BLKSIZE_LOG2 RAMFFS_NBLOCKS
+fi
+
+# L1 configuration
+if [ "$CONFIG_GSM" = 1 -a "$CONFIG_L1_STANDALONE" = 1 ]
+then
+	echo "Error: feature gsm and feature l1stand are mutually exclusive" \
+		1>&2
+	exit 1
+fi
+if [ "$CONFIG_GSM" = 1 -o "$CONFIG_L1_STANDALONE" = 1 ]
+then
+	CONFIG_INCLUDE_L1=1
+	export_to_c	CONFIG_INCLUDE_L1
+	export_to_mk	CONFIG_INCLUDE_L1
 fi
 
 # The list of build components: we have some invariants that are always
@@ -72,6 +84,10 @@
 then
 	BUILD_COMPONENTS="$BUILD_COMPONENTS gpf"
 fi
+if [ "$CONFIG_INCLUDE_L1" = 1 ]
+then
+	BUILD_COMPONENTS="$BUILD_COMPONENTS L1"
+fi
 
 export_to_mk BUILD_COMPONENTS