diff options
-rw-r--r-- | Hurd/HurdOnL4.mdwn | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/Hurd/HurdOnL4.mdwn b/Hurd/HurdOnL4.mdwn new file mode 100644 index 00000000..27823239 --- /dev/null +++ b/Hurd/HurdOnL4.mdwn @@ -0,0 +1,145 @@ +# <a name="GNU_Hurd_on_L4_wiki"> </a> GNU/Hurd on L4 wiki + +## <a name="Introduction"> Introduction </a> + +This page is a place for information pertaining to the efforts towards realizing the migration and porting of the [[Hurd/WebHome]] such that it uses the [L4 Microkernel](http://l4ka.org/). The GNU/Hurd Operating System, sometimes just referred to as the _GNU Operating System_ is a rich and robust collection of programs and utilities which enable you to use your computer to do usefull and or entertaining things. The intent is that most any applicable software package available on the [GNU Website](http://www.gnu.org) (and many others also) will be able to be compiled and run under the resultant operating system. + +At this point (07/20/2004) this is not yet possible. Indeed, the preliminary foundations are still being developed. Nevertheless, this is a volunteer created operating system so those with the knowledge, interest, and spare time are encouraged to study and if possible contribute to the project. + +## <a name="Components_of_the_System"> Components of the System </a> + +### <a name="The_L4_Microkernel"> The L4 Microkernel </a> + +The kernel of an operating system is a fundamental program which provides essential resources from the hardware of the computer to other programs. A kernel typically runs all the time and remains resident in main memory. The amount of functionality and resources which it provides vary tremendously. The [L4 Microkernel](http://l4ka.org/) is an attempt to create a very small high performace core which provides basic memory management, task and context switching, and little else. + +### <a name="The_Hurd"> The Hurd </a> + +The [Hurd](http://www.gnu.org/software/hurd/hurd.html) is a conglomeration of servers and programs which add additional functionality to a microkernel such that it is capable of utilizing additional hardware resources of the computer. It also provides a compatibility layer such that compiling higher level programs is essentially transparent; i.e. when you write a C program and compile it, you need only include standard headers and libraries and for all intents and purposes your generic program will build and run and you need never resort to unportable coding or access to hardware specific methods. + +For a typical user, The Hurd is intended to silently work in the background providing the services and infrastructure which are lacking in the microkernel but are required for higher level programs and libraries to operate. + +### <a name="GNU_Programs"> </a> GNU Programs + +For the user, this is what is desired: to run [GNU Software](http://www.gnu.org/). These programs provide a full featured, robust, and extremely effective operating system. A L4/Hurd system should be capable of compiling and executing most any software package available from GNU with little or no modification. + +Some readers may be familiar with GNU/Linux systems. When GNU/L4 is complete it should highly resemble the functionality of such systems as L4 and Hurd effectively replace the Linux kernel. The bulk of the software should be expected to run much as it does presently under the Linux kernel (or gnumach based GNU/Hurd systems). + +## <a name="Preparations"> Preparations </a> + +### <a name="Build_System"> Build System </a> + +There are no precompiled binaries for Hurd on L4 that I am aware of, so you will need to be able to compile the source code packages in order to experiment with it. While L4Ka will likely build on a variety of compilers and systems, the Hurd may prove troublesome unless it is built using recent GNU compilers and tools. + +I recently used [Debian Unstable](http://www.debian.org) (Sarge) with GNU gcc version 3.3, autoconf version 2.50, and automake version 1.8 to build the system with good results, although there is no reason why some other similarly equipped system with a good development suite, such as [Gentoo](http://www.gentoo.org) or [Slackware](http://www.slackware.com) shouldn't work just as well. + +Generally, I would recommend building the packages using any very up-to-date GNU development system. I'm not going to say that you can't compile them using more exotic platforms, but I wouldn't be overly hopefull about it. I have no idea if Pistachio can be compiled under current gnuMach/Hurd systems it might be interesting to try it. + +### <a name="Making_a_Home_for_L4_Hurd"> Making a Home for L4/Hurd </a> + +Obviously you want to have a home for this little embryonic operating system. Currently, mine is using about 5M for the binaries and headers. If you want the source to reside with the binaries, then allow perhaps another 50M or so, but this is purely optional. + +At the moment, Hurd on L4 can't even see your hard drive, so all you need is a directory on some partition which is visible to the GRUB bootloader. A /l4hurd directory on your existing GNU/Linux system is probably fine for now. + +Howevever, if you have lots of spare disk space and some unpartitioned space you could also make a classic 1G Hurd-style partition and mount that on /l4hurd (which is what I did). This will give your system some room to grow and this will eventually most likely be required. Assuming that you have made some partition **X** with linux _fdisk_, set it to type 83 - Linux and use the following command to initialize it with the proper Hurd extensions: + + + +I would recommend a partition of any size from maybe 100M up to 1G,if you're going to take this route. Keep in mind that this is totally unnecessary and a regular old direcory on your existing Linux (or Hurd) filesystem will serve just as well for now, especially if drive space is tight. + +### <a name="Boot_Loader"> Boot Loader </a> + +Just like regular GNU/Hurd, you need to use [GNU GRUB](http://www.gnu.org/software/grub/), the _GRand Unified Bootloader_ in order to boot the system. Hopefully you already have it installed, in which case adding the commands for L4/Hurd to your `menu.lst` is quite trivial. + +If you don't have GRUB installed, then you should probably take some time to get it set up. A good place to look for help is on the regular [Debian GNU/Hurd Installation Page](http://www.debian.org/ports/hurd/hurd-install) at the **3\. The Boot Loader** section. + +--todo: add a page with good instructions for installing GRUB + +## <a name="Building_Hurd_on_L4"> Building Hurd on L4 </a> + +### <a name="L4Ka_Pistachio"> L4Ka Pistachio </a> + +#### <a name="Getting_the_Sources"> Getting the Sources </a> + +I used the latest version of L4Ka, Pistachio version 0.4. It can be obtained from the following website: + +[L4Ka Pistachio Home](http://l4ka.org/projects/pistachio/) + +#### <a name="Compiling"> Compiling </a> + +Pistachio is designed to be compiled in a build directory which is independant from the source directory, so you need to create your build directory after unpacking the tarball. Furthermore, you need to pass a couple of special parameters to the configure program to set it up for use with Hurd. Here is what I did on my ia32 system: + +Note: I have my installation set up in `/l4hurd` and I am starting from within the Pistachio source top-level directory. + + $ mkdir build + $ cd build + $ ../user/configure --with-s0-linkbase=0x40000 --prefix=/l4hurd + $ make + $ make install + $ mkdir /l4hurd/boot + $ cp kernel/ia32-kernel /l4hurd/boot + +Hopefully everything worked and there were no problems. As usual, if the build fails then scrutinize the output from `configure` and install any missing libraries or development packages. + +### <a name="CVS_l4hurd"> </a> CVS l4hurd + +#### <a name="Getting_the_sources"> Getting the sources </a> + + You need to pull the L4 Hurd sources from the CVS tree on Savannah. The main page is [GNU/Hurd on L4 - Summary](http://savannah.nongnu.org/projects/l4hurd/) and the CVS access page is [GNU/Hurd on L4 - CVS](http://savannah.nongnu.org/cvs/?group=l4hurd). In a nutshell, the following commands should retrieve the sources for you: + + $ export CVS_RSH="ssh" + $ cvs -z3 -d:ext:anoncvs@savannah.nongnu.org:/cvsroot/l4hurd co l4hurd + +#### <a name="Compiling"> Compiling </a> + +Take a look at the README, compiling should be quite simple on any state of the art GNU development system. As per the README, and for my example, you would: + + $ autoreconf -f -i -s + $ ./configure --enable-maintainer-mode --prefix=/l4hurd + $ make + $ make install + $ mkdir /l4hurd/boot + $ cp laden/laden /l4hurd/boot + $ cp wortel/wortel /l4hurd/boot + $ cp physmem/physmem /l4hurd/boot + +In my case it was slightly more complicated as Debian uses a wrapper system to enable the use of multiple versions of the GNU Autotools. In this case, the trick is to utilize some environment variables on the command line as follows: + + $ ACLOCAL=aclocal-1.8 AUTOMAKE=automake-1.8 autoreconf -f -i -s + +As above, hopefully this will compile cleanly; otherwise, scroll up, read any error messages, and correct them by installing required packages of the proper version. Any bad compilation problems are most likely due to you either missing or using a wrong version of something. + +## <a name="Installing"> Installing </a> + +The binaries are now installed into `/l4hurd`. All that remains is to add an entry into GRUB's `menu.lst` in order to test it out. Here's an example from my system where I have `/l4hurd` on `/dev/hda9` in my Linux system: + + title GNU Hurd on L4Ka Pistachio 0.4 + root (hd0,8) + kernel /boot/laden -D + module /boot/ia32-kernel + module /libexec/l4/sigma0 + module /boot/wortel -D + module /boot/physmem + +## <a name="Booting"> Booting </a> + +For me at least, I got some nifty messages and then it dropped into a simple debugging mode. As far as I know, thats all there is right now. + +Read, build, learn, code... + +--todo: add more here. + +## <a name="Experimenting"> Experimenting </a> + +Well, thats why you did all of this, certainly not to do anything else. Use that debugger and get experimenting. + +--todo: things to do wth the debugger + +## <a name="Conclusion"> Conclusion </a> + +If you followed these steps, you most likely have built and booted the latest version of Hurd on L4. I would encourage you to subscribe to the mailing list at the following URL and help in the efforts to get this nifty system up to speed: + +[l4-hurd mailing list](http://lists.gnu.org/mailman/listinfo/l4-hurd) + +And finally, this is a wiki, meaning that **you** have the ability to edit and modify this page. If you want to fix something, add more information, new sub-pages, whatever, feel free to do so. This is a great way to get a doc base up fast and keep it current, so use it like its supposed to be and have fun with Hurd on L4! + +-- [[Main/BDouglasHilton]] - 20 Jun 2004 |