public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: Remove './SecMain' from 'run' target
@ 2019-05-10  6:33 Bob Feng
  2019-05-10  7:25 ` Liming Gao
  0 siblings, 1 reply; 8+ messages in thread
From: Bob Feng @ 2019-05-10  6:33 UTC (permalink / raw)
  To: devel; +Cc: Bob Feng, Liming Gao, Michael D Kinney

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1561

When a target of 'run' is passed into build.py,
BaseTools unconditionally attempts to execute the
application called './SecMain' in the build output directory.

This behavior applies to the Nt32Pkg which is being
replaced with features in the EmulatorPkg.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
---
 BaseTools/Source/Python/build/build.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 7271570d29..04f266abf5 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1225,14 +1225,10 @@ class Build():
 
         makefile = GenMake.BuildFile(AutoGenObject)._FILE_NAME_[GenMake.gMakeType]
 
         # run
         if Target == 'run':
-            RunDir = os.path.normpath(os.path.join(AutoGenObject.BuildDir, GlobalData.gGlobalDefines['ARCH']))
-            Command = '.\SecMain'
-            os.chdir(RunDir)
-            LaunchCommand(Command, RunDir)
             return True
 
         # build modules
         if BuildModule:
             BuildCommand = BuildCommand + [Target]
-- 
2.20.1.windows.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Patch] BaseTools: Remove './SecMain' from 'run' target
  2019-05-10  6:33 [Patch] BaseTools: Remove './SecMain' from 'run' target Bob Feng
@ 2019-05-10  7:25 ` Liming Gao
  2019-05-10  7:34   ` Bob Feng
  0 siblings, 1 reply; 8+ messages in thread
From: Liming Gao @ 2019-05-10  7:25 UTC (permalink / raw)
  To: Feng, Bob C, devel@edk2.groups.io; +Cc: Kinney, Michael D

Bob:
  Please make sure run command still works on NT32 platform. 

>-----Original Message-----
>From: Feng, Bob C
>Sent: Friday, May 10, 2019 2:34 PM
>To: devel@edk2.groups.io
>Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming
><liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
>Subject: [Patch] BaseTools: Remove './SecMain' from 'run' target
>
>BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1561
>
>When a target of 'run' is passed into build.py,
>BaseTools unconditionally attempts to execute the
>application called './SecMain' in the build output directory.
>
>This behavior applies to the Nt32Pkg which is being
>replaced with features in the EmulatorPkg.
>
>Signed-off-by: Bob Feng <bob.c.feng@intel.com>
>Cc: Liming Gao <liming.gao@intel.com>
>Cc: Michael D Kinney <michael.d.kinney@intel.com>
>---
> BaseTools/Source/Python/build/build.py | 4 ----
> 1 file changed, 4 deletions(-)
>
>diff --git a/BaseTools/Source/Python/build/build.py
>b/BaseTools/Source/Python/build/build.py
>index 7271570d29..04f266abf5 100644
>--- a/BaseTools/Source/Python/build/build.py
>+++ b/BaseTools/Source/Python/build/build.py
>@@ -1225,14 +1225,10 @@ class Build():
>
>         makefile =
>GenMake.BuildFile(AutoGenObject)._FILE_NAME_[GenMake.gMakeType]
>
>         # run
>         if Target == 'run':
>-            RunDir = os.path.normpath(os.path.join(AutoGenObject.BuildDir,
>GlobalData.gGlobalDefines['ARCH']))
>-            Command = '.\SecMain'
>-            os.chdir(RunDir)
>-            LaunchCommand(Command, RunDir)
>             return True
>
>         # build modules
>         if BuildModule:
>             BuildCommand = BuildCommand + [Target]
>--
>2.20.1.windows.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch] BaseTools: Remove './SecMain' from 'run' target
  2019-05-10  7:25 ` Liming Gao
@ 2019-05-10  7:34   ` Bob Feng
  2019-05-21 15:06     ` Liming Gao
  0 siblings, 1 reply; 8+ messages in thread
From: Bob Feng @ 2019-05-10  7:34 UTC (permalink / raw)
  To: Gao, Liming, devel@edk2.groups.io; +Cc: Kinney, Michael D

I think NT32Pkg need a POSTBUILD scripts to execute its run command.


-----Original Message-----
From: Gao, Liming 
Sent: Friday, May 10, 2019 3:26 PM
To: Feng, Bob C <bob.c.feng@intel.com>; devel@edk2.groups.io
Cc: Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [Patch] BaseTools: Remove './SecMain' from 'run' target

Bob:
  Please make sure run command still works on NT32 platform. 

>-----Original Message-----
>From: Feng, Bob C
>Sent: Friday, May 10, 2019 2:34 PM
>To: devel@edk2.groups.io
>Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming 
><liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
>Subject: [Patch] BaseTools: Remove './SecMain' from 'run' target
>
>BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1561
>
>When a target of 'run' is passed into build.py, BaseTools 
>unconditionally attempts to execute the application called './SecMain' 
>in the build output directory.
>
>This behavior applies to the Nt32Pkg which is being replaced with 
>features in the EmulatorPkg.
>
>Signed-off-by: Bob Feng <bob.c.feng@intel.com>
>Cc: Liming Gao <liming.gao@intel.com>
>Cc: Michael D Kinney <michael.d.kinney@intel.com>
>---
> BaseTools/Source/Python/build/build.py | 4 ----
> 1 file changed, 4 deletions(-)
>
>diff --git a/BaseTools/Source/Python/build/build.py
>b/BaseTools/Source/Python/build/build.py
>index 7271570d29..04f266abf5 100644
>--- a/BaseTools/Source/Python/build/build.py
>+++ b/BaseTools/Source/Python/build/build.py
>@@ -1225,14 +1225,10 @@ class Build():
>
>         makefile =
>GenMake.BuildFile(AutoGenObject)._FILE_NAME_[GenMake.gMakeType]
>
>         # run
>         if Target == 'run':
>-            RunDir = os.path.normpath(os.path.join(AutoGenObject.BuildDir,
>GlobalData.gGlobalDefines['ARCH']))
>-            Command = '.\SecMain'
>-            os.chdir(RunDir)
>-            LaunchCommand(Command, RunDir)
>             return True
>
>         # build modules
>         if BuildModule:
>             BuildCommand = BuildCommand + [Target]
>--
>2.20.1.windows.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch] BaseTools: Remove './SecMain' from 'run' target
  2019-05-10  7:34   ` Bob Feng
@ 2019-05-21 15:06     ` Liming Gao
  2019-05-21 15:44       ` Michael D Kinney
  0 siblings, 1 reply; 8+ messages in thread
From: Liming Gao @ 2019-05-21 15:06 UTC (permalink / raw)
  To: Feng, Bob C, devel@edk2.groups.io; +Cc: Kinney, Michael D

Bob:
  Because NT32 has been removed, this change should be OK. Reviewed-by: Liming Gao <liming.gao@intel.com>

Thanks
Liming
> -----Original Message-----
> From: Feng, Bob C
> Sent: Friday, May 10, 2019 3:34 PM
> To: Gao, Liming <liming.gao@intel.com>; devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> Subject: RE: [Patch] BaseTools: Remove './SecMain' from 'run' target
> 
> I think NT32Pkg need a POSTBUILD scripts to execute its run command.
> 
> 
> -----Original Message-----
> From: Gao, Liming
> Sent: Friday, May 10, 2019 3:26 PM
> To: Feng, Bob C <bob.c.feng@intel.com>; devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> Subject: RE: [Patch] BaseTools: Remove './SecMain' from 'run' target
> 
> Bob:
>   Please make sure run command still works on NT32 platform.
> 
> >-----Original Message-----
> >From: Feng, Bob C
> >Sent: Friday, May 10, 2019 2:34 PM
> >To: devel@edk2.groups.io
> >Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming
> ><liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
> >Subject: [Patch] BaseTools: Remove './SecMain' from 'run' target
> >
> >BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1561
> >
> >When a target of 'run' is passed into build.py, BaseTools
> >unconditionally attempts to execute the application called './SecMain'
> >in the build output directory.
> >
> >This behavior applies to the Nt32Pkg which is being replaced with
> >features in the EmulatorPkg.
> >
> >Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> >Cc: Liming Gao <liming.gao@intel.com>
> >Cc: Michael D Kinney <michael.d.kinney@intel.com>
> >---
> > BaseTools/Source/Python/build/build.py | 4 ----
> > 1 file changed, 4 deletions(-)
> >
> >diff --git a/BaseTools/Source/Python/build/build.py
> >b/BaseTools/Source/Python/build/build.py
> >index 7271570d29..04f266abf5 100644
> >--- a/BaseTools/Source/Python/build/build.py
> >+++ b/BaseTools/Source/Python/build/build.py
> >@@ -1225,14 +1225,10 @@ class Build():
> >
> >         makefile =
> >GenMake.BuildFile(AutoGenObject)._FILE_NAME_[GenMake.gMakeType]
> >
> >         # run
> >         if Target == 'run':
> >-            RunDir = os.path.normpath(os.path.join(AutoGenObject.BuildDir,
> >GlobalData.gGlobalDefines['ARCH']))
> >-            Command = '.\SecMain'
> >-            os.chdir(RunDir)
> >-            LaunchCommand(Command, RunDir)
> >             return True
> >
> >         # build modules
> >         if BuildModule:
> >             BuildCommand = BuildCommand + [Target]
> >--
> >2.20.1.windows.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch] BaseTools: Remove './SecMain' from 'run' target
  2019-05-21 15:06     ` Liming Gao
@ 2019-05-21 15:44       ` Michael D Kinney
  2019-05-22  1:05         ` Bob Feng
  2019-05-22 22:30         ` Michael D Kinney
  0 siblings, 2 replies; 8+ messages in thread
From: Michael D Kinney @ 2019-05-21 15:44 UTC (permalink / raw)
  To: Gao, Liming, Feng, Bob C, devel@edk2.groups.io, Kinney, Michael D

Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>

If we want the 'run' target to work for the EmulatorPkg, we
can add a python post build script to support that.  Please
enter a BZ feature request.

There is an example in the following edk2-staging branch that
runs QEMU for an OvmfPkg build using a 'run' target.

https://github.com/tianocore/edk2-staging/tree/Bug_1525_FmpDevicePkg_MultipleControllers/OvmfPkg

The DSC file contains a POSTBUILD statement.  There are two
python scripts in this example, but could be consolidated to
a single python script for the EmulatorPkg.  Run.py finds the
output directory where the EmulatorPkg executable for each 
supported host OS can be found.

https://github.com/tianocore/edk2-staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers/OvmfPkg/OvmfPkgIa32X64.dsc

https://github.com/tianocore/edk2-staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers/OvmfPkg/PostBuild.py

https://github.com/tianocore/edk2-staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers/OvmfPkg/Run.py

Best regards,

Mike

> -----Original Message-----
> From: Gao, Liming
> Sent: Tuesday, May 21, 2019 8:06 AM
> To: Feng, Bob C <bob.c.feng@intel.com>;
> devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> Subject: RE: [Patch] BaseTools: Remove './SecMain' from
> 'run' target
> 
> Bob:
>   Because NT32 has been removed, this change should be
> OK. Reviewed-by: Liming Gao <liming.gao@intel.com>
> 
> Thanks
> Liming
> > -----Original Message-----
> > From: Feng, Bob C
> > Sent: Friday, May 10, 2019 3:34 PM
> > To: Gao, Liming <liming.gao@intel.com>;
> devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> > Subject: RE: [Patch] BaseTools: Remove './SecMain'
> from 'run' target
> >
> > I think NT32Pkg need a POSTBUILD scripts to execute
> its run command.
> >
> >
> > -----Original Message-----
> > From: Gao, Liming
> > Sent: Friday, May 10, 2019 3:26 PM
> > To: Feng, Bob C <bob.c.feng@intel.com>;
> devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> > Subject: RE: [Patch] BaseTools: Remove './SecMain'
> from 'run' target
> >
> > Bob:
> >   Please make sure run command still works on NT32
> platform.
> >
> > >-----Original Message-----
> > >From: Feng, Bob C
> > >Sent: Friday, May 10, 2019 2:34 PM
> > >To: devel@edk2.groups.io
> > >Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming
> > ><liming.gao@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>
> > >Subject: [Patch] BaseTools: Remove './SecMain' from
> 'run' target
> > >
> > >BZ:
> https://bugzilla.tianocore.org/show_bug.cgi?id=1561
> > >
> > >When a target of 'run' is passed into build.py,
> BaseTools
> > >unconditionally attempts to execute the application
> called './SecMain'
> > >in the build output directory.
> > >
> > >This behavior applies to the Nt32Pkg which is being
> replaced with
> > >features in the EmulatorPkg.
> > >
> > >Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> > >Cc: Liming Gao <liming.gao@intel.com>
> > >Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > >---
> > > BaseTools/Source/Python/build/build.py | 4 ----
> > > 1 file changed, 4 deletions(-)
> > >
> > >diff --git a/BaseTools/Source/Python/build/build.py
> > >b/BaseTools/Source/Python/build/build.py
> > >index 7271570d29..04f266abf5 100644
> > >--- a/BaseTools/Source/Python/build/build.py
> > >+++ b/BaseTools/Source/Python/build/build.py
> > >@@ -1225,14 +1225,10 @@ class Build():
> > >
> > >         makefile =
> >
> >GenMake.BuildFile(AutoGenObject)._FILE_NAME_[GenMake.g
> MakeType]
> > >
> > >         # run
> > >         if Target == 'run':
> > >-            RunDir =
> os.path.normpath(os.path.join(AutoGenObject.BuildDir,
> > >GlobalData.gGlobalDefines['ARCH']))
> > >-            Command = '.\SecMain'
> > >-            os.chdir(RunDir)
> > >-            LaunchCommand(Command, RunDir)
> > >             return True
> > >
> > >         # build modules
> > >         if BuildModule:
> > >             BuildCommand = BuildCommand + [Target]
> > >--
> > >2.20.1.windows.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch] BaseTools: Remove './SecMain' from 'run' target
  2019-05-21 15:44       ` Michael D Kinney
@ 2019-05-22  1:05         ` Bob Feng
  2019-05-22 22:30         ` Michael D Kinney
  1 sibling, 0 replies; 8+ messages in thread
From: Bob Feng @ 2019-05-22  1:05 UTC (permalink / raw)
  To: Kinney, Michael D, Gao, Liming, devel@edk2.groups.io

I entered a new BZ to create the EmulatorPkg postbuild script for "build run" support.
https://bugzilla.tianocore.org/show_bug.cgi?id=1828


Thanks,
Bob

-----Original Message-----
From: Kinney, Michael D 
Sent: Tuesday, May 21, 2019 11:45 PM
To: Gao, Liming <liming.gao@intel.com>; Feng, Bob C <bob.c.feng@intel.com>; devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [Patch] BaseTools: Remove './SecMain' from 'run' target

Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>

If we want the 'run' target to work for the EmulatorPkg, we can add a python post build script to support that.  Please enter a BZ feature request.

There is an example in the following edk2-staging branch that runs QEMU for an OvmfPkg build using a 'run' target.

https://github.com/tianocore/edk2-staging/tree/Bug_1525_FmpDevicePkg_MultipleControllers/OvmfPkg

The DSC file contains a POSTBUILD statement.  There are two python scripts in this example, but could be consolidated to a single python script for the EmulatorPkg.  Run.py finds the output directory where the EmulatorPkg executable for each supported host OS can be found.

https://github.com/tianocore/edk2-staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers/OvmfPkg/OvmfPkgIa32X64.dsc

https://github.com/tianocore/edk2-staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers/OvmfPkg/PostBuild.py

https://github.com/tianocore/edk2-staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers/OvmfPkg/Run.py

Best regards,

Mike

> -----Original Message-----
> From: Gao, Liming
> Sent: Tuesday, May 21, 2019 8:06 AM
> To: Feng, Bob C <bob.c.feng@intel.com>; devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> Subject: RE: [Patch] BaseTools: Remove './SecMain' from 'run' target
> 
> Bob:
>   Because NT32 has been removed, this change should be OK. 
> Reviewed-by: Liming Gao <liming.gao@intel.com>
> 
> Thanks
> Liming
> > -----Original Message-----
> > From: Feng, Bob C
> > Sent: Friday, May 10, 2019 3:34 PM
> > To: Gao, Liming <liming.gao@intel.com>;
> devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> > Subject: RE: [Patch] BaseTools: Remove './SecMain'
> from 'run' target
> >
> > I think NT32Pkg need a POSTBUILD scripts to execute
> its run command.
> >
> >
> > -----Original Message-----
> > From: Gao, Liming
> > Sent: Friday, May 10, 2019 3:26 PM
> > To: Feng, Bob C <bob.c.feng@intel.com>;
> devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> > Subject: RE: [Patch] BaseTools: Remove './SecMain'
> from 'run' target
> >
> > Bob:
> >   Please make sure run command still works on NT32
> platform.
> >
> > >-----Original Message-----
> > >From: Feng, Bob C
> > >Sent: Friday, May 10, 2019 2:34 PM
> > >To: devel@edk2.groups.io
> > >Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming 
> > ><liming.gao@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>
> > >Subject: [Patch] BaseTools: Remove './SecMain' from
> 'run' target
> > >
> > >BZ:
> https://bugzilla.tianocore.org/show_bug.cgi?id=1561
> > >
> > >When a target of 'run' is passed into build.py,
> BaseTools
> > >unconditionally attempts to execute the application
> called './SecMain'
> > >in the build output directory.
> > >
> > >This behavior applies to the Nt32Pkg which is being
> replaced with
> > >features in the EmulatorPkg.
> > >
> > >Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> > >Cc: Liming Gao <liming.gao@intel.com>
> > >Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > >---
> > > BaseTools/Source/Python/build/build.py | 4 ----
> > > 1 file changed, 4 deletions(-)
> > >
> > >diff --git a/BaseTools/Source/Python/build/build.py
> > >b/BaseTools/Source/Python/build/build.py
> > >index 7271570d29..04f266abf5 100644
> > >--- a/BaseTools/Source/Python/build/build.py
> > >+++ b/BaseTools/Source/Python/build/build.py
> > >@@ -1225,14 +1225,10 @@ class Build():
> > >
> > >         makefile =
> >
> >GenMake.BuildFile(AutoGenObject)._FILE_NAME_[GenMake.g
> MakeType]
> > >
> > >         # run
> > >         if Target == 'run':
> > >-            RunDir =
> os.path.normpath(os.path.join(AutoGenObject.BuildDir,
> > >GlobalData.gGlobalDefines['ARCH']))
> > >-            Command = '.\SecMain'
> > >-            os.chdir(RunDir)
> > >-            LaunchCommand(Command, RunDir)
> > >             return True
> > >
> > >         # build modules
> > >         if BuildModule:
> > >             BuildCommand = BuildCommand + [Target]
> > >--
> > >2.20.1.windows.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch] BaseTools: Remove './SecMain' from 'run' target
  2019-05-21 15:44       ` Michael D Kinney
  2019-05-22  1:05         ` Bob Feng
@ 2019-05-22 22:30         ` Michael D Kinney
  2019-05-23  1:54           ` Bob Feng
  1 sibling, 1 reply; 8+ messages in thread
From: Michael D Kinney @ 2019-05-22 22:30 UTC (permalink / raw)
  To: Gao, Liming, Feng, Bob C, devel@edk2.groups.io, Kinney, Michael D

Hi Bob,

I just noticed that there is a 2nd reference to 'SecMain'
in build.py that was missed in this patch review.

Is there a reason both were not removed?

Mike

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Tuesday, May 21, 2019 8:45 AM
> To: Gao, Liming <liming.gao@intel.com>; Feng, Bob C
> <bob.c.feng@intel.com>; devel@edk2.groups.io; Kinney,
> Michael D <michael.d.kinney@intel.com>
> Subject: RE: [Patch] BaseTools: Remove './SecMain' from
> 'run' target
> 
> Reviewed-by: Michael D Kinney
> <michael.d.kinney@intel.com>
> 
> If we want the 'run' target to work for the
> EmulatorPkg, we
> can add a python post build script to support that.
> Please
> enter a BZ feature request.
> 
> There is an example in the following edk2-staging
> branch that
> runs QEMU for an OvmfPkg build using a 'run' target.
> 
> https://github.com/tianocore/edk2-
> staging/tree/Bug_1525_FmpDevicePkg_MultipleControllers/
> OvmfPkg
> 
> The DSC file contains a POSTBUILD statement.  There are
> two
> python scripts in this example, but could be
> consolidated to
> a single python script for the EmulatorPkg.  Run.py
> finds the
> output directory where the EmulatorPkg executable for
> each
> supported host OS can be found.
> 
> https://github.com/tianocore/edk2-
> staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers/
> OvmfPkg/OvmfPkgIa32X64.dsc
> 
> https://github.com/tianocore/edk2-
> staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers/
> OvmfPkg/PostBuild.py
> 
> https://github.com/tianocore/edk2-
> staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers/
> OvmfPkg/Run.py
> 
> Best regards,
> 
> Mike
> 
> > -----Original Message-----
> > From: Gao, Liming
> > Sent: Tuesday, May 21, 2019 8:06 AM
> > To: Feng, Bob C <bob.c.feng@intel.com>;
> > devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> > Subject: RE: [Patch] BaseTools: Remove './SecMain'
> from
> > 'run' target
> >
> > Bob:
> >   Because NT32 has been removed, this change should
> be
> > OK. Reviewed-by: Liming Gao <liming.gao@intel.com>
> >
> > Thanks
> > Liming
> > > -----Original Message-----
> > > From: Feng, Bob C
> > > Sent: Friday, May 10, 2019 3:34 PM
> > > To: Gao, Liming <liming.gao@intel.com>;
> > devel@edk2.groups.io
> > > Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> > > Subject: RE: [Patch] BaseTools: Remove './SecMain'
> > from 'run' target
> > >
> > > I think NT32Pkg need a POSTBUILD scripts to execute
> > its run command.
> > >
> > >
> > > -----Original Message-----
> > > From: Gao, Liming
> > > Sent: Friday, May 10, 2019 3:26 PM
> > > To: Feng, Bob C <bob.c.feng@intel.com>;
> > devel@edk2.groups.io
> > > Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> > > Subject: RE: [Patch] BaseTools: Remove './SecMain'
> > from 'run' target
> > >
> > > Bob:
> > >   Please make sure run command still works on NT32
> > platform.
> > >
> > > >-----Original Message-----
> > > >From: Feng, Bob C
> > > >Sent: Friday, May 10, 2019 2:34 PM
> > > >To: devel@edk2.groups.io
> > > >Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao,
> Liming
> > > ><liming.gao@intel.com>; Kinney, Michael D
> > <michael.d.kinney@intel.com>
> > > >Subject: [Patch] BaseTools: Remove './SecMain'
> from
> > 'run' target
> > > >
> > > >BZ:
> > https://bugzilla.tianocore.org/show_bug.cgi?id=1561
> > > >
> > > >When a target of 'run' is passed into build.py,
> > BaseTools
> > > >unconditionally attempts to execute the
> application
> > called './SecMain'
> > > >in the build output directory.
> > > >
> > > >This behavior applies to the Nt32Pkg which is
> being
> > replaced with
> > > >features in the EmulatorPkg.
> > > >
> > > >Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> > > >Cc: Liming Gao <liming.gao@intel.com>
> > > >Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > > >---
> > > > BaseTools/Source/Python/build/build.py | 4 ----
> > > > 1 file changed, 4 deletions(-)
> > > >
> > > >diff --git
> a/BaseTools/Source/Python/build/build.py
> > > >b/BaseTools/Source/Python/build/build.py
> > > >index 7271570d29..04f266abf5 100644
> > > >--- a/BaseTools/Source/Python/build/build.py
> > > >+++ b/BaseTools/Source/Python/build/build.py
> > > >@@ -1225,14 +1225,10 @@ class Build():
> > > >
> > > >         makefile =
> > >
> >
> >GenMake.BuildFile(AutoGenObject)._FILE_NAME_[GenMake.g
> > MakeType]
> > > >
> > > >         # run
> > > >         if Target == 'run':
> > > >-            RunDir =
> > os.path.normpath(os.path.join(AutoGenObject.BuildDir,
> > > >GlobalData.gGlobalDefines['ARCH']))
> > > >-            Command = '.\SecMain'
> > > >-            os.chdir(RunDir)
> > > >-            LaunchCommand(Command, RunDir)
> > > >             return True
> > > >
> > > >         # build modules
> > > >         if BuildModule:
> > > >             BuildCommand = BuildCommand +
> [Target]
> > > >--
> > > >2.20.1.windows.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch] BaseTools: Remove './SecMain' from 'run' target
  2019-05-22 22:30         ` Michael D Kinney
@ 2019-05-23  1:54           ` Bob Feng
  0 siblings, 0 replies; 8+ messages in thread
From: Bob Feng @ 2019-05-23  1:54 UTC (permalink / raw)
  To: Kinney, Michael D, Gao, Liming, devel@edk2.groups.io

Mike,

I missed the second 'SecMain', I'll send another patch to fix it.

Bob

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, May 23, 2019 6:31 AM
To: Gao, Liming <liming.gao@intel.com>; Feng, Bob C <bob.c.feng@intel.com>; devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [Patch] BaseTools: Remove './SecMain' from 'run' target

Hi Bob,

I just noticed that there is a 2nd reference to 'SecMain'
in build.py that was missed in this patch review.

Is there a reason both were not removed?

Mike

> -----Original Message-----
> From: Kinney, Michael D
> Sent: Tuesday, May 21, 2019 8:45 AM
> To: Gao, Liming <liming.gao@intel.com>; Feng, Bob C 
> <bob.c.feng@intel.com>; devel@edk2.groups.io; Kinney, Michael D 
> <michael.d.kinney@intel.com>
> Subject: RE: [Patch] BaseTools: Remove './SecMain' from 'run' target
> 
> Reviewed-by: Michael D Kinney
> <michael.d.kinney@intel.com>
> 
> If we want the 'run' target to work for the EmulatorPkg, we can add a 
> python post build script to support that.
> Please
> enter a BZ feature request.
> 
> There is an example in the following edk2-staging branch that runs 
> QEMU for an OvmfPkg build using a 'run' target.
> 
> https://github.com/tianocore/edk2-
> staging/tree/Bug_1525_FmpDevicePkg_MultipleControllers/
> OvmfPkg
> 
> The DSC file contains a POSTBUILD statement.  There are two python 
> scripts in this example, but could be consolidated to a single python 
> script for the EmulatorPkg.  Run.py finds the output directory where 
> the EmulatorPkg executable for each supported host OS can be found.
> 
> https://github.com/tianocore/edk2-
> staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers/
> OvmfPkg/OvmfPkgIa32X64.dsc
> 
> https://github.com/tianocore/edk2-
> staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers/
> OvmfPkg/PostBuild.py
> 
> https://github.com/tianocore/edk2-
> staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers/
> OvmfPkg/Run.py
> 
> Best regards,
> 
> Mike
> 
> > -----Original Message-----
> > From: Gao, Liming
> > Sent: Tuesday, May 21, 2019 8:06 AM
> > To: Feng, Bob C <bob.c.feng@intel.com>; devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> > Subject: RE: [Patch] BaseTools: Remove './SecMain'
> from
> > 'run' target
> >
> > Bob:
> >   Because NT32 has been removed, this change should
> be
> > OK. Reviewed-by: Liming Gao <liming.gao@intel.com>
> >
> > Thanks
> > Liming
> > > -----Original Message-----
> > > From: Feng, Bob C
> > > Sent: Friday, May 10, 2019 3:34 PM
> > > To: Gao, Liming <liming.gao@intel.com>;
> > devel@edk2.groups.io
> > > Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> > > Subject: RE: [Patch] BaseTools: Remove './SecMain'
> > from 'run' target
> > >
> > > I think NT32Pkg need a POSTBUILD scripts to execute
> > its run command.
> > >
> > >
> > > -----Original Message-----
> > > From: Gao, Liming
> > > Sent: Friday, May 10, 2019 3:26 PM
> > > To: Feng, Bob C <bob.c.feng@intel.com>;
> > devel@edk2.groups.io
> > > Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> > > Subject: RE: [Patch] BaseTools: Remove './SecMain'
> > from 'run' target
> > >
> > > Bob:
> > >   Please make sure run command still works on NT32
> > platform.
> > >
> > > >-----Original Message-----
> > > >From: Feng, Bob C
> > > >Sent: Friday, May 10, 2019 2:34 PM
> > > >To: devel@edk2.groups.io
> > > >Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao,
> Liming
> > > ><liming.gao@intel.com>; Kinney, Michael D
> > <michael.d.kinney@intel.com>
> > > >Subject: [Patch] BaseTools: Remove './SecMain'
> from
> > 'run' target
> > > >
> > > >BZ:
> > https://bugzilla.tianocore.org/show_bug.cgi?id=1561
> > > >
> > > >When a target of 'run' is passed into build.py,
> > BaseTools
> > > >unconditionally attempts to execute the
> application
> > called './SecMain'
> > > >in the build output directory.
> > > >
> > > >This behavior applies to the Nt32Pkg which is
> being
> > replaced with
> > > >features in the EmulatorPkg.
> > > >
> > > >Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> > > >Cc: Liming Gao <liming.gao@intel.com>
> > > >Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > > >---
> > > > BaseTools/Source/Python/build/build.py | 4 ----
> > > > 1 file changed, 4 deletions(-)
> > > >
> > > >diff --git
> a/BaseTools/Source/Python/build/build.py
> > > >b/BaseTools/Source/Python/build/build.py
> > > >index 7271570d29..04f266abf5 100644
> > > >--- a/BaseTools/Source/Python/build/build.py
> > > >+++ b/BaseTools/Source/Python/build/build.py
> > > >@@ -1225,14 +1225,10 @@ class Build():
> > > >
> > > >         makefile =
> > >
> >
> >GenMake.BuildFile(AutoGenObject)._FILE_NAME_[GenMake.g
> > MakeType]
> > > >
> > > >         # run
> > > >         if Target == 'run':
> > > >-            RunDir =
> > os.path.normpath(os.path.join(AutoGenObject.BuildDir,
> > > >GlobalData.gGlobalDefines['ARCH']))
> > > >-            Command = '.\SecMain'
> > > >-            os.chdir(RunDir)
> > > >-            LaunchCommand(Command, RunDir)
> > > >             return True
> > > >
> > > >         # build modules
> > > >         if BuildModule:
> > > >             BuildCommand = BuildCommand +
> [Target]
> > > >--
> > > >2.20.1.windows.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-05-23  1:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-10  6:33 [Patch] BaseTools: Remove './SecMain' from 'run' target Bob Feng
2019-05-10  7:25 ` Liming Gao
2019-05-10  7:34   ` Bob Feng
2019-05-21 15:06     ` Liming Gao
2019-05-21 15:44       ` Michael D Kinney
2019-05-22  1:05         ` Bob Feng
2019-05-22 22:30         ` Michael D Kinney
2019-05-23  1:54           ` Bob Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox