changeset 637:0677a6fbb8b6

gsm-fw: CONFIG_INCLUDE_xxx reworked in preparation for G23 integration
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Wed, 03 Sep 2014 16:03:38 +0000
parents 06ecb305f650
children 0b5f226bfdf4
files gsm-fw/cfgmagic/feature.gpf gsm-fw/cfgmagic/feature.gsm gsm-fw/cfgmagic/feature.l1stand gsm-fw/cfgmagic/processconf.sh gsm-fw/finlink/Makefile gsm-fw/sysglue/appinit.c
diffstat 6 files changed, 39 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/cfgmagic/feature.gpf	Mon Sep 01 19:34:31 2014 +0000
+++ b/gsm-fw/cfgmagic/feature.gpf	Wed Sep 03 16:03:38 2014 +0000
@@ -1,3 +1,1 @@
-CONFIG_GPF=1
-export_to_c	CONFIG_GPF
-export_to_mk	CONFIG_GPF
+CONFIG_INCLUDE_GPF=1
--- a/gsm-fw/cfgmagic/feature.gsm	Mon Sep 01 19:34:31 2014 +0000
+++ b/gsm-fw/cfgmagic/feature.gsm	Wed Sep 03 16:03:38 2014 +0000
@@ -3,7 +3,13 @@
 # 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
+export_to_c	CONFIG_GSM
+export_to_mk	CONFIG_GSM
+
+# enable all necessary components
+CONFIG_INCLUDE_CCD=1
+CONFIG_INCLUDE_GPF=1
+CONFIG_INCLUDE_L1=1
+CONFIG_INCLUDE_PCM=1
+CONFIG_INCLUDE_SIM=1
--- a/gsm-fw/cfgmagic/feature.l1stand	Mon Sep 01 19:34:31 2014 +0000
+++ b/gsm-fw/cfgmagic/feature.l1stand	Wed Sep 03 16:03:38 2014 +0000
@@ -1,3 +1,7 @@
 CONFIG_L1_STANDALONE=1
 export_to_c	CONFIG_L1_STANDALONE
 export_to_mk	CONFIG_L1_STANDALONE
+
+# enable the necessary components
+CONFIG_INCLUDE_GPF=1
+CONFIG_INCLUDE_L1=1
--- a/gsm-fw/cfgmagic/processconf.sh	Mon Sep 01 19:34:31 2014 +0000
+++ b/gsm-fw/cfgmagic/processconf.sh	Wed Sep 03 16:03:38 2014 +0000
@@ -22,6 +22,26 @@
 FLASH_BOOT_VIA_BOOTROM=1
 FLASHIMAGE_BASE_ADDR=0x2000
 
+# We always export CONFIG_INCLUDE_xxx to config.h and config.mk, whether
+# enabled or disabled.  This way enabling any of these components is
+# as simple as CONFIG_INCLUDE_xxx=1, without having to remember the
+# export_to_{c,mk} magic.
+CONFIG_INCLUDE_CCD=0
+export_to_c	CONFIG_INCLUDE_CCD
+export_to_mk	CONFIG_INCLUDE_CCD
+CONFIG_INCLUDE_GPF=0
+export_to_c	CONFIG_INCLUDE_GPF
+export_to_mk	CONFIG_INCLUDE_GPF
+CONFIG_INCLUDE_L1=0
+export_to_c	CONFIG_INCLUDE_L1
+export_to_mk	CONFIG_INCLUDE_L1
+CONFIG_INCLUDE_PCM=0
+export_to_c	CONFIG_INCLUDE_PCM
+export_to_mk	CONFIG_INCLUDE_PCM
+CONFIG_INCLUDE_SIM=0
+export_to_c	CONFIG_INCLUDE_SIM
+export_to_mk	CONFIG_INCLUDE_SIM
+
 . ./build.conf
 
 if [ -z "$TARGET" ]
@@ -73,13 +93,6 @@
 		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
-
 if [ "$CONFIG_INCLUDE_L1" = 1 -a "$TARGET" != gtamodem ]
 then
 	echo "Error: tpudrv has not been extended to target != gtamodem yet" \
@@ -92,7 +105,7 @@
 
 BUILD_COMPONENTS="bsp nucleus riviera serial services sprintf sysglue"
 
-if [ "$CONFIG_GPF" = 1 ]
+if [ "$CONFIG_INCLUDE_GPF" = 1 ]
 then
 	BUILD_COMPONENTS="$BUILD_COMPONENTS gpf"
 fi
--- a/gsm-fw/finlink/Makefile	Mon Sep 01 19:34:31 2014 +0000
+++ b/gsm-fw/finlink/Makefile	Wed Sep 03 16:03:38 2014 +0000
@@ -16,7 +16,7 @@
 		../nucleus/libplus.iram.a ../sprintf/libsprintf.a
 LIB_DEPEND=	${BASE_LIBS}
 
-ifeq (${CONFIG_GPF},1)
+ifeq (${CONFIG_INCLUDE_GPF},1)
 GPF_LIBS=	../gpf/libs/libgpf.xip.a ../gpf/libs/libgpf.iram.a
 LIB_LINK_ORDER+=	--start-group ${GPF_LIBS} --end-group
 LIB_DEPEND+=	${GPF_LIBS}
@@ -28,7 +28,7 @@
 INT_PIECES=	../bsp/iramcode.o
 EXT_PIECES=	../bsp/xipcode.o ../serial/xipcode.o ../sysglue/xipcode.o \
 		../services/ffs/xipcode.o ../services/dar/xipcode.o
-ifeq (${CONFIG_GPF},1)
+ifeq (${CONFIG_INCLUDE_GPF},1)
 EXT_PIECES+=	../gpf/conf/xipcode.o
 endif
 ifeq (${CONFIG_INCLUDE_L1},1)
--- a/gsm-fw/sysglue/appinit.c	Mon Sep 01 19:34:31 2014 +0000
+++ b/gsm-fw/sysglue/appinit.c	Wed Sep 03 16:03:38 2014 +0000
@@ -19,7 +19,7 @@
 	rvf_init();
 	rvm_init();
 	create_tasks();
-#if CONFIG_GSM
+#if CONFIG_INCLUDE_SIM
 	SIM_Initialize();
 #endif
 	/* end of Init_Drivers() */
@@ -27,7 +27,7 @@
 	Cust_Init_Layer1();
 #endif
 	Init_Serial_Flows();
-#if CONFIG_GPF
+#if CONFIG_INCLUDE_GPF
 	StartFrame();
 #endif
 	Init_Unmask_IT();