public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] BaseTools: --hash --binary-destination generate wrong binary path
@ 2018-03-16  7:03 Feng, YunhuaX
  2018-03-16 15:45 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: Feng, YunhuaX @ 2018-03-16  7:03 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: Zhu, Yonghong, Gao, Liming

Option --hash --binary-destination generate Binaries section in
the inf file, but the path of ASL file is begin with
Output directory,  so need replace Output directory with '',
will get the file name RamDisk.aml

Incorrect AML file path in inf file on linux:
[Binaries.X64]
  PE32|RamDiskDxe.efi

ASL|home/tiano/Desktop/hash/edk2/Build/OvmfX64/RELEASE_GCC5/X64
/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe/OUTPUT/RamDisk.aml
  DXE_DEPEX|RamDiskDxe.depex
  BIN|RamDiskDxeOffset.bin

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>
---
 BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 439e360955..95e3e912b1 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -4062,11 +4062,11 @@ class ModuleAutoGen(AutoGen):
             AsBuiltInfDict['module_pi_specification_version'] += [self.Specification['PI_SPECIFICATION_VERSION']]
 
         OutputDir = self.OutputDir.replace('\\', '/').strip('/')
         DebugDir = self.DebugDir.replace('\\', '/').strip('/')
         for Item in self.CodaTargetList:
-            File = Item.Target.Path.replace('\\', '/').strip('/').replace(DebugDir, '').strip('/')
+            File = Item.Target.Path.replace('\\', '/').strip('/').replace(DebugDir, '').replace(OutputDir, '').strip('/')
             if File not in self.OutputFile:
                 self.OutputFile.append(File)
             if os.path.isabs(File):
                 File = File.replace('\\', '/').strip('/').replace(OutputDir, '').strip('/')
             if Item.Target.Ext.lower() == '.aml':
-- 
2.12.2.windows.2



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

* Re: [PATCH] BaseTools: --hash --binary-destination generate wrong binary path
  2018-03-16  7:03 [PATCH] BaseTools: --hash --binary-destination generate wrong binary path Feng, YunhuaX
@ 2018-03-16 15:45 ` Gao, Liming
  0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2018-03-16 15:45 UTC (permalink / raw)
  To: Feng, YunhuaX, edk2-devel@lists.01.org

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Feng, YunhuaX
> Sent: Friday, March 16, 2018 3:03 PM
> To: edk2-devel@lists.01.org
> Cc: Zhu, Yonghong <yonghong.zhu@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [PATCH] BaseTools: --hash --binary-destination generate wrong binary path
> 
> Option --hash --binary-destination generate Binaries section in
> the inf file, but the path of ASL file is begin with
> Output directory,  so need replace Output directory with '',
> will get the file name RamDisk.aml
> 
> Incorrect AML file path in inf file on linux:
> [Binaries.X64]
>   PE32|RamDiskDxe.efi
> 
> ASL|home/tiano/Desktop/hash/edk2/Build/OvmfX64/RELEASE_GCC5/X64
> /MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe/OUTPUT/RamDisk.aml
>   DXE_DEPEX|RamDiskDxe.depex
>   BIN|RamDiskDxeOffset.bin
> 
> 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>
> ---
>  BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
> index 439e360955..95e3e912b1 100644
> --- a/BaseTools/Source/Python/AutoGen/AutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
> @@ -4062,11 +4062,11 @@ class ModuleAutoGen(AutoGen):
>              AsBuiltInfDict['module_pi_specification_version'] += [self.Specification['PI_SPECIFICATION_VERSION']]
> 
>          OutputDir = self.OutputDir.replace('\\', '/').strip('/')
>          DebugDir = self.DebugDir.replace('\\', '/').strip('/')
>          for Item in self.CodaTargetList:
> -            File = Item.Target.Path.replace('\\', '/').strip('/').replace(DebugDir, '').strip('/')
> +            File = Item.Target.Path.replace('\\', '/').strip('/').replace(DebugDir, '').replace(OutputDir, '').strip('/')
>              if File not in self.OutputFile:
>                  self.OutputFile.append(File)
>              if os.path.isabs(File):
>                  File = File.replace('\\', '/').strip('/').replace(OutputDir, '').strip('/')
>              if Item.Target.Ext.lower() == '.aml':
> --
> 2.12.2.windows.2



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

end of thread, other threads:[~2018-03-16 15:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-16  7:03 [PATCH] BaseTools: --hash --binary-destination generate wrong binary path Feng, YunhuaX
2018-03-16 15:45 ` Gao, Liming

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