Re: [edk2] [Patch] BaseTools/Build: Support python scripts in PREBUILD/POSTBUILD

2017-07-12 Thread Zhu, Yonghong
Reviewed-by: Yonghong Zhu  

Best Regards,
Zhu Yonghong

-Original Message-
From: Kinney, Michael D 
Sent: Wednesday, July 12, 2017 11:33 PM
To: edk2-devel@lists.01.org
Cc: Kinney, Michael D ; Gao, Liming 
; Zhu, Yonghong 
Subject: [Patch] BaseTools/Build: Support python scripts in PREBUILD/POSTBUILD

From: Michael Kinney 

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

Add shell=True in Popen() calls to support direct execution of python scripts

Cc: Liming Gao 
Cc: Yonghong Zhu 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney 
---
 BaseTools/Source/Python/build/build.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/build/build.py 
b/BaseTools/Source/Python/build/build.py
index cfd28a4b5b..1e14fb4dcc 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1036,7 +1036,7 @@ class Build():
 os.remove(self.PlatformBuildPath)
 if sys.platform == "win32":
 args = ' && '.join((self.Prebuild, 'set > ' + PrebuildEnvFile))
-Process = Popen(args, stdout=PIPE, stderr=PIPE)
+Process = Popen(args, stdout=PIPE, stderr=PIPE, 
+ shell=True)
 else:
 args = ' && '.join((self.Prebuild, 'env > ' + PrebuildEnvFile))
 Process = Popen(args, stdout=PIPE, stderr=PIPE, shell=True) @@ 
-1079,7 +1079,7 @@ class Build():
 if self.Postbuild:
 EdkLogger.info("\n- Postbuild Start -\n")
 if sys.platform == "win32":
-Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE)
+Process = Popen(self.Postbuild, stdout=PIPE, 
+ stderr=PIPE, shell=True)
 else:
 Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE, 
shell=True)
 # launch two threads to read the STDOUT and STDERR
--
2.13.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] TianoCore-docs GitBook Documentation Process

2017-07-12 Thread Kinney, Michael D
Hello,

I have invited package maintainers listed in the edk2/master
MAINTAINERS.txt file to the new EDK II Maintainers Team in
the Tianocore-Docs organization.  This new team has write
access to the document repositories in Tianocore-Docs
organization.

Please let me know if you did not receive an invite and
you require write access to the document repositories.

Thanks,

Mike

> -Original Message-
> From: Kinney, Michael D
> Sent: Monday, July 10, 2017 9:44 AM
> To: Laszlo Ersek ; Kinney, Michael D
> 
> Cc: edk2-devel@lists.01.org
> Subject: RE: [edk2] TianoCore-docs GitBook Documentation
> Process
> 
> Hi Laszlo,
> 
> Thanks for the quick feedback on this content.
> 
> Reponses included below, and I have already made some
> updates to the wiki based on your feedback.
> 
> Mike
> 
> > -Original Message-
> > From: Laszlo Ersek [mailto:ler...@redhat.com]
> > Sent: Saturday, July 8, 2017 2:36 PM
> > To: Kinney, Michael D 
> > Cc: edk2-devel@lists.01.org
> > Subject: Re: [edk2] TianoCore-docs GitBook Documentation
> Process
> >
> > Hi Mike,
> >
> > On 07/08/17 02:37, Kinney, Michael D wrote:
> > > Hello,
> > >
> > > I have added wiki pages that provide an overview of the
> > GitBook documentation
> > > process for TianoCore related documents.  These wiki pages
> are
> > attached to the
> > > EDK II Template Specification repository.  The link to the
> > approved RFC on this
> > > topic is also provided.
> > >
> > > https://github.com/tianocore-docs/edk2-
> > TemplateSpecification/wiki
> > >
> > > https://github.com/tianocore-docs/edk2-
> > TemplateSpecification/wiki/TianoCore-Documents-GitBook-
> > Overview#introduction
> > >
> > > I have also added a link to this content from the EDK II
> > Specification wiki page:
> > >
> > > https://github.com/tianocore/tianocore.github.io/wiki/EDK-
> II-
> > Specifications
> > >
> > > Please review and provide feedback if there are steps that
> are
> > missing or need clarification.
> >
> > This is a large set of articles, it must have been a lot of
> > work!
> >
> > I have four questions/ideas:
> >
> >
> > (1) The article at
> >  > TemplateSpecification/wiki/TianoCore-Documents-Services>
> > says,
> >
> >   3. Join the TianoCore-Docs organization on GitHub
> >
> > Can you send an invite? :) On the org page
> > , I looked for a button
> > saying
> > "request an invite" or some such, but came up empty.
> >
> > So what is the github way for joining an organization? I
> guess
> > the org
> > can send out invites at will, but "solicitation" in the other
> > direction
> > has to occur off-site? (Such as on this mailing list?)
> 
> I do not see a way for a developer to do the request either, so
> sending
> an invite looks to be the way to go here.  I would like the EDK
> II
> Maintainers that have write access to code to have same write
> access to
> Docs.  I will send those invites.
> 
> If anyone else wants write access that is not an EDK II
> Maintainer,
> then they would have to send an email request to edk2-devel.
> 
> I have updated the following page with the email request
> instructions
> 
>   https://github.com/tianocore-docs/edk2-
> TemplateSpecification/wiki/TianoCore-Documents-Services
> 
> >
> >
> > (2) The article at
> >  > TemplateSpecification/wiki/TianoCore-Documents-GitBook-
> Overview>
> > explains that there is some kind of (automated) syncing from
> the
> > tianocore-docs repos to GitBook.com.
> >
> > In case I'm looking at one of the official document git repos
> on
> > GitHub,
> > such as ,
> > what is
> > the fastest way to see an HTML rendered "DRAFT" (matching the
> > master
> > branch) on GitBook.com? Is there some URL pattern that one
> can
> > compose
> > manually, or is there a way to search for the book quickly on
> > GitBook.com?
> 
> A couple ways:
> 
> 1) Goto the GitBook homepage for tianocore-docs
> 
>   https://www.gitbook.com/@edk2-docs
> 
>All the books are listed and you can select any one
>of them.  The main page for a book has a "Read" button
>for the HTML version and a drop down box for PDF, MOBI,
>EPUB.
> 
>I have added this link to the intro paragraph and the
> "Resources"
>section on the TianoCore Documents GitBook Overview wiki
> page:
> 
>https://github.com/tianocore-docs/edk2-
> TemplateSpecification/wiki/TianoCore-Documents-GitBook-Overview
> 
> 
> 2) Goto GitBook.com, select "Explore" tab at the top, and enter
>keywords into searchbox in upper right.
> 
>If you type in a keyword such as "edk2" or "tiano" or
> something
>more specific like "fdf" you will see the search results
>for the books.  If you select one of the books, it will take
> you to
>the main page for that book where you can select the "Read"
> 

[edk2] [Patch] BaseTools/Build: Support python scripts in PREBUILD/POSTBUILD

2017-07-12 Thread Michael D Kinney
From: Michael Kinney 

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

Add shell=True in Popen() calls to support direct execution of
python scripts

Cc: Liming Gao 
Cc: Yonghong Zhu 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney 
---
 BaseTools/Source/Python/build/build.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/build/build.py 
b/BaseTools/Source/Python/build/build.py
index cfd28a4b5b..1e14fb4dcc 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1036,7 +1036,7 @@ class Build():
 os.remove(self.PlatformBuildPath)
 if sys.platform == "win32":
 args = ' && '.join((self.Prebuild, 'set > ' + PrebuildEnvFile))
-Process = Popen(args, stdout=PIPE, stderr=PIPE)
+Process = Popen(args, stdout=PIPE, stderr=PIPE, shell=True)
 else:
 args = ' && '.join((self.Prebuild, 'env > ' + PrebuildEnvFile))
 Process = Popen(args, stdout=PIPE, stderr=PIPE, shell=True)
@@ -1079,7 +1079,7 @@ class Build():
 if self.Postbuild:
 EdkLogger.info("\n- Postbuild Start -\n")
 if sys.platform == "win32":
-Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE)
+Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE, 
shell=True)
 else:
 Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE, 
shell=True)
 # launch two threads to read the STDOUT and STDERR
-- 
2.13.1.windows.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] OVMF Secure Boot variable storage issue

2017-07-12 Thread Konrad Rzeszutek Wilk
On Thu, Jul 06, 2017 at 02:55:27PM -0400, Jason Dickens wrote:
> Thanks for the response Bill. If I should recognize your name, I'm sorry,
> I'm bad with names, but I have been doing a lot of work with Wind River
> recently (and in the past) so its possible I should.
> 
> Actually, I should have mentioned I'm using Xen with full virtualization.
> This means that OVMF firmware can't change without rebuilding Xen. For
> reasons I don't know, it seems the Xen build uses the firmware image by
> first converting it to a C array and then compiling it in.
> 

That can be changed - it already has the mechanism to "slurp" binary
blobs from the host. The only reason it does that right now is mostly
historic - all BIOS images where compiled in 'hvmloader'.

> However, I'm not sure that's the real issue. As far as I'm aware, OVMF
> implements NvVars on the VM image to provide non-volatile storage instead of
> actually modifying the image. As I mentioned, "some" configuration changes
> do persist such as changing the screen resolution in the OVMF settings. Also
> I can see that NvVars is updating its modification time after setting secure
> boot variables. What I'm trying to determine is if there a particular reason
> or implementation problem that causes secure boot settings not persist.
> 
> 
> 
> On 7/6/2017 2:30 PM, Bill Paul wrote:
> > Of all the gin joints in all the towns in all the world, Jason Dickens had 
> > to
> > walk into mine at 10:31:18 on Thursday 06 July 2017 and say:
> > 
> > > All,
> > > 
> > > I'm trying to understand why the secure boot variables (PK, KEK, db,
> > > etc) when using the OVMF build are not retained across reboot? It seems
> > > that this code uses roughly the same SetVariable, GetVariable2 approach
> > > as say the PlatformConfig uses to store screen resolution (which is
> > > retained). Additionally, the NvVars file is being at least touched by
> > > the secure boot configuration. So why are none of the keys retained on
> > > the next reboot?
> > If you're running OVMF in the QEMU simulator, and you're using the -bios
> > option, try using the -pflash option instead.
> > 
> > I know that when using -bios, QEMU only pretends to allow writes to the
> > firmware region, and if you stop QEMU all changes are discarded. The same
> > might be true if you just trigger a hard reboot in the simulator too.
> > 
> > If you use -pflash instead, your changes will be saved. Note that this means
> > your OVMF image will be modified, so keep a copy of the original elsewhere 
> > so
> > that you can start over fresh again if you need to.
> > 
> > (Unfortunately I don't think OVMF has a "load factor defaults" option in its
> > internal menus.)
> > 
> > -Bill
> > > I know this was an issue in the past, but I haven't found the resolution?
> > > 
> > > Jason
> > > 
> > > 
> > > ___
> > > edk2-devel mailing list
> > > edk2-devel@lists.01.org
> > > https://lists.01.org/mailman/listinfo/edk2-devel
> 
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build Script.

2017-07-12 Thread lushifex
GCC build script clean up.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex 
---
 Platform/BroxtonPlatformPkg/BuildBios.sh | 43 +
 Platform/BroxtonPlatformPkg/BuildIFWI.sh | 64 +---
 2 files changed, 3 insertions(+), 104 deletions(-)

diff --git a/Platform/BroxtonPlatformPkg/BuildBios.sh 
b/Platform/BroxtonPlatformPkg/BuildBios.sh
index 2195af6..40d873e 100644
--- a/Platform/BroxtonPlatformPkg/BuildBios.sh
+++ b/Platform/BroxtonPlatformPkg/BuildBios.sh
@@ -94,40 +94,7 @@ EDK_SOURCE=$WORKSPACE
 ## Optional arguments
 for (( i=1; i<=$#; ))
   do
-if [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/Q" ]; then
-  Build_Flags="$Build_Flags --quiet"
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/L" ]; then
-  Build_Flags="$Build_Flags -j EDK2.log"
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/C" ]; then
-  echo "Removing previous Build files..."
-  if [ -d "Build" ]; then
-rm -r Build
-  fi
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/W" ]; then
-  SrcDebug=TRUE
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/SV" ]; then
-  SV_BIOS_ENABLE=TRUE
-  SV_String=_SV_
-  Arch=X64
-  echo "-- Forcing to 64-bit for SV build --"
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/PPV" ]; then
-  PPV_BIOS_ENABLE=TRUE
-  SV_String=_PPV_
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/RVVP" ]; then
-  RVVP_BIOS_ENABLE=TRUE
-  SV_String=_RVVP_
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/RVV" ]; then
-  RVV_BIOS_ENABLE=TRUE
-  SV_String=_RVV_
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/X64" ]; then
+if [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/X64" ]; then
   Arch=X64
   shift
 elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/B" ]; then
@@ -136,12 +103,6 @@ for (( i=1; i<=$#; ))
 elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/A" ]; then
   FabId=A
   shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/VP" ]; then
-  VP_BIOS_ENABLE=TRUE
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/CSLE" ]; then
-  CSLE_ENABLE=TRUE
-  shift
 else
   break
 fi
@@ -151,7 +112,7 @@ for (( i=1; i<=$#; ))
 if [ "$2" == "" ]; then
   echo 
   echo "Not Enough Arguments Provided"
-  echo "Please review the Help screen "/?""
+  echo "Please review the Help screen"
   ErrorExit
 fi
 
diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.sh 
b/Platform/BroxtonPlatformPkg/BuildIFWI.sh
index a315e0b..82d5f45 100755
--- a/Platform/BroxtonPlatformPkg/BuildIFWI.sh
+++ b/Platform/BroxtonPlatformPkg/BuildIFWI.sh
@@ -33,19 +33,9 @@ function Usage () {
 ## Assign initial values
 exitCode=0
 Build_Flags=
-Stitch_Flags=
 Arch=IA32
 FabId=B
 
-## Description of each Platform/Board_ID
-##   APLK - Netbook/Desktop (PCCG)
-##   BXTM - Phablet build (MCG)
-##   BXTM1 - Phablet build for BXT Die1(E0) (MCG)
-##   APLI - Embedded/IVI build (IOTG)
-eNB_RVP=APLK
-Phblt_RVP=BXTM
-Phblt_Die1_RVP=BXTM1
-Embd_RVP=APLI
 
 ## Parse Optional arguments
 if [ "$1" == "/?" ]; then
@@ -61,31 +51,7 @@ fi
 ## Build Flags
 for (( i=1; i<=$#; ))
   do
-if [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/Q" ]; then
-  Build_Flags="$Build_Flags /q"
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/L" ]; then
-  Build_Flags="$Build_Flags /l"
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/C" ]; then
-  Build_Flags="$Build_Flags /c"
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/W" ]; then
-  Build_Flags="$Build_Flags /w"
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/SV" ]; then
-  Build_Flags="$Build_Flags /sv"
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/PPV" ]; then
-  Build_Flags="$Build_Flags /ppv"
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/RVVP" ]; then
-  Build_Flags="$Build_Flags /rvvp"
-  shift
-   elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/RVV" ]; then
-  Build_Flags="$Build_Flags /rvv"
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/X64" ]; then
+if [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/X64" ]; then
   Arch=X64
   Build_Flags="$Build_Flags /x64"
   shift
@@ -97,39 +63,11 @@ for (( i=1; i<=$#; ))
   FabId=A
   Build_Flags="$Build_Flags /A"
   shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/VP" ]; then
-  Build_Flags="$Build_Flags /vp"
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/CSLE" ]; then
-  Build_Flags="$Build_Flags /csle"
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/SATA" ]; then
-  Build_Flags="$Build_Flags /sata"
-  shift
-elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/PCIE" ]; then
-  Build_Flags="$Build_Flags /pcie"
-  shift
 else
   break
 fi
   done
 
-## Stitch Flags
-for (( i=1; i<=$#; ))
-  do
-if [ "$1" == "/nG" ]; then
-