From e46c8f09aa0ba2bd945d0902aa59d019ce05522ab6c48b7c07bef12488ef9ebb Mon Sep 17 00:00:00 2001 From: Raymund Will Date: Fri, 12 Mar 2021 11:23:32 +0000 Subject: [PATCH] Accepting request 878493 from home:gary_lin:branches:Base:System - Update to gnu-efi 3.0.13 + Define UnicodeSPrint/UnicodeVSPrint as our main SPrint/VSPrint calls + Use EFI_FILE_SYSTEM_VOLUME_LABEL rather than EFI_FILE_SYSTEM_VOLUME_LABEL_INFO + Define BASE_CR as a duplicate of the _CR macro + Fix CopyMem() not handling overlaps + Add AsciiPrint and AsciiVSPrint + Replace Pause() macro with new library function + Add Simple Text Input Ex Protocol support - Add gnu-efi-bsc1182057-support-sbat-section.patch to support .sbat section (bsc#1182057) OBS-URL: https://build.opensuse.org/request/show/878493 OBS-URL: https://build.opensuse.org/package/show/Base:System/gnu-efi?expand=0&rev=43 --- gnu-efi-3.0.12.tar.bz2 | 3 - gnu-efi-3.0.13.tar.bz2 | 3 + gnu-efi-bsc1182057-support-sbat-section.patch | 157 ++++++++++++++++++ gnu-efi.changes | 16 ++ gnu-efi.spec | 4 +- 5 files changed, 179 insertions(+), 4 deletions(-) delete mode 100644 gnu-efi-3.0.12.tar.bz2 create mode 100644 gnu-efi-3.0.13.tar.bz2 create mode 100644 gnu-efi-bsc1182057-support-sbat-section.patch diff --git a/gnu-efi-3.0.12.tar.bz2 b/gnu-efi-3.0.12.tar.bz2 deleted file mode 100644 index 1d3384e..0000000 --- a/gnu-efi-3.0.12.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0196f2e1fd3c334b66e610a608a0e59233474c7a01bec7bc53989639aa327669 -size 154575 diff --git a/gnu-efi-3.0.13.tar.bz2 b/gnu-efi-3.0.13.tar.bz2 new file mode 100644 index 0000000..b1f478e --- /dev/null +++ b/gnu-efi-3.0.13.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fccf715279c46ee69c4859186af8150d07a13f4d19876e5459cd65be82d3b7d +size 155726 diff --git a/gnu-efi-bsc1182057-support-sbat-section.patch b/gnu-efi-bsc1182057-support-sbat-section.patch new file mode 100644 index 0000000..1bdbbbc --- /dev/null +++ b/gnu-efi-bsc1182057-support-sbat-section.patch @@ -0,0 +1,157 @@ +From fb52c3207282f1b8b5ca2f445210bbd00ac8f42a Mon Sep 17 00:00:00 2001 +From: Gary Lin +Date: Fri, 12 Mar 2021 15:35:08 +0800 +Subject: [PATCH 1/2] Update linker scripts to add .sbat section + +Signed-off-by: Gary Lin +--- + gnuefi/elf_aarch64_efi.lds | 9 +++++++++ + gnuefi/elf_arm_efi.lds | 9 +++++++++ + gnuefi/elf_x86_64_efi.lds | 10 ++++++++++ + 3 files changed, 28 insertions(+) + +diff --git a/gnuefi/elf_aarch64_efi.lds b/gnuefi/elf_aarch64_efi.lds +index 836d982..1ddec27 100644 +--- a/gnuefi/elf_aarch64_efi.lds ++++ b/gnuefi/elf_aarch64_efi.lds +@@ -46,6 +46,15 @@ SECTIONS + . = ALIGN(512); + _edata = .; + _data_size = . - _data; ++ . = ALIGN(4096); ++ .sbat : ++ { ++ _sbat = .; ++ *(.sbat) ++ *(.sbat.*) ++ } ++ _esbat = .; ++ _sbat_size = . - _sbat; + + . = ALIGN(4096); + .dynsym : { *(.dynsym) } +diff --git a/gnuefi/elf_arm_efi.lds b/gnuefi/elf_arm_efi.lds +index 665bbdb..d47a750 100644 +--- a/gnuefi/elf_arm_efi.lds ++++ b/gnuefi/elf_arm_efi.lds +@@ -46,6 +46,15 @@ SECTIONS + .rel.data : { *(.rel.data) *(.rel.data*) } + _edata = .; + _data_size = . - _etext; ++ . = ALIGN(4096); ++ .sbat : ++ { ++ _sbat = .; ++ *(.sbat) ++ *(.sbat.*) ++ } ++ _esbat = .; ++ _sbat_size = . - _sbat; + + . = ALIGN(4096); + .dynsym : { *(.dynsym) } +diff --git a/gnuefi/elf_x86_64_efi.lds b/gnuefi/elf_x86_64_efi.lds +index 7be5902..fad1939 100644 +--- a/gnuefi/elf_x86_64_efi.lds ++++ b/gnuefi/elf_x86_64_efi.lds +@@ -61,6 +61,16 @@ SECTIONS + *(.rela.got) + *(.rela.stab) + } ++ . = ALIGN(4096); ++ .sbat : ++ { ++ _sbat = .; ++ *(.sbat) ++ *(.sbat.*) ++ } ++ _esbat = .; ++ _sbat_size = . - _sbat; ++ + . = ALIGN(4096); + .dynsym : { *(.dynsym) } + . = ALIGN(4096); +-- +2.29.2 + + +From 6014f854bd3a083f866a6379c34711bd294202a2 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 11 Mar 2021 10:08:41 -0500 +Subject: [PATCH 2/2] arm/aarch64: include .sbat in section headers. + +Signed-off-by: Peter Jones +--- + gnuefi/crt0-efi-aarch64.S | 14 +++++++++++++- + gnuefi/crt0-efi-arm.S | 16 +++++++++++++++- + 2 files changed, 28 insertions(+), 2 deletions(-) + +diff --git a/gnuefi/crt0-efi-aarch64.S b/gnuefi/crt0-efi-aarch64.S +index c300d89..9d4ffcd 100644 +--- a/gnuefi/crt0-efi-aarch64.S ++++ b/gnuefi/crt0-efi-aarch64.S +@@ -31,7 +31,7 @@ pe_header: + .short 0 + coff_header: + .short 0xaa64 // AArch64 +- .short 2 // nr_sections ++ .short 3 // nr_sections + .long 0 // TimeDateStamp + .long 0 // PointerToSymbolTable + .long 1 // NumberOfSymbols +@@ -109,6 +109,18 @@ section_table: + .short 0 // NumberOfLineNumbers (0 for executables) + .long 0xc0000040 // Characteristics (section flags) + ++ .ascii ".sbat\0\0\0" ++ .long _sbat_size // VirtualSize ++ .long _sbat - ImageBase // VirtualAddress ++ .long _sbat_size // SizeOfRawData ++ .long _sbat - ImageBase // PointerToRawData ++ ++ .long 0 // PointerToRelocations (0 for executables) ++ .long 0 // PointerToLineNumbers (0 for executables) ++ .short 0 // NumberOfRelocations (0 for executables) ++ .short 0 // NumberOfLineNumbers (0 for executables) ++ .long 0x40400040 // Characteristics (section flags) ++ + .align 12 + _start: + stp x29, x30, [sp, #-32]! +diff --git a/gnuefi/crt0-efi-arm.S b/gnuefi/crt0-efi-arm.S +index c5bb6d4..0189868 100644 +--- a/gnuefi/crt0-efi-arm.S ++++ b/gnuefi/crt0-efi-arm.S +@@ -31,7 +31,7 @@ pe_header: + .short 0 + coff_header: + .short 0x1c2 // Mixed ARM/Thumb +- .short 2 // nr_sections ++ .short 3 // nr_sections + .long 0 // TimeDateStamp + .long 0 // PointerToSymbolTable + .long 1 // NumberOfSymbols +@@ -122,6 +122,20 @@ section_table: + .short 0 // NumberOfLineNumbers (0 for executables) + .long 0xe0500020 // Characteristics (section flags) + ++ ++ .ascii ".sbat\0\0\0" ++ .long _sbat_size // VirtualSize ++ .long _sbat - ImageBase // VirtualAddress ++ .long _sbat_size // SizeOfRawData ++ .long _sbat - ImageBase // PointerToRawData ++ ++ .long 0 // PointerToRelocations (0 for executables) ++ .long 0 // PointerToLineNumbers (0 for executables) ++ .short 0 // NumberOfRelocations (0 for executables) ++ .short 0 // NumberOfLineNumbers (0 for executables) ++ .long 0x40400040 // Characteristics (section flags) ++ ++ + _start: + stmfd sp!, {r0-r2, lr} + +-- +2.29.2 + diff --git a/gnu-efi.changes b/gnu-efi.changes index 69c6a1a..35a32b9 100644 --- a/gnu-efi.changes +++ b/gnu-efi.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Fri Mar 12 08:34:48 UTC 2021 - Gary Ching-Pang Lin + +- Update to gnu-efi 3.0.13 + + Define UnicodeSPrint/UnicodeVSPrint as our main SPrint/VSPrint + calls + + Use EFI_FILE_SYSTEM_VOLUME_LABEL rather than + EFI_FILE_SYSTEM_VOLUME_LABEL_INFO + + Define BASE_CR as a duplicate of the _CR macro + + Fix CopyMem() not handling overlaps + + Add AsciiPrint and AsciiVSPrint + + Replace Pause() macro with new library function + + Add Simple Text Input Ex Protocol support +- Add gnu-efi-bsc1182057-support-sbat-section.patch to support + .sbat section (bsc#1182057) + ------------------------------------------------------------------- Mon Jan 4 13:20:45 UTC 2021 - Dirk Müller diff --git a/gnu-efi.spec b/gnu-efi.spec index a7aa766..240a542 100644 --- a/gnu-efi.spec +++ b/gnu-efi.spec @@ -17,7 +17,7 @@ Name: gnu-efi -Version: 3.0.12 +Version: 3.0.13 Release: 0 Summary: Library for EFI Applications License: BSD-3-Clause AND GPL-2.0-or-later @@ -25,6 +25,7 @@ Group: Development/Libraries/Other URL: https://sourceforge.net/projects/gnu-efi Source: https://download.sourceforge.net/project/gnu-efi/gnu-efi-%{version}.tar.bz2 Source1: %{name}-rpmlintrc +Patch1: gnu-efi-bsc1182057-support-sbat-section.patch BuildRequires: kernel-source ExclusiveArch: ia64 %{ix86} x86_64 aarch64 %{arm} @@ -35,6 +36,7 @@ environment. %prep %setup -q +%patch1 -p1 %build ##########################