add grub-efi

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@2732 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2010-11-12 21:01:10 +00:00
parent fdb917f178
commit 234e2fb761
4 changed files with 175 additions and 0 deletions

View File

@ -0,0 +1,4 @@
AUX grub-1.96-genkernel.patch 634 RMD160 bc1fdaa51e3f0e3b777a303e0f1c76987c7e69e5 SHA1 e79384a3ac32bfd74c884ead8133b1691a743316 SHA256 8ee327465d9b6d704a78b0c7b31cfdee7c6e7e9f9897e8d0a86198430f0c6ea0
AUX grub-1.98-efi_std_dir-1.patch 1257 RMD160 46f3fff434fee54f05adbad09a2bdfcc73320b5d SHA1 f45fd2f7d2f2c25e922b35cee3d06b7d59f07dcd SHA256 c348128612cc9d39be80a3f4fa4663fa1ed8dd27672494f3c9fcaabc045500c9
DIST grub-1.98.tar.gz 2449386 RMD160 197fb8d7c673bd67ae81eda53a2baa2968cc1e69 SHA1 e83a2c438f4773a2e272c225983c0145e1ffd641 SHA256 bef2c1892e052967b65aab6aa62ac702c0e50ef8848506eacf3c0b2f5007c614
EBUILD grub-efi-1.98.ebuild 3126 RMD160 8d9aa9583c273618b4285ad336a824424fa528a7 SHA1 cc9f11ec04d4b25e00ca3cf5be972541b91e2db1 SHA256 abb58f69c945e316eb40b7a4f7061b15c8bfe51e7686a979b80d5cb974420555

View File

@ -0,0 +1,19 @@
--- util/grub.d/10_linux.in
+++ util/grub.d/10_linux.in
@@ -61,7 +61,7 @@
EOF
}
-list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
+list=`for i in /boot/kernel-* /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
@@ -78,6 +78,7 @@
initrd=
for i in "initrd.img-${version}" "initrd-${version}.img" \
"initrd-${version}" "initrd.img-${alt_version}" \
+ "initramfs-genkernel-${version}" "initramfs-genkernel-${alt_version}" \
"initrd-${alt_version}.img" "initrd-${alt_version}"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"

View File

@ -0,0 +1,37 @@
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
Date: 2010-11-12
Initial Package Version: 1.98
Origin: me
Upstream Status: gentoo specific
Description: place the grub.efi in the right dir
diff -Naur grub-1.98.orig/util/i386/efi/grub-install.in grub-1.98/util/i386/efi/grub-install.in
--- grub-1.98.orig/util/i386/efi/grub-install.in 2010-11-12 20:47:04.000000000 +0000
+++ grub-1.98/util/i386/efi/grub-install.in 2010-11-12 20:50:47.000000000 +0000
@@ -37,7 +37,7 @@
grub_probe=${sbindir}/`echo grub-probe | sed ${transform}`
grub_editenv=${bindir}/`echo grub-editenv | sed ${transform}`
rootdir=
-grub_prefix=`echo /boot/grub | sed ${transform}`
+grub_prefix=`echo /boot/efi/EFI/grub | sed ${transform}`
modules=
no_floppy=
@@ -63,7 +63,7 @@
--no-floppy do not probe any floppy drive
--recheck probe a device map even if it already exists
-grub-install copies GRUB images into the DIR/boot directory specified by
+grub-install copies GRUB images into the DIR/boot/efi/EFI directory specified by
--root-directory.
Report bugs to <bug-grub@gnu.org>.
@@ -119,7 +119,7 @@
;;
*)
# Use /boot/grub by default.
- bootdir=${rootdir}/boot
+ bootdir=${rootdir}/boot/efi/EFI
;;
esac

View File

@ -0,0 +1,115 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-1.98.ebuild,v 1.5 2010/07/24 08:45:56 vapier Exp $
# XXX: need to implement a grub.conf migration in pkg_postinst before we ~arch
inherit mount-efi eutils flag-o-matic toolchain-funcs
if [[ ${PV} == "9999" ]] ; then
EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub"
inherit autotools bzr
SRC_URI=""
else
SRC_URI="ftp://alpha.gnu.org/gnu/${PN}/grub-${PV}.tar.gz
mirror://gentoo/grub-${PV}.tar.gz"
fi
DESCRIPTION="GNU GRUB 2 boot loader"
HOMEPAGE="http://www.gnu.org/software/grub/"
LICENSE="GPL-3"
use multislot && SLOT="2" || SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="custom-cflags debug truetype multislot static"
RDEPEND=">=sys-libs/ncurses-5.2-r5
dev-libs/lzo
truetype? ( media-libs/freetype media-fonts/unifont )
sys-boot/grub"
DEPEND="${RDEPEND}
dev-lang/ruby"
PROVIDE="virtual/bootloader"
S="${WORKDIR}"/grub-${PV}
export STRIP_MASK="*/grub/*/*.mod"
QA_EXECSTACK="sbin/grub-probe sbin/grub-setup sbin/grub-mkdevicemap bin/grub-script-check bin/grub-fstest"
src_unpack() {
if [[ ${PV} == "9999" ]] ; then
bzr_src_unpack
else
unpack ${A}
fi
cd "${S}"
epatch "${FILESDIR}"/grub-1.96-genkernel.patch #256335
epatch "${FILESDIR}"/grub-1.98-efi_std_dir-1.patch
epatch_user
# autogen.sh does more than just run autotools
# need to eautomake due to weirdness #296013
if [[ ${PV} == "9999" ]] ; then
sed -i \
-e '/^\(auto\|ac\)/s:^:e:' \
-e "s:^eautomake:`which automake`:" \
autogen.sh
(. ./autogen.sh) || die
fi
}
src_compile() {
use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
use static && append-ldflags -static
econf \
--disable-werror \
--sbindir=/sbin \
--bindir=/bin \
--libdir=/$(get_libdir) \
--with-platform=efi \
$(use_enable truetype grub-mkfont) \
$(use_enable debug mm-debug) \
$(use_enable debug grub-emu-usb) \
$(use_enable debug grub-fstest)
emake -j1 || die "making regular stuff"
}
src_install() {
emake DESTDIR="${D}" install || die
dodoc AUTHORS ChangeLog NEWS README THANKS TODO
cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib
GRUB_DISTRIBUTOR="Gentoo"
EOF
if use multislot ; then
sed -i "s:grub-install:grub2-install:" "${D}"/sbin/grub-install || die
mv "${D}"/sbin/grub{,2}-install || die
mv "${D}"/sbin/grub{,2}-set-default || die
mv "${D}"/usr/share/man/man8/grub{,2}-install.8 || die
mv "${D}"/usr/share/info/grub{,2}.info || die
fi
}
setup_boot_dir() {
local boot_dir=$1
local dir=${boot_dir}/grub
if [[ ! -e ${dir}/grub.cfg ]] ; then
einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
grub-mkconfig -o "${dir}/grub.cfg"
fi
#local install=grub-install
#use multislot && install="grub2-install --grub-setup=/bin/true"
#einfo "Running: ${install} "
#${install}
}
pkg_postinst() {
if use multislot ; then
elog "You have installed grub2 with USE=multislot, so to coexist"
elog "with grub1, the grub2 install binary is named grub2-install."
fi
mkdir "${ROOT}"boot/efi/EFI/grub
setup_boot_dir "${ROOT}"boot/efi/EFI
}