All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH,HURD] Fix GNU/Hurd boot
@ 2009-10-21 18:13 Samuel Thibault
  2009-10-24 23:04 ` Robert Millan
  2009-10-26  1:40 ` [PATCH,HURD] Fix GNU/Hurd menu entry generation Samuel Thibault
  0 siblings, 2 replies; 7+ 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] 7+ messages in thread

* Re: [PATCH,HURD] Fix GNU/Hurd boot
  2009-10-21 18:13 [PATCH,HURD] Fix GNU/Hurd boot Samuel Thibault
@ 2009-10-24 23:04 ` Robert Millan
  2009-10-26  1:40 ` [PATCH,HURD] Fix GNU/Hurd menu entry generation Samuel Thibault
  1 sibling, 0 replies; 7+ messages in thread
From: Robert Millan @ 2009-10-24 23:04 UTC (permalink / raw)
  To: The development of GRUB 2

On Wed, Oct 21, 2009 at 08:13:02PM +0200, Samuel Thibault wrote:
> 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.

Committed, thanks.  Btw please include a ChangeLog entry next time.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



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

* [PATCH,HURD] Fix GNU/Hurd menu entry generation
  2009-10-21 18:13 [PATCH,HURD] Fix GNU/Hurd boot Samuel Thibault
  2009-10-24 23:04 ` Robert Millan
@ 2009-10-26  1:40 ` Samuel Thibault
  2009-10-26  1:48   ` Robert Millan
  1 sibling, 1 reply; 7+ messages in thread
From: Samuel Thibault @ 2009-10-26  1:40 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
	* util/grub.d/10_hurd.in: Translate grub device name into mach
	device name.

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`"
+      HURD_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
Index: util/grub.d/10_hurd.in
===================================================================
--- util/grub.d/10_hurd.in	(révision 2657)
+++ util/grub.d/10_hurd.in	(copie de travail)
@@ -48,6 +48,7 @@
   *fs)	hurd_fs="${GRUB_FS}" ;;
   *)	hurd_fs="${GRUB_FS}fs" ;;
 esac
+mach_device="`echo "${GRUB_DEVICE}" | tr -d '()' | tr , s`"
 
 for i in /hurd/${hurd_fs}.static /hurd/exec ; do
   if test -e "$i" ; then
@@ -73,7 +74,7 @@
 EOF
 prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/"
 cat << EOF
-	multiboot ${kernel} root=device:${GRUB_DEVICE}
+	multiboot ${kernel} root=device:${mach_device}
 	module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\
 			--multiboot-command-line='\${kernel-command-line}' \\
 			--host-priv-port='\${host-port}' \\



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

* Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Millan @ 2009-10-26  1:48 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Oct 26, 2009 at 02:40:01AM +0100, Samuel Thibault wrote:
> +      mach_device="`echo "${GRUB_DEVICE}" | tr -d '()' | tr , s`"
> [...]
> +mach_device="`echo "${GRUB_DEVICE}" | tr -d '()' | tr , s`"
>  
>  for i in /hurd/${hurd_fs}.static /hurd/exec ; do
>    if test -e "$i" ; then
> @@ -73,7 +74,7 @@
>  EOF
>  prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/"
>  cat << EOF
> -	multiboot ${kernel} root=device:${GRUB_DEVICE}
> +	multiboot ${kernel} root=device:${mach_device}

I think you missunderstand what GRUB_DEVICE is (not surprising, because the
variable name is quite misleading).  Did you observe wrong entry generation
in grub-mkconfig?

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



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

* Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
  2009-10-26  1:48   ` Robert Millan
@ 2009-10-26  2:01     ` Samuel Thibault
  2009-10-26 12:36       ` Robert Millan
  0 siblings, 1 reply; 7+ messages in thread
From: Samuel Thibault @ 2009-10-26  2:01 UTC (permalink / raw)
  To: The development of GRUB 2

Robert Millan, le Mon 26 Oct 2009 02:48:48 +0100, a écrit :
> > @@ -73,7 +74,7 @@
> >  EOF
> >  prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/"
> >  cat << EOF
> > -	multiboot ${kernel} root=device:${GRUB_DEVICE}
> > +	multiboot ${kernel} root=device:${mach_device}
> 
> I think you missunderstand what GRUB_DEVICE is (not surprising, because the
> variable name is quite misleading).

Ah, that's possible, is it actually DEVICE?  If so, then you can
probably skip that part of the patch indeed.

> Did you observe wrong entry generation in grub-mkconfig?

I didn't try that part of my patch as there are other things that
prevent grub2 from working from inside GNU/Hurd itself.

Samuel



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

* Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
  2009-10-26  2:01     ` Samuel Thibault
@ 2009-10-26 12:36       ` Robert Millan
  2009-10-26 13:37         ` Samuel Thibault
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Millan @ 2009-10-26 12:36 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Oct 26, 2009 at 03:01:16AM +0100, Samuel Thibault wrote:
> > Did you observe wrong entry generation in grub-mkconfig?
> 
> I didn't try that part of my patch as there are other things that
> prevent grub2 from working from inside GNU/Hurd itself.

Which are these?  It's unfortunate that nobody reported this before
1.97 was released.  Perhaps I should test GRUB on GNU/Hurd before doing
a release.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



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

* Re: [PATCH,HURD] Fix GNU/Hurd menu entry generation
  2009-10-26 12:36       ` Robert Millan
@ 2009-10-26 13:37         ` Samuel Thibault
  0 siblings, 0 replies; 7+ messages in thread
From: Samuel Thibault @ 2009-10-26 13:37 UTC (permalink / raw)
  To: The development of GRUB 2

Robert Millan, le Mon 26 Oct 2009 13:36:13 +0100, a écrit :
> On Mon, Oct 26, 2009 at 03:01:16AM +0100, Samuel Thibault wrote:
> > > Did you observe wrong entry generation in grub-mkconfig?
> > 
> > I didn't try that part of my patch as there are other things that
> > prevent grub2 from working from inside GNU/Hurd itself.
> 
> Which are these?

Various things that we never took the time to implement, like
discovering disks & such.

Samuel



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

end of thread, other threads:[~2009-10-26 13:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-21 18:13 [PATCH,HURD] Fix GNU/Hurd boot Samuel Thibault
2009-10-24 23:04 ` Robert Millan
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.