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.f...@intel.com> Sent: 28 June 2020 08:34 To: devel@edk2.groups.io; Pierre Gondois <pierre.gond...@arm.com> Cc: Sami Mujawar <sami.muja...@arm.com>; Tomas Pilar <tomas.pi...@arm.com>; Gao, Liming <liming....@intel.com>; nd <n...@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.f...@intel.com> Cc: Sami Mujawar <sami.muja...@arm.com>; Tomas Pilar <tomas.pi...@arm.com>; Gao, Liming <liming....@intel.com>; nd <n...@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.gond...@arm.com> Cc: Sami Mujawar <sami.muja...@arm.com>; Tomas Pilar <tomas.pi...@arm.com>; Gao, Liming <liming....@intel.com>; nd <n...@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.gond...@arm.com>; sami.muja...@arm.com; tomas.pi...@arm.com; Feng, Bob C <bob.c.f...@intel.com>; Gao, Liming <liming....@intel.com>; n...@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/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-