Commit Graph

54 Commits

Author SHA1 Message Date
Rebecca Cran e6447d2a08 Remove bashisms from edksetup.sh and BaseTools/BuildEnv
Remove bashisms from edksetup.sh and BaseTools/BuildEnv. This allows any
POSIX shell to use those scripts, removing the dependency on bash.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2023-05-10 12:02:34 +00:00
rebecca@bsdio.com cf2d8d4978 edksetup.sh: remove redundant -?, -h and --help in options parsing
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Message-Id: <20190716165538.57960-4-rebecca@bsdio.com>
2019-07-23 10:41:55 +02:00
rebecca@bsdio.com 11e5fc6601 edksetup.sh: when executing arithmetic commands, $ isn't needed
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Message-Id: <20190716165538.57960-3-rebecca@bsdio.com>
2019-07-23 10:41:55 +02:00
rebecca@bsdio.com 07d80d35ad edksetup.sh: Use $SCRIPTNAME consistently instead of 'edksetup.sh'
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Message-Id: <20190716165538.57960-2-rebecca@bsdio.com>
2019-07-23 10:41:55 +02:00
rebecca@bsdio.com 80d4f9e8f9 edksetup.sh: Use bash variable $PWD instead of executing pwd command
This is a (very minor) optimization: `pwd` runs the command (even as a
built-in), whereas $PWD simply evaluates the value of the variable.

ALso, modern scripts should generally use $(...) to run commands,
instead of `...`.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Message-Id: <20190716165538.57960-1-rebecca@bsdio.com>
2019-07-23 10:41:55 +02:00
Fan, ZhijuX 3974488393 BaseTools:Linux changes the way the latest version is judged
Some Linux servers do not have BC installed,so errors occur.
So the judgment was changed to avoid this error.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-07-01 11:57:06 +08:00
rebecca@bluestop.org aecad6c1cb Fix indentation in edksetup.sh SetupPython3
Signed-off-by: Rebecca Cran <rebecca@bluestop.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-07-01 11:57:06 +08:00
Fan, ZhijuX 49693202ec Revert "BaseTools:code of test python module is moved to edksetup"
This reverts commit df7c81b5b2.

In commint df7c81b5b219c9,used a function to test python module
But the Boolean value of the return value of this function is the
opposite of the Correct result, resulting in an unexpected result

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-05-09 19:02:35 +08:00
Fan, ZhijuX df7c81b5b2 BaseTools:The code used to test python module is moved to edksetup
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1582

testing for presence of python modules should be done in edksetup
to reduce impact on subsequent build times.
This code currently exists in BaseTools/Tests/RunTest.py.

This patch is going to fix this issue.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-05-08 09:41:43 +08:00
Michael D Kinney 9ca2b9b9ab edk2: Replace BSD License with BSD+Patent License
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2019-04-09 09:10:18 -07:00
Fan, ZhijuX 95083f7db5 BaseTools:Some build generated files content are not ordered on linux
If the WORKSPACE environment variable has been set,The variables that
control stable sorting will not be set.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-02-22 15:47:15 +08:00
Liming Gao 7aef7b7cbf BaseTools: Update PYTHON env to PYTHON_COMMAND
Update PYTHON env to PYTHON_COMMAND.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-02-01 11:09:23 +08:00
Zhijux Fan d8238aaf86 BaseTools:Linux Python highest version check.
Linux Python highest version check.
The path of Python interpreter assign values to PYTHON_COMMAND

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-02-01 11:09:23 +08:00
Zhijux Fan 9c2d68c0a2 BaseTools: Update windows and linux run scripts file to use Python3
Modify windows script, PosixLike script, edksetup.sh, edksetup.bat to
use Python3 based on PYTHON3_ENABLE environment.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-02-01 11:09:22 +08:00
Zhijux Fan d097412330 BaseTools:Solve the data sorting problem use python3
set PYTHONHASHSEED
Specifying the value 0 will disable hash randomization.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-02-01 11:09:18 +08:00
Liming Gao 1ccc4d895d Revert BaseTools: PYTHON3 migration
This reverts commit 6693f359b3c213513c5096a06c6f67244a44dc52..
678f851312.

Python3 migration is the fundamental change. It requires every developer
to install Python3. Before this migration, the well communication and wide
verification must be done. But now, most people is not aware of this change,
and not try it. So, Python3 migration is reverted and be moved to edk2-staging
Python3 branch for the edk2 user evaluation.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
2018-10-15 08:29:14 +08:00
Yunhua Feng 04c47cd401 BaseTools: Update windows and linux run scripts file to use Python3
Modify windows script, PosixLike script, edksetup.sh, edksetup.bat to
use Python3

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-10-13 09:57:14 +08:00
Chris Ruffin 95cc9a51e1 BaseTools/edksetup.sh: fix invalid test for current working directory
edksetup.sh implements a test that requires the current working
directory to contain the edksetup.sh script.  This test has the side
effect of requiring the WORKSPACE to be set to the same directory as
the edksetup.sh.  In a multiple workspace configuration, it is
required to be able to have a WORKSPACE that is different from the
directory that contains edksetup.sh.  This changeset skips this test
if PACKAGE_PATH is set.

Change-Id: Ie6f16a08c012baf4e650c48cc8e91cdc466d05f2
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Ruffin <chris.ruffin@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-10 12:54:58 +08:00
Leif Lindholm c112e371ce edksetup.sh, BaseTools/BuildEnv: add --reconfig support
Add command line option --reconfig to edksetup.sh, forcing cached
copies of Conf/*.txt to be overwritten.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-10-24 13:53:16 +01:00
Leif Lindholm 44f7942558 edksetup.sh: rework argument parsing and update usage information
Rework the argument parsing logic to a more extensible traditional
while/case setup to prepare for further additions.

While doing that, align the Usage printout to look a bit more like
the output of Edk2Setup.bat (and be more correct).

And also stop passing around command line options to the BuildEnv
script (which does not check them anyway).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-10-24 13:53:06 +01:00
Yonghong Zhu 445bfd9214 edksetup.sh: update the URL in edksetup.sh
Update the URL since http://edk2.tianocore.org is not valid

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-09-15 16:04:14 +08:00
Liming Gao 094a67398f BaseTools: Update edksetup.sh to support multiple workspaces
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Wu Hao A <hao.a.wu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18584 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08 09:29:56 +00:00
Paolo Bonzini d54934498f edksetup.sh: Ensure that WORKSPACE points to the top of an edk2 checkout
Since WORKSPACE should point at the EDK2 tree, the right place
to check its validity is edksetup.sh, not BaseTools/BuildEnv.

This patch makes sure that BuildEnv is always invoked with a valid
WORKSPACE.  This lets us show better error messages, and ensures that
we never dirty the user's environment.

BuildEnv will maintain backwards-compatibility and, should the variable
be missing, it will be able to set a default WORKSPACE.  Only the sanity
checks will be of lower quality.

Note that the error message in SetupEnv will never be shown if
SetWorkspace sets WORKSPACE=`pwd`.

Suggested-by: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15701 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-28 17:37:40 +00:00
Paolo Bonzini 7bc14212b3 edksetup.sh: Look for BuildEnv under EDK_TOOLS_PATH
EDK_TOOLS_PATH is basically a replacement for $WORKSPACE/BaseTools.

It makes sense to check for BuildEnv there, then, if $WORKSPACE
is absent but $EDK_TOOLS_PATH is present.

With this patch, it is possible to separately package tools in
/usr and use them compile EDK2 (doing "rm -rf BaseTools" in the
EDK2 tree).  This is desirable for OS distributions that need to
distribute the tools in a "free software" repository and OVMF in
a "non-free software" repository; bundling the same code in two
different packages causes confusion.  It is also simpler for distros
because the build process for BaseTools and OVMF is completely
different.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15700 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-28 17:37:35 +00:00
Leif Lindholm 1bb6bfaa08 edksetup.sh: Fix typo and return code
The typo was a check for the string "BaseTool" instead of "BaseTools".

Also fixed the issue where the script returned success even when
configuration failed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15200 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-30 19:26:53 +00:00
Jordan Justen ef9086c3a5 edksetup.sh: Code style
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15199 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-30 19:26:46 +00:00
Parmeshwr Prasad 729220eaca Handle command line parameter "-? -h --help" and any other.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Parmeshwr Prasad <parmeshwr_prasad@dell.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15192 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-28 02:18:23 +00:00
hhtian 92063c4e55 Correct copyright year
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11321 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-16 12:21:31 +00:00
geekboy15a 9f2ced4e2b Removed the requirement to pass in at least one parameter to the script.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10642 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-09 19:42:03 +00:00
hhtian 24542fb211 Update the copyright notice format
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10448 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-29 15:17:20 +00:00
klu2 2b1473c1ba add more description in edksetup.sh
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8806 6f19259b-4bc3-4df7-8a09-765794883524
2009-07-08 05:54:53 +00:00
lhauch 3a6b4559e5 Removed Java/Ant specific content from the setup scripts.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7169 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-31 16:57:24 +00:00
lhauch 76c6abd94f setting executable on these files
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5241 6f19259b-4bc3-4df7-8a09-765794883524
2008-05-20 17:43:07 +00:00
jljusten 000c06d236 edksetup.sh:
Support both BaseTools and AntTools.  Do not require the user
  to use BaseTools/BuildEnv for the BaseTools support.

  Use this command to for help: . edksetup.sh --help


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4687 6f19259b-4bc3-4df7-8a09-765794883524
2008-02-12 22:27:42 +00:00
jljusten 8352c27a29 Refer to $WORKSPACE/BaseTools rather than $WORKSPACE/Tools.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4149 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-17 02:03:40 +00:00
jljusten a310886b9b edksetup.sh:
Now we look for the 'NewBuild' parameter, and if so, ask the user to
  'source' the correct script.  (. Tools/BuildEnv)

  Otherwise we 'source' the Tools/OldBuildEnv script for the user.

Tools/OldBuildEnv:
  This is the old contents of $WORKSPACE/edksetup.sh

Tools/BuildEnv:
  This script is used to configure the BaseTools build environment for
  unix-like operating systems.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4141 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-16 20:52:46 +00:00
jwang36 51ac2ffdab Added support for xmlbeans-2.2.0
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2203 6f19259b-4bc3-4df7-8a09-765794883524
2007-01-10 02:15:11 +00:00
jwang36 3088e81137 Changed the FrameworkWizard.jar path from Bin to bin
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2169 6f19259b-4bc3-4df7-8a09-765794883524
2007-01-04 07:37:06 +00:00
klu2 d6203412a9 Add ant-contrib.jar to class path
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2150 6f19259b-4bc3-4df7-8a09-765794883524
2006-12-28 09:26:39 +00:00
bbahnsen 6dbea97890 Cleanups for cygwin.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1953 6f19259b-4bc3-4df7-8a09-765794883524
2006-11-14 17:57:07 +00:00
qouyang 8f7f05d527 Fix EDKT140(CompressDll.dll does not build under cygwin gcc).
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1188 6f19259b-4bc3-4df7-8a09-765794883524
2006-08-04 03:17:05 +00:00
klu2 d14ebb4374 Because Pcd entity, exception and some action package are shared by Building tools and Wizard Tools, so I move them to Tools/Source folder and generated PcdTools.jar,
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1160 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-31 18:55:26 +00:00
bbahnsen f98a565d9b Handle the FRAMEWORK_TOOLS_PATH properly on cygwin.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1126 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-27 21:54:12 +00:00
bbahnsen 48186277b9 Check to see if the tools are built before trying a build.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1005 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-14 08:02:04 +00:00
hche10x da1508dd53 1. Add build FrameworkWizard in edksetup.bat
2. Modify FrameworkWizard.bat to skip building and only run the program

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@934 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-13 01:16:51 +00:00
klu2 ace425da36 Fix some bugs in edksetup.sh
1, WORKSPACE environment in unix-like system can be obtained automatically as edksetup.bat in window's environment.
2, XMLBEANS_HOME environment in unix-like system should be also check as edksetup.bat in windows's environment.
3, In some unix-like system like darwin's system, system environment should be export to user's environment explicitly, this behavior is different in microsoft windows's platform. 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@849 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-09 17:33:16 +00:00
bbahnsen bf0c93fdc5 Add a new classpath element.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@577 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-20 22:12:27 +00:00
bbahnsen f79b595b7b Convert env var name to all caps.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@486 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-12 17:15:58 +00:00
bbahnsen 7a05c964e6 Remove one of the saxon jars from the classpath.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@434 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-06 23:41:12 +00:00
bbahnsen 4182ff457c Try to fix the Surface Area build.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@433 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-06 23:06:37 +00:00