diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2008-03-30 05:12:38 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2008-03-30 05:12:38 +0000 |
commit | 68e122d677b35aed316c37b242b6f5f866e87b1a (patch) | |
tree | b3ff23d795c703c225f3107c7cc4782e56ea2e83 /sys-boot/grub | |
parent | whitespace (diff) | |
download | gentoo-2-68e122d677b35aed316c37b242b6f5f866e87b1a.tar.gz gentoo-2-68e122d677b35aed316c37b242b6f5f866e87b1a.tar.bz2 gentoo-2-68e122d677b35aed316c37b242b6f5f866e87b1a.zip |
Per bug #160801, Grub needs modification to support kernels larger than 3Mb. However, this may have negative consequences, so the actual value is configurable at compile-time via the GRUB_MAX_KERNEL_SIE environment variable.
(Portage version: 2.1.4.4)
Diffstat (limited to 'sys-boot/grub')
-rw-r--r-- | sys-boot/grub/ChangeLog | 8 | ||||
-rw-r--r-- | sys-boot/grub/grub-0.97-r5.ebuild | 23 |
2 files changed, 29 insertions, 2 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog index dde40274222e..e2b10c25eef8 100644 --- a/sys-boot/grub/ChangeLog +++ b/sys-boot/grub/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-boot/grub # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.84 2008/03/29 01:28:50 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.85 2008/03/30 05:12:38 robbat2 Exp $ + + 30 Mar 2008; Robin H. Johnson <robbat2@gentoo.org> grub-0.97-r5.ebuild: + Per bug #160801, Grub needs modification to support kernels larger than + 3Mb. However, this may have negative consequences, so the actual value is + configurable at compile-time via the GRUB_MAX_KERNEL_SIZE environment + variable. 29 Mar 2008; Mike Frysinger <vapier@gentoo.org> grub-0.97-r5.ebuild: Pull in app-emulation/emul-linux-x86-baselibs for USE=ncurses on amd64 #128249. diff --git a/sys-boot/grub/grub-0.97-r5.ebuild b/sys-boot/grub/grub-0.97-r5.ebuild index 62e26ab89760..9c7fa880b9bc 100644 --- a/sys-boot/grub/grub-0.97-r5.ebuild +++ b/sys-boot/grub/grub-0.97-r5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.97-r5.ebuild,v 1.3 2008/03/29 01:28:50 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.97-r5.ebuild,v 1.4 2008/03/30 05:12:38 robbat2 Exp $ inherit mount-boot eutils flag-o-matic toolchain-funcs autotools @@ -30,6 +30,27 @@ src_unpack() { # patch breaks booting for some people #111885 rm "${WORKDIR}"/patch/400_* + # Grub will not handle a kernel larger than EXTENDED_MEMSIZE Mb as + # discovered in bug 160801. We can change this, however, using larger values + # for this variable means that Grub needs more memory to run and boot. For a + # kernel of size N, Grub needs (N+1)*2. Advanced users should set a custom + # value in make.conf, it is possible to make kernels ~16Mb in size, but it + # needs the kitchen sink built-in. + local t="custom" + if [[ -z "$GRUB_MAX_KERNEL_SIZE" ]]; then + case $ARCH in + amd64*) GRUB_MAX_KERNEL_SIZE=7 ;; + x86*) GRUB_MAX_KERNEL_SIZE=3 ;; + esac + t="default" + fi + einfo "Grub will support the ${t} maximum kernel size of ${GRUB_MAX_KERNEL_SIZE} Mb (GRUB_MAX_KERNEL_SIZE)" + + sed -i \ + -e "/^#define.*EXTENDED_MEMSIZE/s,3,${GRUB_MAX_KERNEL_SIZE},g" \ + "${S}"/grub/asmstub.c \ + || die "Failed to hack memory size" + if [[ -n ${PATCHVER} ]] ; then EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch |