Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1N2EZC-0001dJ-RJ for mharc-grub-devel@gnu.org; Sun, 25 Oct 2009 21:40:14 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N2EZB-0001bY-8a for grub-devel@gnu.org; Sun, 25 Oct 2009 21:40:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N2EZ6-0001XY-QI for grub-devel@gnu.org; Sun, 25 Oct 2009 21:40:12 -0400 Received: from [199.232.76.173] (port=57563 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N2EZ6-0001XN-Cm for grub-devel@gnu.org; Sun, 25 Oct 2009 21:40:08 -0400 Received: from solo.fdn.fr ([80.67.169.19]:35885) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N2EZ5-00053z-SD for grub-devel@gnu.org; Sun, 25 Oct 2009 21:40:08 -0400 Received: from const.ipv6 (youpi.is-a-geek.org [80.67.176.89]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by solo.fdn.fr (Postfix) with ESMTP id 2FB27442A0 for ; Mon, 26 Oct 2009 02:40:04 +0100 (CET) Received: from samy by const.ipv6 with local (Exim 4.69) (envelope-from ) id 1N2EYz-0001Jt-M9 for grub-devel@gnu.org; Mon, 26 Oct 2009 02:40:01 +0100 Date: Mon, 26 Oct 2009 02:40:01 +0100 From: Samuel Thibault To: grub-devel@gnu.org Message-ID: <20091026014001.GA4518@const.famille.thibault.fr> References: <20091021181301.GA4419@const.famille.thibault.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20091021181301.GA4419@const.famille.thibault.fr> User-Agent: Mutt/1.5.12-2006-07-14 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [PATCH,HURD] Fix GNU/Hurd menu entry generation X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 01:40:13 -0000 Hello, The patch below fixes menu entry generation for GNU/Hurd. Samuel 2009-20-26 Samuel Thibault * 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- util/grub.d/30_os-prober.in (r=E9vision 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=3D"`${grub_probe} --device ${DEVICE} --target=3Ddrive`= " + mach_device=3D"`echo "${GRUB_DEVICE}" | tr -d '()' | tr , s`" + HURD_FS=3D"`${grub_probe} --device ${DEVICE} --target=3Dfs`" + case "${GRUB_FS}" in + *fs) hurd_fs=3D"${GRUB_FS}" ;; + *) hurd_fs=3D"${GRUB_FS}fs" ;; + esac + cat << EOF + multiboot /boot/gnumach.gz root=3Ddevice:${mach_device} + module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\ + --multiboot-command-line=3D'\${kernel-command-line}' \\ + --host-priv-port=3D'\${host-port}' \\ + --device-master-port=3D'\${device-port}' \\ + --exec-server-task=3D'\${exec-task}' -T typed '\${root}' \\ + '\$(task-create)' '\$(task-resume)' + module /lib/ld.so.1 exec /hurd/exec '\$(exec-task=3Dtask-create)' +} +EOF ;; esac done Index: util/grub.d/10_hurd.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- util/grub.d/10_hurd.in (r=E9vision 2657) +++ util/grub.d/10_hurd.in (copie de travail) @@ -48,6 +48,7 @@ *fs) hurd_fs=3D"${GRUB_FS}" ;; *) hurd_fs=3D"${GRUB_FS}fs" ;; esac +mach_device=3D"`echo "${GRUB_DEVICE}" | tr -d '()' | tr , s`" =20 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=3Ddevice:${GRUB_DEVICE} + multiboot ${kernel} root=3Ddevice:${mach_device} module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\ --multiboot-command-line=3D'\${kernel-command-line}' \\ --host-priv-port=3D'\${host-port}' \\