mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Patched grub for vitio blockdevice
This commit is contained in:
1
lfs/grub
1
lfs/grub
@@ -81,6 +81,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-0.93-special-device-names.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-0.95-moreraid.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-0.94-i2o.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-0.97_grub-install_virtio.patch
|
||||
|
||||
cd $(DIR_APP) && perl -pi -e 's,/usr/lib/grub/i386-pc,/usr/share/grub/i386-pc,' docs/grub.texi
|
||||
cd $(DIR_APP) && sed -i 's/AM_INIT_AUTOMAKE/&\nAM_PROG_AS/' configure.ac
|
||||
|
||||
41
src/patches/grub-0.97_grub-install_virtio.patch
Normal file
41
src/patches/grub-0.97_grub-install_virtio.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
diff -Naur grub-0.97.org/util/grub-install.in grub-0.97/util/grub-install.in
|
||||
--- grub-0.97.org/util/grub-install.in 2004-07-24 20:57:31.000000000 +0200
|
||||
+++ grub-0.97/util/grub-install.in 2009-08-14 20:01:20.000000000 +0200
|
||||
@@ -96,12 +96,12 @@
|
||||
# Break the device name into the disk part and the partition part.
|
||||
case "$host_os" in
|
||||
linux*)
|
||||
- tmp_disk=`echo "$1" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \
|
||||
+ tmp_disk=`echo "$1" | sed -e 's%\([vsh]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%' \
|
||||
-e 's%\(c[0-7]d[0-9]*\).*$%\1%'`
|
||||
- tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' \
|
||||
+ tmp_part=`echo "$1" | sed -e 's%.*/[vsh]d[a-z]\([0-9]*\)$%\1%' \
|
||||
-e 's%.*d[0-9]*p%%' \
|
||||
-e 's%.*/fd[0-9]*$%%' \
|
||||
-e 's%.*/floppy/[0-9]*$%%' \
|
||||
@@ -333,6 +333,10 @@
|
||||
if test -f "$device_map"; then
|
||||
:
|
||||
else
|
||||
+
|
||||
+ tmp_disk=`echo "$1" | grep "/dev/vd"`
|
||||
+ if test "x$tmp_disk" = x; then
|
||||
+
|
||||
# Create a safe temporary file.
|
||||
test -n "$mklog" && log_file=`$mklog`
|
||||
|
||||
@@ -345,6 +349,11 @@
|
||||
fi
|
||||
|
||||
rm -f $log_file
|
||||
+
|
||||
+ else
|
||||
+ echo "Create fake device.map for vitio device $1" 1>&2
|
||||
+ echo "(hd0) $1" > $device_map
|
||||
+ fi
|
||||
fi
|
||||
|
||||
# Make sure that there is no duplicated entry.
|
||||
Reference in New Issue
Block a user