.gear/gnu-efi.spec | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++ .gear/rules | 4 ++ .gear/tags/list | 1 + Make.defaults | 6 +-- lib/runtime/rtstr.c | 2 +- 5 files changed, 118 insertions(+), 4 deletions(-) diff --git a/.gear/gnu-efi.spec b/.gear/gnu-efi.spec new file mode 100644 index 0000000..56aba37 --- /dev/null +++ b/.gear/gnu-efi.spec @@ -0,0 +1,109 @@ +Name: gnu-efi +Version: 3.0.9 +Release: alt2 +Epoch: 1 +Summary: Building EFI applications using the GNU toolchain +# Intel and HP's BSD-like license, except setjmp code coming from GRUB +License: GPL v2+ (setjmp code), BSD-like (all the rest) +Group: Development/Other + +Url: http://gnu-efi.sourceforge.net/ +# git https://git.code.sf.net/p/gnu-efi/code +Source: %name-%version.tar +Patch: %name-%version-%release.patch +ExclusiveArch: %ix86 x86_64 armh aarch64 +Conflicts: gnu-efi-3.0r gnu-efi-3.0u gnu-efi-3.0.5 +%define efidir altlinux + +%description +GNU-EFI development environment allows to create EFI applications +for IA-64 and x86 platforms using the GNU toolchain. + +%prep +%setup +%patch0 -p1 + +%build +%make +%make apps +%ifarch x86_64 +setarch linux32 -B make ARCH=ia32 PREFIX=%prefix LIBDIR=%prefix/lib +setarch linux32 -B make ARCH=ia32 PREFIX=%prefix LIBDIR=%prefix/lib apps +%endif + + +%install +%make install INSTALLROOT=%buildroot PREFIX=%prefix LIBDIR=%_libdir +%ifarch x86_64 +setarch linux32 -B make PREFIX=%prefix LIBDIR=%_prefix/lib INSTALLROOT=%buildroot ARCH=ia32 install +%endif + + +%files +%doc ChangeLog README.* apps +%_libdir/libefi.a +%_libdir/libgnuefi.a +%_libdir/crt0-efi-*.o +%_libdir/elf_*_efi.lds +%ifarch x86_64 +%_prefix/lib/* +%endif +%_includedir/efi + +%changelog +* Sat Oct 17 2020 Sergey Bolshakov 1:3.0.9-alt2 +- rebuilt for armh + +* Thu Oct 18 2018 Anton Farygin 1:3.0.9-alt1 +- up to 3.0.9 with fixes from git + +* Tue Aug 07 2018 Anton Farygin 1:3.0.8-alt2 +- rebuilt for aarch64 + +* Tue Apr 24 2018 Anton Farygin 1:3.0.8-alt1 +- added ubt + +* Wed Mar 28 2018 Anton Farygin 1:3.0.8-alt1 +- 3.0.8 + +* Mon Mar 05 2018 Anton Farygin 1:3.0.6-alt2 +- built 32-bit gni-efi toolchain on x86_64 + +* Sun Nov 26 2017 Anton Farygin 1:3.0.6-alt1 +- 3.0.6 + +* Fri Nov 24 2017 Anton Farygin 1:3.0.5-alt1 +- 3.0.5 +- drop wrapping + +* Wed Mar 01 2017 Michael Shigorin 3.0u-alt4 +- FTBFS workaround: use gcc4.7 + +* Mon Nov 25 2013 Michael Shigorin 3.0r-alt2 +- turned into a wrapper package + +* Mon Nov 25 2013 Michael Shigorin 3.0u-alt3 +- renamed to gnu-efi-3.0u to be packaged along with 3.0r + +* Fri Nov 15 2013 Michael Shigorin 3.0u-alt2 +- drop extra options (both build and defaults) as per: + + upstream recommendations regarding defaults; + + gentoo portage's 3.0u build; + + architectures supported by ALT Linux +- refind-0.7.x built with this gnu-efi doesn't hang anymore ;-) + +* Mon Jul 29 2013 Michael Shigorin 3.0u-alt1 +- 3.0u + +* Thu Feb 28 2013 Michael Shigorin 3.0t-alt1 +- 3.0t: works again + +* Thu Jan 10 2013 Michael Shigorin 3.0s-alt1 +- 3.0s: results in broken elilo build (silent hang, reported upstream) + +* Wed Oct 17 2012 Michael Shigorin 3.0r-alt1 +- 3.0r + +* Wed Oct 17 2012 Michael Shigorin 3.0q-alt1 +- built for Sisyphus; these PLD people worked on the spec: + baggins glen qboosh diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 0000000..abd57d0 --- /dev/null +++ b/.gear/rules @@ -0,0 +1,4 @@ +tar: @version@:. +diff: @version@:. . +spec: .gear/gnu-efi.spec +copy?: .gear/*.patch diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 0000000..a1c84be --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +183ec634eec7aee214e4e2baa728bc9c68c492f0 3.0.9 diff --git a/Make.defaults b/Make.defaults index ba743f1..ff08589 100755 --- a/Make.defaults +++ b/Make.defaults @@ -62,12 +62,12 @@ OBJCOPY := $(prefix)$(CROSS_COMPILE)objcopy # Host/target identification OS := $(shell uname -s) -HOSTARCH ?= $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed -e s,i[3456789]86,ia32, -e 's,armv7.*,arm,' ) -ARCH ?= $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed -e s,i[3456789]86,ia32, -e 's,armv7.*,arm,' ) +HOSTARCH ?= $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed -e s,i[3456789]86,ia32, -e 's,armv7.*,arm,' -e s,armh,arm, ) +ARCH ?= $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed -e s,i[3456789]86,ia32, -e 's,armv7.*,arm,' -e s,armh,arm, ) # Get ARCH from the compiler if cross compiling ifneq ($(CROSS_COMPILE),) - override ARCH := $(shell $(CC) -dumpmachine | cut -f1 -d-| sed -e s,i[3456789]86,ia32, -e 's,armv7.*,arm,' ) + override ARCH := $(shell $(CC) -dumpmachine | cut -f1 -d-| sed -e s,i[3456789]86,ia32, -e 's,armv7.*,arm,' -e s,armh,arm, ) endif # FreeBSD (and possibly others) reports amd64 instead of x86_64 diff --git a/lib/runtime/rtstr.c b/lib/runtime/rtstr.c index 129c9f2..73965ca 100644 --- a/lib/runtime/rtstr.c +++ b/lib/runtime/rtstr.c @@ -71,7 +71,7 @@ RtStrnCpy ( { UINTN Size = RtStrnLen(Src, Len); if (Size != Len) - RtSetMem(Dest + Len, '\0', (UINT8)((Len - Size) * sizeof(CHAR16))); + RtSetMem(Dest + Size, (Len - Size) * sizeof(CHAR16), '\0'); RtCopyMem(Dest, Src, Size * sizeof(CHAR16)); }