Microkernel based OS(GNU Hurd) Edit

Reference Edit

Aim Edit

Make GNU Mach use more up to date device drivers

Abstract Edit

The GNU Hurd running on top of GNU/Mach is a free Operating System ('free' as in 'freedom'). The Hurd is a collection of "servers" that run over the Mach micro-kernel to implement file systems, network protocols, file access control, and other features that are implemented by the Unix/Linux kernel. It has not been released yet, but it is on a growth trajectory - being constantly developed and improved based on a stable snapshot. It only supports i386 architecture and a set of small-range hardware components. This is due to the way the device driver framework is designed. The device drivers used are those of the Linux Kernel (versions 1.3 to 2.2) being emulated by means of a framework designed in 1996 (and a lot alike ndiswrapper). Glue code has been added in GNU/Mach to support various features needed by the Linux Kernel and it's drivers.

Possibilities are a) updating the current glue code to a newer Linux version, which will probably lead to rewriting most of it [or] b) just going ahead and write new glue code, be it again for Linux or FreeBSD. BSD kernels are more or less known to have more or less stable kernel interfaces, at least far more stable than in Linux. Free BSD drivers are a bit closer to Mach ones and a new framework to drivers on Mach would be a good idea. It would be closer to FreeBSD device driver framework, so, we could port FreeBSD drivers to GNU Mach. Finally, the code has to be fully documented, so as to render the task of maintaining as easy as possible.

Background: Edit

   * GNU Hurd runs on GNU/Mach micro kernel
       o GNU/Mach architecture
       o Userspace servers
       o Device Drivers
   * GNU Hurd is based on a mix of Linux device drivers varying from versions 1.3 and 2.0
   * Mach needs to be updated so as to support common hardware found nowadays

Benefits: Edit

   * GNU/Mach will support modern hardware
   * Will make GNU/Hurd's utilization wider

Deliverables: Edit

   * GNU/Mach glue code/updated drivers
   * Documentation will include:
       o steps through the entire process
       o glue code explication

Plan: Edit

   * Linux Device Driver Emulation in Mach
   * Communication via IRC / Savannah task discussion / bug-hurd, help-hurd mailing list
   * Code will be committed to Savannah or other testbed
       o Study / communication
           Reread parts I've read and understood thoroughly. Comb the glue code that already exists. Revise and understand parts of the Linux Kernel Device Drivers. Note down things that should and should not be integrated for the emulation code.
       o Block device drivers (basic integration, debugging, make sure things work as needed)
   Split block device support into Linux kernel specific and device driver handling. Try to isolate Linux specific parts and study if they can be integrated in GNU/Mach. Emulate the interface that can trick Linux block device drivers so as to supersede such parts. Debug.
       o Try to make block device driver integration robust
   Extend basic block device support to existing device drivers in GNU/Mach. Run numerous tests on both block device drivers to check for incompatibilities.
   I first came across the GNU Hurd in a discussion organised in Bangalore, around a year ago, to promote the development of it. I thus joined the related mailing lists and started reading up on various related research material. I am keen to pursue and further the development of the GNU Hurd.

Help on porting the network drivers Edit

4th October, 2007BR

(08:03:11 IST) ##hurd  : The GNU Hurd: Join us now, and you shall be assimilated! | Off-topic discussions: anything about the Hurd | BR (09:45:09 IST) ams: First you need to understand the interface for a random network driver.BR (09:46:15 IST) ams: So one way is to take a random driver in linux, and rip it apart and see what makes it tick....BR (09:47:02 IST) vincentvikram: ams: can you define:random BR (09:47:24 IST) ams: Pick a network driver, at random, and see what it uses for API.BR (09:47:34 IST) ams: Like, take eepro100 or something...BR (09:48:20 IST) ams: And then see what it uses.BR (09:48:31 IST) ams: I.e. what is boiler plate code and what is not.BR (09:48:35 IST) ams: Then port those interfaces.BR (09:48:39 IST) ams: Then half the job is done.BR (09:48:48 IST) ams: The interfaces don't need to do anything at first infact.BR (09:49:16 IST) ams: Then you need to port the IRQ and other kernel specific bits that depend on the driver, maybe some schedule grit as well.BR (09:50:25 IST) ams: Getting the driver compiling in mach is step one really.BR (09:50:29 IST) ams: Then you need to get it working =)BR (09:50:47 IST) ams: (compiling as is, without modifications)BR (09:52:31 IST) ams: Ofcorse, this is probobly 50% of porting a driver...BR (09:52:40 IST) ams: Or not even that...BR (09:54:04 IST) ams: After that, you need to get it acutally working.BR (09:54:35 IST) ams: Oh, and use #ifdef's when trying to get it to compile...BR (09:54:49 IST) ams: Then you can ignore parts of the code, and concentrate on smaller parts.BR

Prerequisites Edit

    • C programming, data structures and algorithms
    • Operating system concepts
    • GCC, GDB, Autotools and friends
    • CVS, Subversion, etc...
    • Mach3, mig, glibc
    • Bug reports.

References: Edit

   1. Why GNU Hurd?

   2. Andrew S. Tanenbaum, Jorrit N. Herder, and Herbert Bos, Vrije Universiteit, Amsterdam

Can We Make Operating Systems Reliable and Secure?

   3. Debate between Linus Torvalds and Andrew Tanenbaum on Microkernel vs. Monolithic kernel

   4. Tanenbaum-Torvalds debate Part-II

   5. Jonathan Shapiro, Ph.D., (Managing Director, The EROS Group) on Microkernel

   6. The Hurd and Linux

   7. The Hurd - Development and information links

Related material: Edit

   1. Main source of information

   2. Interview with a lead developer:

   3. Hurd reference manual

   4. For other tasks related to Hurd:

   5. If you want to preview the system I got a GNU Hurd live cd. Contact me.

GNU/Hurd Users Group Edit

  1. []
  1. [Indian Hurd Users Group]

IRC Edit

Feel free to join us on IRC:(General channels)-> #hurd ##hurd #debian-hurd (India specific channels) ->

Time frame Edit

   This was initially proposed as a Google Summer of Code project. I think that a period of 6 months is a reasonable required time frame.

People Edit

   Vikram Vincent <> <>

Is this project relevant? Edit

   Check out the Hurd Live CD first. While it is of an older release it still has a lot to offer. Right now, cutting edge research is being used to design/redesign various aspects of the GNU Hurd keeping the base requirements of Reliability and Security as primary.

Bug Reports Edit

  1. 304577 coreutils' su no longer works
  1. 304777 shutdown does not work

Progress Edit

Project approved by NRCFOSS in mid-June, 2007

As of September 10th, 2007: Currently studying linux device drivers, linux, the kernel, internals and gnumach-1-branch. Have updated on the points mentioned in the prerequisites. Have submitted the above bug reports.

As of September 19th, 2007: (I should mention that this was a part of my first steps around 2 months ago)I had gone through the FreeBSD driver code and found that they are not properly documented. Thus, while the code is compatible with the GNU Mach-it is not feasible to port it. I am sticking with the Linux kernel device drivers.

Currently, I am studying: 1. The GNU Mach Reference Manual, 2. Mach 3 Kernel Principles.

As of September 20th, 2007: Complete /i386/linux/ and linux/ directories and some bits like calling interrupt handlers, memory management, etc... are the main files need to be altered in the 'gnumach-1-branch'(Tschwinge-In a mail on the subject).

As of September 24th, 2007: Experimenting with char devices which I now have a bit of familiarity.

As of September 25th, 2007: Have removed out all the old linux device drivers, emulation code, etc.. and ensured that gnumach still builds.

As of September 27th, 2007: Just discovered the power of Anjuta(Integrated Development Environment)(It was lying around but I just tried it out for gnumach).

As of October 8th, 2007: Was added as a member of the Hurd project. and also assigned to

As of October 10th, 2007: Set up 'Global' to cross-reference the Hurd source code. Will try to get it hosted for public use as well. Trying out lxr.

As of October 12th, 2007: Generating documentation for the Hurd, GNU Mach and Mig using Doxygen.

As of October 22nd, 2007: Studying the "The Open Group Base Specifications"

As of October 31st, 2007: Bug triaging ->

November 13th, 2007: Integrating into the main wiki at Content includes material for beginners...

November 23rd, 2007: End of my official work at NRCFOSS and beginning of the continuation of my work on the Hurd.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.