Posted & filed under English.

Last summer I started to spend my time studying the Hurd more seriously. I wanted to do it long time ago, but I was working then and didn't have the time. Finally, by the end of August and after leaving my job, I was able to spend a couple of weeks studying the Hurd before beginning of the university term. Mainly, all I did was read more and more documentation, write some schematic summaries about everything I was learning and make some exercises that can be found in the project's wiki. I read many wiki pages, and not so many exercises as I only found three of them. This one is an example.

I have to say that in the beginning I had some problems understanding some concepts. For instance, the concepts of port, port right and port name have some subtle differences and the documentation often use the three terms to talk about the port name from the programmer's point of view. This document helped me a bit. I was a little confused by the threads library as well. In the last versions of the hurd, Glibc provides the pthreads library everybody knows, but in some manuals and many pages of the wiki you can still find references to the old GNU Mach's cthreads library.

During the semester, I spent a couple of hours per week reading more documentation. For instance, I learnt the basics to write a translator: libports, libtrivfs and MIG. The Hello translator is a good example. I this time I've learnt that the best source of information are the logs of the #hurd channel at freenode: everything has been asked before there. Wget may be used to download the logs in order to grep them locally:

wget --mirror --no-parent -A "hurd-*" -e robots=off http://richtlijn.be/~larstiq/hurd/

In February, we the students of the UOC have about three free weeks before the beginning of the next term. It was in this time when I was looking for ideas and finally decided to try with this one. The first step was to choose a stack to port. Reading the logs of the #hurd channel, I found that some Hurd developers talked about it, and particularly debated between porting LwIP and the NetBSD's stack. I first tried with the NetBSD's stack but soon desisted since I failed to find the right documentation and realized it was maybe too much for someone without previous experience in OS programming. However, I found LwIP much easier since the beginning. It has a very suitable wiki for beginners, though it doesn't go much further. Besides, it also has its Doxygen documentation online, and that's priceless.

The last weeks of February I started working on the prototype, with the purpose of having something to show before March 20th, the start of the GSoC call for proposals term. The first step to be made in a big and difficult project is to find a way to start. In my case the best reference was pfinet, the server that is currently offering the TCP/IP service in the Hurd based in an old version of the Linux's stack. I decided to download pfinet's code and wonder what should I change to make it work with LwIP. I removed all the code related with the Linux's stack, added LwIP's one and started to modify the implementation of the sockets and I/O operations to adapt them to LwIP.

At the end of the day, this project is more about reading documentation than about programming. I've read much more code than I wrote so far, and imagine I'll continue to do so for the rest of the summer.