Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 440188 Details for
Bug 566930
sys-boot/refind: Does not respect {C,LD}{,FLAGS}
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Build rEFInd using user defined flags
sys-boot-refind-use-flags-for-rEFInd.patch (text/plain), 8.37 KB, created by
Stéphane Veyret
on 2016-07-09 15:29:29 UTC
(
hide
)
Description:
Build rEFInd using user defined flags
Filename:
MIME Type:
Creator:
Stéphane Veyret
Created:
2016-07-09 15:29:29 UTC
Size:
8.37 KB
patch
obsolete
>From 57199153a198d8faa845e181e1764091d62274d2 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?St=C3=A9phane=20Veyret?= <stephane.veyret@neptura.org> >Date: Sat, 9 Jul 2016 10:08:54 +0200 >Subject: [PATCH] sys-boot/refind: use flags for rEFInd, bug #566930 > >--- > sys-boot/refind/metadata.xml | 47 ++++++++++++++++++---- > sys-boot/refind/refind-0.10.2.ebuild | 76 +++++++++++++++++++++++++++++++----- > 2 files changed, 106 insertions(+), 17 deletions(-) > >diff --git a/sys-boot/refind/metadata.xml b/sys-boot/refind/metadata.xml >index a5bf904..df1d4bd 100644 >--- a/sys-boot/refind/metadata.xml >+++ b/sys-boot/refind/metadata.xml >@@ -1,4 +1,4 @@ >-<?xml version="1.0" encoding="UTF-8"?> >+<?xml version='1.0' encoding='UTF-8'?> > <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> > <pkgmetadata> > <maintainer type="person"> >@@ -6,16 +6,44 @@ > <name>Sam Jorna</name> > </maintainer> > <maintainer type="person"> >- <email>sveyret@gmail.com</email> >- <name>Stephane Veyret</name> >+ <email>sveyret@gmail.com</email> >+ <name>Stéphane Veyret</name> > <description>Proxy - Maintainer.CC on bugs</description> >- </maintainer> >+ </maintainer> > <maintainer type="project"> >- <email>proxy-maint@gentoo.org</email> >- <name>Proxy Maintainers</name> >+ <email>proxy-maint@gentoo.org</email> >+ <name>Proxy Maintainers</name> > </maintainer> >- <longdescription lang="en">EFI Boot Manager</longdescription> >- <longdescription lang="fr">Gestionnaire d'amorçage EFI</longdescription> >+ <longdescription lang="en"> >+A graphical boot manager for EFI- and UEFI-based computers, such as all >+Intel-based Macs and recent (most 2011 and later) PCs. rEFInd presents a >+boot menu showing all the EFI boot loaders on the EFI-accessible >+partitions, and optionally BIOS-bootable partitions on Macs and BIOS boot >+entries on UEFI PCs with CSMs. EFI-compatbile OSes, including Linux, >+provide boot loaders that rEFInd can detect and launch. rEFInd can launch >+Linux EFI boot loaders such as ELILO, GRUB Legacy, GRUB 2, and 3.3.0 and >+later kernels with EFI stub support. EFI filesystem drivers for ext2/3/4fs, >+ReiserFS, Btrfs, NTFS, HFS+, and ISO-9660 enable rEFInd to read boot >+loaders from these filesystems, too. rEFInd's ability to detect boot >+loaders at runtime makes it very easy to use, particularly when paired with >+Linux kernels that provide EFI stub support. >+ </longdescription> >+ <longdescription lang="fr"> >+Un gestionnaire d'amorçage pour ordinateur EFI ou UEFI tel que tous les Macs >+contenant un processeur Intel et les PC récents (2011 et après). rEFInd affiche >+un menu d'amorçage montrant tous les gestionnaires d'amorçage sur les >+partitions EFI accessibles et optionnellement les partitions démarrable en BIOS >+sur Macs et les entrées BIOS sur les PC UEFI avec CSM. Les systèmes >+d'exploitation compatibles EFI, incluant Linux, fournissent des gestionnaires >+d'amorçage que rEFInd détect et démarre. rEFInd peut démarrer les gestionnaires >+d'amorçage EFI Linux tel que ELILO, GRUB Legacy, GRUB 2 ainsi que les noyaux >+3.3.0 et suivants avec le support EFI stub. Les pilotes EFI pour les sytèmes de >+fichiers ext2/3/4fs, ReiserFS, Btrfs, NTFS, HFS+ et ISO-9660 permettent à >+rEFInd de lire les gestionnaires d'amorçage également depuis ces systèmes de >+fichiers. La capacité de rEFInd à détecter les gestionnaires d'amorçage au >+moment de l'exécution le rend très facile à utiliser, en particulier associé à >+des noyau Linux qui fournissent un support EFI stub. >+ </longdescription> > <use lang="en"> > <flag name="ext2">Builds the EFI binary ext2 filesystem driver</flag> > <flag name="ext4">Builds the EFI binary ext4 filesystem driver</flag> >@@ -24,6 +52,7 @@ > <flag name="hfs">Builds the EFI binary hfs filesystem driver</flag> > <flag name="btrfs">Builds the EFI binary btrfs filesystem driver</flag> > <flag name="ntfs">Builds the EFI binary ntfs filesystem driver</flag> >+ <flag name="gnuefi">Compile using GNU-EFI instead of Tianocore</flag> > <flag name="doc">Install document files</flag> > </use> > <use lang="fr"> >@@ -34,9 +63,11 @@ > <flag name="hfs">Construire le gestionnaire EFI pour le système de fichier hfs</flag> > <flag name="btrfs">Construire le gestionnaire EFI pour le système de fichier btrfs</flag> > <flag name="ntfs">Construire le gestionnaire EFI pour le système de fichier ntfs</flag> >+ <flag name="gnuefi">Compiler en utilisant GNU-EFI au lieu de Tianocore</flag> > <flag name="doc">Installer les fichiers de documentation</flag> > </use> > <upstream> > <remote-id type="sourceforge">refind</remote-id> > </upstream> > </pkgmetadata> >+ >diff --git a/sys-boot/refind/refind-0.10.2.ebuild b/sys-boot/refind/refind-0.10.2.ebuild >index db4455b..8a73dbb 100644 >--- a/sys-boot/refind/refind-0.10.2.ebuild >+++ b/sys-boot/refind/refind-0.10.2.ebuild >@@ -2,9 +2,9 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Id$ > >-EAPI=5 >+EAPI=6 > >-inherit eutils >+inherit eutils toolchain-funcs flag-o-matic > > DESCRIPTION="The rEFInd UEFI Boot Manager by Rod Smith" > HOMEPAGE="http://www.rodsbooks.com/refind/" >@@ -15,9 +15,10 @@ LICENSE="BSD GPL-2 GPL-3 FDL-1.3" > SLOT="0" > KEYWORDS="~amd64 ~x86" > FS_USE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs" >-IUSE="${FS_USE} doc" >+IUSE="${FS_USE} -gnuefi doc" > >-DEPEND=">=sys-boot/gnu-efi-3.0.2" >+DEPEND="gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) >+ !gnuefi? ( >=sys-boot/udk-2015 )" > > DOCS="NEWS.txt README.txt docs/refind docs/Styles" > >@@ -39,19 +40,76 @@ pkg_setup() { > fi > } > >+src_prepare() { >+ eapply_user >+ for f in "${S}"/*/Make.tiano "${S}"/Make.common; do >+ sed -i -e 's/^\(include .*target.txt.*\)$/#\1/' \ >+ -e 's@^\(TIANO_INCLUDE_DIRS\s*=\s*-I\s*\).*$@\1/usr/include/udk \\@' \ >+ -e '/^\s*-I \$(EDK2BASE).*$/d' \ >+ "${f}" || die "Failed to patch Tianocore make file in" \ >+ $(basename $(dirname ${f})) >+ done >+ for f in "${S}"/*/Make.tiano; do >+ sed -i -e 's@^\(EFILIB\s*=\s*\).*$@\1/usr/lib@' \ >+ -e 's@\$(EFILIB).*/\([^/]*\).lib@-l\1@' \ >+ -e 's/\(--start-group\s*\$(ALL_EFILIBS)\)/-L \$(EFILIB) \1/' \ >+ "${f}" || die "Failed to patch Tianocore make file in" \ >+ $(basename $(dirname ${f})) >+ done >+ sed -i -e '/Guids/i#include "AutoGen.h"\n' "${S}/filesystems/AutoGen.c" >+ for f in "${S}"/*/AutoGen.c; do >+ cat >>"${f}" <<EOF >+ >+#define _PCD_TOKEN_PcdFixedDebugPrintErrorLevel 11U >+#define _PCD_SIZE_PcdFixedDebugPrintErrorLevel 4 >+#define _PCD_GET_MODE_SIZE_PcdFixedDebugPrintErrorLevel _PCD_SIZE_PcdFixedDebugPrintErrorLevel >+#define _PCD_VALUE_PcdFixedDebugPrintErrorLevel 0xFFFFFFFFU >+GLOBAL_REMOVE_IF_UNREFERENCED const UINT32 _gPcd_FixedAtBuild_PcdFixedDebugPrintErrorLevel = _PCD_VALUE_PcdFixedDebugPrintErrorLevel; >+extern const UINT32 _gPcd_FixedAtBuild_PcdFixedDebugPrintErrorLevel; >+#define _PCD_GET_MODE_32_PcdFixedDebugPrintErrorLevel _gPcd_FixedAtBuild_PcdFixedDebugPrintErrorLevel >+//#define _PCD_SET_MODE_32_PcdFixedDebugPrintErrorLevel ASSERT(FALSE) // It is not allowed to set value for a FIXED_AT_BUILD PCD >+EOF >+ done >+} >+ > src_compile() { >+ # Prepare flags >+ [[ $EFIARCH == x64 ]] && pecoff_header_size='0x228' \ >+ || pecoff_header_size='0x220' >+ >+ append-cflags "-fno-strict-aliasing" "-fno-stack-protector" "-fshort-wchar" "-Wall" >+ >+ local make_flags=( >+ ARCH="${BUILDARCH}" >+ GENFW="/usr/bin/GenFw" >+ CC="$(tc-getCC)" >+ AS="$(tc-getAS)" >+ LD="$(tc-getLD)" >+ AR="$(tc-getAR)" >+ RANLIB="$(tc-getRANLIB)" >+ OBJCOPY="$(tc-getOBJCOPY)" >+ #CFLAGS="${CFLAGS}" >+ LDFLAGS="${LDFLAGS}" >+ GNUEFI_LDFLAGS="-T \$(GNUEFI_LDSCRIPT) -shared -nostdlib -Bsymbolic \ >+ -L\$(EFILIB) -L\$(GNUEFILIB) \$(CRTOBJS) -znocombreloc -zdefs" >+ TIANO_LDSCRIPT="/usr/lib/GccBase.lds" >+ TIANO_LDFLAGS="-n -q --gc-sections -nostdlib \ >+ --script=\$(TIANO_LDSCRIPT) \ >+ --defsym=PECOFF_HEADER_SIZE=${pecoff_header_size} \ >+ --entry \$(ENTRYPOINT) -u \$(ENTRYPOINT) -m \$(LD_CODE)" >+ ) >+ > # Make main EFI >- all_target=gnuefi >- emake ARCH=${BUILDARCH} ${all_target} >+ use gnuefi && export all_target=gnuefi || export all_target=tiano >+ emake "${make_flags[@]}" ${all_target} > > # Make filesystem drivers >- export gnuefi_target="_gnuefi" >+ use gnuefi && export gnuefi_target="_gnuefi" > for fs in ${FS_USE}; do > fs=${fs#+} > if use "${fs}"; then > einfo "Building ${fs} filesystem driver" >- rm -f "${S}/filesystems/fsw_efi.o" >- emake -C "${S}/filesystems" ARCH=${BUILDARCH} ${fs}${gnuefi_target} >+ emake "${make_flags[@]}" -C "${S}/filesystems" ${fs}${gnuefi_target} > fi > done > } >-- >2.7.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 566930
:
418350
|
418352
|
418588
|
420790
|
420982
|
440188
|
440240
|
440242
|
440952