changeset 65:bb53b2e2d548

revamped the handling of blob libs
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 01 Oct 2016 19:36:13 +0000
parents 84f4a04fde24
children 0377665aef9d
files configs/classic configure.sh
diffstat 2 files changed, 86 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- a/configs/classic	Sat Oct 01 18:33:04 2016 +0000
+++ b/configs/classic	Sat Oct 01 19:36:13 2016 +0000
@@ -14,7 +14,7 @@
 SRVC=1
 export GPRS MMI SRVC
 
-blob_lib blobs/libs/ccddata.lib
+blob_lib_std ccddata
 
 # ACI libs
 build_lib aci classic
@@ -27,66 +27,66 @@
 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
 
 # G23M protocol stack libs
-blob_lib blobs/libs/alr.lib
-blob_lib blobs/libs/cc.lib
-blob_lib blobs/libs/cci.lib
-blob_lib blobs/libs/cci_ir.lib
+blob_lib_std alr
+blob_lib_std cc
+blob_lib_std cci
+blob_lib_std cci_ir
 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
-blob_lib blobs/libs/dl.lib
-blob_lib blobs/libs/dti.lib
-blob_lib blobs/libs/fad.lib
-blob_lib blobs/libs/gmm.lib
-blob_lib blobs/libs/grlc.lib
-blob_lib blobs/libs/grlc_ir.lib
+blob_lib_std dl
+blob_lib_std dti
+blob_lib_std fad
+blob_lib_std gmm
+blob_lib_std grlc
+blob_lib_std grlc_ir
 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
-blob_lib blobs/libs/grr.lib
-blob_lib blobs/libs/l1_pei.lib
-blob_lib blobs/libs/l2r.lib
-blob_lib blobs/libs/llc.lib
-blob_lib blobs/libs/mm.lib
-blob_lib blobs/libs/ra.lib
-blob_lib blobs/libs/rlp.lib
-blob_lib blobs/libs/rr.lib
-blob_lib blobs/libs/sim_b_lib.lib
-blob_lib blobs/libs/sm.lib
-blob_lib blobs/libs/sms.lib
-blob_lib blobs/libs/sndcp.lib
-blob_lib blobs/libs/ss.lib
-blob_lib blobs/libs/t30.lib
-blob_lib blobs/libs/uart_b_lib.lib
-blob_lib blobs/libs/ppp.lib
-blob_lib blobs/libs/ppp_ir.lib
+blob_lib_std grr
+blob_lib_std l1_pei
+blob_lib_std l2r
+blob_lib_std llc
+blob_lib_std mm
+blob_lib_std ra
+blob_lib_std rlp
+blob_lib_std rr
+blob_lib_std sim_b_lib
+blob_lib_std sm
+blob_lib_std sms
+blob_lib_std sndcp
+blob_lib_std ss
+blob_lib_std t30
+blob_lib_std uart_b_lib
+blob_lib_std ppp
+blob_lib_std ppp_ir
 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
 
 # Condat drivers
 build_lib gdi
 
 # GPF
-blob_lib blobs/gpflibs/ccd_na7_db.lib
-blob_lib blobs/gpflibs/frame_na7_db_fl.lib
-blob_lib blobs/gpflibs/frame_na7_db_ir.lib
+blob_lib_gpf ccd_na7_db
+blob_lib_gpf frame_na7_db_fl
+blob_lib_gpf frame_na7_db_ir
 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
-blob_lib blobs/gpflibs/misc_na7_db_fl.lib
-blob_lib blobs/gpflibs/misc_na7_db_ir.lib
+blob_lib_gpf misc_na7_db_fl
+blob_lib_gpf misc_na7_db_ir
 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
-blob_lib blobs/gpflibs/osx_na7_db.lib
+blob_lib_gpf osx_na7_db
 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
-blob_lib blobs/gpflibs/tif_na7_db_fl.lib
-blob_lib blobs/gpflibs/tif_na7_db_ir.lib
+blob_lib_gpf tif_na7_db_fl
+blob_lib_gpf tif_na7_db_ir
 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
 
 # core drivers
 build_lib drivers_flash
 
 # Layer 1
-blob_lib blobs/libs/tpudrv.lib
+blob_lib_std tpudrv
 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
-blob_lib blobs/libs/l1_ext.lib
+blob_lib_std l1_ext
 lib_link_magic '(BSS_LIBS (.l1s_global))'
-blob_lib blobs/libs/l1_int.lib
+blob_lib_std l1_int
 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
-blob_lib blobs/libs/l1_custom_ext.lib
-blob_lib blobs/libs/l1_custom_int.lib
+blob_lib_std l1_custom_ext
+blob_lib_std l1_custom_int
 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
 
 build_lib riviera_core_flash
@@ -119,16 +119,16 @@
 build_lib uart_drv
 
 # eyesores
-blob_lib $MAIN_blob
-blob_lib blobs/libs/bootloader.lib
+blob_lib_custom "$MAIN_blob" main
+blob_lib_std bootloader
 lib_link_magic '(CONST_BOOT_LIB (.const, .text, .text:v$3) BSS_BOOT_LIB (.bss))'
 
 # Nucleus and TI's compiler stuff
-blob_lib blobs/oslibs/nucleus_flash_nodbg.lib
-blob_lib blobs/oslibs/nucleus_int_ram_nodbg.lib
+blob_lib_os nucleus_flash_nodbg
+blob_lib_os nucleus_int_ram_nodbg
 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
-blob_lib blobs/oslibs/rts16le_flash.lib
-blob_lib blobs/oslibs/rts16le_int_ram.lib
+blob_lib_os rts16le_flash
+blob_lib_os rts16le_int_ram
 lib_link_magic '(BSS_LIBS (.bss))'
 
 str2ind_blobs_used=1
--- a/configure.sh	Sat Oct 01 18:33:04 2016 +0000
+++ b/configure.sh	Sat Oct 01 19:36:13 2016 +0000
@@ -84,13 +84,49 @@
 	LIBS="$LIBS $current_lib"
 }
 
-blob_lib() {
+blob_lib_std() {
+	if [ $# != 1 ]
+	then
+		echo "Error: blob_lib_std takes 1 argument" 1>&2
+		exit 1
+	fi
+	current_lib="../blobs/libs/$1.lib"
+	LIBS="$LIBS $current_lib"
+}
+
+blob_lib_gpf() {
 	if [ $# != 1 ]
 	then
-		echo "Error: blob_lib takes 1 argument" 1>&2
+		echo "Error: blob_lib_gpf takes 1 argument" 1>&2
+		exit 1
+	fi
+	current_lib="../blobs/gpflibs/$1.lib"
+	LIBS="$LIBS $current_lib"
+}
+
+blob_lib_os() {
+	if [ $# != 1 ]
+	then
+		echo "Error: blob_lib_os takes 1 argument" 1>&2
 		exit 1
 	fi
-	current_lib="../$1"
+	current_lib="../blobs/oslibs/$1.lib"
+	LIBS="$LIBS $current_lib"
+}
+
+blob_lib_custom() {
+	if [ $# != 2 ]
+	then
+		echo "Error: blob_lib_custom takes 2 arguments" 1>&2
+		exit 1
+	fi
+	if [ -z "$1" ]
+	then
+		echo "Error: this config is not supported on this target" 1>&2
+		exit 1
+	fi
+	cp $1 $BUILD_DIR/$2.lib
+	current_lib=$2.lib
 	LIBS="$LIBS $current_lib"
 }