[aadk-commits] dbailey: trunk r365 - /trunk/scripts/

aadk-commits at lists.digium.com aadk-commits at lists.digium.com
Sat Apr 21 14:04:53 MST 2007


Author: dbailey
Date: Sat Apr 21 16:04:52 2007
New Revision: 365

URL: http://svn.digium.com/view/aadk?view=rev&rev=365
Log:
Changed scripts to add MD5 checksum to program images and to update create-sounds script with proper sound revision

Added:
    trunk/scripts/package-image   (with props)
    trunk/scripts/set-asterisk-soundrevision   (with props)
Modified:
    trunk/scripts/build-asterisk
    trunk/scripts/build-bootloader
    trunk/scripts/build-image
    trunk/scripts/build-tftp

Modified: trunk/scripts/build-asterisk
URL: http://svn.digium.com/view/aadk/trunk/scripts/build-asterisk?view=diff&rev=365&r1=364&r2=365
==============================================================================
--- trunk/scripts/build-asterisk (original)
+++ trunk/scripts/build-asterisk Sat Apr 21 16:04:52 2007
@@ -38,3 +38,5 @@
 ./configure --host=bfin-uclinux CFLAGS="-g -mfdpic"
 cd ../scripts
 ./rebuild-asterisk-gui
+
+./set-asterisk-soundrevision

Modified: trunk/scripts/build-bootloader
URL: http://svn.digium.com/view/aadk/trunk/scripts/build-bootloader?view=diff&rev=365&r1=364&r2=365
==============================================================================
--- trunk/scripts/build-bootloader (original)
+++ trunk/scripts/build-bootloader Sat Apr 21 16:04:52 2007
@@ -30,5 +30,10 @@
 cd tools/bin2ldr
 sh runme.sh
 #cp -v app.ldr app.bin app.hex /tftpboot
+
+
+# Integrate MD5 sum into the image 
+$AADKDIR/scripts/package-image app.ldr app.flash
+
 cd ../../
 cp -v tools/mkimage $AADKDIR/toolchain/buildscript/out-uclinux/bin/bfin-uclinux-mkimage

Modified: trunk/scripts/build-image
URL: http://svn.digium.com/view/aadk/trunk/scripts/build-image?view=diff&rev=365&r1=364&r2=365
==============================================================================
--- trunk/scripts/build-image (original)
+++ trunk/scripts/build-image Sat Apr 21 16:04:52 2007
@@ -3,4 +3,8 @@
 . scripts/build-common
 cd uClinux/uClinux-dist
 make image
+# Integrate MD5 sum into the image 
+../../scripts/package-image images/uImage images/uImage.flash
+
 #cp -v images/uImage /tftpboot
+

Modified: trunk/scripts/build-tftp
URL: http://svn.digium.com/view/aadk/trunk/scripts/build-tftp?view=diff&rev=365&r1=364&r2=365
==============================================================================
--- trunk/scripts/build-tftp (original)
+++ trunk/scripts/build-tftp Sat Apr 21 16:04:52 2007
@@ -1,7 +1,7 @@
 cd ../
 . scripts/build-common
 cd uClinux/uClinux-dist
-cp -v images/uImage /tftpboot
+cp -v images/uImage.flash /tftpboot/uImage
 cd ../../u-boot/u-boot_1.1.3
 cd tools/bin2ldr
-cp -v app.ldr app.bin app.hex /tftpboot
+cp -v app.flash /tftpboot/app.ldr

Added: trunk/scripts/package-image
URL: http://svn.digium.com/view/aadk/trunk/scripts/package-image?view=auto&rev=365
==============================================================================
--- trunk/scripts/package-image (added)
+++ trunk/scripts/package-image Sat Apr 21 16:04:52 2007
@@ -1,0 +1,22 @@
+#!/bin/sh
+
+# Places a 32 byte MD5 ASCII checksum on the end of the input file
+
+if [ "$2" = "" ]; then
+	echo "Usage: package-image <source file> <destination file>"
+	exit 1
+fi
+
+SRC=$1
+DST=$2
+PID=$$
+TMP="temp-${PID}.MD5"
+
+echo "Building MD5 embedded distributable image"
+# Insure base file size is padded out to a multiple of 32 
+dd bs=32 if=${SRC} of=${DST} conv=sync
+FILESIZE=$(stat -c%s ${DST})
+NUMBLOCKS=`expr $FILESIZE / 32 `
+md5sum ${DST} >${TMP}
+dd bs=32 seek=$NUMBLOCKS count=1 if=${TMP} of=${DST} oflag=append 2>/dev/null
+rm ${TMP}

Propchange: trunk/scripts/package-image
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/scripts/package-image
------------------------------------------------------------------------------
    svn:executable = *

Propchange: trunk/scripts/package-image
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: trunk/scripts/package-image
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: trunk/scripts/set-asterisk-soundrevision
URL: http://svn.digium.com/view/aadk/trunk/scripts/set-asterisk-soundrevision?view=auto&rev=365
==============================================================================
--- trunk/scripts/set-asterisk-soundrevision (added)
+++ trunk/scripts/set-asterisk-soundrevision Sat Apr 21 16:04:52 2007
@@ -1,0 +1,20 @@
+#!/bin/sh -e
+#### This script places the correct revision information into the create-sounds script
+cd ../
+. scripts/build-common
+
+#Determine the revision of the sounds file for the create_sounds script
+PID=$$
+TMPFILE=tmp-${PID}
+cd asterisk
+CORE_SOUNDS_VERSION=`make -s -C sounds core_sounds_version`
+EXTRA_SOUNDS_VERSION=`make -s -C sounds extra_sounds_version`
+
+#Strip the 1st three lines of the script and replace them with proper values
+cd ../uClinux/uClinux-dist/vendors/Digium/S800I/scripts
+grep -v "#!/bin/sh" create_sounds | grep  -v "SOUNDS_CORE_VERSION=" | grep -v "SOUNDS_EXTRA_VERSION=" >${TMPFILE}
+
+echo "#!/bin/sh -e\nSOUNDS_CORE_VERSION=${CORE_SOUNDS_VERSION} \nSOUNDS_EXTRA_VERSION=${EXTRA_SOUNDS_VERSION}"  >create_sounds
+cat ${TMPFILE} >>create_sounds
+rm ${TMPFILE}
+

Propchange: trunk/scripts/set-asterisk-soundrevision
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/scripts/set-asterisk-soundrevision
------------------------------------------------------------------------------
    svn:executable = *

Propchange: trunk/scripts/set-asterisk-soundrevision
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: trunk/scripts/set-asterisk-soundrevision
------------------------------------------------------------------------------
    svn:mime-type = text/plain



More information about the aadk-commits mailing list