Gentoo Archives: gentoo-soc

From: "Seaton
To: "gentoo-soc@l.g.o" <gentoo-soc@l.g.o>
Subject: [gentoo-soc] Plan 9 From Gentoo: Weekly Progress Report #11
Date: Mon, 08 Aug 2011 14:55:50
Message-Id: 2F0F7F89A74A7F4AA58220381FD93DDD104E76CE@SN2PRD0202MB141.namprd02.prod.outlook.com
1 Hi, all.
2
3 Plan 9 From Gentoo is a 2011 GSoC project to overlay a Plan 9 inspired userspace on top of a Linux base system.
4
5 Project page: http://soc.dev.gentoo.org/~rps/plan9/
6 LiveCD image: http://soc.dev.gentoo.org/~rps/plan9-download/plan9-from-gentoo-x86-minimal.iso
7
8 This week I worked on Plan 9 From Gentoo's project page and I also worked on 'nine', a compatibility layer for running Plan 9 binaries on top of Linux.
9
10 The first half of the week I spent on polishing and fleshing out the project page. I incorporated feedback from several Gentoo'ers on IRC, including dberkholz. I added a detailed introduction message with more of a hook to get people interested, changed the layout of the screenshots to more of a gallery-style, and added captions to each screenshot. The changes are live, so you can see them by visiting the project page: http://soc.dev.gentoo.org/~rps/plan9/. I'm pretty happy with the state of the project page. There are one or two things that I would like to change, but altogether it is in a fairly finished state.
11
12 The rest of the week I spent studying the wine source code and hacking on nine, my project to allow Plan 9 binaries to run on top of a Linux kernel. This is an effort to port the functionality of Glendix into a userspace binary. This week I wrote the code to verify that a binary passed to nine is supported and began working on the code to load a Plan 9 binary into memory and begin executing it. I have never worked on a project like this before so progress is a little slow as I'm learning a lot about how ELF binaries are laid out in memory and such as I go. You can check out the code at https://github.com/robertseaton/nine. I also wrote a script which registers the binary with Linux's alternate binfmt support. This means that instead of typing 'nine cat' to run Plan 9's cat, you can just run cat directly and the kernel will automatically know to invoke nine to run the binary. It's pretty cool.
13
14 For the upcoming week, I plan on finishing the code that loads a Plan 9 binary into memory and begins executing it. The next step after that is to write a handler to take over when Plan 9 tries to execute a Plan 9 specific syscall, which would obviously not be implemented by Linux. By the end of the week, I would like to have the handler implemented and working along with at least one of Plan 9's syscalls. After I have implemented one syscall, it should be relatively easy to port the remaining 9 syscalls from Glendix. Once that is completed, I will begin working on porting more of Plan 9's 51 syscalls to nine. That work should probably last until the end of GSoC.
15
16 Also, during the week, I would like to generate a new Plan 9 From Gentoo image to see if that fixes some of the networking issues that the current liveCD image has. This really depends on the state of the Portage tree when I try to build the image. If I do manage to generate a new liveCD image, I will upload it along with some screenshots featuring the working networking to the project page.