[edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

PierreGondois posted 4 patches 3 years, 10 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC}               | 28 +++----
BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat}     |  0
BaseTools/Conf/build_rule.template                                 | 15 +++-
BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} | 82 ++++++++------------
BaseTools/Source/Python/AutoGen/BuildEngine.py                     |  2 +-
BaseTools/Source/Python/AutoGen/GenMake.py                         |  6 ++
BaseTools/Source/Python/AutoGen/ModuleAutoGen.py                   | 38 +++++----
7 files changed, 89 insertions(+), 82 deletions(-)
rename BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC} (97%)
rename BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat} (100%)
rename BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} (52%)
[edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file
Posted by PierreGondois 3 years, 10 months ago
Following the BZ at https://bugzilla.tianocore.org/show_bug.cgi?id=2425
This patch serie is a another way to solve the dependency
of C files over ASL files. With this new method, the
dependency is resolved at the linking stage.

The last method to solve this dependency was to add
the possibility to modify INF files to depict such a
dependency. This method was not accepted. The discussion
is available at https://edk2.groups.io/g/devel/topic/72655342#56658

The last patch modifying the INF specification and INF
parsing are available at:
https://edk2.groups.io/g/devel/topic/72655342#56658
https://edk2.groups.io/g/devel/topic/72656060#56662

Pierre Gondois (4):
  BaseTools: Generate multiple rules when multiple output files
  BaseTools: Rename AmlToHex script to AmlToC
  BaseTools: Compile AML bytecode arrays into .obj file
  BaseTools: Fix string concatenation

 BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC}               | 28 +++----
 BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat}     |  0
 BaseTools/Conf/build_rule.template                                 | 15 +++-
 BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} | 82 ++++++++------------
 BaseTools/Source/Python/AutoGen/BuildEngine.py                     |  2 +-
 BaseTools/Source/Python/AutoGen/GenMake.py                         |  6 ++
 BaseTools/Source/Python/AutoGen/ModuleAutoGen.py                   | 38 +++++----
 7 files changed, 89 insertions(+), 82 deletions(-)
 rename BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC} (97%)
 rename BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat} (100%)
 rename BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} (52%)

-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61643): https://edk2.groups.io/g/devel/message/61643
Mute This Topic: https://groups.io/mt/75078123/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file
Posted by Bob Feng 3 years, 10 months ago
Hi Pierre,

There are some build failed in OpenCI. Would you please check it?
https://github.com/tianocore/edk2/pull/727

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Wednesday, June 24, 2020 5:09 PM
To: devel@edk2.groups.io
Cc: Pierre Gondois <Pierre.Gondois@arm.com>; sami.mujawar@arm.com; tomas.pilar@arm.com; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; nd@arm.com
Subject: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Following the BZ at https://bugzilla.tianocore.org/show_bug.cgi?id=2425
This patch serie is a another way to solve the dependency of C files over ASL files. With this new method, the dependency is resolved at the linking stage.

The last method to solve this dependency was to add the possibility to modify INF files to depict such a dependency. This method was not accepted. The discussion is available at https://edk2.groups.io/g/devel/topic/72655342#56658

The last patch modifying the INF specification and INF parsing are available at:
https://edk2.groups.io/g/devel/topic/72655342#56658
https://edk2.groups.io/g/devel/topic/72656060#56662

Pierre Gondois (4):
  BaseTools: Generate multiple rules when multiple output files
  BaseTools: Rename AmlToHex script to AmlToC
  BaseTools: Compile AML bytecode arrays into .obj file
  BaseTools: Fix string concatenation

 BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC}               | 28 +++----
 BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat}     |  0
 BaseTools/Conf/build_rule.template                                 | 15 +++-
 BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} | 82 ++++++++------------
 BaseTools/Source/Python/AutoGen/BuildEngine.py                     |  2 +-
 BaseTools/Source/Python/AutoGen/GenMake.py                         |  6 ++
 BaseTools/Source/Python/AutoGen/ModuleAutoGen.py                   | 38 +++++----
 7 files changed, 89 insertions(+), 82 deletions(-)  rename BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC} (97%)  rename BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat} (100%)  rename BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} (52%)

--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61687): https://edk2.groups.io/g/devel/message/61687
Mute This Topic: https://groups.io/mt/75078123/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file
Posted by PierreGondois 3 years, 10 months ago
Hello Bob,
I believe the line endings of the BaseTools/BinWrappers/PosixLike/AmlToC script have been modified to CRLF when I sent the patch. I created a pull request from the linked github branch noted in the patches. It is available at https://github.com/PierreARM/edk2/commits/803_Compile_AML_bytecode_array_into_OBJ_file_v3 . The pull request is available here (to show the result of the CI tests) https://github.com/tianocore/edk2/pull/729 .
Do you want a v4 or is it possible to pull the patches from the github repository?
Sorry for the inconvenience.

Regards,
Pierre

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng via groups.io
Sent: 24 June 2020 16:16
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

There are some build failed in OpenCI. Would you please check it?
https://github.com/tianocore/edk2/pull/727

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Wednesday, June 24, 2020 5:09 PM
To: devel@edk2.groups.io
Cc: Pierre Gondois <Pierre.Gondois@arm.com>; sami.mujawar@arm.com; tomas.pilar@arm.com; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; nd@arm.com
Subject: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Following the BZ at https://bugzilla.tianocore.org/show_bug.cgi?id=2425
This patch serie is a another way to solve the dependency of C files over ASL files. With this new method, the dependency is resolved at the linking stage.

The last method to solve this dependency was to add the possibility to modify INF files to depict such a dependency. This method was not accepted. The discussion is available at https://edk2.groups.io/g/devel/topic/72655342#56658

The last patch modifying the INF specification and INF parsing are available at:
https://edk2.groups.io/g/devel/topic/72655342#56658
https://edk2.groups.io/g/devel/topic/72656060#56662

Pierre Gondois (4):
  BaseTools: Generate multiple rules when multiple output files
  BaseTools: Rename AmlToHex script to AmlToC
  BaseTools: Compile AML bytecode arrays into .obj file
  BaseTools: Fix string concatenation

 BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC}               | 28 +++----
 BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat}     |  0
 BaseTools/Conf/build_rule.template                                 | 15 +++-
 BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} | 82 ++++++++------------
 BaseTools/Source/Python/AutoGen/BuildEngine.py                     |  2 +-
 BaseTools/Source/Python/AutoGen/GenMake.py                         |  6 ++
 BaseTools/Source/Python/AutoGen/ModuleAutoGen.py                   | 38 +++++----
 7 files changed, 89 insertions(+), 82 deletions(-)  rename BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC} (97%)  rename BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat} (100%)  rename BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} (52%)

--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'








-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61707): https://edk2.groups.io/g/devel/message/61707
Mute This Topic: https://groups.io/mt/75078123/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file
Posted by Bob Feng 3 years, 10 months ago
Hi Pierre,

Please send patch v4. 

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Thursday, June 25, 2020 5:31 PM
To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hello Bob,
I believe the line endings of the BaseTools/BinWrappers/PosixLike/AmlToC script have been modified to CRLF when I sent the patch. I created a pull request from the linked github branch noted in the patches. It is available at https://github.com/PierreARM/edk2/commits/803_Compile_AML_bytecode_array_into_OBJ_file_v3 . The pull request is available here (to show the result of the CI tests) https://github.com/tianocore/edk2/pull/729 .
Do you want a v4 or is it possible to pull the patches from the github repository?
Sorry for the inconvenience.

Regards,
Pierre

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng via groups.io
Sent: 24 June 2020 16:16
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

There are some build failed in OpenCI. Would you please check it?
https://github.com/tianocore/edk2/pull/727

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Wednesday, June 24, 2020 5:09 PM
To: devel@edk2.groups.io
Cc: Pierre Gondois <Pierre.Gondois@arm.com>; sami.mujawar@arm.com; tomas.pilar@arm.com; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; nd@arm.com
Subject: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Following the BZ at https://bugzilla.tianocore.org/show_bug.cgi?id=2425
This patch serie is a another way to solve the dependency of C files over ASL files. With this new method, the dependency is resolved at the linking stage.

The last method to solve this dependency was to add the possibility to modify INF files to depict such a dependency. This method was not accepted. The discussion is available at https://edk2.groups.io/g/devel/topic/72655342#56658

The last patch modifying the INF specification and INF parsing are available at:
https://edk2.groups.io/g/devel/topic/72655342#56658
https://edk2.groups.io/g/devel/topic/72656060#56662

Pierre Gondois (4):
  BaseTools: Generate multiple rules when multiple output files
  BaseTools: Rename AmlToHex script to AmlToC
  BaseTools: Compile AML bytecode arrays into .obj file
  BaseTools: Fix string concatenation

 BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC}               | 28 +++----
 BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat}     |  0
 BaseTools/Conf/build_rule.template                                 | 15 +++-
 BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} | 82 ++++++++------------
 BaseTools/Source/Python/AutoGen/BuildEngine.py                     |  2 +-
 BaseTools/Source/Python/AutoGen/GenMake.py                         |  6 ++
 BaseTools/Source/Python/AutoGen/ModuleAutoGen.py                   | 38 +++++----
 7 files changed, 89 insertions(+), 82 deletions(-)  rename BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC} (97%)  rename BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat} (100%)  rename BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} (52%)

--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'











-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61718): https://edk2.groups.io/g/devel/message/61718
Mute This Topic: https://groups.io/mt/75078123/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file
Posted by Bob Feng 3 years, 10 months ago
Hi Pierre,

I met a problem when I push your patch set.

If I change the CRLF to a unix format EOL, the patch can't pass PatchCheck.py.
If I don't change the CRLF, The build on Linux will fail.
So I can't make the patch set pass the CI.

Could you share me how did you do to make your PR 729 pass?

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Thursday, June 25, 2020 5:31 PM
To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hello Bob,
I believe the line endings of the BaseTools/BinWrappers/PosixLike/AmlToC script have been modified to CRLF when I sent the patch. I created a pull request from the linked github branch noted in the patches. It is available at https://github.com/PierreARM/edk2/commits/803_Compile_AML_bytecode_array_into_OBJ_file_v3 . The pull request is available here (to show the result of the CI tests) https://github.com/tianocore/edk2/pull/729 .
Do you want a v4 or is it possible to pull the patches from the github repository?
Sorry for the inconvenience.

Regards,
Pierre

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng via groups.io
Sent: 24 June 2020 16:16
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

There are some build failed in OpenCI. Would you please check it?
https://github.com/tianocore/edk2/pull/727

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Wednesday, June 24, 2020 5:09 PM
To: devel@edk2.groups.io
Cc: Pierre Gondois <Pierre.Gondois@arm.com>; sami.mujawar@arm.com; tomas.pilar@arm.com; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; nd@arm.com
Subject: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Following the BZ at https://bugzilla.tianocore.org/show_bug.cgi?id=2425
This patch serie is a another way to solve the dependency of C files over ASL files. With this new method, the dependency is resolved at the linking stage.

The last method to solve this dependency was to add the possibility to modify INF files to depict such a dependency. This method was not accepted. The discussion is available at https://edk2.groups.io/g/devel/topic/72655342#56658

The last patch modifying the INF specification and INF parsing are available at:
https://edk2.groups.io/g/devel/topic/72655342#56658
https://edk2.groups.io/g/devel/topic/72656060#56662

Pierre Gondois (4):
  BaseTools: Generate multiple rules when multiple output files
  BaseTools: Rename AmlToHex script to AmlToC
  BaseTools: Compile AML bytecode arrays into .obj file
  BaseTools: Fix string concatenation

 BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC}               | 28 +++----
 BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat}     |  0
 BaseTools/Conf/build_rule.template                                 | 15 +++-
 BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} | 82 ++++++++------------
 BaseTools/Source/Python/AutoGen/BuildEngine.py                     |  2 +-
 BaseTools/Source/Python/AutoGen/GenMake.py                         |  6 ++
 BaseTools/Source/Python/AutoGen/ModuleAutoGen.py                   | 38 +++++----
 7 files changed, 89 insertions(+), 82 deletions(-)  rename BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC} (97%)  rename BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat} (100%)  rename BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} (52%)

--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'











-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61766): https://edk2.groups.io/g/devel/message/61766
Mute This Topic: https://groups.io/mt/75078123/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file
Posted by PierreGondois 3 years, 10 months ago
Hello Bob,
The PR729 didn't pass the PatchCheck for the patch adding the LF line endings to the script in BaseTools/BinWrappers/PosixLike, this is for the patch named "BaseTools: Rename AmlToHex script to AmlToC" (cf the following link: https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=8860&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=9c939e41-62c2-5605-5e05-fc3554afc9f5&l=76).
However, I thought it was a normal behaviour. Indeed, PatchCheck.py is triggering an error for any file with LF line endings, except when:
 - the file has a ".sh" extension
 - the filename is in .gitmodules (it is coming from another git repo)
 - the file mode of the file is 160000  (it is coming from another git repo)
The new AmlToC posix script doesn't match any of these conditions. However some other files are in the same conditions. I searched the files containing the "#!usr/bin/env" string and which don't have a ".sh" extension. I tried to run the PatchCheck.py script on their respective commit with the version of PatchCheck.py that existed at that time and the same CRLF error appeared. The list of these files is at the end of the mail. Renaming them with a ".sh" extension would break the build on linux: the extension of the file is important to locate a file. This is not the case on windows (and this explains why all the scripts in BaseTools\BinWrappers\WindowsLike have a .bat extension).
All the bash scripts not having a ".sh" extension are located in BaseTools/Bin/CYGWIN_NT-5.1-i686/ or BaseTools/BinWrappers/PosixLike/ . A solution would be to add an exception to the CRLF check for these two folders.

A small question: when applying the patch set, did BaseTools\BinWrappers\PosixLike\AmlToC have CRLF line endings and you had to manually modify them to linux line endings, or where the line endings already correct (linux LF line endings)?

Regards,
Pierre

The list of bash scripts without a ".sh" extension:
BaseTools/Bin/CYGWIN_NT-5.1-i686/BootSectImage
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/build
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/BuildEnv
commit 66a2dc96d3dff90b4243c4ed3e7eaa33abdcdf3c
Date:   2012-02-15T08:06:01+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/Ecc
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/EfiLdrImage
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/EfiRom
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/GenCrc32
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/GenDepex
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFds
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFfs
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFv
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFw
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/GenPage
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/GenSec
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/GenVtf
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/GnuGenBootSector
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaCompress
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaF86Compress
commit 2e351cbe8e190271b3716284fc1076551d005472
Date:   2019-04-03T16:03:11-07:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/RunBinToolFromBuildDir
commit 66a2dc96d3dff90b4243c4ed3e7eaa33abdcdf3c
Date:   2012-02-15T08:06:01+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/RunToolFromSource
commit 66a2dc96d3dff90b4243c4ed3e7eaa33abdcdf3c
Date:   2012-02-15T08:06:01+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/Split
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/TargetTool
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/TianoCompress
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/Trim
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/VfrCompile
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/Bin/CYGWIN_NT-5.1-i686/VolInfo
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/BinWrappers/PosixLike/AmlToC
commit 68fe454598fea8472f65283656c4e9abe06dadb3 (HEAD -> pg/803_Compile_AML_bytecode_array_into_OBJ_file)
Date:   2020-06-25T13:44:09+01:00

BaseTools/BinWrappers/PosixLike/BPDG
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/Brotli
commit de87f23291620d36d69ec55ea53a1c38b8780f0b
Date:   2017-03-30T16:23:10+08:00

BaseTools/BinWrappers/PosixLike/BrotliCompress
commit 2e351cbe8e190271b3716284fc1076551d005472
Date:   2019-04-03T16:03:11-07:00

BaseTools/BinWrappers/PosixLike/build
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/DevicePath
commit 7dbc50bd244d95fdc1741b9cfc561f0bfd724de1
Date:   2017-12-27T14:12:29+08:00

BaseTools/BinWrappers/PosixLike/Ecc
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/EfiRom
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/BinWrappers/PosixLike/GenCrc32
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/BinWrappers/PosixLike/GenDepex
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/GenerateCapsule
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/GenFds
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/GenFfs
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/BinWrappers/PosixLike/GenFv
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/BinWrappers/PosixLike/GenFw
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/BinWrappers/PosixLike/GenPatchPcdTable
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/GenSec
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/BinWrappers/PosixLike/LzmaCompress
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/BinWrappers/PosixLike/LzmaF86Compress
commit 2e351cbe8e190271b3716284fc1076551d005472
Date:   2019-04-03T16:03:11-07:00

BaseTools/BinWrappers/PosixLike/PatchPcdValue
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/Pkcs7Sign
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/Rsa2048Sha256GenerateKeys
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/Rsa2048Sha256Sign
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/Split
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/BinWrappers/PosixLike/TargetTool
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/TianoCompress
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/BinWrappers/PosixLike/Trim
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/UPT
commit 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa
Date:   2018-12-28T16:25:04+08:00

BaseTools/BinWrappers/PosixLike/VfrCompile
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

BaseTools/BinWrappers/PosixLike/VolInfo
commit 5e407648358d639ed19d228303527133e4c95c25
Date:   2016-01-20T05:12:02+00:00

-----Original Message-----
From: Feng, Bob C <bob.c.feng@intel.com> 
Sent: 28 June 2020 08:34
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: RE: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

I met a problem when I push your patch set.

If I change the CRLF to a unix format EOL, the patch can't pass PatchCheck.py.
If I don't change the CRLF, The build on Linux will fail.
So I can't make the patch set pass the CI.

Could you share me how did you do to make your PR 729 pass?

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Thursday, June 25, 2020 5:31 PM
To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hello Bob,
I believe the line endings of the BaseTools/BinWrappers/PosixLike/AmlToC script have been modified to CRLF when I sent the patch. I created a pull request from the linked github branch noted in the patches. It is available at https://github.com/PierreARM/edk2/commits/803_Compile_AML_bytecode_array_into_OBJ_file_v3 . The pull request is available here (to show the result of the CI tests) https://github.com/tianocore/edk2/pull/729 .
Do you want a v4 or is it possible to pull the patches from the github repository?
Sorry for the inconvenience.

Regards,
Pierre

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng via groups.io
Sent: 24 June 2020 16:16
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

There are some build failed in OpenCI. Would you please check it?
https://github.com/tianocore/edk2/pull/727

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Wednesday, June 24, 2020 5:09 PM
To: devel@edk2.groups.io
Cc: Pierre Gondois <Pierre.Gondois@arm.com>; sami.mujawar@arm.com; tomas.pilar@arm.com; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; nd@arm.com
Subject: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Following the BZ at https://bugzilla.tianocore.org/show_bug.cgi?id=2425
This patch serie is a another way to solve the dependency of C files over ASL files. With this new method, the dependency is resolved at the linking stage.

The last method to solve this dependency was to add the possibility to modify INF files to depict such a dependency. This method was not accepted. The discussion is available at https://edk2.groups.io/g/devel/topic/72655342#56658

The last patch modifying the INF specification and INF parsing are available at:
https://edk2.groups.io/g/devel/topic/72655342#56658
https://edk2.groups.io/g/devel/topic/72656060#56662

Pierre Gondois (4):
  BaseTools: Generate multiple rules when multiple output files
  BaseTools: Rename AmlToHex script to AmlToC
  BaseTools: Compile AML bytecode arrays into .obj file
  BaseTools: Fix string concatenation

 BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC}               | 28 +++----
 BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat}     |  0
 BaseTools/Conf/build_rule.template                                 | 15 +++-
 BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} | 82 ++++++++------------
 BaseTools/Source/Python/AutoGen/BuildEngine.py                     |  2 +-
 BaseTools/Source/Python/AutoGen/GenMake.py                         |  6 ++
 BaseTools/Source/Python/AutoGen/ModuleAutoGen.py                   | 38 +++++----
 7 files changed, 89 insertions(+), 82 deletions(-)  rename BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC} (97%)  rename BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat} (100%)  rename BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} (52%)

--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'











-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61769): https://edk2.groups.io/g/devel/message/61769
Mute This Topic: https://groups.io/mt/75078123/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file
Posted by PierreGondois 3 years, 10 months ago
Hello Bob,
I actually found more files having a LF line ending by running the following command:
for file in `git ls-files`; do if [ "${file##*.}" != bin ] && [ "${file##*.}" != bmp ] && [ "${file##*.}" != a ] && [ "${file##*.}" != lib ] && [ "${file##*.}" != cer ] && [ "${file##*.}" != pyd ] &&[ "${file##*.}" != pem ] && [ "${file##*.}" != raw ]; then file $file | grep -v "CRLF" | grep -v ": directory"; fi; done
The command list files referenced in git, then excludes files with specific extensions, excludes directories, and excludes files with CRLF line endings.

I believe some of them should have CRLF line endings if this is the default in edk2. I am mainly thinking about the ".rtf", ".py" and ".txt" files. For the actual bash scripts, maybe a ".gitattributes" file can be created in edk2 to explicitly make them use LF line endings. This can be done by setting this attribute: "eol=lf".
This ".gitattributes" file would then be parsed by the PatchCHeck.py script not to trigger an error for files having the later attribute.

Regards,
Pierre

List of files obtained by running the command above, (maybe it needs some more filters):
BaseTools/Bin/CYGWIN_NT-5.1-i686/BootSectImage: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/BuildEnv: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/Ecc: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/EfiLdrImage: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/EfiRom: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenCrc32: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenDepex: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFds: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFfs: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFv: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFw: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenPage: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenSec: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenVtf: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GnuGenBootSector: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaCompress: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaF86Compress: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/RunBinToolFromBuildDir: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/RunToolFromSource: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/Split: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/TargetTool: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/TianoCompress: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/Trim: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/VfrCompile: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/VolInfo: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/build: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/BPDG: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Brotli: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/BrotliCompress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/DevicePath: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Ecc: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/EfiRom: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenCrc32: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenDepex: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFds: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFfs: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFv: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFw: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenPatchPcdTable: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenSec: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenerateCapsule: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/LzmaCompress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/LzmaF86Compress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/PatchPcdValue: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Pkcs7Sign: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Rsa2048Sha256GenerateKeys: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Rsa2048Sha256Sign: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Split: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/TargetTool: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/TianoCompress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Trim: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/UPT: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/VfrCompile: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/VolInfo: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/build: Bourne-Again shell script, ASCII text executable
BaseTools/BuildEnv: ASCII text
BaseTools/Source/C/VfrCompile/Pccts/KNOWN_PROBLEMS.txt: data
BaseTools/Source/C/VfrCompile/Pccts/history.ps: PostScript document text conforming DSC level 3.0
BaseTools/Source/Python/Ecc/CParser3/__init__.py: empty
BaseTools/Source/Python/Ecc/CParser4/__init__.py: empty
BaseTools/Source/Python/Eot/CParser3/__init__.py: empty
BaseTools/Source/Python/Eot/CParser4/__init__.py: empty
BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer.inc: ASCII text, with very long lines, with no line terminators
BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc: ASCII text, with very long lines, with no line terminators
BaseTools/UserManuals/Build_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/EfiRom_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenCrc32_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenDepex_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFds_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFfs_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFv_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFw_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenPatchPcdTable_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenSec_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/Intel_UEFI_Packaging_Tool_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/LzmaCompress_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/PatchPcdValue_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/SplitFile_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/TargetTool_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/TianoCompress_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/Trim_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/UtilityManPage_template.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/VfrCompiler_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/VolInfo_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
CryptoPkg/Library/Include/internal/dso_conf.h: C source, ASCII text
CryptoPkg/Library/OpensslLib/process_files.pl: Perl script text executable
EmbeddedPkg/Library/FdtLib/TODO: ASCII text
EmbeddedPkg/Library/FdtLib/fdt_overlay.c: C source, ASCII text
EmulatorPkg/Unix/.gdbinit: ASCII text
EmulatorPkg/Unix/GdbRun.sh: ASCII text
EmulatorPkg/Unix/Host/X11IncludeHack: ASCII text, with no line terminators
EmulatorPkg/Unix/Xcode/xcode_project32/XcodeBuild.sh: Bourne-Again shell script, ASCII text executable
EmulatorPkg/Unix/Xcode/xcode_project32/xcode_project.xcodeproj/default.pbxuser: ASCII text
EmulatorPkg/Unix/Xcode/xcode_project32/xcode_project.xcodeproj/project.pbxproj: ASCII text
EmulatorPkg/Unix/Xcode/xcode_project64/XcodeBuild.sh: Bourne-Again shell script, ASCII text executable
EmulatorPkg/Unix/Xcode/xcode_project64/xcode_project.xcodeproj/default.pbxuser: ASCII text
EmulatorPkg/Unix/Xcode/xcode_project64/xcode_project.xcodeproj/project.pbxproj: ASCII text
EmulatorPkg/Unix/lldbinit: ASCII text
EmulatorPkg/build.sh: Bourne-Again shell script, ASCII text executable
OvmfPkg/QemuVideoDxe/VbeShim.sh: POSIX shell script, ASCII text executable
OvmfPkg/build.sh: Bourne-Again shell script, ASCII text executable
edksetup.sh: ASCII text


-----Original Message-----
From: Feng, Bob C <bob.c.feng@intel.com> 
Sent: 28 June 2020 08:34
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: RE: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

I met a problem when I push your patch set.

If I change the CRLF to a unix format EOL, the patch can't pass PatchCheck.py.
If I don't change the CRLF, The build on Linux will fail.
So I can't make the patch set pass the CI.

Could you share me how did you do to make your PR 729 pass?

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Thursday, June 25, 2020 5:31 PM
To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hello Bob,
I believe the line endings of the BaseTools/BinWrappers/PosixLike/AmlToC script have been modified to CRLF when I sent the patch. I created a pull request from the linked github branch noted in the patches. It is available at https://github.com/PierreARM/edk2/commits/803_Compile_AML_bytecode_array_into_OBJ_file_v3 . The pull request is available here (to show the result of the CI tests) https://github.com/tianocore/edk2/pull/729 .
Do you want a v4 or is it possible to pull the patches from the github repository?
Sorry for the inconvenience.

Regards,
Pierre

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng via groups.io
Sent: 24 June 2020 16:16
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

There are some build failed in OpenCI. Would you please check it?
https://github.com/tianocore/edk2/pull/727

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Wednesday, June 24, 2020 5:09 PM
To: devel@edk2.groups.io
Cc: Pierre Gondois <Pierre.Gondois@arm.com>; sami.mujawar@arm.com; tomas.pilar@arm.com; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; nd@arm.com
Subject: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Following the BZ at https://bugzilla.tianocore.org/show_bug.cgi?id=2425
This patch serie is a another way to solve the dependency of C files over ASL files. With this new method, the dependency is resolved at the linking stage.

The last method to solve this dependency was to add the possibility to modify INF files to depict such a dependency. This method was not accepted. The discussion is available at https://edk2.groups.io/g/devel/topic/72655342#56658

The last patch modifying the INF specification and INF parsing are available at:
https://edk2.groups.io/g/devel/topic/72655342#56658
https://edk2.groups.io/g/devel/topic/72656060#56662

Pierre Gondois (4):
  BaseTools: Generate multiple rules when multiple output files
  BaseTools: Rename AmlToHex script to AmlToC
  BaseTools: Compile AML bytecode arrays into .obj file
  BaseTools: Fix string concatenation

 BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC}               | 28 +++----
 BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat}     |  0
 BaseTools/Conf/build_rule.template                                 | 15 +++-
 BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} | 82 ++++++++------------
 BaseTools/Source/Python/AutoGen/BuildEngine.py                     |  2 +-
 BaseTools/Source/Python/AutoGen/GenMake.py                         |  6 ++
 BaseTools/Source/Python/AutoGen/ModuleAutoGen.py                   | 38 +++++----
 7 files changed, 89 insertions(+), 82 deletions(-)  rename BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC} (97%)  rename BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat} (100%)  rename BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} (52%)

--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'











-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61802): https://edk2.groups.io/g/devel/message/61802
Mute This Topic: https://groups.io/mt/75078123/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file
Posted by Bob Feng 3 years, 10 months ago
Hi Pierre,

I think we need to update the PatchCheck.py script. The comments says, "Do not enforce CR/LF line endings for linux shell scripts.", but that only check the file ext is .sh is not enough.

if self.filename.endswith('.sh'):
                    #
                    # Do not enforce CR/LF line endings for linux shell scripts.
                    #
                    self.force_crlf = False

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Monday, June 29, 2020 10:33 PM
To: Feng, Bob C <bob.c.feng@intel.com>; devel@edk2.groups.io
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hello Bob,
I actually found more files having a LF line ending by running the following command:
for file in `git ls-files`; do if [ "${file##*.}" != bin ] && [ "${file##*.}" != bmp ] && [ "${file##*.}" != a ] && [ "${file##*.}" != lib ] && [ "${file##*.}" != cer ] && [ "${file##*.}" != pyd ] &&[ "${file##*.}" != pem ] && [ "${file##*.}" != raw ]; then file $file | grep -v "CRLF" | grep -v ": directory"; fi; done The command list files referenced in git, then excludes files with specific extensions, excludes directories, and excludes files with CRLF line endings.

I believe some of them should have CRLF line endings if this is the default in edk2. I am mainly thinking about the ".rtf", ".py" and ".txt" files. For the actual bash scripts, maybe a ".gitattributes" file can be created in edk2 to explicitly make them use LF line endings. This can be done by setting this attribute: "eol=lf".
This ".gitattributes" file would then be parsed by the PatchCHeck.py script not to trigger an error for files having the later attribute.

Regards,
Pierre

List of files obtained by running the command above, (maybe it needs some more filters):
BaseTools/Bin/CYGWIN_NT-5.1-i686/BootSectImage: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/BuildEnv: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/Ecc: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/EfiLdrImage: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/EfiRom: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenCrc32: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenDepex: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFds: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFfs: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFv: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFw: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenPage: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenSec: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenVtf: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GnuGenBootSector: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaCompress: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaF86Compress: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/RunBinToolFromBuildDir: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/RunToolFromSource: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/Split: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/TargetTool: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/TianoCompress: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/Trim: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/VfrCompile: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/VolInfo: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/build: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/BPDG: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Brotli: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/BrotliCompress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/DevicePath: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Ecc: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/EfiRom: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenCrc32: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenDepex: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFds: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFfs: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFv: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFw: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenPatchPcdTable: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenSec: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenerateCapsule: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/LzmaCompress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/LzmaF86Compress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/PatchPcdValue: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Pkcs7Sign: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Rsa2048Sha256GenerateKeys: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Rsa2048Sha256Sign: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Split: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/TargetTool: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/TianoCompress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Trim: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/UPT: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/VfrCompile: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/VolInfo: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/build: Bourne-Again shell script, ASCII text executable
BaseTools/BuildEnv: ASCII text
BaseTools/Source/C/VfrCompile/Pccts/KNOWN_PROBLEMS.txt: data
BaseTools/Source/C/VfrCompile/Pccts/history.ps: PostScript document text conforming DSC level 3.0
BaseTools/Source/Python/Ecc/CParser3/__init__.py: empty
BaseTools/Source/Python/Ecc/CParser4/__init__.py: empty
BaseTools/Source/Python/Eot/CParser3/__init__.py: empty
BaseTools/Source/Python/Eot/CParser4/__init__.py: empty
BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer.inc: ASCII text, with very long lines, with no line terminators
BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc: ASCII text, with very long lines, with no line terminators
BaseTools/UserManuals/Build_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/EfiRom_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenCrc32_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenDepex_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFds_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFfs_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFv_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFw_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenPatchPcdTable_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenSec_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/Intel_UEFI_Packaging_Tool_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/LzmaCompress_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/PatchPcdValue_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/SplitFile_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/TargetTool_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/TianoCompress_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/Trim_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/UtilityManPage_template.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/VfrCompiler_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/VolInfo_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
CryptoPkg/Library/Include/internal/dso_conf.h: C source, ASCII text
CryptoPkg/Library/OpensslLib/process_files.pl: Perl script text executable
EmbeddedPkg/Library/FdtLib/TODO: ASCII text
EmbeddedPkg/Library/FdtLib/fdt_overlay.c: C source, ASCII text
EmulatorPkg/Unix/.gdbinit: ASCII text
EmulatorPkg/Unix/GdbRun.sh: ASCII text
EmulatorPkg/Unix/Host/X11IncludeHack: ASCII text, with no line terminators
EmulatorPkg/Unix/Xcode/xcode_project32/XcodeBuild.sh: Bourne-Again shell script, ASCII text executable
EmulatorPkg/Unix/Xcode/xcode_project32/xcode_project.xcodeproj/default.pbxuser: ASCII text
EmulatorPkg/Unix/Xcode/xcode_project32/xcode_project.xcodeproj/project.pbxproj: ASCII text
EmulatorPkg/Unix/Xcode/xcode_project64/XcodeBuild.sh: Bourne-Again shell script, ASCII text executable
EmulatorPkg/Unix/Xcode/xcode_project64/xcode_project.xcodeproj/default.pbxuser: ASCII text
EmulatorPkg/Unix/Xcode/xcode_project64/xcode_project.xcodeproj/project.pbxproj: ASCII text
EmulatorPkg/Unix/lldbinit: ASCII text
EmulatorPkg/build.sh: Bourne-Again shell script, ASCII text executable
OvmfPkg/QemuVideoDxe/VbeShim.sh: POSIX shell script, ASCII text executable
OvmfPkg/build.sh: Bourne-Again shell script, ASCII text executable
edksetup.sh: ASCII text


-----Original Message-----
From: Feng, Bob C <bob.c.feng@intel.com>
Sent: 28 June 2020 08:34
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: RE: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

I met a problem when I push your patch set.

If I change the CRLF to a unix format EOL, the patch can't pass PatchCheck.py.
If I don't change the CRLF, The build on Linux will fail.
So I can't make the patch set pass the CI.

Could you share me how did you do to make your PR 729 pass?

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Thursday, June 25, 2020 5:31 PM
To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hello Bob,
I believe the line endings of the BaseTools/BinWrappers/PosixLike/AmlToC script have been modified to CRLF when I sent the patch. I created a pull request from the linked github branch noted in the patches. It is available at https://github.com/PierreARM/edk2/commits/803_Compile_AML_bytecode_array_into_OBJ_file_v3 . The pull request is available here (to show the result of the CI tests) https://github.com/tianocore/edk2/pull/729 .
Do you want a v4 or is it possible to pull the patches from the github repository?
Sorry for the inconvenience.

Regards,
Pierre

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng via groups.io
Sent: 24 June 2020 16:16
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

There are some build failed in OpenCI. Would you please check it?
https://github.com/tianocore/edk2/pull/727

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Wednesday, June 24, 2020 5:09 PM
To: devel@edk2.groups.io
Cc: Pierre Gondois <Pierre.Gondois@arm.com>; sami.mujawar@arm.com; tomas.pilar@arm.com; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; nd@arm.com
Subject: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Following the BZ at https://bugzilla.tianocore.org/show_bug.cgi?id=2425
This patch serie is a another way to solve the dependency of C files over ASL files. With this new method, the dependency is resolved at the linking stage.

The last method to solve this dependency was to add the possibility to modify INF files to depict such a dependency. This method was not accepted. The discussion is available at https://edk2.groups.io/g/devel/topic/72655342#56658

The last patch modifying the INF specification and INF parsing are available at:
https://edk2.groups.io/g/devel/topic/72655342#56658
https://edk2.groups.io/g/devel/topic/72656060#56662

Pierre Gondois (4):
  BaseTools: Generate multiple rules when multiple output files
  BaseTools: Rename AmlToHex script to AmlToC
  BaseTools: Compile AML bytecode arrays into .obj file
  BaseTools: Fix string concatenation

 BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC}               | 28 +++----
 BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat}     |  0
 BaseTools/Conf/build_rule.template                                 | 15 +++-
 BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} | 82 ++++++++------------
 BaseTools/Source/Python/AutoGen/BuildEngine.py                     |  2 +-
 BaseTools/Source/Python/AutoGen/GenMake.py                         |  6 ++
 BaseTools/Source/Python/AutoGen/ModuleAutoGen.py                   | 38 +++++----
 7 files changed, 89 insertions(+), 82 deletions(-)  rename BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC} (97%)  rename BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat} (100%)  rename BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} (52%)

--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'














-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61833): https://edk2.groups.io/g/devel/message/61833
Mute This Topic: https://groups.io/mt/75078123/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file
Posted by PierreGondois 3 years, 10 months ago
I agree that PatchCheck.py needs to be updated. However, this is difficult for PatchCheck.py to know whether a file should be allowed to have LF line endings or not. Some files currently in edk2 have LF line endings and:
 - have a ".sh" extension (EmulatorPkg/build.sh), some other don't (BaseTools/BinWrappers/PosixLike/GenFv);
 - start with "#!/usr/bin/env bash" (BaseTools/BinWrappers/PosixLike/GenFv), some other don't (edksetup.sh);
I don't see any criteria that would allow to identify whether a file is supposed to have LF line endings or not. This is why I think creating a ".gitattribute" file in edk2 would help. In this file, people could identify files/folders being allowed to have LF line endings. PatchCheck.py would parse this file to exclude them from the CRLF check. Plus it would enforce the line ending on local copies of edk2, thus preventing mistakes like I did when sending a bash script with CRLF line endings.
Do you agree with this solution?

Another question: does the CRLF error triggered by PatchCheck.py imply delaying this current patch set? Indeed I'm scared trying to add a ".gitattribute" file might start long discussions.

Regards,
Pierre

-----Original Message-----
From: Feng, Bob C <bob.c.feng@intel.com> 
Sent: 30 June 2020 11:59
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: RE: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

I think we need to update the PatchCheck.py script. The comments says, "Do not enforce CR/LF line endings for linux shell scripts.", but that only check the file ext is .sh is not enough.

if self.filename.endswith('.sh'):
                    #
                    # Do not enforce CR/LF line endings for linux shell scripts.
                    #
                    self.force_crlf = False

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Monday, June 29, 2020 10:33 PM
To: Feng, Bob C <bob.c.feng@intel.com>; devel@edk2.groups.io
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hello Bob,
I actually found more files having a LF line ending by running the following command:
for file in `git ls-files`; do if [ "${file##*.}" != bin ] && [ "${file##*.}" != bmp ] && [ "${file##*.}" != a ] && [ "${file##*.}" != lib ] && [ "${file##*.}" != cer ] && [ "${file##*.}" != pyd ] &&[ "${file##*.}" != pem ] && [ "${file##*.}" != raw ]; then file $file | grep -v "CRLF" | grep -v ": directory"; fi; done The command list files referenced in git, then excludes files with specific extensions, excludes directories, and excludes files with CRLF line endings.

I believe some of them should have CRLF line endings if this is the default in edk2. I am mainly thinking about the ".rtf", ".py" and ".txt" files. For the actual bash scripts, maybe a ".gitattributes" file can be created in edk2 to explicitly make them use LF line endings. This can be done by setting this attribute: "eol=lf".
This ".gitattributes" file would then be parsed by the PatchCHeck.py script not to trigger an error for files having the later attribute.

Regards,
Pierre

List of files obtained by running the command above, (maybe it needs some more filters):
BaseTools/Bin/CYGWIN_NT-5.1-i686/BootSectImage: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/BuildEnv: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/Ecc: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/EfiLdrImage: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/EfiRom: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenCrc32: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenDepex: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFds: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFfs: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFv: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFw: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenPage: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenSec: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenVtf: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GnuGenBootSector: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaCompress: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaF86Compress: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/RunBinToolFromBuildDir: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/RunToolFromSource: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/Split: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/TargetTool: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/TianoCompress: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/Trim: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/VfrCompile: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/VolInfo: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/build: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/BPDG: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Brotli: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/BrotliCompress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/DevicePath: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Ecc: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/EfiRom: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenCrc32: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenDepex: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFds: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFfs: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFv: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFw: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenPatchPcdTable: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenSec: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenerateCapsule: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/LzmaCompress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/LzmaF86Compress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/PatchPcdValue: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Pkcs7Sign: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Rsa2048Sha256GenerateKeys: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Rsa2048Sha256Sign: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Split: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/TargetTool: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/TianoCompress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Trim: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/UPT: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/VfrCompile: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/VolInfo: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/build: Bourne-Again shell script, ASCII text executable
BaseTools/BuildEnv: ASCII text
BaseTools/Source/C/VfrCompile/Pccts/KNOWN_PROBLEMS.txt: data
BaseTools/Source/C/VfrCompile/Pccts/history.ps: PostScript document text conforming DSC level 3.0
BaseTools/Source/Python/Ecc/CParser3/__init__.py: empty
BaseTools/Source/Python/Ecc/CParser4/__init__.py: empty
BaseTools/Source/Python/Eot/CParser3/__init__.py: empty
BaseTools/Source/Python/Eot/CParser4/__init__.py: empty
BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer.inc: ASCII text, with very long lines, with no line terminators
BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc: ASCII text, with very long lines, with no line terminators
BaseTools/UserManuals/Build_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/EfiRom_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenCrc32_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenDepex_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFds_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFfs_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFv_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFw_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenPatchPcdTable_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenSec_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/Intel_UEFI_Packaging_Tool_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/LzmaCompress_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/PatchPcdValue_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/SplitFile_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/TargetTool_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/TianoCompress_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/Trim_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/UtilityManPage_template.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/VfrCompiler_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/VolInfo_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
CryptoPkg/Library/Include/internal/dso_conf.h: C source, ASCII text
CryptoPkg/Library/OpensslLib/process_files.pl: Perl script text executable
EmbeddedPkg/Library/FdtLib/TODO: ASCII text
EmbeddedPkg/Library/FdtLib/fdt_overlay.c: C source, ASCII text
EmulatorPkg/Unix/.gdbinit: ASCII text
EmulatorPkg/Unix/GdbRun.sh: ASCII text
EmulatorPkg/Unix/Host/X11IncludeHack: ASCII text, with no line terminators
EmulatorPkg/Unix/Xcode/xcode_project32/XcodeBuild.sh: Bourne-Again shell script, ASCII text executable
EmulatorPkg/Unix/Xcode/xcode_project32/xcode_project.xcodeproj/default.pbxuser: ASCII text
EmulatorPkg/Unix/Xcode/xcode_project32/xcode_project.xcodeproj/project.pbxproj: ASCII text
EmulatorPkg/Unix/Xcode/xcode_project64/XcodeBuild.sh: Bourne-Again shell script, ASCII text executable
EmulatorPkg/Unix/Xcode/xcode_project64/xcode_project.xcodeproj/default.pbxuser: ASCII text
EmulatorPkg/Unix/Xcode/xcode_project64/xcode_project.xcodeproj/project.pbxproj: ASCII text
EmulatorPkg/Unix/lldbinit: ASCII text
EmulatorPkg/build.sh: Bourne-Again shell script, ASCII text executable
OvmfPkg/QemuVideoDxe/VbeShim.sh: POSIX shell script, ASCII text executable
OvmfPkg/build.sh: Bourne-Again shell script, ASCII text executable
edksetup.sh: ASCII text


-----Original Message-----
From: Feng, Bob C <bob.c.feng@intel.com>
Sent: 28 June 2020 08:34
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: RE: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

I met a problem when I push your patch set.

If I change the CRLF to a unix format EOL, the patch can't pass PatchCheck.py.
If I don't change the CRLF, The build on Linux will fail.
So I can't make the patch set pass the CI.

Could you share me how did you do to make your PR 729 pass?

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Thursday, June 25, 2020 5:31 PM
To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hello Bob,
I believe the line endings of the BaseTools/BinWrappers/PosixLike/AmlToC script have been modified to CRLF when I sent the patch. I created a pull request from the linked github branch noted in the patches. It is available at https://github.com/PierreARM/edk2/commits/803_Compile_AML_bytecode_array_into_OBJ_file_v3 . The pull request is available here (to show the result of the CI tests) https://github.com/tianocore/edk2/pull/729 .
Do you want a v4 or is it possible to pull the patches from the github repository?
Sorry for the inconvenience.

Regards,
Pierre

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng via groups.io
Sent: 24 June 2020 16:16
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

There are some build failed in OpenCI. Would you please check it?
https://github.com/tianocore/edk2/pull/727

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Wednesday, June 24, 2020 5:09 PM
To: devel@edk2.groups.io
Cc: Pierre Gondois <Pierre.Gondois@arm.com>; sami.mujawar@arm.com; tomas.pilar@arm.com; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; nd@arm.com
Subject: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Following the BZ at https://bugzilla.tianocore.org/show_bug.cgi?id=2425
This patch serie is a another way to solve the dependency of C files over ASL files. With this new method, the dependency is resolved at the linking stage.

The last method to solve this dependency was to add the possibility to modify INF files to depict such a dependency. This method was not accepted. The discussion is available at https://edk2.groups.io/g/devel/topic/72655342#56658

The last patch modifying the INF specification and INF parsing are available at:
https://edk2.groups.io/g/devel/topic/72655342#56658
https://edk2.groups.io/g/devel/topic/72656060#56662

Pierre Gondois (4):
  BaseTools: Generate multiple rules when multiple output files
  BaseTools: Rename AmlToHex script to AmlToC
  BaseTools: Compile AML bytecode arrays into .obj file
  BaseTools: Fix string concatenation

 BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC}               | 28 +++----
 BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat}     |  0
 BaseTools/Conf/build_rule.template                                 | 15 +++-
 BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} | 82 ++++++++------------
 BaseTools/Source/Python/AutoGen/BuildEngine.py                     |  2 +-
 BaseTools/Source/Python/AutoGen/GenMake.py                         |  6 ++
 BaseTools/Source/Python/AutoGen/ModuleAutoGen.py                   | 38 +++++----
 7 files changed, 89 insertions(+), 82 deletions(-)  rename BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC} (97%)  rename BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat} (100%)  rename BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} (52%)

--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'














-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61856): https://edk2.groups.io/g/devel/message/61856
Mute This Topic: https://groups.io/mt/75078123/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file
Posted by Bob Feng 3 years, 10 months ago
Hi Pierre,

Yes. if the patch set can't pass CI, it can't be merged.

I think we can add a check for the file path. The scripts under BinWrappers\PosixLike are all linux shell scripts.

Thanks,
Bob 

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Tuesday, June 30, 2020 9:56 PM
To: Feng, Bob C <bob.c.feng@intel.com>; devel@edk2.groups.io
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

I agree that PatchCheck.py needs to be updated. However, this is difficult for PatchCheck.py to know whether a file should be allowed to have LF line endings or not. Some files currently in edk2 have LF line endings and:
 - have a ".sh" extension (EmulatorPkg/build.sh), some other don't (BaseTools/BinWrappers/PosixLike/GenFv);
 - start with "#!/usr/bin/env bash" (BaseTools/BinWrappers/PosixLike/GenFv), some other don't (edksetup.sh); I don't see any criteria that would allow to identify whether a file is supposed to have LF line endings or not. This is why I think creating a ".gitattribute" file in edk2 would help. In this file, people could identify files/folders being allowed to have LF line endings. PatchCheck.py would parse this file to exclude them from the CRLF check. Plus it would enforce the line ending on local copies of edk2, thus preventing mistakes like I did when sending a bash script with CRLF line endings.
Do you agree with this solution?

Another question: does the CRLF error triggered by PatchCheck.py imply delaying this current patch set? Indeed I'm scared trying to add a ".gitattribute" file might start long discussions.

Regards,
Pierre

-----Original Message-----
From: Feng, Bob C <bob.c.feng@intel.com>
Sent: 30 June 2020 11:59
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: RE: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

I think we need to update the PatchCheck.py script. The comments says, "Do not enforce CR/LF line endings for linux shell scripts.", but that only check the file ext is .sh is not enough.

if self.filename.endswith('.sh'):
                    #
                    # Do not enforce CR/LF line endings for linux shell scripts.
                    #
                    self.force_crlf = False

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Monday, June 29, 2020 10:33 PM
To: Feng, Bob C <bob.c.feng@intel.com>; devel@edk2.groups.io
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hello Bob,
I actually found more files having a LF line ending by running the following command:
for file in `git ls-files`; do if [ "${file##*.}" != bin ] && [ "${file##*.}" != bmp ] && [ "${file##*.}" != a ] && [ "${file##*.}" != lib ] && [ "${file##*.}" != cer ] && [ "${file##*.}" != pyd ] &&[ "${file##*.}" != pem ] && [ "${file##*.}" != raw ]; then file $file | grep -v "CRLF" | grep -v ": directory"; fi; done The command list files referenced in git, then excludes files with specific extensions, excludes directories, and excludes files with CRLF line endings.

I believe some of them should have CRLF line endings if this is the default in edk2. I am mainly thinking about the ".rtf", ".py" and ".txt" files. For the actual bash scripts, maybe a ".gitattributes" file can be created in edk2 to explicitly make them use LF line endings. This can be done by setting this attribute: "eol=lf".
This ".gitattributes" file would then be parsed by the PatchCHeck.py script not to trigger an error for files having the later attribute.

Regards,
Pierre

List of files obtained by running the command above, (maybe it needs some more filters):
BaseTools/Bin/CYGWIN_NT-5.1-i686/BootSectImage: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/BuildEnv: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/Ecc: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/EfiLdrImage: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/EfiRom: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenCrc32: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenDepex: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFds: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFfs: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFv: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenFw: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenPage: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenSec: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GenVtf: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/GnuGenBootSector: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaCompress: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/LzmaF86Compress: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/RunBinToolFromBuildDir: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/RunToolFromSource: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/Split: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/TargetTool: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/TianoCompress: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/Trim: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/VfrCompile: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/VolInfo: Bourne-Again shell script, ASCII text executable
BaseTools/Bin/CYGWIN_NT-5.1-i686/build: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/BPDG: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Brotli: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/BrotliCompress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/DevicePath: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Ecc: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/EfiRom: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenCrc32: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenDepex: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFds: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFfs: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFv: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenFw: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenPatchPcdTable: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenSec: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/GenerateCapsule: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/LzmaCompress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/LzmaF86Compress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/PatchPcdValue: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Pkcs7Sign: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Rsa2048Sha256GenerateKeys: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Rsa2048Sha256Sign: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Split: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/TargetTool: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/TianoCompress: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/Trim: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/UPT: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/VfrCompile: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/VolInfo: Bourne-Again shell script, ASCII text executable
BaseTools/BinWrappers/PosixLike/build: Bourne-Again shell script, ASCII text executable
BaseTools/BuildEnv: ASCII text
BaseTools/Source/C/VfrCompile/Pccts/KNOWN_PROBLEMS.txt: data
BaseTools/Source/C/VfrCompile/Pccts/history.ps: PostScript document text conforming DSC level 3.0
BaseTools/Source/Python/Ecc/CParser3/__init__.py: empty
BaseTools/Source/Python/Ecc/CParser4/__init__.py: empty
BaseTools/Source/Python/Eot/CParser3/__init__.py: empty
BaseTools/Source/Python/Eot/CParser4/__init__.py: empty
BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer.inc: ASCII text, with very long lines, with no line terminators
BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc: ASCII text, with very long lines, with no line terminators
BaseTools/UserManuals/Build_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/EfiRom_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenCrc32_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenDepex_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFds_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFfs_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFv_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenFw_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenPatchPcdTable_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/GenSec_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/Intel_UEFI_Packaging_Tool_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/LzmaCompress_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/PatchPcdValue_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/SplitFile_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/TargetTool_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/TianoCompress_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/Trim_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/UtilityManPage_template.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/VfrCompiler_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
BaseTools/UserManuals/VolInfo_Utility_Man_Page.rtf: Rich Text Format data, version 1, unknown character set
CryptoPkg/Library/Include/internal/dso_conf.h: C source, ASCII text
CryptoPkg/Library/OpensslLib/process_files.pl: Perl script text executable
EmbeddedPkg/Library/FdtLib/TODO: ASCII text
EmbeddedPkg/Library/FdtLib/fdt_overlay.c: C source, ASCII text
EmulatorPkg/Unix/.gdbinit: ASCII text
EmulatorPkg/Unix/GdbRun.sh: ASCII text
EmulatorPkg/Unix/Host/X11IncludeHack: ASCII text, with no line terminators
EmulatorPkg/Unix/Xcode/xcode_project32/XcodeBuild.sh: Bourne-Again shell script, ASCII text executable
EmulatorPkg/Unix/Xcode/xcode_project32/xcode_project.xcodeproj/default.pbxuser: ASCII text
EmulatorPkg/Unix/Xcode/xcode_project32/xcode_project.xcodeproj/project.pbxproj: ASCII text
EmulatorPkg/Unix/Xcode/xcode_project64/XcodeBuild.sh: Bourne-Again shell script, ASCII text executable
EmulatorPkg/Unix/Xcode/xcode_project64/xcode_project.xcodeproj/default.pbxuser: ASCII text
EmulatorPkg/Unix/Xcode/xcode_project64/xcode_project.xcodeproj/project.pbxproj: ASCII text
EmulatorPkg/Unix/lldbinit: ASCII text
EmulatorPkg/build.sh: Bourne-Again shell script, ASCII text executable
OvmfPkg/QemuVideoDxe/VbeShim.sh: POSIX shell script, ASCII text executable
OvmfPkg/build.sh: Bourne-Again shell script, ASCII text executable
edksetup.sh: ASCII text


-----Original Message-----
From: Feng, Bob C <bob.c.feng@intel.com>
Sent: 28 June 2020 08:34
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: RE: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

I met a problem when I push your patch set.

If I change the CRLF to a unix format EOL, the patch can't pass PatchCheck.py.
If I don't change the CRLF, The build on Linux will fail.
So I can't make the patch set pass the CI.

Could you share me how did you do to make your PR 729 pass?

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Thursday, June 25, 2020 5:31 PM
To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hello Bob,
I believe the line endings of the BaseTools/BinWrappers/PosixLike/AmlToC script have been modified to CRLF when I sent the patch. I created a pull request from the linked github branch noted in the patches. It is available at https://github.com/PierreARM/edk2/commits/803_Compile_AML_bytecode_array_into_OBJ_file_v3 . The pull request is available here (to show the result of the CI tests) https://github.com/tianocore/edk2/pull/729 .
Do you want a v4 or is it possible to pull the patches from the github repository?
Sorry for the inconvenience.

Regards,
Pierre

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng via groups.io
Sent: 24 June 2020 16:16
To: devel@edk2.groups.io; Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Tomas Pilar <Tomas.Pilar@arm.com>; Gao, Liming <liming.gao@intel.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Hi Pierre,

There are some build failed in OpenCI. Would you please check it?
https://github.com/tianocore/edk2/pull/727

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of PierreGondois
Sent: Wednesday, June 24, 2020 5:09 PM
To: devel@edk2.groups.io
Cc: Pierre Gondois <Pierre.Gondois@arm.com>; sami.mujawar@arm.com; tomas.pilar@arm.com; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; nd@arm.com
Subject: [edk2-devel] [PATCH v3 0/4] Compile AML bytecode array into OBJ file

Following the BZ at https://bugzilla.tianocore.org/show_bug.cgi?id=2425
This patch serie is a another way to solve the dependency of C files over ASL files. With this new method, the dependency is resolved at the linking stage.

The last method to solve this dependency was to add the possibility to modify INF files to depict such a dependency. This method was not accepted. The discussion is available at https://edk2.groups.io/g/devel/topic/72655342#56658

The last patch modifying the INF specification and INF parsing are available at:
https://edk2.groups.io/g/devel/topic/72655342#56658
https://edk2.groups.io/g/devel/topic/72656060#56662

Pierre Gondois (4):
  BaseTools: Generate multiple rules when multiple output files
  BaseTools: Rename AmlToHex script to AmlToC
  BaseTools: Compile AML bytecode arrays into .obj file
  BaseTools: Fix string concatenation

 BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC}               | 28 +++----
 BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat}     |  0
 BaseTools/Conf/build_rule.template                                 | 15 +++-
 BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} | 82 ++++++++------------
 BaseTools/Source/Python/AutoGen/BuildEngine.py                     |  2 +-
 BaseTools/Source/Python/AutoGen/GenMake.py                         |  6 ++
 BaseTools/Source/Python/AutoGen/ModuleAutoGen.py                   | 38 +++++----
 7 files changed, 89 insertions(+), 82 deletions(-)  rename BaseTools/BinWrappers/PosixLike/{AmlToHex => AmlToC} (97%)  rename BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat => AmlToC.bat} (100%)  rename BaseTools/Source/Python/{AmlToHex/AmlToHex.py => AmlToC/AmlToC.py} (52%)

--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'

















-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61876): https://edk2.groups.io/g/devel/message/61876
Mute This Topic: https://groups.io/mt/75078123/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-