#!/bin/bash
-# Copyright (c) 2008 - 2009, Apple, Inc. All rights reserved.
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
echo Initializing workspace
cd ..
# Uses an external BaseTools project
- export EDK_TOOLS_PATH=`pwd`/../BaseTools
+# export EDK_TOOLS_PATH=`pwd`/../BaseTools
# Uses the BaseTools in edk2
-# export EDK_TOOLS_PATH=`pwd`/BaseTools
+ export EDK_TOOLS_PATH=`pwd`/BaseTools
source edksetup.sh BaseTools
else
echo Building from: $WORKSPACE
;;
Linux*)
# Not tested
- TARGET_TOOLS=ELFGCC
+ TARGET_TOOLS=ARMGCC
;;
Darwin*)
Major=$(uname -r | cut -f 1 -d '.')
;;
esac
-BUILD_ROOT=$WORKSPACE/Build/BeagleBoard/DEBUG_"$TARGET_TOOLS"
+TARGET=DEBUG
+for arg in "$@"
+do
+ if [[ $arg == RELEASE ]];
+ then
+ TARGET=RELEASE
+ fi
+done
+
+BUILD_ROOT=$WORKSPACE/Build/BeagleBoard/"$TARGET"_"$TARGET_TOOLS"
GENERATE_IMAGE=$WORKSPACE/BeagleBoardPkg/Tools/generate_image
FLASH_BOOT=$BUILD_ROOT/FV/BeagleBoard_EFI_flashboot.fd
#
# Build the edk2 BeagleBoard code
#
-build -p $WORKSPACE/BeagleBoardPkg/BeagleBoardPkg.dsc -a ARM -t $TARGET_TOOLS $1 $2 $3 $4 $5 $6 $7 $8
+if [[ $TARGET == RELEASE ]]; then
+ build -p $WORKSPACE/BeagleBoardPkg/BeagleBoardPkg.dsc -a ARM -t $TARGET_TOOLS -b $TARGET -D DEBUG_TARGET=RELEASE $2 $3 $4 $5 $6 $7 $8
+else
+ build -p $WORKSPACE/BeagleBoardPkg/BeagleBoardPkg.dsc -a ARM -t $TARGET_TOOLS -b $TARGET $1 $2 $3 $4 $5 $6 $7 $8
+fi
+
for arg in "$@"
do