* [Patch 0/2] Update the edk2.tianocore.org URL link @ 2016-09-14 6:23 Yonghong Zhu 2016-09-14 6:23 ` [Patch V2] BaseTools: Fix the bug to handle the read-only file Yonghong Zhu ` (3 more replies) 0 siblings, 4 replies; 7+ messages in thread From: Yonghong Zhu @ 2016-09-14 6:23 UTC (permalink / raw) To: edk2-devel The link http://edk2.tianocore.org is not valid, so update related link. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Yonghong Zhu (2): edksetup.sh: update the URL in edksetup.sh IntelFrameworkPkg/FrameworkSpecConformance.txt: Update the URL IntelFrameworkPkg/FrameworkSpecConformance.txt | 2 +- edksetup.sh | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) -- 2.6.1.windows.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Patch V2] BaseTools: Fix the bug to handle the read-only file 2016-09-14 6:23 [Patch 0/2] Update the edk2.tianocore.org URL link Yonghong Zhu @ 2016-09-14 6:23 ` Yonghong Zhu 2016-09-14 7:15 ` Gao, Liming 2016-09-14 6:23 ` [Patch 1/2] edksetup.sh: update the URL in edksetup.sh Yonghong Zhu ` (2 subsequent siblings) 3 siblings, 1 reply; 7+ messages in thread From: Yonghong Zhu @ 2016-09-14 6:23 UTC (permalink / raw) To: edk2-devel; +Cc: Liming Gao change the 'r+b' to 'rb' for some file's open, since these files we only read it and no need to write. It can fix the bug that the file's attribute had been set to read-only. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> --- BaseTools/Source/Python/GenFds/FfsFileStatement.py | 2 +- BaseTools/Source/Python/GenFds/Fv.py | 2 +- BaseTools/Source/Python/GenFds/FvImageSection.py | 4 ++-- BaseTools/Source/Python/GenFds/Region.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/FfsFileStatement.py b/BaseTools/Source/Python/GenFds/FfsFileStatement.py index 690826b..f76ddf4 100644 --- a/BaseTools/Source/Python/GenFds/FfsFileStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsFileStatement.py @@ -99,11 +99,11 @@ class FileStatement (FileStatementClassObject) : FileContent = '' MaxAlignIndex = 0 MaxAlignValue = 1 for Index, File in enumerate(self.FileName): try: - f = open(File, 'r+b') + f = open(File, 'rb') except: GenFdsGlobalVariable.ErrorLogger("Error opening RAW file %s." % (File)) Content = f.read() f.close() AlignValue = 1 diff --git a/BaseTools/Source/Python/GenFds/Fv.py b/BaseTools/Source/Python/GenFds/Fv.py index 64d1709..ab3f8b2 100644 --- a/BaseTools/Source/Python/GenFds/Fv.py +++ b/BaseTools/Source/Python/GenFds/Fv.py @@ -180,11 +180,11 @@ class FV (FvClassObject): # # Write the Fv contents to Buffer # if os.path.isfile(FvOutputFile): - FvFileObj = open ( FvOutputFile,'r+b') + FvFileObj = open ( FvOutputFile,'rb') GenFdsGlobalVariable.VerboseLogger( "\nGenerate %s FV Successfully" %self.UiFvName) GenFdsGlobalVariable.SharpCounter = 0 Buffer.write(FvFileObj.read()) diff --git a/BaseTools/Source/Python/GenFds/FvImageSection.py b/BaseTools/Source/Python/GenFds/FvImageSection.py index 748d02f..5989978 100644 --- a/BaseTools/Source/Python/GenFds/FvImageSection.py +++ b/BaseTools/Source/Python/GenFds/FvImageSection.py @@ -62,11 +62,11 @@ class FvImageSection(FvImageSectionClassObject): MaxFvAlignment = 0 for FvFileName in FileList: FvAlignmentValue = 0 if os.path.isfile(FvFileName): - FvFileObj = open (FvFileName,'r+b') + FvFileObj = open (FvFileName,'rb') FvFileObj.seek(0) # PI FvHeader is 0x48 byte FvHeaderBuffer = FvFileObj.read(0x48) # FV alignment position. FvAlignmentValue = 1 << (ord (FvHeaderBuffer[0x2E]) & 0x1F) @@ -107,11 +107,11 @@ class FvImageSection(FvImageSectionClassObject): self.Alignment = Fv.FvAlignment else: if self.FvFileName != None: FvFileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FvFileName) if os.path.isfile(FvFileName): - FvFileObj = open (FvFileName,'r+b') + FvFileObj = open (FvFileName,'rb') FvFileObj.seek(0) # PI FvHeader is 0x48 byte FvHeaderBuffer = FvFileObj.read(0x48) # FV alignment position. FvAlignmentValue = 1 << (ord (FvHeaderBuffer[0x2E]) & 0x1F) diff --git a/BaseTools/Source/Python/GenFds/Region.py b/BaseTools/Source/Python/GenFds/Region.py index e393286..945c548 100644 --- a/BaseTools/Source/Python/GenFds/Region.py +++ b/BaseTools/Source/Python/GenFds/Region.py @@ -146,11 +146,11 @@ class Region(RegionClassObject): FileLength = os.stat(FileName)[ST_SIZE] if FileLength > Size: EdkLogger.error("GenFds", GENFDS_ERROR, "Size of FV File (%s) is larger than Region Size 0x%X specified." \ % (RegionData, Size)) - BinFile = open(FileName, 'r+b') + BinFile = open(FileName, 'rb') Buffer.write(BinFile.read()) BinFile.close() Size = Size - FileLength # # Pad the left buffer @@ -199,11 +199,11 @@ class Region(RegionClassObject): FileLength = os.stat(FileName)[ST_SIZE] if FileLength > Size: EdkLogger.error("GenFds", GENFDS_ERROR, "Size 0x%X of Capsule File (%s) is larger than Region Size 0x%X specified." \ % (FileLength, RegionData, Size)) - BinFile = open(FileName, 'r+b') + BinFile = open(FileName, 'rb') Buffer.write(BinFile.read()) BinFile.close() Size = Size - FileLength # # Pad the left buffer -- 2.6.1.windows.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Patch V2] BaseTools: Fix the bug to handle the read-only file 2016-09-14 6:23 ` [Patch V2] BaseTools: Fix the bug to handle the read-only file Yonghong Zhu @ 2016-09-14 7:15 ` Gao, Liming 0 siblings, 0 replies; 7+ messages in thread From: Gao, Liming @ 2016-09-14 7:15 UTC (permalink / raw) To: Zhu, Yonghong, edk2-devel@lists.01.org Reviewed-by: Liming Gao <liming.gao@intel.com> > -----Original Message----- > From: Zhu, Yonghong > Sent: Wednesday, September 14, 2016 2:24 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming <liming.gao@intel.com> > Subject: [Patch V2] BaseTools: Fix the bug to handle the read-only file > > change the 'r+b' to 'rb' for some file's open, since these files we only > read it and no need to write. It can fix the bug that the file's attribute > had been set to read-only. > > Cc: Liming Gao <liming.gao@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> > --- > BaseTools/Source/Python/GenFds/FfsFileStatement.py | 2 +- > BaseTools/Source/Python/GenFds/Fv.py | 2 +- > BaseTools/Source/Python/GenFds/FvImageSection.py | 4 ++-- > BaseTools/Source/Python/GenFds/Region.py | 4 ++-- > 4 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/BaseTools/Source/Python/GenFds/FfsFileStatement.py > b/BaseTools/Source/Python/GenFds/FfsFileStatement.py > index 690826b..f76ddf4 100644 > --- a/BaseTools/Source/Python/GenFds/FfsFileStatement.py > +++ b/BaseTools/Source/Python/GenFds/FfsFileStatement.py > @@ -99,11 +99,11 @@ class FileStatement (FileStatementClassObject) : > FileContent = '' > MaxAlignIndex = 0 > MaxAlignValue = 1 > for Index, File in enumerate(self.FileName): > try: > - f = open(File, 'r+b') > + f = open(File, 'rb') > except: > GenFdsGlobalVariable.ErrorLogger("Error opening RAW > file %s." % (File)) > Content = f.read() > f.close() > AlignValue = 1 > diff --git a/BaseTools/Source/Python/GenFds/Fv.py > b/BaseTools/Source/Python/GenFds/Fv.py > index 64d1709..ab3f8b2 100644 > --- a/BaseTools/Source/Python/GenFds/Fv.py > +++ b/BaseTools/Source/Python/GenFds/Fv.py > @@ -180,11 +180,11 @@ class FV (FvClassObject): > > # > # Write the Fv contents to Buffer > # > if os.path.isfile(FvOutputFile): > - FvFileObj = open ( FvOutputFile,'r+b') > + FvFileObj = open ( FvOutputFile,'rb') > > GenFdsGlobalVariable.VerboseLogger( "\nGenerate %s FV > Successfully" %self.UiFvName) > GenFdsGlobalVariable.SharpCounter = 0 > > Buffer.write(FvFileObj.read()) > diff --git a/BaseTools/Source/Python/GenFds/FvImageSection.py > b/BaseTools/Source/Python/GenFds/FvImageSection.py > index 748d02f..5989978 100644 > --- a/BaseTools/Source/Python/GenFds/FvImageSection.py > +++ b/BaseTools/Source/Python/GenFds/FvImageSection.py > @@ -62,11 +62,11 @@ class FvImageSection(FvImageSectionClassObject): > > MaxFvAlignment = 0 > for FvFileName in FileList: > FvAlignmentValue = 0 > if os.path.isfile(FvFileName): > - FvFileObj = open (FvFileName,'r+b') > + FvFileObj = open (FvFileName,'rb') > FvFileObj.seek(0) > # PI FvHeader is 0x48 byte > FvHeaderBuffer = FvFileObj.read(0x48) > # FV alignment position. > FvAlignmentValue = 1 << (ord (FvHeaderBuffer[0x2E]) & 0x1F) > @@ -107,11 +107,11 @@ class FvImageSection(FvImageSectionClassObject): > self.Alignment = Fv.FvAlignment > else: > if self.FvFileName != None: > FvFileName = > GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FvFileName) > if os.path.isfile(FvFileName): > - FvFileObj = open (FvFileName,'r+b') > + FvFileObj = open (FvFileName,'rb') > FvFileObj.seek(0) > # PI FvHeader is 0x48 byte > FvHeaderBuffer = FvFileObj.read(0x48) > # FV alignment position. > FvAlignmentValue = 1 << (ord (FvHeaderBuffer[0x2E]) & 0x1F) > diff --git a/BaseTools/Source/Python/GenFds/Region.py > b/BaseTools/Source/Python/GenFds/Region.py > index e393286..945c548 100644 > --- a/BaseTools/Source/Python/GenFds/Region.py > +++ b/BaseTools/Source/Python/GenFds/Region.py > @@ -146,11 +146,11 @@ class Region(RegionClassObject): > FileLength = os.stat(FileName)[ST_SIZE] > if FileLength > Size: > EdkLogger.error("GenFds", GENFDS_ERROR, > "Size of FV File (%s) is larger than Region Size 0x%X > specified." \ > % (RegionData, Size)) > - BinFile = open(FileName, 'r+b') > + BinFile = open(FileName, 'rb') > Buffer.write(BinFile.read()) > BinFile.close() > Size = Size - FileLength > # > # Pad the left buffer > @@ -199,11 +199,11 @@ class Region(RegionClassObject): > FileLength = os.stat(FileName)[ST_SIZE] > if FileLength > Size: > EdkLogger.error("GenFds", GENFDS_ERROR, > "Size 0x%X of Capsule File (%s) is larger than Region Size > 0x%X specified." \ > % (FileLength, RegionData, Size)) > - BinFile = open(FileName, 'r+b') > + BinFile = open(FileName, 'rb') > Buffer.write(BinFile.read()) > BinFile.close() > Size = Size - FileLength > # > # Pad the left buffer > -- > 2.6.1.windows.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Patch 1/2] edksetup.sh: update the URL in edksetup.sh 2016-09-14 6:23 [Patch 0/2] Update the edk2.tianocore.org URL link Yonghong Zhu 2016-09-14 6:23 ` [Patch V2] BaseTools: Fix the bug to handle the read-only file Yonghong Zhu @ 2016-09-14 6:23 ` Yonghong Zhu 2016-09-14 6:23 ` [Patch 2/2] IntelFrameworkPkg/FrameworkSpecConformance.txt: Update the URL Yonghong Zhu 2016-09-14 7:14 ` [Patch 0/2] Update the edk2.tianocore.org URL link Gao, Liming 3 siblings, 0 replies; 7+ messages in thread From: Yonghong Zhu @ 2016-09-14 6:23 UTC (permalink / raw) To: edk2-devel; +Cc: Liming Gao 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> --- edksetup.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/edksetup.sh b/edksetup.sh index 57368b5..27c0994 100755 --- a/edksetup.sh +++ b/edksetup.sh @@ -1,30 +1,27 @@ # -# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # 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 # http://opensource.org/licenses/bsd-license.php # # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # # In *inux environment, the build tools's source is required and need to be compiled -# firstly, please reference https://edk2.tianocore.org/unix-getting-started.html to +# firstly, please reference https://github.com/tianocore/tianocore.github.io/wiki/SourceForge-to-Github-Quick-Start # to get how to setup build tool. # -# After build tool is downloaded and compiled, a soft symbol linker need to be created -# at <workspace>/Conf. For example: ln -s /work/BaseTools /work/edk2/Conf/BaseToolsSource. -# # Setup the environment for unix-like systems running a bash-like shell. # This file must be "sourced" not merely executed. For example: ". edksetup.sh" # # CYGWIN users: Your path and filename related environment variables should be # set up in the unix style. This script will make the necessary conversions to # windows style. # -# Please reference edk2 user manual for more detail descriptions at https://edk2.tianocore.org/files/documents/64/494/EDKII_UserManual.pdf +# Please reference edk2 user manual for more detail descriptions at https://github.com/tianocore-docs/Docs/raw/master/User_Docs/EDK_II_UserManual_0_7.pdf # function HelpMsg() { echo Please note: This script must be \'sourced\' so the environment can be changed. -- 2.6.1.windows.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Patch 2/2] IntelFrameworkPkg/FrameworkSpecConformance.txt: Update the URL 2016-09-14 6:23 [Patch 0/2] Update the edk2.tianocore.org URL link Yonghong Zhu 2016-09-14 6:23 ` [Patch V2] BaseTools: Fix the bug to handle the read-only file Yonghong Zhu 2016-09-14 6:23 ` [Patch 1/2] edksetup.sh: update the URL in edksetup.sh Yonghong Zhu @ 2016-09-14 6:23 ` Yonghong Zhu 2016-09-14 7:04 ` Fan, Jeff 2016-09-14 7:14 ` [Patch 0/2] Update the edk2.tianocore.org URL link Gao, Liming 3 siblings, 1 reply; 7+ messages in thread From: Yonghong Zhu @ 2016-09-14 6:23 UTC (permalink / raw) To: edk2-devel; +Cc: Liming Gao, Jeff Fan Update the URL since http://edk2.tianocore.org is not valid Cc: Liming Gao <liming.gao@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> --- IntelFrameworkPkg/FrameworkSpecConformance.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IntelFrameworkPkg/FrameworkSpecConformance.txt b/IntelFrameworkPkg/FrameworkSpecConformance.txt index 36644c8..2aba2cb 100644 --- a/IntelFrameworkPkg/FrameworkSpecConformance.txt +++ b/IntelFrameworkPkg/FrameworkSpecConformance.txt @@ -1,9 +1,9 @@ ## # This file is used to document mismatches between Intel Platform Innovation Framework specification # (http://www.intel.com/technology/framework/spec.htm) and data structures defind at IntelFrameworkPkg -# package in EdkII Open Source Project (https://edk2.tianocore.org/source/browse/edk2/trunk/edk2/IntelFrameworkPkg) +# package in EdkII Open Source Project (https://github.com/tianocore/edk2/tree/master/IntelFrameworkPkg) ## ## # The general consideration about keeping the mismatches in EdkII: # 1. Some definitions defined in Framework specification may bring a little complexity on implementation. EdkII -- 2.6.1.windows.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Patch 2/2] IntelFrameworkPkg/FrameworkSpecConformance.txt: Update the URL 2016-09-14 6:23 ` [Patch 2/2] IntelFrameworkPkg/FrameworkSpecConformance.txt: Update the URL Yonghong Zhu @ 2016-09-14 7:04 ` Fan, Jeff 0 siblings, 0 replies; 7+ messages in thread From: Fan, Jeff @ 2016-09-14 7:04 UTC (permalink / raw) To: Zhu, Yonghong, edk2-devel@lists.01.org; +Cc: Gao, Liming Reviewed-by: Jeff Fan <jeff.fan@intel.com> -----Original Message----- From: Zhu, Yonghong Sent: Wednesday, September 14, 2016 2:24 PM To: edk2-devel@lists.01.org Cc: Gao, Liming; Fan, Jeff Subject: [Patch 2/2] IntelFrameworkPkg/FrameworkSpecConformance.txt: Update the URL Update the URL since http://edk2.tianocore.org is not valid Cc: Liming Gao <liming.gao@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> --- IntelFrameworkPkg/FrameworkSpecConformance.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IntelFrameworkPkg/FrameworkSpecConformance.txt b/IntelFrameworkPkg/FrameworkSpecConformance.txt index 36644c8..2aba2cb 100644 --- a/IntelFrameworkPkg/FrameworkSpecConformance.txt +++ b/IntelFrameworkPkg/FrameworkSpecConformance.txt @@ -1,9 +1,9 @@ ## # This file is used to document mismatches between Intel Platform Innovation Framework specification # (http://www.intel.com/technology/framework/spec.htm) and data structures defind at IntelFrameworkPkg -# package in EdkII Open Source Project (https://edk2.tianocore.org/source/browse/edk2/trunk/edk2/IntelFrameworkPkg) +# package in EdkII Open Source Project +(https://github.com/tianocore/edk2/tree/master/IntelFrameworkPkg) ## ## # The general consideration about keeping the mismatches in EdkII: # 1. Some definitions defined in Framework specification may bring a little complexity on implementation. EdkII -- 2.6.1.windows.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Patch 0/2] Update the edk2.tianocore.org URL link 2016-09-14 6:23 [Patch 0/2] Update the edk2.tianocore.org URL link Yonghong Zhu ` (2 preceding siblings ...) 2016-09-14 6:23 ` [Patch 2/2] IntelFrameworkPkg/FrameworkSpecConformance.txt: Update the URL Yonghong Zhu @ 2016-09-14 7:14 ` Gao, Liming 3 siblings, 0 replies; 7+ messages in thread From: Gao, Liming @ 2016-09-14 7:14 UTC (permalink / raw) To: Zhu, Yonghong, edk2-devel@lists.01.org Reviewed-by: Liming Gao <liming.gao@intel.com> > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Yonghong Zhu > Sent: Wednesday, September 14, 2016 2:24 PM > To: edk2-devel@lists.01.org > Subject: [edk2] [Patch 0/2] Update the edk2.tianocore.org URL link > > The link http://edk2.tianocore.org is not valid, so update related link. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> > > Yonghong Zhu (2): > edksetup.sh: update the URL in edksetup.sh > IntelFrameworkPkg/FrameworkSpecConformance.txt: Update the URL > > IntelFrameworkPkg/FrameworkSpecConformance.txt | 2 +- > edksetup.sh | 9 +++------ > 2 files changed, 4 insertions(+), 7 deletions(-) > > -- > 2.6.1.windows.1 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-09-14 7:15 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-09-14 6:23 [Patch 0/2] Update the edk2.tianocore.org URL link Yonghong Zhu 2016-09-14 6:23 ` [Patch V2] BaseTools: Fix the bug to handle the read-only file Yonghong Zhu 2016-09-14 7:15 ` Gao, Liming 2016-09-14 6:23 ` [Patch 1/2] edksetup.sh: update the URL in edksetup.sh Yonghong Zhu 2016-09-14 6:23 ` [Patch 2/2] IntelFrameworkPkg/FrameworkSpecConformance.txt: Update the URL Yonghong Zhu 2016-09-14 7:04 ` Fan, Jeff 2016-09-14 7:14 ` [Patch 0/2] Update the edk2.tianocore.org URL link Gao, Liming
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox