Permalink
Browse files

Updated SConstruct/SConscript files to handle 5d-shield add-ons better.

Also, changed the build_all.sh script.
  • Loading branch information...
1 parent de93df7 commit 59ef0f1e5e20a3344105dc7849f6b055ecc24126 @giseburt giseburt committed Nov 9, 2011
Showing with 21 additions and 22 deletions.
  1. +4 −0 firmware/SConstruct
  2. +13 −21 firmware/build_all.sh
  3. +4 −1 firmware/src/SConscript.motherboard
View
@@ -1,6 +1,10 @@
platform = ARGUMENTS.get('platform','mb24')
+fived = ARGUMENTS.get('fived','false')
if (platform == 'rrmbv12' or platform == 'mb24' or platform == 'mb24-2560'):
+ if (fived == 'true'):
+ platform = platform+'-5d'
+
SConscript(['src/SConscript.motherboard'], variant_dir='build/'+platform)
elif (platform == 'ecv22' or platform == 'ecv34'):
View
@@ -2,33 +2,27 @@
SCONS=SConstruct
-PLATFORMS=( rrmbv12 mb24 mb24-2560 ecv22 ecv34 )
+PLATFORMS=( rrmbv12 'rrmbv12 fived=true' mb24 mb24-2560 ecv22 ecv34 )
LOG_FILE=build_all_output
function build_firmware {
- platform_list_name="$1[*]"
- platform_list=(${!platform_list_name})
- scons_file=$2
-
- for platform in ${platform_list[@]}
+ for platform in "${PLATFORMS[@]}"
do
- echo -n "Building firmware for ${platform}... "
-
- echo -e "\n\n\n\n" >> ${LOG_FILE}
- echo Building firmware for ${platform} >> ${LOG_FILE}
-
- scons -f ${scons_file} platform=${platform} >> ${LOG_FILE} 2>&1
+ echo -n "Building firmware for ${platform}... "
- if [ "$?" -ne "0" ]; then
- echo Failure
- else
- echo Success
- fi
-done
+ echo -e "\n\n\n\n" >> ${LOG_FILE}
+ echo Building firmware for ${platform} >> ${LOG_FILE}
+ scons -f "${SCONS}" platform=${platform} >> ${LOG_FILE} 2>&1
+ if [ "$?" -ne "0" ]; then
+ echo Failure
+ else
+ echo Success
+ fi
+ done
}
@@ -51,8 +45,6 @@ function build_documentation {
echo Building all firmware
echo "Building all firmware" > ${LOG_FILE}
-build_firmware PLATFORMS ${SCONS}
-
-
+build_firmware
build_documentation
@@ -61,8 +61,11 @@ vstr = File('#/current_version.txt').get_contents().strip()
vstr = ARGUMENTS.get('version',vstr)
version = parse_version(vstr)
+subplatform = ""
+if (fived == 'true'):
+ subplatform = "-5d"
-target_name = "MB-"+platform+"-v"+str(version//100)+"."+str(version%100)
+target_name = "MB-"+platform+subplatform+"-v"+str(version//100)+"."+str(version%100)
if (platform == 'rrmbv12'):
default_baud = '38400'

0 comments on commit 59ef0f1

Please sign in to comment.