[bug#63527,v5,11/11] gnu: gnumach: Support "noide" argument.
Commit Message
* gnu/packages/patches/gnumach-support-noide.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/hurd.scm (gnumach-headers): Use it.
* doc/guix.texi (Bootloader Configuration): Document it.
---
doc/guix.texi | 21 ++++++++++++++++
gnu/local.mk | 1 +
gnu/packages/hurd.scm | 3 ++-
.../patches/gnumach-support-noide.patch | 25 +++++++++++++++++++
4 files changed, 49 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/gnumach-support-noide.patch
Comments
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
> * gnu/packages/patches/gnumach-support-noide.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/hurd.scm (gnumach-headers): Use it.
> * doc/guix.texi (Bootloader Configuration): Document it.
[...]
> +@lisp
> +'("console=com0"")
^
Extra quote.
> +To use the new (experimental) rumpdisk (See
> +@url{https://darnassus.sceen.net/~hurd-web/rump_kernel/, GNU Hurd rump
> +kernel}) instead of the legacy gnumach buitin IDE support:
Nitpick:
To use the new and still experimental
@uref{https://darnassus.sceen.net/~hurd-web/rump_kernel/, rumpdisk
user-level disk driver} instead of GNU@tie{}Mach's in-kernel IDE
driver, set @code{kernel-arguments} to:
Ludo’.
Ludovic Courtès writes:
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> * gnu/packages/patches/gnumach-support-noide.patch: New file.
>> * gnu/local.mk (dist_patch_DATA): Add it.
>> * gnu/packages/hurd.scm (gnumach-headers): Use it.
>> * doc/guix.texi (Bootloader Configuration): Document it.
>
> [...]
>
>> +@lisp
>> +'("console=com0"")
> ^
> Extra quote.
Oops.
>> +To use the new (experimental) rumpdisk (See
>> +@url{https://darnassus.sceen.net/~hurd-web/rump_kernel/, GNU Hurd rump
>> +kernel}) instead of the legacy gnumach buitin IDE support:
>
> Nitpick:
>
> To use the new and still experimental
> @uref{https://darnassus.sceen.net/~hurd-web/rump_kernel/, rumpdisk
> user-level disk driver} instead of GNU@tie{}Mach's in-kernel IDE
> driver, set @code{kernel-arguments} to:
I like it! Thanks.
@@ -39779,6 +39779,27 @@ Bootloader Configuration
@item @code{multiboot-arguments} (default: @code{()})
The list of extra command-line arguments for the multiboot-kernel.
+For example, when running in QEMU it can be useful to use a text-based
+console (use options @option{--nographic} @option{--serial mon:stdio}):
+
+@lisp
+'("console=com0"")
+@end lisp
+
+To use the new (experimental) rumpdisk (See
+@url{https://darnassus.sceen.net/~hurd-web/rump_kernel/, GNU Hurd rump
+kernel}) instead of the legacy gnumach buitin IDE support:
+
+@lisp
+'("noide")
+@end lisp
+
+Of course, these options can be combined:
+
+@lisp
+'("console=com0" "noide")
+@end lisp
+
@item @code{multiboot-modules} (default: @code{()})
The list of commands for loading Multiboot modules. For example:
@@ -1277,6 +1277,7 @@ dist_patch_DATA = \
%D%/packages/patches/gnome-session-support-elogind.patch \
%D%/packages/patches/gnome-tweaks-search-paths.patch \
%D%/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch \
+ %D%/packages/patches/gnumach-support-noide.patch \
%D%/packages/patches/gnupg-default-pinentry.patch \
%D%/packages/patches/gnupg-1-build-with-gcc10.patch \
%D%/packages/patches/gnutls-skip-trust-store-test.patch \
@@ -80,7 +80,8 @@ (define-public gnumach-headers
(file-name (git-file-name "gnumach" version))
(sha256
(base32
- "0f49zqxf64ds75rmskizpybl2mw7sxs05k59gjp3pgspvr87w7gs"))))
+ "0f49zqxf64ds75rmskizpybl2mw7sxs05k59gjp3pgspvr87w7gs"))
+ (patches (list (search-patch "gnumach-support-noide.patch")))))
(build-system gnu-build-system)
(arguments
`(#:phases
new file mode 100644
@@ -0,0 +1,25 @@
+Upstream status: Taken from Debian/upsream.
+
+ https://salsa.debian.org/hurd-team/gnumach/-/blob/master/debian/patches/90_noide.patch
+
+This supports using `noide' on the gnumach command line, disabling
+gnumach IDE support and thus forcing use of rumdisk.
+
+---
+ linux/dev/glue/block.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/linux/dev/glue/block.c
++++ b/linux/dev/glue/block.c
+@@ -207,7 +207,10 @@ int
+ blk_dev_init ()
+ {
+ #ifdef CONFIG_BLK_DEV_IDE
+- ide_init ();
++ extern char *kernel_cmdline;
++ if (strncmp(kernel_cmdline, "noide", 5) &&
++ !strstr(kernel_cmdline, " noide"))
++ ide_init ();
+ #endif
+ #ifdef CONFIG_BLK_DEV_FD
+ floppy_init ();