build.sh revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
#
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
# Copyright (c) 2010 - 2011, Intel Corporation. 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
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
set -e
shopt -s nocasematch
#
# Setup workspace if it is not set
#
if [ -z "$WORKSPACE" ]
then
echo Initializing workspace
if [ ! -e `pwd`/edksetup.sh ]
then
cd ..
fi
# This version is for the tools in the BaseTools project.
# this assumes svn pulls have the same root dir
# export EDK_TOOLS_PATH=`pwd`/../BaseTools
# This version is for the tools source in edk2
echo $EDK_TOOLS_PATH
source edksetup.sh BaseTools
else
fi
#
# Configure defaults for various options
#
#
# Pick a default tool type for a given OS
#
CYGWIN*)
;;
Darwin*)
if [[ $Major == 9 ]]
then
exit 1
else
fi
;;
Linux*)
case $gcc_version in
4.5.*)
;;
4.6.*)
;;
*)
;;
esac
esac
#
# Scan command line to override defaults
#
do
if [ -z "$LAST_ARG" ]; then
-a|-b|-t|-p)
;;
qemu)
shift
break
;;
*)
;;
esac
else
-a)
;;
-b)
;;
-p)
;;
-t)
;;
*)
;;
esac
fi
shift
done
case $PROCESSOR in
IA32)
;;
X64)
;;
*)
exit 1
;;
esac
if [ -z "$PLATFORMFILE" ]; then
fi
do
break
;;
esac
done
#
# Uncomment this block for parameter parsing debug
#
#echo RUN_QEMU=$RUN_QEMU
#echo BUILD_OPTIONS=$BUILD_OPTIONS
#echo BUILDTARGET=$BUILDTARGET
#echo TARGET_TOOLS=$TARGET_TOOLS
#echo PROCESSOR=$PROCESSOR
#echo Remaining for qemu: $*
#exit 1
then
# build the tools if they don't yet exist. Bin scheme
then
# build the tools if they don't yet exist. BinWrapper scheme
else
fi
if [[ "$RUN_QEMU" == "yes" ]]; then
if [[ ! -d $QEMU_FIRMWARE_DIR ]]; then
fi
if [[ "$ADD_QEMU_HDA" == "yes" ]]; then
AUTO_QEMU_HDA="-hda fat:$BUILD_ROOT_ARCH"
else
fi
echo Running: $QEMU_COMMAND
exit $?
fi
#
# Build the edk2 OvmfPkg
#
exit $?