diff options
-rw-r--r-- | community/gsoc/project_ideas/driver_glue_code.mdwn | 5 | ||||
-rw-r--r-- | faq/sata_disk_drives.mdwn | 4 | ||||
-rw-r--r-- | hurd/documentation.mdwn | 3 | ||||
-rw-r--r-- | hurd/rump.mdwn | 25 | ||||
-rw-r--r-- | hurd/rump/rumpdisk.mdwn | 62 | ||||
-rw-r--r-- | hurd/rump/rumpfs.mdwn | 31 | ||||
-rw-r--r-- | hurd/rump/rumpnet.mdwn | 22 | ||||
-rw-r--r-- | hurd/rump/rumpsound.mdwn | 25 | ||||
-rw-r--r-- | hurd/rump/rumpusbdisk.mdwn | 26 | ||||
-rw-r--r-- | open_issues/running_rump_for_slash.mdwn | 19 |
10 files changed, 217 insertions, 5 deletions
diff --git a/community/gsoc/project_ideas/driver_glue_code.mdwn b/community/gsoc/project_ideas/driver_glue_code.mdwn index 3d0a9192..9383f4ea 100644 --- a/community/gsoc/project_ideas/driver_glue_code.mdwn +++ b/community/gsoc/project_ideas/driver_glue_code.mdwn @@ -36,7 +36,10 @@ for running all drivers in separate userspace processes, which is more desirable than drivers running in the microkernel. Robert Millan worked on a port of the Rump kernel, which allowed to run a sound -driver in userland. This work now needs to be extended. +driver in userland. Damien Zammit implemented +[[rumpdisk|hurd/rump/rumpdisk]] and +[[rumpusbdisk|hurd/rump/rumpusbdisk]]. +This work now needs to be extended. [[Zheng Da|zhengda]] has already done considerable work on a similar approach, using [[DDE]] The basic framework for using DDE in the Hurd is present, diff --git a/faq/sata_disk_drives.mdwn b/faq/sata_disk_drives.mdwn index 4864e35b..81e2a01a 100644 --- a/faq/sata_disk_drives.mdwn +++ b/faq/sata_disk_drives.mdwn @@ -15,3 +15,7 @@ License|/fdl]]."]]"""]] Until recently, GNU Mach did not support SATA disk drives (`/dev/sda` etc. in GNU/Linux) natively, the only way to get those drives to work used to be to put them into compatibility mode in the BIOS, if such an option exists. GNU Mach will then recognize them as hd etc. An AHCI driver has been added on 10th May 2013, which should bring support for a wide range of SATA controlers. Please however make sure to configure the BIOS in AHCI mode (as opposed to RAID mode). + +Damien Zammit ported a rump kernel to the Hurd to use SSD devices. We +call it [[rumpdisk|hurd/rump/rumpdisk]]. With rumpdisk you can have a +[[2TB partition!|faq/2_gib_partition_limit]] diff --git a/hurd/documentation.mdwn b/hurd/documentation.mdwn index 68914697..4cf5205b 100644 --- a/hurd/documentation.mdwn +++ b/hurd/documentation.mdwn @@ -67,6 +67,9 @@ is included in the section entitled * [[Building]] * [[Toolchain]] * [[glibc]] +* Device Drivers + * [[rump|hurd/rump]] NetBSD drivers + * [[DDE|hurd/dde]] Outdated Linux Drivers (unmaintained) * RPC [[Interface]]s * Libraries * [[libpager]] diff --git a/hurd/rump.mdwn b/hurd/rump.mdwn index ddde657f..401634bd 100644 --- a/hurd/rump.mdwn +++ b/hurd/rump.mdwn @@ -1,5 +1,5 @@ -[[!meta copyright="Copyright © 2009, 2010, 2011 Free Software Foundation, -Inc."]] +[[!meta copyright="Copyright © 2009, 2010, 2011, 2024 Free Software +Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -35,8 +35,9 @@ maintaining drivers ourselves, we can re-use the existing NetBSD drivers. Hurd developers have enabled experimental support for modern hard -drives with a rump kernel. We call it rumpdisk, and you can try it in -the [[Debian GNU/Hurd image|hurd/running/qemu]]. +drives with a rump kernel. We call it +[[rumpdisk|hurd/rump/rumpdisk]], and you can try it in the [[Debian +GNU/Hurd image|hurd/running/qemu]]. As of May 2023, Hurd users are having good success with it in qemu environments and some are using it on real hardware! @@ -45,6 +46,18 @@ We do hope to use rump kernels for usb support, sound support (this was working at some point), and possibly a new TCP/IP stack, but work has not completed on those projects. +# Rump kernels + + * [[rumpdisk|rump/rumpdisk]] HHD/SSD/NVMe device drivers + + * [[rumpfs|rump/rumpfs]] using NetBSDs filesystems (FFS) + + * [[rumpnet|rump/rumpnet]] wifi/ethernet device drivers + + * [[rumpsound|rump/rumpsound]] audio device drivers + + * [[rumpusbdisk|rump/rumpusbdisk]] accessing external SATA devices + # Documentation * <http://www.fixup.fi/misc/usenix-login-2015/login_oct15_02_kantee.pdf> @@ -55,6 +68,10 @@ has not completed on those projects. A tutorial introduction for those interested in using and deploying rump kernels. + * <https://netbsd.org/docs/rump/sptut.html> + + Another tutorial on rump kernel servers and clients. + * <https://core.ac.uk/display/41816390> "User space approach to audio device driving on UNIX-like systems" by Robert Millan Hernandez. diff --git a/hurd/rump/rumpdisk.mdwn b/hurd/rump/rumpdisk.mdwn new file mode 100644 index 00000000..33e37ff7 --- /dev/null +++ b/hurd/rump/rumpdisk.mdwn @@ -0,0 +1,62 @@ +[[!meta copyright="Copyright © 2024 Free Software Foundation, +Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag stable_URL]] + +# RumpDisk + +The Hurd supports modern SATA devices like SSDs with RumpDisk. If you +successfully installed the Hurd in real hardware, via toggling the +"compatibility" mode in your BIOS, then the Hurd is probably using old +Linux drivers to access your hard drive/SSD. Even more problematic, +those drivers are baked into the GNU Mach kernel! With rumpdisk, you +can use SSDs on the Hurd and enjoy a max partition size of [[2 +TiB|faq/2_gib_partition_limit]]! + +If you want to test if the Hurd can boot with your SSD, change any +occurence of `hdN` in `/boot/grub/grub.cfg` to `wdN`, where `N` is a +number, and add the `noide` option on the `multiboot` line, +(which disables the old Linux disk drivers). Also change any occurence +of `hdN` in your `/etc/fstab` to `wdN`. + + /boot/grub/grub.cfg + + # multiboot /boot/gnumach-1.8-486.gz root=part:2:device:hd0 console=com0 + multiboot /boot/gnumach-1.8-486.gz root=part:2:device:wd0 console=com0 noide + + /etc/fstab + + #/dev/hd0s2 / ext2 defaults 0 1 + /dev/wd0s2 / ext2 defaults 0 1 + #/dev/hd0s1 none swap sw 0 0 + /dev/wd0s1 none swap sw 0 0 + #/dev/hd2 /media/cdrom0 iso9660 noauto 0 0 + /dev/wd2 /media/cdrom0 iso9660 noauto 0 0 + +Then reboot your machine. Before Grub appears change "compatibility" +in your BIOS to "AHCI" (not "RAID"). If you successfully boot, +congrats! You are now using rumpdisk! You can permanently add in the +"noide" option to grub: + + /etc/default/grub + + # make sure you add this next line somewhere in the file + GRUB_CMDLINE_GNUMACH="noide" + +Now you can run `update-grub`. That way when you update the kernel, +you can be sure to use rumpdisk. + +rumpdisk is normally already set up on `/dev/rumpdisk`. + + $ showtrans /dev/rumpdisk + /hurd/rumpdisk + +[[!inline pages=open_issues/running_rump_for_slash raw=yes feeds=no]] diff --git a/hurd/rump/rumpfs.mdwn b/hurd/rump/rumpfs.mdwn new file mode 100644 index 00000000..8236defa --- /dev/null +++ b/hurd/rump/rumpfs.mdwn @@ -0,0 +1,31 @@ +[[!meta copyright="Copyright © 2024 Free Software Foundation, +Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag stable_URL]] + +# What is rumpfs? + +`Rumpfs` would let us use the [[NetBSD +filesystems|https://man.netbsd.org/fstab.5]], namely FFS, which is a +journaled filesystem that supports snapshots. This is a significant +improvement over the Hurd's current filesystem: +[[ext2|hurd/translator/ext2fs]], which forces users to deal with +occassional filesystem corruption. With FFS, this would no longer be +an issue, and NetBSD developers would maintain the FFS codebase. + +As of October 2024, rumpfs still needs to be implemented. + +Another option is to create an ext3fs. We have a +[[task|https://savannah.gnu.org/task/?5498]] for this, which mentions +some existing experimental code. + +Another option is to create translators out of +[[libguestfs|hurd/translator/libguestfs]]. diff --git a/hurd/rump/rumpnet.mdwn b/hurd/rump/rumpnet.mdwn new file mode 100644 index 00000000..5ea3ba61 --- /dev/null +++ b/hurd/rump/rumpnet.mdwn @@ -0,0 +1,22 @@ +[[!meta copyright="Copyright © 2024 Free Software Foundation, +Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag stable_URL]] + +# RumpNet + +Hurd developers want to use rumpnet, so that we can use modern +ethernet and wifi device drivers. The Hurd is currently using Linux's +old TCP/IP stack (`pfinet`) and device drivers. We plan to replace +`pfinet` with [[lwip|hurd/translator/lwip]] and use rumpnet's modern +device drivers for ethernet and wifi hardware. Alternatively, we +could use rump's TCP/IP stack. + diff --git a/hurd/rump/rumpsound.mdwn b/hurd/rump/rumpsound.mdwn new file mode 100644 index 00000000..f8f113e6 --- /dev/null +++ b/hurd/rump/rumpsound.mdwn @@ -0,0 +1,25 @@ +[[!meta copyright="Copyright © 2024 Free Software Foundation, +Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag stable_URL]] + +rumpsound lets us use audio devices on the Hurd. There is an +experimental/basic [[hurd rump audio +translator|https://github.com/dm0-/hurd-rump-audio]] that exists. The +translator runs at `/dev/audio`, which is somehow similiar to a +Solaris audio device. Any application that supports pulseaudio, can +play through this device. + +Some Hurd developers, believe that pulseaudio may not be the best +choice for supporting sound on the Hurd. Damien Zammit has several +[[ideas|https://lists.gnu.org/archive/html/bug-hurd/2019-11/msg00086.html]] +how to get proper sound support on the Hurd. The [[audio +page|open_issues/audio]] has more information. diff --git a/hurd/rump/rumpusbdisk.mdwn b/hurd/rump/rumpusbdisk.mdwn new file mode 100644 index 00000000..26e1a101 --- /dev/null +++ b/hurd/rump/rumpusbdisk.mdwn @@ -0,0 +1,26 @@ +[[!meta copyright="Copyright © 2024 Free Software Foundation, +Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag stable_URL]] + +# RumpUSBDisk + +With RumpUSBDisk, the Hurd can use a usb to SATA dongle to access a +SATA device. The StarTech offers a good quality dongle that works +well. The Hurd could then read/write data from a SATA device with an +fatfs or ext2 filesystem. Damien Zammit implemented [[rumpusbdisk +already|https://lists.gnu.org/archive/html/bug-hurd/2023-07/msg00025.html]]. +However, as of October 2024, netdde seems to exhibit a bug when +running `ifdown /dev/eth0` simultaneously to running the rumpusbdisk +translator, due to the two devices sharing the same IRQ. + + + diff --git a/open_issues/running_rump_for_slash.mdwn b/open_issues/running_rump_for_slash.mdwn index 52c97b5d..0740993e 100644 --- a/open_issues/running_rump_for_slash.mdwn +++ b/open_issues/running_rump_for_slash.mdwn @@ -11,6 +11,8 @@ License|/fdl]]."]]"""]] [[!tag open_issue_hurd]] +## Samuel's [[email|https://lists.gnu.org/archive/html/bug-hurd/2019-12/msg00002.html]] + I have been thinking about how to get rump running for the / filesystem. Looking at how things go between ext2fs and exec: in grub.cfg we have @@ -51,3 +53,20 @@ and we'd make `pci-arbiter`'s initialization use `task_set_special_port` to set the `TASK_BOOTSTRAP_PORT` special port of rump to a send right to pci-arbiter and resume it. When `libpciaccess` sees that this port is set, it would use it instead of looking up `/server/bus/pci`. + +## Damien's [[follow up email|https://lists.gnu.org/archive/html/bug-hurd/2020-04/msg00032.html]] + +In my own words, the changes that are needed: + +1. libpciaccess needs to check if pci-arbiter's `task_bootstrap_port` is set +and if it is, use it instead of `/servers/bus/pci` + +2. pci-arbiter needs to call `task_set_special_port` on rump's `TASK_BOOTSTRAP_PORT` +if `--disk-server-task` flag is detected. + +3. rumpdisk needs to call `task_set_special_port` on ext2fs's `TASK_BOOTSTRAP_PORT` +if `--fs-server-task` flag is detected. + +4. ext2fs will just work in this configuration + + |