rpms/grub/devel grub-fedora-9.patch, NONE, 1.1 grub.spec, 1.58, 1.59 grub-fedora-8.patch, 1.3, NONE
Peter Jones (pjones)
fedora-extras-commits at redhat.com
Mon Nov 5 20:31:52 UTC 2007
Author: pjones
Update of /cvs/extras/rpms/grub/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9858
Modified Files:
grub.spec
Added Files:
grub-fedora-9.patch
Removed Files:
grub-fedora-8.patch
Log Message:
- The great experiment: efi support in grub on x86_64
grub-fedora-9.patch:
--- NEW FILE grub-fedora-9.patch ---
diff --git a/Makefile.am b/Makefile.am
index 63a9a4f..a27da9c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,7 @@
# Do not change this order if you don't know what you are doing.
AUTOMAKE_OPTIONS = 1.7 gnu
SUBDIRS = netboot stage2 stage1 lib grub util docs
+if PLATFORM_EFI
+SUBDIRS += efi
+endif
EXTRA_DIST = BUGS MAINTENANCE
diff --git a/Makefile.in b/Makefile.in
index 6652366..6cff007 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.4 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,15 +13,11 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -35,19 +31,19 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
THANKS TODO compile config.guess config.sub depcomp install-sh \
missing mkinstalldirs
-subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
+ configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
@@ -55,10 +51,13 @@ SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
@@ -74,17 +73,14 @@ GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BUILD_EXAMPLE_KERNEL_FALSE = @BUILD_EXAMPLE_KERNEL_FALSE@
-BUILD_EXAMPLE_KERNEL_TRUE = @BUILD_EXAMPLE_KERNEL_TRUE@
CC = @CC@
CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -93,18 +89,16 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-DISKLESS_SUPPORT_FALSE = @DISKLESS_SUPPORT_FALSE@
-DISKLESS_SUPPORT_TRUE = @DISKLESS_SUPPORT_TRUE@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FSYS_CFLAGS = @FSYS_CFLAGS@
+GREP = @GREP@
GRUB_CFLAGS = @GRUB_CFLAGS@
GRUB_LIBS = @GRUB_LIBS@
-HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@
-HERCULES_SUPPORT_TRUE = @HERCULES_SUPPORT_TRUE@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -112,14 +106,12 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LOADER_LDFLAGS = @LOADER_LDFLAGS@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
NETBOOT_DRIVERS = @NETBOOT_DRIVERS@
-NETBOOT_SUPPORT_FALSE = @NETBOOT_SUPPORT_FALSE@
-NETBOOT_SUPPORT_TRUE = @NETBOOT_SUPPORT_TRUE@
NET_CFLAGS = @NET_CFLAGS@
NET_EXTRAFLAGS = @NET_EXTRAFLAGS@
OBJCOPY = @OBJCOPY@
@@ -133,22 +125,17 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
RANLIB = @RANLIB@
-SERIAL_SPEED_SIMULATION_FALSE = @SERIAL_SPEED_SIMULATION_FALSE@
-SERIAL_SPEED_SIMULATION_TRUE = @SERIAL_SPEED_SIMULATION_TRUE@
-SERIAL_SUPPORT_FALSE = @SERIAL_SUPPORT_FALSE@
-SERIAL_SUPPORT_TRUE = @SERIAL_SUPPORT_TRUE@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STAGE1_CFLAGS = @STAGE1_CFLAGS@
STAGE2_CFLAGS = @STAGE2_CFLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_OBJCOPY = @ac_ct_OBJCOPY@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -160,28 +147,39 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
[...35999 lines suppressed...]
# Create the device map file if it is not present.
@@ -336,6 +483,10 @@ else
# Create a safe temporary file.
test -n "$mklog" && log_file=`$mklog`
+ # Before all invocations of the grub shell, call sync to make sure
+ # the raw device is in sync with any bufferring in filesystems.
+ sync
+
$grub_shell --batch $no_floppy --device-map=$device_map <<EOF >$log_file
quit
EOF
@@ -351,34 +502,60 @@ fi
tmp=`sed -n '/^([fh]d[0-9]*)/s/\(^(.*)\).*/\1/p' $device_map \
| sort | uniq -d | sed -n 1p`
if test -n "$tmp"; then
- echo "The drive $tmp is defined multiple times in the device map $device_map" 1>&2
+ echo "The drive $tmp is defined multiple times in the new device map." 1>&2
+ if test $recheck = yes; then
+ echo "Reverting to backed up copy." 1>&2
+ mv ${device_map}.backup $device_map
+ fi
+ exit 1
+fi
+
+# Make sure device.map has at least one hd device
+grep -q "^(hd[0-9]\+)" $device_map
+if [ "x$?" != "x0" ]; then
+ echo "No suitable drive was found in the generated device map." 1>&2
+ if test $recheck = yes; then
+ echo "Reverting to backed up copy." 1>&2
+ mv ${device_map}.backup $device_map
+ fi
exit 1
fi
# Check for INSTALL_DEVICE.
case "$install_device" in
/dev/*)
- install_device=`resolve_symlink "$install_device"`
- install_drive=`convert "$install_device"`
- # I don't know why, but some shells wouldn't die if exit is
- # called in a function.
- if test "x$install_drive" = x; then
+ install_device=`resolve_symlink "$install_device"` || exit 1
+ for install_drive in `find_real_devs $install_device` ; do
+ install_drive=`convert $install_drive` || exit 1
+ if is_raid1_device $install_device; then
+ install_drive=`echo $install_drive | sed 's/,[0-9]*)/)/'`
+ fi
+ if [ "x$install_drive" = "x" ]; then
+ exit 1
+ fi
+ install_drives="${install_drives} ${install_drive}"
+ done
+ unset install_drive
+
+ if test "x$install_drives" = x ; then
exit 1
fi ;;
\([hf]d[0-9]*\))
- install_drive="$install_device" ;;
+ install_drives="$install_device" ;;
[hf]d[0-9]*)
# The GRUB format with no parenthesis.
- install_drive="($install_device)" ;;
+ install_drives="($install_device)" ;;
*)
echo "Format of install_device not recognized." 1>&2
usage
exit 1 ;;
esac
+unset install_device
+
# Get the root drive.
-root_device=`find_device ${rootdir}`
-bootdir_device=`find_device ${bootdir}`
+root_device=`find_device ${rootdir}` || exit 1
+bootdir_device=`find_device ${bootdir}` || exit 1
# Check if the boot directory is in the same device as the root directory.
if test "x$root_device" != "x$bootdir_device"; then
@@ -387,15 +564,8 @@ if test "x$root_device" != "x$bootdir_device"; then
grub_prefix="/grub"
fi
-# Convert the root device to a GRUB drive.
-root_drive=`convert "$root_device"`
-if test "x$root_drive" = x; then
- exit 1
-fi
-
-# Check if the root directory exists in the same device as the grub
-# directory.
-grubdir_device=`find_device ${grubdir}`
+# Check if the root directory exists in the same device as the grub directory.
+grubdir_device=`find_device ${grubdir}` || exit 1
if test "x$grubdir_device" != "x$root_device"; then
# For now, cannot deal with this situation.
@@ -406,61 +576,66 @@ EOF
exit 1
fi
-# Copy the GRUB images to the GRUB directory.
-for file in ${grubdir}/stage1 ${grubdir}/stage2 ${grubdir}/*stage1_5; do
- rm -f $file || exit 1
-done
-for file in \
- ${pkglibdir}/stage1 ${pkglibdir}/stage2 ${pkglibdir}/*stage1_5; do
- cp -f $file ${grubdir} || exit 1
-done
-
-# Make a default file.
-${grub_set_default} --root-directory=${rootdir} default
-
# Make sure that GRUB reads the same images as the host OS.
test -n "$mkimg" && img_file=`$mkimg`
test -n "$mklog" && log_file=`$mklog`
+# There's not a real root device, so just pick the first
+if is_raid1_device $root_device ; then
+ root_device=`find_real_devs $root_device | awk '{print $1}'`
+fi
+
+# Convert the root deviceto a GRUB drive.
+root_drive=`convert "$root_device"` || exit 1
+if [ "x$root_drive" = x ]; then
+ exit 1
+fi
+
for file in ${grubdir}/stage1 ${grubdir}/stage2 ${grubdir}/*stage1_5; do
count=5
tmp=`echo $file | sed "s|^${grubdir}|${grub_prefix}|"`
while test $count -gt 0; do
- $grub_shell --batch $no_floppy --device-map=$device_map <<EOF >$log_file
-dump ${root_drive}${tmp} ${img_file}
-quit
-EOF
- if grep "Error [0-9]*: " $log_file >/dev/null; then
- :
- elif cmp $file $img_file >/dev/null; then
- break
- fi
- sleep 1
- count=`expr $count - 1`
+ dump_boot_block $root_drive $img_file
+ if grep "Error [0-9]*: " $log_file >/dev/null; then
+ :
+ elif cmp $file $img_file >/dev/null; then
+ break
+ fi
+ sleep 1
+ count=`expr $count - 1`
done
if test $count -eq 0; then
- echo "The file $file not read correctly." 1>&2
- exit 1
+ echo "The file $file not read correctly." 1>&2
+ exit 1
fi
done
rm -f $img_file
rm -f $log_file
+if ! test -e ${grubdir}/grub.conf ; then
+ test -e ${grubdir}/menu.lst && ln -s ./menu.lst ${grubdir}/grub.conf
+fi
+
# Create a safe temporary file.
test -n "$mklog" && log_file=`$mklog`
-# Now perform the installation.
-$grub_shell --batch $no_floppy --device-map=$device_map <<EOF >$log_file
-root $root_drive
-setup $force_lba --stage2=$grubdir/stage2 --prefix=$grub_prefix $install_drive
-quit
-EOF
+for install_drive in $install_drives; do
+ # Convert the root deviceto a GRUB drive.
+ root_drive=`convert "$root_device"` || exit 1
+ if [ "x$root_drive" = x ]; then
+ exit 1
+ fi
+ install_boot_block $root_drive $install_drive
+done
-if grep "Error [0-9]*: " $log_file >/dev/null || test $debug = yes; then
+if grep "Error [0-9]*: " $log_file >/dev/null ; then
cat $log_file 1>&2
exit 1
fi
+if test $debug = yes; then
+ cat $log_file 1>&2
+fi
rm -f $log_file
Index: grub.spec
===================================================================
RCS file: /cvs/extras/rpms/grub/devel/grub.spec,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- grub.spec 20 Sep 2007 20:14:20 -0000 1.58
+++ grub.spec 5 Nov 2007 20:31:16 -0000 1.59
@@ -1,13 +1,13 @@
Name: grub
Version: 0.97
-Release: 19
+Release: 20.%{?dist}
Summary: GRUB - the Grand Unified Boot Loader.
Group: System Environment/Base
License: GPLv2+
ExclusiveArch: i386 x86_64
BuildRequires: binutils >= 2.9.1.0.23, ncurses-devel, ncurses-static, texinfo
-BuildRequires: autoconf /usr/lib/crt1.o
+BuildRequires: autoconf /usr/lib/crt1.o automake
PreReq: /sbin/install-info
Requires: mktemp
Requires: /usr/bin/cmp
@@ -16,7 +16,7 @@
URL: http://www.gnu.org/software/%{name}/
Source0: ftp://alpha.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
-Patch0: grub-fedora-8.patch
+Patch0: grub-fedora-9.patch
%description
GRUB (Grand Unified Boot Loader) is an experimental boot loader
@@ -26,24 +26,33 @@
%prep
%setup -q
-%patch -p1 -b .fedora-8
+%patch0 -p1 -b .fedora-9
%build
+autoreconf
autoconf
GCCVERS=$(gcc --version | head -1 | cut -d\ -f3 | cut -d. -f1)
CFLAGS="-Os -g -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused"
if [ "$GCCVERS" == "4" ]; then
CFLAGS="$CFLAGS -Wno-pointer-sign"
fi
+export CFLAGS
%ifarch x86_64
+%configure --sbindir=/sbin --disable-auto-linux-mem-opt --datarootdir=%{_datadir} --with-platform=efi
+make
+rm -fr $RPM_BUILD_ROOT
+%makeinstall sbindir=${RPM_BUILD_ROOT}/sbin
+mv ${RPM_BUILD_ROOT}/sbin/grub ${RPM_BUILD_ROOT}/sbin/grub-efi
+make clean
+autoreconf
+autoconf
CFLAGS="$CFLAGS -static"
-%endif
export CFLAGS
+%endif
%configure --sbindir=/sbin --disable-auto-linux-mem-opt --datarootdir=%{_datadir}
make
%install
-rm -fr $RPM_BUILD_ROOT
%makeinstall sbindir=${RPM_BUILD_ROOT}/sbin
mkdir -p ${RPM_BUILD_ROOT}/boot/grub
@@ -77,8 +86,14 @@
%{_infodir}/multiboot*
%{_mandir}/man*/*
%{_datadir}/grub
+%ifarch x86_64
+%{_datadir}/grub/grub.efi
+%endif
%changelog
+* Mon Nov 05 2007 Peter Jones <pjones at redhat.com> - 0.97-20
+- Add EFI support from Intel on x86_64
+
* Thu Sep 20 2007 Peter Jones <pjones at redhat.com> - 0.97-19
- Fix dmraid detection on Intel (isw) controllers in grub-install .
--- grub-fedora-8.patch DELETED ---
More information about the scm-commits
mailing list