All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH,HURD] Fix GNU/Hurd menu entry generation
@ 2009-11-02 19:36 Samuel Thibault
  2009-11-02 21:02 ` Robert Millan
  0 siblings, 1 reply; 10+ messages in thread
From: Samuel Thibault @ 2009-11-02 19:36 UTC (permalink / raw)
  To: grub-devel

Hello,

The patch below fixes menu entry generation for GNU/Hurd.

Samuel

2009-20-26  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* util/grub.d/30_os-prober.in: Add GNU/Hurd support

Index: util/grub.d/30_os-prober.in
===================================================================
--- util/grub.d/30_os-prober.in	(révision 2657)
+++ util/grub.d/30_os-prober.in	(copie de travail)
@@ -155,7 +155,28 @@
 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



^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH,HURD] Fix GNU/Hurd boot
@ 2009-10-21 18:13 Samuel Thibault
  2009-10-26  1:40 ` [PATCH,HURD] Fix GNU/Hurd menu entry generation Samuel Thibault
  0 siblings, 1 reply; 10+ messages in thread
From: Samuel Thibault @ 2009-10-21 18:13 UTC (permalink / raw)
  To: grub-devel

Hello,

The patch compensates the behavior change in the module command: it
repeats the module name since GNU Mach expects it in the command line.

Samuel

Index: docs/grub.cfg
===================================================================
--- docs/grub.cfg	(révision 2643)
+++ docs/grub.cfg	(copie de travail)
@@ -15,13 +15,13 @@
 menuentry "GNU (aka GNU/Hurd)" {
 	set root=(hd0,1)
 	multiboot /boot/gnumach.gz root=device:hd0s1
-	module /hurd/ext2fs.static --readonly \
+	module /hurd/ext2fs.static ext2fs --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 /hurd/exec '$(exec-task=task-create)'
+	module /lib/ld.so.1 exec /hurd/exec '$(exec-task=task-create)'
 }
 
 # For booting GNU/Linux
Index: util/grub.d/10_hurd.in
===================================================================
--- util/grub.d/10_hurd.in	(révision 2643)
+++ util/grub.d/10_hurd.in	(copie de travail)
@@ -74,12 +74,12 @@
 prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/"
 cat << EOF
 	multiboot ${kernel} root=device:${GRUB_DEVICE}
-	module /hurd/${hurd_fs}.static --readonly \\
+	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 /hurd/exec '\$(exec-task=task-create)'
+	module /lib/ld.so.1 exec /hurd/exec '\$(exec-task=task-create)'
 }
 EOF



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-11-03 14:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02 19:36 [PATCH,HURD] Fix GNU/Hurd menu entry generation Samuel Thibault
2009-11-02 21:02 ` Robert Millan
2009-11-03 13:36   ` Yves Blusseau
2009-11-03 14:01     ` Samuel Thibault
2009-11-03 14:25       ` Felix Zielcke
  -- strict thread matches above, loose matches on Subject: below --
2009-10-21 18:13 [PATCH,HURD] Fix GNU/Hurd boot Samuel Thibault
2009-10-26  1:40 ` [PATCH,HURD] Fix GNU/Hurd menu entry generation Samuel Thibault
2009-10-26  1:48   ` Robert Millan
2009-10-26  2:01     ` Samuel Thibault
2009-10-26 12:36       ` Robert Millan
2009-10-26 13:37         ` Samuel Thibault

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.