Accepting request 244497 from Base:System
1 OBS-URL: https://build.opensuse.org/request/show/244497 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=96
This commit is contained in:
commit
641acbd654
56
aarch64-reloc.patch
Normal file
56
aarch64-reloc.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
From f472bc5ac54e72eb09b0606f588085af504d754b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andreas Schwab <schwab@suse.de>
|
||||||
|
Date: Tue, 12 Aug 2014 10:42:43 +0200
|
||||||
|
Subject: [PATCH] Support R_AARCH64_PREL32 relocation
|
||||||
|
|
||||||
|
* include/grub/elf.h (R_AARCH64_PREL32): Define.
|
||||||
|
* util/grub-mkimagexx.c (make_reloc_section): Handle it.
|
||||||
|
(relocate_addresses): Likewise.
|
||||||
|
---
|
||||||
|
include/grub/elf.h | 1 +
|
||||||
|
util/grub-mkimagexx.c | 10 ++++++++++
|
||||||
|
2 files changed, 11 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/include/grub/elf.h b/include/grub/elf.h
|
||||||
|
index caa7963..836b304 100644
|
||||||
|
--- a/include/grub/elf.h
|
||||||
|
+++ b/include/grub/elf.h
|
||||||
|
@@ -2070,6 +2070,7 @@ typedef Elf32_Addr Elf32_Conflict;
|
||||||
|
#define R_AARCH64_ABS32 258 /* Direct 32 bit. */
|
||||||
|
#define R_AARCH64_JUMP26 282 /* 26-bit relative. */
|
||||||
|
#define R_AARCH64_CALL26 283 /* 26-bit relative. */
|
||||||
|
+#define R_AARCH64_PREL32 261 /* 32-bit pc-relative. */
|
||||||
|
#define R_AARCH64_COPY 1024 /* Copy symbol at runtime. */
|
||||||
|
#define R_AARCH64_GLOB_DAT 1025 /* Create GOT entry. */
|
||||||
|
#define R_AARCH64_JUMP_SLOT 1026 /* Create PLT entry. */
|
||||||
|
diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
|
||||||
|
index 0a1ac9e..376dc2d 100644
|
||||||
|
--- a/util/grub-mkimagexx.c
|
||||||
|
+++ b/util/grub-mkimagexx.c
|
||||||
|
@@ -836,6 +836,15 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
|
||||||
|
*target = grub_host_to_target64 (grub_target_to_host64 (*target) + sym_addr);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
+ case R_AARCH64_PREL32:
|
||||||
|
+ {
|
||||||
|
+ grub_uint32_t *t32 = (grub_uint32_t *) target;
|
||||||
|
+ *t32 = grub_host_to_target64 (grub_target_to_host32 (*t32)
|
||||||
|
+ + sym_addr
|
||||||
|
+ - target_section_addr - offset
|
||||||
|
+ - image_target->vaddr_offset);
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
case R_AARCH64_JUMP26:
|
||||||
|
case R_AARCH64_CALL26:
|
||||||
|
{
|
||||||
|
@@ -1197,6 +1206,7 @@ SUFFIX (make_reloc_section) (Elf_Ehdr *e, void **out,
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
/* Relative relocations do not require fixup entries. */
|
||||||
|
+ case R_AARCH64_PREL32:
|
||||||
|
case R_AARCH64_CALL26:
|
||||||
|
case R_AARCH64_JUMP26:
|
||||||
|
break;
|
||||||
|
--
|
||||||
|
2.0.4
|
||||||
|
|
20
grub2-ppc64le-fix-64bit-trampoline-in-dyn-linker.patch
Normal file
20
grub2-ppc64le-fix-64bit-trampoline-in-dyn-linker.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Index: grub-2.02~beta2/grub-core/kern/powerpc/dl.c
|
||||||
|
===================================================================
|
||||||
|
--- grub-2.02~beta2.orig/grub-core/kern/powerpc/dl.c
|
||||||
|
+++ grub-2.02~beta2/grub-core/kern/powerpc/dl.c
|
||||||
|
@@ -61,6 +61,7 @@ struct trampoline
|
||||||
|
grub_uint32_t std;
|
||||||
|
grub_uint32_t addis;
|
||||||
|
grub_uint32_t addi;
|
||||||
|
+ grub_uint32_t clrldi;
|
||||||
|
grub_uint32_t mtctr;
|
||||||
|
grub_uint32_t bctr;
|
||||||
|
};
|
||||||
|
@@ -70,6 +71,7 @@ static const struct trampoline trampolin
|
||||||
|
0xf8410018, /* std r2,24(r1) */
|
||||||
|
0x3d800000, /* addis r12,0,0 */
|
||||||
|
0x398c0000, /* addi r12,r12,0 */
|
||||||
|
+ 0x798c0020, /* clrldi r12,r12,32 */
|
||||||
|
0x7d8903a6, /* mtctr r12 */
|
||||||
|
0x4e800420, /* bctr */
|
||||||
|
};
|
@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 12 12:56:29 UTC 2014 - schwab@suse.de
|
||||||
|
|
||||||
|
- Enable building on aarch64
|
||||||
|
- aarch64-reloc.patch: support R_AARCH64_PREL32 relocation
|
||||||
|
- Build host tools with RPM_OPT_FLAGS
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 11 14:34:55 UTC 2014 - dvaleev@suse.com
|
||||||
|
|
||||||
|
- Fix the 64-bit trampoline code in dynamic linker (bnc#890999)
|
||||||
|
grub2-ppc64le-fix-64bit-trampoline-in-dyn-linker.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jul 29 11:46:54 CEST 2014 - tiwai@suse.de
|
Tue Jul 29 11:46:54 CEST 2014 - tiwai@suse.de
|
||||||
|
|
||||||
|
16
grub2.spec
16
grub2.spec
@ -80,16 +80,23 @@ BuildRequires: xen-devel
|
|||||||
|
|
||||||
# build efi bootloader on some platforms only:
|
# build efi bootloader on some platforms only:
|
||||||
%if ! 0%{?efi}
|
%if ! 0%{?efi}
|
||||||
%global efi %{ix86} x86_64 ia64
|
%global efi %{ix86} x86_64 ia64 aarch64
|
||||||
|
%endif
|
||||||
|
%ifarch aarch64
|
||||||
|
%define only_efi 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch %{efi}
|
%ifarch %{efi}
|
||||||
%ifarch %{ix86}
|
%ifarch %{ix86}
|
||||||
%define grubefiarch i386-efi
|
%define grubefiarch i386-efi
|
||||||
%else
|
%else
|
||||||
|
%ifarch aarch64
|
||||||
|
%define grubefiarch arm64-efi
|
||||||
|
%else
|
||||||
%define grubefiarch %{_target_cpu}-efi
|
%define grubefiarch %{_target_cpu}-efi
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version} == 1110
|
%if 0%{?suse_version} == 1110
|
||||||
%define only_efi %{nil}
|
%define only_efi %{nil}
|
||||||
@ -140,6 +147,7 @@ Patch36: 0001-look-for-DejaVu-also-in-usr-share-fonts-truetype.patch
|
|||||||
Patch37: grub2-use-Unifont-for-starfield-theme-terminal.patch
|
Patch37: grub2-use-Unifont-for-starfield-theme-terminal.patch
|
||||||
Patch38: grub2-s390x-01-Changes-made-and-files-added-in-order-to-allow-s390x.patch
|
Patch38: grub2-s390x-01-Changes-made-and-files-added-in-order-to-allow-s390x.patch
|
||||||
Patch39: grub2-use-rpmsort-for-version-sorting.patch
|
Patch39: grub2-use-rpmsort-for-version-sorting.patch
|
||||||
|
Patch40: aarch64-reloc.patch
|
||||||
# Btrfs snapshot booting related patches
|
# Btrfs snapshot booting related patches
|
||||||
Patch101: 0002-btrfs-add-ability-to-boot-from-subvolumes.patch
|
Patch101: 0002-btrfs-add-ability-to-boot-from-subvolumes.patch
|
||||||
Patch102: 0003-cmdline-add-envvar-loader_cmdline_append.patch
|
Patch102: 0003-cmdline-add-envvar-loader_cmdline_append.patch
|
||||||
@ -179,6 +187,7 @@ Patch229: grub2-xfs-Fix-termination-loop-for-directory-iteration.patch
|
|||||||
Patch230: grub2-xfs-Convert-inode-numbers-to-cpu-endianity-immediate.patch
|
Patch230: grub2-xfs-Convert-inode-numbers-to-cpu-endianity-immediate.patch
|
||||||
Patch231: grub2-xfs-V5-filesystem-format-support.patch
|
Patch231: grub2-xfs-V5-filesystem-format-support.patch
|
||||||
Patch232: grub2-efi_gop-avoid-low-resolution.patch
|
Patch232: grub2-efi_gop-avoid-low-resolution.patch
|
||||||
|
Patch233: grub2-ppc64le-fix-64bit-trampoline-in-dyn-linker.patch
|
||||||
|
|
||||||
Requires: gettext-runtime
|
Requires: gettext-runtime
|
||||||
%if 0%{?suse_version} >= 1140
|
%if 0%{?suse_version} >= 1140
|
||||||
@ -195,7 +204,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|||||||
%if 0%{?only_x86_64:1}
|
%if 0%{?only_x86_64:1}
|
||||||
ExclusiveArch: x86_64
|
ExclusiveArch: x86_64
|
||||||
%else
|
%else
|
||||||
ExclusiveArch: %{ix86} x86_64 ppc ppc64 ppc64le s390x
|
ExclusiveArch: %{ix86} x86_64 ppc ppc64 ppc64le s390x aarch64
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -337,6 +346,7 @@ mv po/grub.pot po/%{name}.pot
|
|||||||
%patch37 -p1
|
%patch37 -p1
|
||||||
%patch38 -p1
|
%patch38 -p1
|
||||||
%patch39 -p1
|
%patch39 -p1
|
||||||
|
%patch40 -p1
|
||||||
%patch101 -p1
|
%patch101 -p1
|
||||||
%patch102 -p1
|
%patch102 -p1
|
||||||
%patch103 -p1
|
%patch103 -p1
|
||||||
@ -374,6 +384,7 @@ mv po/grub.pot po/%{name}.pot
|
|||||||
%patch230 -p1
|
%patch230 -p1
|
||||||
%patch231 -p1
|
%patch231 -p1
|
||||||
%patch232 -p1
|
%patch232 -p1
|
||||||
|
%patch233 -p1
|
||||||
|
|
||||||
# Generate po/LINGUAS for message catalogs ...
|
# Generate po/LINGUAS for message catalogs ...
|
||||||
./linguas.sh
|
./linguas.sh
|
||||||
@ -403,6 +414,7 @@ CFLAGS="-fno-strict-aliasing -fno-inline-functions-called-once "
|
|||||||
CXXFLAGS=" "
|
CXXFLAGS=" "
|
||||||
FFLAGS=" "
|
FFLAGS=" "
|
||||||
export CFLAGS CXXFLAGS FFLAGS
|
export CFLAGS CXXFLAGS FFLAGS
|
||||||
|
export HOST_CFLAGS=$RPM_OPT_FLAGS
|
||||||
|
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
cd build-xen
|
cd build-xen
|
||||||
|
Loading…
Reference in New Issue
Block a user