From 0ffe4df854f6fb251bc9ec8c2068f978b8809162 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sat, 13 Jun 2026 19:59:08 +0300 Subject: [PATCH] Switch to new package format --- pkg.info => info.yml | 2 +- source.sh => recipe.sh | 4 +- .../fix-discarded-qualifiers-error.patch | 41 +++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) rename pkg.info => info.yml (99%) rename source.sh => recipe.sh (97%) create mode 100644 source-files/fix-discarded-qualifiers-error.patch diff --git a/pkg.info b/info.yml similarity index 99% rename from pkg.info rename to info.yml index d0cdd87..f6122a5 100644 --- a/pkg.info +++ b/info.yml @@ -1,7 +1,7 @@ name: edk2-ovmf description: EFI Development Kit 2 - Open Virtual Machine Firmware version: "202508.01" -revision: 1 +revision: 2 url: https://github.com/tianocore/tianocore.github.io/wiki/EDK-II license: BSD-2-Clause-Patent,MIT architecture: any diff --git a/source.sh b/recipe.sh similarity index 97% rename from source.sh rename to recipe.sh index 26ce796..0f151e2 100644 --- a/source.sh +++ b/recipe.sh @@ -1,4 +1,4 @@ -# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT @@ -9,7 +9,9 @@ prepare() { cd "$BPM_SOURCE" # fix 32-bit instruction errors dos2unix "$BPM_SOURCE"/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm + dos2unix "$BPM_SOURCE"/BaseTools/Source/C/EfiRom/EfiRom.c patch -Np1 -i "$BPM_WORKDIR"/nasm3.patch + patch -Np1 -i "$BPM_WORKDIR"/fix-discarded-qualifiers-error.patch } # The build function is executed in the source directory diff --git a/source-files/fix-discarded-qualifiers-error.patch b/source-files/fix-discarded-qualifiers-error.patch new file mode 100644 index 0000000..a460e44 --- /dev/null +++ b/source-files/fix-discarded-qualifiers-error.patch @@ -0,0 +1,41 @@ +From 9af06ef3cbb052b142f9660c2c01e7aeb401300c Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann +Date: Mon, 8 Dec 2025 10:28:50 +0100 +Subject: [PATCH] BaseTools/EfiRom: fix compiler warning +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +New warning after updating gcc: + +EfiRom.c: In function ‘main’: +EfiRom.c:78:17: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] + +The assigned value is not used, so fix the warning by just removing it. + +Signed-off-by: Gerd Hoffmann +--- + BaseTools/Source/C/EfiRom/EfiRom.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/BaseTools/Source/C/EfiRom/EfiRom.c b/BaseTools/Source/C/EfiRom/EfiRom.c +index fa7bf0e62e6d..6e903b350411 100644 +--- a/BaseTools/Source/C/EfiRom/EfiRom.c ++++ b/BaseTools/Source/C/EfiRom/EfiRom.c +@@ -44,7 +44,6 @@ Routine Description: + FILE_LIST *FList; + UINT32 TotalSize; + UINT32 Size; +- CHAR8 *Ptr0; + + SetUtilityName(UTILITY_NAME); + +@@ -75,7 +74,7 @@ Routine Description: + // + if (mOptions.DumpOption == 1) { + if (mOptions.FileList != NULL) { +- if ((Ptr0 = strstr ((CONST CHAR8 *) mOptions.FileList->FileName, DEFAULT_OUTPUT_EXTENSION)) != NULL) { ++ if (strstr ((CONST CHAR8 *) mOptions.FileList->FileName, DEFAULT_OUTPUT_EXTENSION) != NULL) { + DumpImage (mOptions.FileList); + goto BailOut; + } else {