[aadk-commits] qwell: trunk r22 - in /trunk: ./ scripts/

aadk-commits at lists.digium.com aadk-commits at lists.digium.com
Sat Nov 4 21:20:09 MST 2006


Author: qwell
Date: Sat Nov  4 22:20:09 2006
New Revision: 22

URL: http://svn.digium.com/view/aadk?rev=22&view=rev
Log:
Add README file, with instructions for building everything.

Also add the scripts for...yep, you guessed it...building everything.

Added:
    trunk/README   (with props)
    trunk/scripts/
    trunk/scripts/build-asterisk   (with props)
    trunk/scripts/build-bootloader   (with props)
    trunk/scripts/build-common   (with props)
    trunk/scripts/build-distro   (with props)
    trunk/scripts/build-image   (with props)
    trunk/scripts/build-toolchain   (with props)
    trunk/scripts/rebuild-asterisk   (with props)
    trunk/scripts/rebuild-asterisk-gui   (with props)

Added: trunk/README
URL: http://svn.digium.com/view/aadk/trunk/README?rev=22&view=auto
==============================================================================
--- trunk/README (added)
+++ trunk/README Sat Nov  4 22:20:09 2006
@@ -1,0 +1,46 @@
+This directory contains the source code for the Asterisk Appliance Developer
+Kit (AADK).
+
+This directory contains several subdirectories, including:
+
+toolchain     - Contains the source code for the blackfin toolchain
+boot          - Contains the source code for the u-boot loader
+uClinux       - Contains the source code for the micro Linux distribution
+asterisk      - Contains the source code for Asterisk.
+asterisk-gui  - Contains the source code for the Asterisk GUI.
+scripts       - Contains the build scripts for the above directories.
+
+There are several scripts to facilitate building of the system:
+
+build-toolchain      - Builds and installs the toolchain.
+build-bootloader     - Builds and installs the boot loader.
+build-distro         - Builds and installs the distribution environment.
+build-asterisk       - Builds and installs Asterisk and the Asterisk GUI
+rebuild-asterisk     - Builds and installs Asterisk.
+rebuild-asterisk-gui - Installs the Asterisk GUI.
+build-image          - Builds tftp-able image, and copies it to /tftpboot/.
+
+
+Step 1: Building the tool chain
+Run the "build-toolchain" script from within the scripts directory.  This
+creates the toolchain (gcc, uClibc, etc) that is needed to build everything.
+This process may take 45 minutes or more.
+
+Step 2: Building the boot loader
+Run the "build-bootloader" script from within the scripts directory.  This
+will build the boot loader, as well as some of the accompaning tools.
+
+Step 3: Building the distribution (pass 1)
+The first time you build the distribution, please run the "build-distro"
+script from within the scripts directory.  That will setup the environment
+for being able to build applications.
+This process may take 30 minutes or more.
+
+Step 4: Building Asterisk
+Run the "build-asterisk" script from within the scripts directory.  If you
+are making incremental changes, you may run the "rebuild-asterisk" and/or
+"rebuild-asterisk-gui" scripts instead to save a bit of time.
+
+Step 5: Building disk image (pass 2)
+Run the "build-image" script.  This will place the new image in /tftpboot/
+where it is suitable for download into the appliance.

Propchange: trunk/README
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/README
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: trunk/scripts/build-asterisk
URL: http://svn.digium.com/view/aadk/trunk/scripts/build-asterisk?rev=22&view=auto
==============================================================================
--- trunk/scripts/build-asterisk (added)
+++ trunk/scripts/build-asterisk Sat Nov  4 22:20:09 2006
@@ -1,0 +1,25 @@
+#!/bin/sh -e
+cd ../
+. scripts/build-common
+cp -v uClinux/uClinux-dist/lib/ncurses/lib/libncurses.a $AADKDIR/toolchain/buildscript/out-uclinux/bfin-uclinux/runtime/lib/
+cp -v uClinux/uClinux-dist/lib/ncurses/include/*.h $AADKDIR/toolchain/buildscript/out-uclinux/bfin-uclinux/runtime/usr/include/
+cp -v uClinux/uClinux-dist/lib/libtonezone/libtonezone.a $AADKDIR/toolchain/buildscript/out-uclinux/bfin-uclinux/runtime/lib/
+cp -v uClinux/uClinux-dist/lib/zlib/libz.a $AADKDIR/toolchain/buildscript/out-uclinux/bfin-uclinux/runtime/lib/
+cp -v uClinux/uClinux-dist/lib/zlib/zlib.h $AADKDIR/toolchain/buildscript/out-uclinux/bfin-uclinux/runtime/usr/include/
+cp -v uClinux/uClinux-dist/lib/zlib/zconf.h $AADKDIR/toolchain/buildscript/out-uclinux/bfin-uclinux/runtime/usr/include/
+mkdir -p $AADKDIR/toolchain/buildscript/out-uclinux/bfin-uclinux/runtime/usr/include/zaptel/
+cp -v uClinux/uClinux-dist/linux-2.6.x/include/zaptel/zaptel.h $AADKDIR/toolchain/buildscript/out-uclinux/bfin-uclinux/runtime/usr/include/zaptel/
+cp -v uClinux/uClinux-dist/linux-2.6.x/drivers/zaptel/tonezone.h $AADKDIR/toolchain/buildscript/out-uclinux/bfin-uclinux/runtime/usr/include/zaptel/
+cd asterisk
+./configure --host=bfin-uclinux --disable-largefile CFLAGS="-g -mfdpic" --without-pwlib --without-curl #--with-zaptel=$AADKDIR/uClinux/uClinux-dist/linux-2.6.x --with-tonezone=$AADKDIR/uClinux/uClinux-dist/linux-2.6.x --with-ncurses=$AADKDIR/uClinux/uClinux-dist/lib/ncurses --with-openssl=$AADKDIR/uClinux/uClinux-dist/lib/libssl #--with-z=$AADKDIR/uClinux/uClinux-dist/lib/zlib
+mkdir -p ../uClinux/uClinux-dist/romfs/var/lib/asterisk/sounds
+mkdir -p ../uClinux/uClinux-dist/romfs/var/lib/asterisk/sounds/moh
+mkdir -p ../uClinux/uClinux-dist/romfs/var/lib/asterisk/sounds/meetme
+mkdir -p ../uClinux/uClinux-dist/romfs/var/lib/asterisk/sounds/voicemail
+mkdir -p ../uClinux/uClinux-dist/romfs/var/spool/asterisk
+( cd ../uClinux/uClinux-dist/romfs/var/lib/asterisk ; ln -sf sounds/moh . )
+( cd ../uClinux/uClinux-dist/romfs/var/spool/asterisk ; ln -sf ../../lib/asterisk/sounds/meetme . )
+( cd ../uClinux/uClinux-dist/romfs/var/spool/asterisk ; ln -sf ../../lib/asterisk/sounds/voicemail . )
+cd ../scripts
+./rebuild-asterisk
+./rebuild-asterisk-gui

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

Propchange: trunk/scripts/build-asterisk
------------------------------------------------------------------------------
    svn:executable = *

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

Added: trunk/scripts/build-bootloader
URL: http://svn.digium.com/view/aadk/trunk/scripts/build-bootloader?rev=22&view=auto
==============================================================================
--- trunk/scripts/build-bootloader (added)
+++ trunk/scripts/build-bootloader Sat Nov  4 22:20:09 2006
@@ -1,0 +1,12 @@
+#!/bin/sh
+cd ../
+. scripts/build-common
+cd u-boot/u-boot_1.1.3
+make distclean
+make s800i_config
+make
+cd tools/bin2ldr
+sh runme.sh
+cp -v app.ldr app.bin app.hex /tftpboot
+cd ../../
+cp -v tools/mkimage $AADKDIR/toolchain/buildscript/out-uclinux/bin/bfin-uclinux-mkimage

Propchange: trunk/scripts/build-bootloader
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/scripts/build-bootloader
------------------------------------------------------------------------------
    svn:executable = *

Propchange: trunk/scripts/build-bootloader
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: trunk/scripts/build-common
URL: http://svn.digium.com/view/aadk/trunk/scripts/build-common?rev=22&view=auto
==============================================================================
--- trunk/scripts/build-common (added)
+++ trunk/scripts/build-common Sat Nov  4 22:20:09 2006
@@ -1,0 +1,3 @@
+#!/bin/sh
+AADKDIR=`pwd`
+export PATH=$AADKDIR/toolchain/buildscript/out-uclinux/bin:$PATH

Propchange: trunk/scripts/build-common
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/scripts/build-common
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: trunk/scripts/build-distro
URL: http://svn.digium.com/view/aadk/trunk/scripts/build-distro?rev=22&view=auto
==============================================================================
--- trunk/scripts/build-distro (added)
+++ trunk/scripts/build-distro Sat Nov  4 22:20:09 2006
@@ -1,0 +1,6 @@
+#!/bin/sh -e
+cd ../
+. scripts/build-common
+cd uClinux/uClinux-dist
+make
+

Propchange: trunk/scripts/build-distro
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/scripts/build-distro
------------------------------------------------------------------------------
    svn:executable = *

Propchange: trunk/scripts/build-distro
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: trunk/scripts/build-image
URL: http://svn.digium.com/view/aadk/trunk/scripts/build-image?rev=22&view=auto
==============================================================================
--- trunk/scripts/build-image (added)
+++ trunk/scripts/build-image Sat Nov  4 22:20:09 2006
@@ -1,0 +1,6 @@
+#!/bin/sh
+cd ../
+. scripts/build-common
+cd uClinux/uClinux-dist
+make image
+cp -v images/uImage /tftpboot

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

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

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

Added: trunk/scripts/build-toolchain
URL: http://svn.digium.com/view/aadk/trunk/scripts/build-toolchain?rev=22&view=auto
==============================================================================
--- trunk/scripts/build-toolchain (added)
+++ trunk/scripts/build-toolchain Sat Nov  4 22:20:09 2006
@@ -1,0 +1,7 @@
+#!/bin/sh -e
+cd ../
+. scripts/build-common
+echo "Preparing to build toolchain (This may take an hour or more)"
+cd toolchain/buildscript
+#./BuildToolChain -s /usr/src/digium-aadk/toolchain/ -k /usr/src/digium-aadk/uClinux-dist -o /opt/digium-dev/digium
+./BuildToolChain -s $AADKDIR/toolchain -k $AADKDIR/uClinux-dist -B 2.17 -c 3.4

Propchange: trunk/scripts/build-toolchain
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/scripts/build-toolchain
------------------------------------------------------------------------------
    svn:executable = *

Propchange: trunk/scripts/build-toolchain
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: trunk/scripts/rebuild-asterisk
URL: http://svn.digium.com/view/aadk/trunk/scripts/rebuild-asterisk?rev=22&view=auto
==============================================================================
--- trunk/scripts/rebuild-asterisk (added)
+++ trunk/scripts/rebuild-asterisk Sat Nov  4 22:20:09 2006
@@ -1,0 +1,8 @@
+#!/bin/sh -e
+cd ../
+. scripts/build-common
+cd asterisk
+OPTIMIZE="-O4" ASTCFLAGS="-mfdpic" ASTLDFLAGS="-mfdpic" make codecs #GC_CFLAGS="" GC_LDFLAGS=""
+OPTIMIZE="-Os" ASTCFLAGS="-mfdpic" ASTLDFLAGS="-mfdpic" make #GC_CFLAGS="" GC_LDFLAGS=""
+cp -v main/asterisk ../uClinux/uClinux-dist/romfs/bin
+bfin-uclinux-strip ../uClinux/uClinux-dist/romfs/bin/asterisk

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

Propchange: trunk/scripts/rebuild-asterisk
------------------------------------------------------------------------------
    svn:executable = *

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

Added: trunk/scripts/rebuild-asterisk-gui
URL: http://svn.digium.com/view/aadk/trunk/scripts/rebuild-asterisk-gui?rev=22&view=auto
==============================================================================
--- trunk/scripts/rebuild-asterisk-gui (added)
+++ trunk/scripts/rebuild-asterisk-gui Sat Nov  4 22:20:09 2006
@@ -1,0 +1,17 @@
+#!/bin/bash
+cd ../
+cd asterisk-gui
+STUFF='config/*.html config/images/* config/scripts/* config/stylesheets/*'
+set -f STUFF
+mkdir -p ../uClinux/uClinux-dist/romfs/var/lib/asterisk
+mkdir -p ../uClinux/uClinux-dist/romfs/var/lib/asterisk/static-http
+mkdir -p ../uClinux/uClinux-dist/romfs/var/lib/asterisk/static-http/config
+mkdir -p ../uClinux/uClinux-dist/romfs/var/lib/asterisk/static-http/config/images
+mkdir -p ../uClinux/uClinux-dist/romfs/var/lib/asterisk/static-http/config/stylesheets
+mkdir -p ../uClinux/uClinux-dist/romfs/var/lib/asterisk/static-http/config/scripts
+mkdir -p ../uClinux/uClinux-dist/romfs/var/lib/asterisk/sounds
+for x in ${STUFF}; do 
+	set +f x
+	rm -vf ../uClinux/uClinux-dist/romfs/var/lib/asterisk/static-http/${x}
+	cp -v $x ../uClinux/uClinux-dist/romfs/var/lib/asterisk/static-http/`dirname "$x"`
+done

Propchange: trunk/scripts/rebuild-asterisk-gui
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/scripts/rebuild-asterisk-gui
------------------------------------------------------------------------------
    svn:executable = *

Propchange: trunk/scripts/rebuild-asterisk-gui
------------------------------------------------------------------------------
    svn:mime-type = text/plain



More information about the aadk-commits mailing list