mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-20 20:24:28 +02:00
UnixPkg: Allow build.sh/build64.sh to be run from the edk2 root
You can now use this sequence to build UnixPkg: $ cd /path/to/edk2 $ UnixPkg/build.sh or $ UnixPkg/build64.sh The old method is still valid: $ cd /path/to/edk2/UnixPkg $ ./build.sh git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10934 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a069372ced
commit
75f18f3435
@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||||
|
# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
||||||
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,14 +16,16 @@ set -e
|
|||||||
shopt -s nocasematch
|
shopt -s nocasematch
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Setup workspace if it is not set
|
# Setup workspace if it is not set
|
||||||
#
|
#
|
||||||
if [ -z "$WORKSPACE" ]
|
if [ -z "$WORKSPACE" ]
|
||||||
then
|
then
|
||||||
echo Initializing workspace
|
echo Initializing workspace
|
||||||
cd ..
|
if [ ! -e `pwd`/edksetup.sh ]
|
||||||
|
then
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
# This version is for the tools in the BaseTools project.
|
# This version is for the tools in the BaseTools project.
|
||||||
# this assumes svn pulls have the same root dir
|
# this assumes svn pulls have the same root dir
|
||||||
# export EDK_TOOLS_PATH=`pwd`/../BaseTools
|
# export EDK_TOOLS_PATH=`pwd`/../BaseTools
|
||||||
@ -39,18 +43,18 @@ fi
|
|||||||
TARGET_TOOLS=MYTOOLS
|
TARGET_TOOLS=MYTOOLS
|
||||||
case `uname` in
|
case `uname` in
|
||||||
CYGWIN*) echo Cygwin not fully supported yet. ;;
|
CYGWIN*) echo Cygwin not fully supported yet. ;;
|
||||||
Darwin*)
|
Darwin*)
|
||||||
Major=$(uname -r | cut -f 1 -d '.')
|
Major=$(uname -r | cut -f 1 -d '.')
|
||||||
if [[ $Major == 9 ]]
|
if [[ $Major == 9 ]]
|
||||||
then
|
then
|
||||||
echo UnixPkg requires Snow Leopard or later OS
|
echo UnixPkg requires Snow Leopard or later OS
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
TARGET_TOOLS=XCODE32
|
TARGET_TOOLS=XCODE32
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
Linux*) TARGET_TOOLS=ELFGCC ;;
|
Linux*) TARGET_TOOLS=ELFGCC ;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
BUILD_ROOT_ARCH=$WORKSPACE/Build/Unix/DEBUG_"$TARGET_TOOLS"/IA32
|
BUILD_ROOT_ARCH=$WORKSPACE/Build/Unix/DEBUG_"$TARGET_TOOLS"/IA32
|
||||||
@ -74,7 +78,7 @@ for arg in "$@"
|
|||||||
do
|
do
|
||||||
if [[ $arg == run ]]; then
|
if [[ $arg == run ]]; then
|
||||||
case `uname` in
|
case `uname` in
|
||||||
Darwin*)
|
Darwin*)
|
||||||
#
|
#
|
||||||
# On Darwin we can't use dlopen, so we have to load the real PE/COFF images.
|
# On Darwin we can't use dlopen, so we have to load the real PE/COFF images.
|
||||||
# This .gdbinit script sets a breakpoint that loads symbols for the PE/COFFEE
|
# This .gdbinit script sets a breakpoint that loads symbols for the PE/COFFEE
|
||||||
@ -82,14 +86,21 @@ do
|
|||||||
#
|
#
|
||||||
cp $WORKSPACE/UnixPkg/.gdbinit $WORKSPACE/Build/Unix/DEBUG_"$TARGET_TOOLS"/IA32
|
cp $WORKSPACE/UnixPkg/.gdbinit $WORKSPACE/Build/Unix/DEBUG_"$TARGET_TOOLS"/IA32
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
/usr/bin/gdb $BUILD_ROOT_ARCH/SecMain -q -cd=$BUILD_ROOT_ARCH
|
/usr/bin/gdb $BUILD_ROOT_ARCH/SecMain -q -cd=$BUILD_ROOT_ARCH
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $arg == cleanall ]]; then
|
if [[ $arg == cleanall ]]; then
|
||||||
make -C $WORKSPACE/BaseTools clean
|
make -C $WORKSPACE/BaseTools clean
|
||||||
|
build -p $WORKSPACE/GccShellPkg/GccShellPkg.dsc -a IA32 -t $TARGET_TOOLS -n 3 clean
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $arg == clean ]]; then
|
||||||
|
build -p $WORKSPACE/GccShellPkg/GccShellPkg.dsc -a IA32 -t $TARGET_TOOLS -n 3 clean
|
||||||
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $arg == shell ]]; then
|
if [[ $arg == shell ]]; then
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||||
|
# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
||||||
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -20,7 +22,10 @@ shopt -s nocasematch
|
|||||||
if [ -z "$WORKSPACE" ]
|
if [ -z "$WORKSPACE" ]
|
||||||
then
|
then
|
||||||
echo Initializing workspace
|
echo Initializing workspace
|
||||||
cd ..
|
if [ ! -e `pwd`/edksetup.sh ]
|
||||||
|
then
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
# This version is for the tools in the BaseTools project.
|
# This version is for the tools in the BaseTools project.
|
||||||
# this assumes svn pulls have the same root dir
|
# this assumes svn pulls have the same root dir
|
||||||
# export EDK_TOOLS_PATH=`pwd`/../BaseTools
|
# export EDK_TOOLS_PATH=`pwd`/../BaseTools
|
||||||
@ -101,13 +106,10 @@ do
|
|||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ $arg == shell ]]; then
|
if [[ $arg == shell ]]; then
|
||||||
build -p $WORKSPACE/GccShellPkg/GccShellPkg.dsc -a X64 -t $UNIXPKG_TOOLS -n 3 $2 $3 $4 $5 $6 $7 $8
|
build -p $WORKSPACE/GccShellPkg/GccShellPkg.dsc -a X64 -t $UNIXPKG_TOOLS -n 3 $2 $3 $4 $5 $6 $7 $8
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user