-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BaseTools: Use pip module if available, CI uses it by default
Use the new edk2-basetools pip module. Includes a helpful message in setup to let users know which has been selected. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Matthew Carlson <matthewfcarlson@gmail.com>
- Loading branch information
1 parent
ffddac3
commit bfcc4ea
Showing
55 changed files
with
1,053 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
#python `dirname $0`/RunToolFromSource.py `basename $0` $* | ||
|
||
# If a ${PYTHON_COMMAND} command is available, use it in preference to python | ||
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then | ||
python_exe=${PYTHON_COMMAND} | ||
fi | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
dir=$(dirname "$full_cmd") | ||
exe=$(basename "$full_cmd") | ||
|
||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}" | ||
exec "${python_exe:-python}" "$dir/../../Source/Python/$exe/$exe.py" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
#python `dirname $0`/RunToolFromSource.py `basename $0` $* | ||
|
||
# If a ${PYTHON_COMMAND} command is available, use it in preference to python | ||
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then | ||
python_exe=${PYTHON_COMMAND} | ||
fi | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
cmd=${full_cmd##*/} | ||
|
||
exec "${python_exe:-python}" -m edk2basetools.$cmd.EccMain "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
dir=$(dirname "$full_cmd") | ||
cmd=${full_cmd##*/} | ||
|
||
if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] | ||
then | ||
exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" | ||
elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] | ||
then | ||
if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] | ||
then | ||
echo "BaseTools C Tool binary was not found ($cmd)" | ||
echo "You may need to run:" | ||
echo " make -C $EDK_TOOLS_PATH/Source/C" | ||
else | ||
exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" | ||
fi | ||
elif [ -e "$dir/../../Source/C/bin/$cmd" ] | ||
then | ||
exec "$dir/../../Source/C/bin/$cmd" "$@" | ||
else | ||
echo "Unable to find the real '$cmd' to run" | ||
echo "This message was printed by" | ||
echo " $0" | ||
exit 127 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# This script will exec Brotli tool with -e/-d options. | ||
# | ||
# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR> | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
QLT="-q 9 -w 22" | ||
ARGS= | ||
|
||
while test $# -gt 0 | ||
do | ||
case $1 in | ||
-e) | ||
;; | ||
-d) | ||
ARGS+="$1 " | ||
;; | ||
-o|-g) | ||
ARGS+="$1 $2 " | ||
shift | ||
;; | ||
-q) | ||
QLT="$1 $2 " | ||
shift | ||
;; | ||
*) | ||
ARGS+="$1 " | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
exec Brotli $QLT $ARGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
dir=$(dirname "$full_cmd") | ||
cmd=${full_cmd##*/} | ||
|
||
if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] | ||
then | ||
exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" | ||
elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] | ||
then | ||
if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] | ||
then | ||
echo "BaseTools C Tool binary was not found ($cmd)" | ||
echo "You may need to run:" | ||
echo " make -C $EDK_TOOLS_PATH/Source/C" | ||
else | ||
exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" | ||
fi | ||
elif [ -e "$dir/../../Source/C/bin/$cmd" ] | ||
then | ||
exec "$dir/../../Source/C/bin/$cmd" "$@" | ||
else | ||
echo "Unable to find the real '$cmd' to run" | ||
echo "This message was printed by" | ||
echo " $0" | ||
exit 127 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
#python `dirname $0`/RunToolFromSource.py `basename $0` $* | ||
|
||
# If a ${PYTHON_COMMAND} command is available, use it in preference to python | ||
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then | ||
python_exe=${PYTHON_COMMAND} | ||
fi | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
cmd=${full_cmd##*/} | ||
|
||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}" | ||
exec "${python_exe:-python}" -m $cmd.EccMain "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
dir=$(dirname "$full_cmd") | ||
cmd=${full_cmd##*/} | ||
|
||
if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] | ||
then | ||
exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" | ||
elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] | ||
then | ||
if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] | ||
then | ||
echo "BaseTools C Tool binary was not found ($cmd)" | ||
echo "You may need to run:" | ||
echo " make -C $EDK_TOOLS_PATH/Source/C" | ||
else | ||
exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" | ||
fi | ||
elif [ -e "$dir/../../Source/C/bin/$cmd" ] | ||
then | ||
exec "$dir/../../Source/C/bin/$cmd" "$@" | ||
else | ||
echo "Unable to find the real '$cmd' to run" | ||
echo "This message was printed by" | ||
echo " $0" | ||
exit 127 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
dir=$(dirname "$full_cmd") | ||
cmd=${full_cmd##*/} | ||
|
||
if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] | ||
then | ||
exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" | ||
elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] | ||
then | ||
if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] | ||
then | ||
echo "BaseTools C Tool binary was not found ($cmd)" | ||
echo "You may need to run:" | ||
echo " make -C $EDK_TOOLS_PATH/Source/C" | ||
else | ||
exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" | ||
fi | ||
elif [ -e "$dir/../../Source/C/bin/$cmd" ] | ||
then | ||
exec "$dir/../../Source/C/bin/$cmd" "$@" | ||
else | ||
echo "Unable to find the real '$cmd' to run" | ||
echo "This message was printed by" | ||
echo " $0" | ||
exit 127 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
#python `dirname $0`/RunToolFromSource.py `basename $0` $* | ||
|
||
# If a ${PYTHON_COMMAND} command is available, use it in preference to python | ||
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then | ||
python_exe=${PYTHON_COMMAND} | ||
fi | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
cmd=${full_cmd##*/} | ||
|
||
exec "${python_exe:-python}" -m edk2basetools.AutoGen.$cmd "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
#python `dirname $0`/RunToolFromSource.py `basename $0` $* | ||
|
||
# If a ${PYTHON_COMMAND} command is available, use it in preference to python | ||
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then | ||
python_exe=${PYTHON_COMMAND} | ||
fi | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
cmd=${full_cmd##*/} | ||
|
||
exec "${python_exe:-python}" -m edk2basetools.$cmd "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
dir=$(dirname "$full_cmd") | ||
cmd=${full_cmd##*/} | ||
|
||
if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] | ||
then | ||
exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" | ||
elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] | ||
then | ||
if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] | ||
then | ||
echo "BaseTools C Tool binary was not found ($cmd)" | ||
echo "You may need to run:" | ||
echo " make -C $EDK_TOOLS_PATH/Source/C" | ||
else | ||
exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" | ||
fi | ||
elif [ -e "$dir/../../Source/C/bin/$cmd" ] | ||
then | ||
exec "$dir/../../Source/C/bin/$cmd" "$@" | ||
else | ||
echo "Unable to find the real '$cmd' to run" | ||
echo "This message was printed by" | ||
echo " $0" | ||
exit 127 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
dir=$(dirname "$full_cmd") | ||
cmd=${full_cmd##*/} | ||
|
||
if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] | ||
then | ||
exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" | ||
elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] | ||
then | ||
if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] | ||
then | ||
echo "BaseTools C Tool binary was not found ($cmd)" | ||
echo "You may need to run:" | ||
echo " make -C $EDK_TOOLS_PATH/Source/C" | ||
else | ||
exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" | ||
fi | ||
elif [ -e "$dir/../../Source/C/bin/$cmd" ] | ||
then | ||
exec "$dir/../../Source/C/bin/$cmd" "$@" | ||
else | ||
echo "Unable to find the real '$cmd' to run" | ||
echo "This message was printed by" | ||
echo " $0" | ||
exit 127 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
dir=$(dirname "$full_cmd") | ||
cmd=${full_cmd##*/} | ||
|
||
if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] | ||
then | ||
exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" | ||
elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] | ||
then | ||
if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] | ||
then | ||
echo "BaseTools C Tool binary was not found ($cmd)" | ||
echo "You may need to run:" | ||
echo " make -C $EDK_TOOLS_PATH/Source/C" | ||
else | ||
exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" | ||
fi | ||
elif [ -e "$dir/../../Source/C/bin/$cmd" ] | ||
then | ||
exec "$dir/../../Source/C/bin/$cmd" "$@" | ||
else | ||
echo "Unable to find the real '$cmd' to run" | ||
echo "This message was printed by" | ||
echo " $0" | ||
exit 127 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
#python `dirname $0`/RunToolFromSource.py `basename $0` $* | ||
|
||
# If a ${PYTHON_COMMAND} command is available, use it in preference to python | ||
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then | ||
python_exe=${PYTHON_COMMAND} | ||
fi | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
cmd=${full_cmd##*/} | ||
|
||
exec "${python_exe:-python}" -m edk2basetools.$cmd.$cmd "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here | ||
dir=$(dirname "$full_cmd") | ||
cmd=${full_cmd##*/} | ||
|
||
if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ] | ||
then | ||
exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd" | ||
elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ] | ||
then | ||
if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ] | ||
then | ||
echo "BaseTools C Tool binary was not found ($cmd)" | ||
echo "You may need to run:" | ||
echo " make -C $EDK_TOOLS_PATH/Source/C" | ||
else | ||
exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@" | ||
fi | ||
elif [ -e "$dir/../../Source/C/bin/$cmd" ] | ||
then | ||
exec "$dir/../../Source/C/bin/$cmd" "$@" | ||
else | ||
echo "Unable to find the real '$cmd' to run" | ||
echo "This message was printed by" | ||
echo " $0" | ||
exit 127 | ||
fi | ||
|
Oops, something went wrong.