changeset 489:2a26785fb5a2

gsm-fw: GPF included in the build with feature gpf, link successful
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 29 Jun 2014 22:37:29 +0000
parents e8ed76bbf556
children 06ab60fec942
files gsm-fw/cfgmagic/feature.gpf gsm-fw/cfgmagic/processconf.sh gsm-fw/finlink/Makefile gsm-fw/finlink/ld-script.src gsm-fw/sysglue/appinit.c
diffstat 5 files changed, 26 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/cfgmagic/feature.gpf	Sun Jun 29 22:37:29 2014 +0000
@@ -0,0 +1,3 @@
+CONFIG_GPF=1
+export_to_c	CONFIG_GPF
+export_to_mk	CONFIG_GPF
--- a/gsm-fw/cfgmagic/processconf.sh	Sun Jun 29 21:59:14 2014 +0000
+++ b/gsm-fw/cfgmagic/processconf.sh	Sun Jun 29 22:37:29 2014 +0000
@@ -62,11 +62,16 @@
 	export_to_m4	RAMFFS_NBLOCKS
 fi
 
-# At some point the list of build components will probably become
-# dependent on feature or maybe even target configurations, but for
-# now it is static.
+# The list of build components: we have some invariants that are always
+# included, and some others that are included depending on the configuration.
 
 BUILD_COMPONENTS="bsp nucleus riviera serial services sprintf sysglue"
+
+if [ "$CONFIG_GPF" = 1 ]
+then
+	BUILD_COMPONENTS="$BUILD_COMPONENTS gpf"
+fi
+
 export_to_mk BUILD_COMPONENTS
 
 # The support for building flashable images is not here yet,
--- a/gsm-fw/finlink/Makefile	Sun Jun 29 21:59:14 2014 +0000
+++ b/gsm-fw/finlink/Makefile	Sun Jun 29 22:37:29 2014 +0000
@@ -13,10 +13,19 @@
 
 LOCAL_LIBS=	../riviera/librv.a ../nucleus/libplus.xip.a \
 		../nucleus/libplus.iram.a ../sprintf/libsprintf.a
+COND_LOCAL_LIBS=
+
+ifeq (${CONFIG_GPF},1)
+COND_LOCAL_LIBS+=	--start-group ../gpf/libs/libgpf.xip.a \
+				../gpf/libs/libgpf.iram.a --end-group
+endif
 
 INT_PIECES=	../bsp/niq32.o
 EXT_PIECES=	../bsp/xipcode.o ../serial/xipcode.o ../sysglue/xipcode.o \
 		../services/ffs/xipcode.o ../services/dar/xipcode.o
+ifeq (${CONFIG_GPF},1)
+EXT_PIECES+=	../gpf/conf/xipcode.o
+endif
 ifeq (${RVM_ETM_SWE},1)
 EXT_PIECES+=	../services/etm/xipcode.o
 endif
@@ -38,7 +47,7 @@
 
 ramImage.elf:	iramcode.o xipcode.o ${LOCAL_LIBS} ramImage.ld
 	${LD} -N -T ramImage.ld -o $@ -Map ramImage.map iramcode.o xipcode.o \
-		${LOCAL_LIBS} \
+		${COND_LOCAL_LIBS} ${LOCAL_LIBS} \
 		--start-group ${LIBC_A} ${LIBGCC_A} --end-group
 
 ramImage.srec:	ramImage.elf
--- a/gsm-fw/finlink/ld-script.src	Sun Jun 29 21:59:14 2014 +0000
+++ b/gsm-fw/finlink/ld-script.src	Sun Jun 29 22:37:29 2014 +0000
@@ -32,6 +32,7 @@
 		*(xip.text*)
 		xipcode.o(.text*)
 		*libplus.xip.a:(.text*)
+		*libgpf.xip.a:(.text*)
 		*librv.a:(.text*)
 		*libsprintf.a:(.text*)
 		/* let's put the ARM->Thumb veneers in the XIP section */
@@ -45,6 +46,7 @@
 		*(iram.text*)
 		iramcode.o(.text*)
 		*libplus.iram.a:(.text*)
+		*libgpf.iram.a:(.text*)
 		*libc.a:(.text*)
 		*libgcc.a:(.text*)
 	} > IRAM AT> Buildmem
@@ -77,6 +79,7 @@
 		*(int.bss*)
 		iramcode.o(.bss* COMMON)
 		*libplus.iram.a:(.bss* COMMON)
+		*libgpf.iram.a:(.bss* COMMON)
 		*libc.a:(.bss* COMMON)
 		*libgcc.a:(.bss* COMMON)
 		. = ALIGN(4);
@@ -88,6 +91,7 @@
 		*(ext.bss*)
 		xipcode.o(.bss* COMMON)
 		*libplus.xip.a:(.bss* COMMON)
+		*libgpf.xip.a:(.bss* COMMON)
 		*librv.a:(.bss* COMMON)
 		*libsprintf.a:(.bss* COMMON)
 		. = ALIGN(4);
--- a/gsm-fw/sysglue/appinit.c	Sun Jun 29 21:59:14 2014 +0000
+++ b/gsm-fw/sysglue/appinit.c	Sun Jun 29 22:37:29 2014 +0000
@@ -27,7 +27,7 @@
 	Cust_Init_Layer1();
 #endif
 	Init_Serial_Flows();
-#if CONFIG_GSM
+#if CONFIG_GPF
 	StartFrame();
 #endif
 	Init_Unmask_IT();