mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 15:22:39 +00:00
templates: Add support for pci-arbiter and rumpdisk on Hurd
This adds pci-arbiter and rumpdisk as bootstrap modules whenever they are available. This opens the path for fully-userland disk support. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
a4430355a3
commit
666c6f8adb
1 file changed
+47
-3
+47
-3
@@ -68,6 +68,18 @@ for i in /hurd/${hurd_fs}.static /hurd/exec ; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if test -e '/hurd/pci-arbiter.static' ; then
|
||||||
|
pci_arbiter=true
|
||||||
|
else
|
||||||
|
pci_arbiter=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -e '/hurd/rumpdisk.static' ; then
|
||||||
|
rumpdisk=true
|
||||||
|
else
|
||||||
|
rumpdisk=false
|
||||||
|
fi
|
||||||
|
|
||||||
if ${at_least_one} ; then : ; else
|
if ${at_least_one} ; then : ; else
|
||||||
# no hurd here, aborting silently
|
# no hurd here, aborting silently
|
||||||
exit 0
|
exit 0
|
||||||
@@ -132,14 +144,46 @@ EOF
|
|||||||
opts="--readonly"
|
opts="--readonly"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
host_ports="--host-priv-port='\${host-port}' --device-master-port='\${device-port}'"
|
||||||
|
resume_task="'\$(task-resume)'"
|
||||||
|
|
||||||
sed "s/^/$submenu_indentation/" << EOF
|
sed "s/^/$submenu_indentation/" << EOF
|
||||||
echo '$(echo "$message" | grub_quote)'
|
echo '$(echo "$message" | grub_quote)'
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ "$pci_arbiter" = true ] ; then
|
||||||
|
if [ "$rumpdisk" = true ] ; then
|
||||||
|
next_task='${disk-task}'
|
||||||
|
else
|
||||||
|
next_task='${fs-task}'
|
||||||
|
fi
|
||||||
|
sed "s/^/$submenu_indentation/" << EOF
|
||||||
|
module /hurd/pci-arbiter.static pci-arbiter \\
|
||||||
|
$host_ports \\
|
||||||
|
--next-task='$next_task' \\
|
||||||
|
'\$(pci-task=task-create)' $resume_task
|
||||||
|
EOF
|
||||||
|
host_ports=""
|
||||||
|
resume_task=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$rumpdisk" = true ] ; then
|
||||||
|
sed "s/^/$submenu_indentation/" << EOF
|
||||||
|
module /hurd/rumpdisk.static rumpdisk \\
|
||||||
|
$host_ports \\
|
||||||
|
--next-task='\${fs-task}' \\
|
||||||
|
'\$(disk-task=task-create)' $resume_task
|
||||||
|
EOF
|
||||||
|
host_ports=""
|
||||||
|
resume_task=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed "s/^/$submenu_indentation/" << EOF
|
||||||
module /hurd/${hurd_fs}.static ${hurd_fs} $opts \\
|
module /hurd/${hurd_fs}.static ${hurd_fs} $opts \\
|
||||||
--multiboot-command-line='\${kernel-command-line}' \\
|
--multiboot-command-line='\${kernel-command-line}' \\
|
||||||
--host-priv-port='\${host-port}' \\
|
$host_ports \\
|
||||||
--device-master-port='\${device-port}' \\
|
|
||||||
--exec-server-task='\${exec-task}' -T typed '\${root}' \\
|
--exec-server-task='\${exec-task}' -T typed '\${root}' \\
|
||||||
'\$(task-create)' '\$(task-resume)'
|
'\$(fs-task=task-create)' $resume_task
|
||||||
module /lib/ld.so.1 exec /hurd/exec '\$(exec-task=task-create)'
|
module /lib/ld.so.1 exec /hurd/exec '\$(exec-task=task-create)'
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in new issue
Block a user