]> git.proxmox.com Git - grub2.git/commitdiff
2009-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
authorrobertmh <robertmh@localhost>
Mon, 2 Nov 2009 21:01:14 +0000 (21:01 +0000)
committerrobertmh <robertmh@localhost>
Mon, 2 Nov 2009 21:01:14 +0000 (21:01 +0000)
        * util/grub.d/30_os-prober.in: Add GNU/Hurd support

ChangeLog
util/grub.d/30_os-prober.in

index e2aacd7600c6622a388ac3497884c05cfc1fc96c..ea21457705e6d5ed7d7e73cf56aaee58bc017fc3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+       * util/grub.d/30_os-prober.in: Add GNU/Hurd support
+
 2009-11-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
        * util/grub.d/10_hurd.in: Drop /dev/ prefix from root device path before
index 6fd97fc4e0da721ab8f90244e217c3ed273b4f9a..e14a07316b1757c63cb247f2fa079ad384a68519 100644 (file)
@@ -159,7 +159,28 @@ EOF
 EOF
     ;;
     hurd|*)
-      echo "  ${LONGNAME} is not yet supported by grub-mkconfig." >&2
+      cat << EOF
+menuentry "${LONGNAME} (on ${DEVICE})" {
+EOF
+      prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
+      grub_device="`${grub_probe} --device ${DEVICE} --target=drive`"
+      mach_device="`echo "${grub_device}" | tr -d '()' | tr , s`"
+      grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`"
+      case "${grub_fs}" in
+       *fs)    hurd_fs="${grub_fs}" ;;
+       *)      hurd_fs="${grub_fs}fs" ;;
+      esac
+      cat << EOF
+       multiboot /boot/gnumach.gz root=device:${mach_device}
+       module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\
+                       --multiboot-command-line='\${kernel-command-line}' \\
+                       --host-priv-port='\${host-port}' \\
+                       --device-master-port='\${device-port}' \\
+                       --exec-server-task='\${exec-task}' -T typed '\${root}' \\
+                       '\$(task-create)' '\$(task-resume)'
+       module /lib/ld.so.1 exec /hurd/exec '\$(exec-task=task-create)'
+}
+EOF
     ;;
   esac
 done