iPXE hackathon in Tønsberg, Norway

So, a while ago I decided that I wanted to invite the core developers of the iPXE project to my home for an extended weekend of hacking on the project. The agenda was to try and merge as many outstanding patches and pull requests that we knew about. The work the various students did as part of GSoC 2012 was on the priority list. The three people that were able to come were Michael Brown, Thomas Miletich and Marin Hannache.

TL;DR: Skip down to the summary at the bottom.

Thursday 11th of July

After a busy day cleaning the house and making things ready for the arrival of the guests I headed down to Sandefjord airport (TRF) to pick up Michael. His plane was scheduled to arrive around midnight. He had brought a test machine padded in a large suitcase which packed the car quite full. Luckily Marin and Thomas missed the planned train from Oslo airport, so they arrived an hour later, which was just enough time to get Michael settled in before I had to pick them up. After everyone had arrived we ensured the sleeping arrangements were appropriate and test equipment was unpacked and set up. We finished up the evening around 3AM with strawberries with cream and sugar accompanied by white wine (brought by Marin). Finally people crashed and burned after a long day.

Friday 12th of July

Since the day before was quite late, people slept in a bit and woke up a little bit before noon. I had solicited food preferences in advance, which was received favorably when we had breakfast out on the patio in the sun/shade.

After the breakfast Thomas started working on the code review of the VIA Velocity Gigabit driver written from scratch by Adrian Jamróz as part of GSoC 2012. I guess we should've merged this code a long time ago, but better late than never.

Michael continued working on his code to allow iPXE scripts to pull out information from PCI configuration space. This is useful for e.g. including the PCI vendor/device IDs in embedded menus or sending it off to a server-side script somewhere, either for inventory purposes or dynamic driver loading. The code was merged and pushed out later the same day. Documentation on how to use it is expected to show up at https://ipxe.org/settings/pci eventually.

Marin worked hard on cleaning up his NFS protocol support code. There were some bugs around that caused the downloaded image name to be NULL, and the URL format was a bit odd. After some discussion we decided on a new URL format and a way to derive the required mount point. Marin worked actively on that piece for the rest of the day.

I was performing initial testing on the new Broadcom NetXtreme II driver written by Daniel Wyatt as part of GSoC 2012. Preliminary testing indicated there was something strange with the loopback test between this card and the Intel 82541pi used as a reference. Except for performance, most of the driver seemed to be working more or less as it should, but the loopback failure required more hardcore debugging. I decided to let it rest until Michael could help me out.

Hacking on iPXE

Some time during the day we all went to the supermarket and bought various food we were planning on eating during the weekend. That avoided the trouble of trying to translate all of the names of things from Norwegian to English.

Later in the evening I organized a traditional Norwegian barbecue with potato salad, fresh watermelon summer salad and burgers, hot dogs and some tender beef. The guys seemed to like it. After the dinner we ate marzipan cake, which is something Michael decided to buy at the supermarket. Michael also made a traditional English drink called Pimm's with lemonade to top it off. It tasted quite good, all of it, in my opinion.

After a break which included a few episodes of Futurama some more hacking got done, until we eventually succumbed to sleep deprivation.

Saturday 13th of July

Even before breakfast was served, Marin was hard at work with the changes on his NFS project. I helped him test it out and eventually he was able to finish it up and hand it over to Michael for final code review and merging.

Also before breakfast Michael rewrote the support for netX by implementing symlink support between settings blocks. The netX settings block now shows up first in the list of network adapters, and it directly points to the last opened network device. This now enables a clean way of abstracting out the netX feature to be used in e.g. autoboot and other places you can specify a network device. It also fixes a bug with ${mac}, ${chip} and ${busid} not representing the currently opened device if you have more than one network device, but always the first network device.

Thomas was still working hard on the VIA Velocity driver. It seemed like never-ending work.

Breakfast we enjoyed outside this day as well. I had bought cold burgers, heated in the microwave, and put them on the table together with the other normal things. Since the first meal of the day was quite late (2PM), everyone ate like the hungry wolves they were. :)

After looking through some iPXE configuration menu I suggested to Marin that he should add support for Home/End/PgUp/PgDown to the config TUI. It didn't take him much time to shake that out of his right arm. It's currently waiting for merging. After he did that he started looking into a shutdown command someone had mentioned they wanted. He spent some time trying to figure out how APM works, and sometime in the middle of the day Shao Miller showed up on IRC and helped him out, and he was able to complete a patch for that feature. It is currently lingering in the merge queue.

Michael started reviewing the VIA Rhine driver, first cleaning it up and then hitting several obstacles with the loopback test not giving him what he expected. He continued figuratively banging his head against the wall for the rest of the day.

Sometimes it is good to take a break when you just can't find any good answers. He started making a typical Asian dish called watercress & chicken stir-fry with rice for dinner (we couldn't find watercress in the store, but he substituted with some other appropriate vegetables). Once he was done with that we sat down and enjoyed a good meal at a late hour (almost 10PM).

I had mentioned earlier in the day that Matthew Helton wanted a way to make the iPXE version string available to scripts. Michael encouraged me to try to write the support myself, considering it was just a few lines of code in core/settings.c. While Michael was busy making dinner I had a look at it, and with some insight from Marin and Thomas I was able to push out my second commit in the C parts of the iPXE codebase. I felt so proud of myself, even though it was mostly copy and paste and two lines of changed code.

After a long day of extensive hacking and a good meal, we sat down with some ice cream for dessert. While we were eating we fired up the old MAME emulator and had some fun playing games like Street Fighter II, Mortal Kombat and Bubble Bobble with an authentic arcade joystick from X-Arcade. Michael even tried it!

Although most of us was ready for bed Michael and Thomas ended up back at the computers hacking on the troublesome VIA drivers while Marin and myself continued beating each other to a pulp in Mortal Kombat. Michael found a page with the special moves earlier which made it so much more funny.

At 3AM the last of us figured it was getting way too late and decided to just stop what we were doing and try again the next day with fresh eyes.

Sunday 14th of July

I had mentioned to the guys earlier that I was planning on making eggs and bacon for breakfast one morning, and this was indeed the day for that. Everything went well and my favorite brunch was served the way it was supposed to. We ate it indoors because the wind was a bit chilly. It seemed to go down very well after a long evening hacking the night before.

After the breakfast we went on a tour around the center of Tønsberg. We started at Slottsfjell museum where we saw the viking ship and the large whale skeletons. Both things impressed the guys. After that we walked up to Tallak and had a look around the old buildings there. The place was very busy, because a lot of construction workers were preparing for the Slottsfjell festival that is happening the next weekend. After that we walked up to the tower and had a look out over the city. For the first time in years I could see the changes in the city from an aerial view. The next stop on our route was the pier, which was reasonably active with people. We stopped at Parad-is for some long-awaited ice-cream and a walking break. Finally we walked back up to where the car was parked by the museum. All along the route me and Marin were busy hacking Ingress portals.

Overlooking Tønsberg
Cannons are fun
Hand-built viking ship

Once we came back Michael continued working on his VIA Rhine reviewing, in which he had an epiphany and found out there was an interrupt bug in the Intel driver which caused packets to be lost for some reason. Once that was taken care of he was able to finally push the new rhine driver.

Thomas continued working on the VIA Velocity driver, getting more and more annoyed at the poor quality of the data sheet and the odd behavior of the test hardware.

Marin said he wanted to make potatoes baked in cream for dinner one of the days, so he started preparing that after we got back, and after a good amount of time in the stove the dinner was ready. Together with some left-over watermelon salad, some sausages, burgers, grilled chicken and other goodies it was time for a feast. And boy was it true!

After the dinner everyone was feeling a bit sleepy after a long day with more than just hacking, so we sat back and watched an episode of Futurama and MacGyver, during which some of us fell asleep for shorter bits of time. It's really nice to see that people enjoy themselves and feel like they're at home. While we were cleaning the plates off the table Marin was eating out of the almost empty pot of left-over potatoes. I guess he's just as much a sucker for food as I am.

The guys went back to hacking the code, while I decided to go to bed a bit earlier than the other days.

Monday 15th of July

When I woke up I got some good news from Thomas. It seems the machine he had been using for testing the VIA Velocity driver had some hardware issues. Once he moved to another machine, all the tests passed and he was very happy with the outcome. The driver could finally be merged.

Once everyone was up and around we had breakfast out in the sun again. The weather had improved a bit from the day before.

After the breakfast Michael was busy merging all of the other outstanding patches mentioned earlier before he started in the NFS feature from Marin. After several back-and-forth bug fixes by Marin the patch was finally in a mergeable state and we could all rejoice over a job well done.

While the others were busy doing code reviewing, I tried to figure out why my dual-NIC test machine didn't want to exit properly back to my embedded menu from my main menu script. After a lot of testing we found out that autoboot had an issue with its getopt implementation which caused it to go in a loop if you specified a network adapter, but worked fine if you didn't specify an adapter list.

We had already decided on going out to eat dinner one of the days, so this was definitely the day to do that. We went to the restaurant in the city which is supposed to have the best kitchen, La Barca. Most of us ordered reindeer, and the dish was outstanding, as usual.

Well deserved dinner

After we got back from the city Marin and Michael worked more on getting the file license Makefile target to work properly. They actually got it working, but it also revealed a lot of manual work that needs to be done (basically going through each source file, figuring out which license it is under and then tagging it with a single line of code - if you want to help out with this, please get it touch).

Thomas was at this point getting tired of the review work on the bnx2 driver, so he decided to start looking at a driver for the IC+ 1000 Gigabit Ethernet adapter he's had around for a while.

At 1AM we started getting hungry, so we pulled out the rest of the strawberries and enjoyed (most likely) the last desert of the hackathon.

While eating people got grandiose ideas about implementing Pong using iPXE scripting. It was pretty obvious the sleep deprivation was starting to get to us.

Tuesday 16th of July

The day had finally arrived when everyone had to pack up and get back home. People woke up quite late, which meant we had to eat breakfast in a hurry to avoid Thomas and Marin missing their train to the airport.

While I drove Thomas and Marin to the train, Michael was still hacking around on a new increment command for the iPXE scripting language. It is going to be a neat feature that should enable us to easily loop through e.g. network adapters in embedded menus and probe hardware or other information using the pci or smbios settings blocks.

When I got back we sat down and chatted a bit, watched a couple of episodes (introduced Michael to The Big Bang Theory) and I suggested to him to get in touch with Randal Schwartz to appear on FLOSS Weekly. This could give us a decent PR boost and get the word out a bit more, and hopefully grow our community.

Later I dropped Michael off at the airport and hacked some more Ingress portals on my way home.


Overall these new features and drivers where published to mainline during the hackathon:

  • New hexraw variable format. Useful for using MAC addresses without separators.
  • A network interface's PCI location can be used from scripts.
  • PCI vendor/device IDs (and more) can be used from scripts.
  • netX is now a symlink settings block to most recently opened interface.
  • Version string available to scripts.
  • New VIA Rhine 100Mbit driver.
  • Backslash (like bash) continuation to break long script lines.
  • New VIA Velocity Gigabit driver.
  • Home/End/PgUp/PgDown keys now work in config.
  • APM computer shutdown command, poweroff.
  • Downloading of files using NFS protocol.
  • Building the license targets now work (although we miss license info for lots of files).
  • Several minor bug fixes that have been reported and some we discovered during the weekend.

These are the items on the agenda we weren't able to complete because of lack of time:

  • Merge the bnx2 driver.
  • Make ipxe.kpxe work (aka UNDI fallback).
  • Make iPXE as an EFI application work.
  • New Intel wireless driver.

All in all it was a great event, and I'm happy that everyone enjoyed it as much as I did hosting it. I'm quite up for doing it again some time in the future, it was a blast! You can find some photos from the event on my Flickr set for the hackathon.

If you want to participate in the iPXE community, join us on IRC, the mailing-list or the forum. If you're a beginner to network booting, you might also find the website https://networkboot.org/ useful.

If you want to get in touch with me there are links at the top of my blog with links to Twitter, Facebook and Google+. Talk to you later!