rpms/grub/F-11 grub-install_virtio_blk_support.patch, NONE, 1.1 grub-low-memory.patch, NONE, 1.1 grub.spec, 1.94, 1.95

Peter Jones pjones at fedoraproject.org
Wed Apr 29 21:28:09 UTC 2009


Author: pjones

Update of /cvs/extras/rpms/grub/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3219

Modified Files:
	grub.spec 
Added Files:
	grub-install_virtio_blk_support.patch grub-low-memory.patch 
Log Message:
* Wed Apr 29 2009 Peter Jones <pjones at redhat.com> - 0.97-50
- Handle virtio_blk disks and their crazy new device name in grub-install
  (rhbz#479760)


grub-install_virtio_blk_support.patch:

--- NEW FILE grub-install_virtio_blk_support.patch ---
diff -ur grub-0.97.orig/util/grub-install.in grub-0.97/util/grub-install.in
--- grub-0.97.orig/util/grub-install.in	2009-01-12 21:47:56.000000000 -0500
+++ grub-0.97/util/grub-install.in	2009-01-12 21:48:16.000000000 -0500
@@ -102,7 +102,7 @@
     linux*)
 	tmp_disk=`echo "$1" | grep -v '/mapper/control$' |
 		grep -v '/mapper/[[:alnum:]]\+-[[:alnum:]]\+$' | uniq |
-		sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \
+		sed -e 's%\([shv]d[a-z]\)[0-9]*$%\1%' \
 				  -e 's%\(d[0-9]*\)p[0-9]*$%\1%' \
 				  -e 's%\(fd[0-9]*\)$%\1%' \
 				  -e 's%/part[0-9]*$%/disc%' \
@@ -112,7 +112,7 @@
 	  -e 's%\(/mapper/[[:alpha:]]\+_[[:alpha:]]\+\)[[:digit:]]\+$%\1%'`
 	tmp_part=`echo "$1" | grep -v '/mapper/control$' |
 		grep -v '/mapper/[[:alnum:]]\+-[[:alnum:]]\+$' | uniq |
-		sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' \
+		sed -e 's%.*/[shv]d[a-z]\([0-9]*\)$%\1%' \
 				  -e 's%.*d[0-9]*p%%' \
 				  -e 's%.*/fd[0-9]*$%%' \
 				  -e 's%.*/floppy/[0-9]*$%%' \

grub-low-memory.patch:

--- NEW FILE grub-low-memory.patch ---
From: Peter Jones
Date: Thu, Apr 16 2009 16:16:00 -0500
Subject: [PATCH] allocate low memory at bottom of memory instead of top.

Don't allocate the low memory area above 1GB, as the kernel doesn't map that
during early boot.

diff -urpN grub-0.97/efi/x86_64/loader/linux.c.lowmem grub-0.97/efi/x86_64/loader/linux.c
--- grub-0.97/efi/x86_64/loader/linux.c.lowmem	2009-04-16 16:56:32.000000000 -0400
+++ grub-0.97/efi/x86_64/loader/linux.c	2009-04-16 16:57:38.000000000 -0400
@@ -169,16 +169,24 @@ allocate_pages (grub_size_t real_size, g
 	  && desc->num_pages >= real_mode_pages)
 	{
 	  grub_efi_physical_address_t physical_end;
+          int allocsize = real_size + mmap_size;
 
           physical_end = desc->physical_start + (desc->num_pages << 12);
 
           grub_dprintf ("linux", "physical_start = %x, physical_end = %x\n",
                         (unsigned) desc->physical_start,
                         (unsigned) physical_end);
-          addr = physical_end - real_size - mmap_size;
+          addr = physical_end - allocsize;
           if (addr < 0x10000)
             continue;
 
+          /* the kernel wants this address to be under 1 gig.*/
+          if (desc->physical_start > 0x40000000 - allocsize)
+            continue;
+
+          if (addr > 0x40000000 - allocsize)
+            addr = 0x40000000 - allocsize;
+
           grub_dprintf ("linux", "trying to allocate %u pages at %x\n",
                         (unsigned) real_mode_pages, (unsigned) addr);
           real_mode_mem = grub_efi_allocate_pages (addr, real_mode_pages);


Index: grub.spec
===================================================================
RCS file: /cvs/extras/rpms/grub/F-11/grub.spec,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -p -r1.94 -r1.95
--- grub.spec	9 Apr 2009 21:23:16 -0000	1.94
+++ grub.spec	29 Apr 2009 21:27:38 -0000	1.95
@@ -1,6 +1,6 @@
 Name: grub
 Version: 0.97
-Release: 48%{?dist}
+Release: 50%{?dist}
 Summary: Grand Unified Boot Loader.
 Group: System Environment/Base
 License: GPLv2+
@@ -40,6 +40,8 @@ Patch11: grub-0.97-efistatus.patch
 Patch12: grub-0.97-fat-lowercase.patch
 Patch13: grub-0.97-efipxe.patch
 Patch14: grub-0.97-tolower.patch
+Patch15: grub-low-memory.patch
+Patch16: grub-install_virtio_blk_support.patch
 
 %description
 GRUB (Grand Unified Boot Loader) is an experimental boot loader
@@ -64,6 +66,8 @@ systems.
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
+%patch15 -p1
+%patch16 -p1
 
 %build
 autoreconf
@@ -126,6 +130,14 @@ fi
 %{_datadir}/grub
 
 %changelog
+* Wed Apr 29 2009 Peter Jones <pjones at redhat.com> - 0.97-50
+- Handle virtio_blk disks and their crazy new device name in grub-install
+  (rhbz#479760)
+
+* Thu Apr 16 2009 Peter Jones <pjones at redhat.com> - 0.97-49
+- Fix efi booting on machines with continguous memory regions across
+  the 1G boundary.
+
 * Thu Apr 09 2009 Peter Jones <pjones at redhat.com> - 0.97-48
 - remove test message Re: using network drive or not.
 




More information about the fedora-extras-commits mailing list