# HG changeset patch # User Mychaela Falconia # Date 1532399822 0 # Node ID 9363ea39c74c8272d1f5de74b7ee39c16b2d5317 # Parent f9125919bbe4435c77806eba48544ca2460f0b13 configure.sh: implemented SUFFIX= setting, replacing raw BUILD_DIR= diff -r f9125919bbe4 -r 9363ea39c74c configure.sh --- a/configure.sh Sun Jul 22 19:10:47 2018 +0000 +++ b/configure.sh Tue Jul 24 02:37:02 2018 +0000 @@ -54,9 +54,6 @@ . "targets/$TARGET.conf" -BUILD_DIR="build-$TARGET-$CONFIG" -USE_STR2IND=0 - # settings derived from the target-defined DSP version case "$DSP" in @@ -104,6 +101,9 @@ ALLOW_CSIM_GSM=1 SERIAL_DYNAMIC_SWITCH=0 TR_BAUD_CONFIG=TR_BAUD_115200 +USE_STR2IND=0 + +SUFFIX= # allow the user to override these defaults @@ -115,6 +115,8 @@ shift done +BUILD_DIR="build-$TARGET-$CONFIG$SUFFIX" + echo "Building configuration $CONFIG for target $TARGET in $BUILD_DIR" if [ "$clean_flag" = 1 ] @@ -237,7 +239,7 @@ # generate the top level Makefile! -helpers/makeline def CONFIG_NAME $CONFIG > $BUILD_DIR/Makefile +helpers/makeline def CONFIG_NAME "$CONFIG$SUFFIX" > $BUILD_DIR/Makefile echo >> $BUILD_DIR/Makefile helpers/makeline def SUBDIR $SUBDIR >> $BUILD_DIR/Makefile echo >> $BUILD_DIR/Makefile diff -r f9125919bbe4 -r 9363ea39c74c doc/Compiling --- a/doc/Compiling Sun Jul 22 19:10:47 2018 +0000 +++ b/doc/Compiling Tue Jul 24 02:37:02 2018 +0000 @@ -59,11 +59,15 @@ a particular configuration, run a command like this from the top level of the fc-magnetite tree: -./configure.sh gtamodem l1reconst +./configure.sh fcdev3b hybrid -The first argument to the configure.sh script selects the target, and the second -argument selects the configuration. As of this writing, the following targets -are supported: +The first required argument to the configure.sh script selects the target, the +second required argument selects the build configuration recipe, and any further +arguments beyond these two (optional) allow changing various configurable +settings that aren't strictly fixed by the hardware target or by the build +configuration recipe. + +As of this writing, the following hardware targets are supported: c11x Motorola C11x/12x c139 Motorola C139/140 @@ -75,11 +79,20 @@ For the available configurations (the second required argument to the configure script), look in the configs directory and read the various write-ups under doc. -Each configuration is built in its own directory; by default the build directory -is named build-$TARGET-$CONFIG, i.e., for the example configure.sh line above, -the resulting build directory will be build-gtamodem-l1reconst. You can change -the name of this directory by appending a BUILD_DIR=dir argument to the -./configure.sh line after the two required arguments. +Each configuration is built in its own directory; the name of this build +directory takes the form of build-$TARGET-$CONFIG$SUFFIX, i.e., for the example +configure.sh line above, the resulting build directory will be named +build-fcdev3b-hybrid. The $SUFFIX part is empty by default, but can be set on +the command line in order to distinguish non-standard builds that had some +tunable settings changed to values other than the default. For example, if you +are building the hybrid configuration for the fcdev3b target as above, but you +need to disable MELODY_E2, you could run the configure script as follows: + +./configure.sh fcdev3b hybrid MELODY_E2=0 SUFFIX=-noe2 + +The build directory would then become build-fcdev3b-hybrid-noe2, and the +specified suffix will also be included in the firmware version ID string that +gets compiled into the image. To actually compile the firmware, cd into the created build directory and run make there. Unfortunately the use of TI's proprietary compiler via Wine makes